Browse Source

Rebranding

master
Blagovest Petrov 2 years ago
parent
commit
b2348f75ab
  1. BIN
      assets/icon.ico
  2. BIN
      assets/icon.png
  3. BIN
      assets/icons/1024x1024.png
  4. BIN
      assets/icons/128x128.png
  5. BIN
      assets/icons/16x16.png
  6. BIN
      assets/icons/24x24.png
  7. BIN
      assets/icons/256x256.png
  8. BIN
      assets/icons/32x32.png
  9. BIN
      assets/icons/48x48.png
  10. BIN
      assets/icons/512x512.png
  11. BIN
      assets/icons/64x64.png
  12. BIN
      assets/icons/96x96.png
  13. 11
      package.json
  14. 2
      src/components/layout/Titlebar.tsx
  15. 105
      src/components/settings/Login.tsx
  16. BIN
      src/img/placeholder.png
  17. 2
      src/index.html
  18. 9
      src/main.prod.js.LICENSE.txt
  19. 6
      src/package.json

BIN
assets/icon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 118 KiB

BIN
assets/icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 90 KiB

BIN
assets/icons/1024x1024.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 672 KiB

BIN
assets/icons/128x128.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 32 KiB

BIN
assets/icons/16x16.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 884 B

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
assets/icons/24x24.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
assets/icons/256x256.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 90 KiB

BIN
assets/icons/32x32.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
assets/icons/48x48.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
assets/icons/512x512.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 244 KiB

BIN
assets/icons/64x64.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/icons/96x96.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 21 KiB

11
package.json

@ -1,7 +1,7 @@
{
"name": "sonixd",
"productName": "Sonixd",
"description": "A full-featured Subsonic/Jellyfin compatible desktop client",
"name": "tunio",
"productName": "Tunio",
"description": "Desktop player for Tunio",
"scripts": {
"build": "concurrently \"yarn build:main\" \"yarn build:renderer\"",
"build:main": "cross-env NODE_ENV=production webpack --config ./.erb/configs/webpack.config.main.prod.babel.js",
@ -9,6 +9,7 @@
"rebuild": "electron-rebuild --parallel --types prod,dev,optional --module-dir src",
"lint": "cross-env NODE_ENV=development eslint . --cache --ext .js,.jsx,.ts,.tsx",
"package": "yarn build && electron-builder build --publish never",
"package-win": "yarn build && electron-builder build --publish never --win",
"postinstall": "node -r @babel/register .erb/scripts/CheckNativeDep.js && electron-builder install-app-deps && yarn cross-env NODE_ENV=development webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.babel.js && opencollective-postinstall && yarn-deduplicate yarn.lock",
"start": "node -r @babel/register ./.erb/scripts/CheckPortInUse.js && yarn start:renderer",
"start:main": "cross-env NODE_ENV=development electron -r ./.erb/scripts/BabelRegister ./src/main.dev.js",
@ -31,8 +32,8 @@
]
},
"build": {
"productName": "Sonixd",
"appId": "org.erb.sonixd",
"productName": "Tunio",
"appId": "org.bok.tunio",
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
"files": [
"dist/",

2
src/components/layout/Titlebar.tsx

@ -33,7 +33,7 @@ const Titlebar = ({ font }: any) => {
? `(${playQueue.currentIndex + 1} / ${playQueue[currentEntryList].length}) ~ ${
playQueue[currentEntryList][playQueue.currentIndex]?.title
} ~ ${playQueue[currentEntryList][playQueue.currentIndex]?.artist[0]?.title} `
: 'Sonixd';
: 'Туньо';
setTitle(`${playStatus} ${songTitle}`.trim());
document.title = `${playStatus} ${songTitle}`.trim();

105
src/components/settings/Login.tsx

@ -5,13 +5,7 @@ import { Form, ControlLabel, Message, RadioGroup } from 'rsuite';
import axios from 'axios';
import { useTranslation } from 'react-i18next';
import { settings, setDefaultSettings } from '../shared/setDefaultSettings';
import {
StyledButton,
StyledCheckbox,
StyledInput,
StyledInputPickerContainer,
StyledRadio,
} from '../shared/styled';
import { StyledButton, StyledInput } from '../shared/styled';
import { LoginPanel } from './styled';
import GenericPage from '../layout/GenericPage';
import logo from '../../../assets/icon.png';
@ -21,13 +15,14 @@ import { Server } from '../../types';
const Login = () => {
const { t } = useTranslation();
const [serverType, setServerType] = useState('subsonic');
const [serverName, setServerName] = useState('');
// const serverType = 'subsonic';
const serverName = 'https://tunio.blago.cloud';
const [userName, setUserName] = useState('');
const [password, setPassword] = useState('');
const [legacyAuth, setLegacyAuth] = useState(false);
// const [legacyAuth, setLegacyAuth] = useState(true);
const legacyAuth = true;
const [message, setMessage] = useState('');
const serverTypePickerRef = useRef(null);
// const serverTypePickerRef = useRef(null);
const handleConnect = async () => {
setMessage('');
@ -80,52 +75,6 @@ const Login = () => {
window.location.reload();
};
const handleConnectJellyfin = async () => {
setMessage('');
const cleanServerName = serverName.replace(/\/$/, '');
const deviceId = randomstring.generate({ length: 12, charset: 'alphanumeric' });
try {
const { data } = await axios.post(
`${cleanServerName}/users/authenticatebyname`,
{
Username: userName,
Pw: password,
},
{
headers: {
'X-Emby-Authorization': `MediaBrowser Client="Sonixd", Device="PC", DeviceId="${deviceId}", Version="${packageJson.version}"`,
},
}
);
localStorage.setItem('server', cleanServerName);
localStorage.setItem('serverBase64', btoa(cleanServerName));
localStorage.setItem('serverType', 'jellyfin');
localStorage.setItem('username', data.User.Id);
localStorage.setItem('token', data.AccessToken);
localStorage.setItem('deviceId', deviceId);
settings.set('server', cleanServerName);
settings.set('serverBase64', btoa(cleanServerName));
settings.set('serverType', 'jellyfin');
settings.set('username', data.User.Id);
settings.set('token', data.AccessToken);
settings.set('deviceId', deviceId);
} catch (err) {
if (err instanceof Error) {
setMessage(`${err.message}`);
return;
}
setMessage(t('An unknown error occurred'));
return;
}
// Set defaults on login
setDefaultSettings(false);
window.location.reload();
};
return (
<GenericPage hideDivider>
<LoginPanel bordered>
@ -136,27 +85,6 @@ const Login = () => {
<br />
{message !== '' && <Message type="error" description={message} />}
<Form id="login-form" fluid style={{ paddingTop: '20px' }}>
<StyledInputPickerContainer ref={serverTypePickerRef}>
<ControlLabel>{t('Server type')}</ControlLabel>
<RadioGroup
inline
defaultValue="subsonic"
value={serverType}
onChange={(e: Server) => setServerType(e)}
>
<StyledRadio value="subsonic">Subsonic</StyledRadio>
<StyledRadio value="jellyfin">Jellyfin</StyledRadio>
</RadioGroup>
</StyledInputPickerContainer>
<br />
<ControlLabel>{t('Server')}</ControlLabel>
<StyledInput
id="login-servername"
name="servername"
value={serverName}
onChange={(e: string) => setServerName(e)}
placeholder={t('Requires http(s)://')}
/>
<br />
<ControlLabel>{t('Username')}</ControlLabel>
<StyledInput
@ -177,31 +105,12 @@ const Login = () => {
placeholder={t('Enter password')}
/>
<br />
{serverType !== 'jellyfin' && (
<>
<StyledCheckbox
defaultChecked={
process.env.NODE_ENV === 'test'
? mockSettings.legacyAuth
: Boolean(settings.get('legacyAuth'))
}
checked={legacyAuth}
onChange={(_v: any, e: boolean) => {
settings.set('legacyAuth', e);
setLegacyAuth(e);
}}
>
{t('Legacy auth (plaintext)')}
</StyledCheckbox>
<br />
</>
)}
<StyledButton
id="login-button"
appearance="primary"
type="submit"
block
onClick={serverType !== 'jellyfin' ? handleConnect : handleConnectJellyfin}
onClick={handleConnect}
>
{t('Connect')}
</StyledButton>

BIN
src/img/placeholder.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 90 KiB

2
src/index.html

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<title>Sonixd</title>
<title>Tunio</title>
<script>
(() => {
if (process?.env?.NODE_ENV !== 'development') {

9
src/main.prod.js.LICENSE.txt

@ -1,9 +1,3 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
/**
@ -15,7 +9,8 @@ object-assign
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
/** @license React v17.0.2
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.

6
src/package.json

@ -1,8 +1,8 @@
{
"name": "sonixd",
"productName": "Sonixd",
"name": "Tunio",
"productName": "TunioDesktop",
"version": "0.15.4",
"description": "A full-featured Subsonic/Jellyfin compatible desktop client",
"description": "Player for Tunio",
"main": "./main.prod.js",
"author": {
"name": "jeffvli",

Loading…
Cancel
Save