Merge branch 'main' into develop
|
@ -1,6 +1,11 @@
|
|||
import * as ws from "ws";
|
||||
import * as http from "http";
|
||||
import * as https from "https";
|
||||
import * as url from "url";
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import * as electron from "electron";
|
||||
|
||||
const WebSocket = ws;
|
||||
const WebSocketServer = ws.Server;
|
||||
|
||||
interface standardResponse {
|
||||
|
@ -16,13 +21,12 @@ export class wsapi {
|
|||
port: any = 26369
|
||||
wss: any = null
|
||||
clients: any = []
|
||||
private _win: any;
|
||||
|
||||
constructor(win: any) {
|
||||
private _win : any;
|
||||
constructor(win : any) {
|
||||
this._win = win;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
createId() {
|
||||
// create random guid
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
||||
|
@ -31,34 +35,33 @@ export class wsapi {
|
|||
return v.toString(16);
|
||||
});
|
||||
}
|
||||
|
||||
public async InitWebSockets() {
|
||||
electron.ipcMain.on('wsapi-updatePlaybackState', (_event: any, arg: any) => {
|
||||
public async InitWebSockets () {
|
||||
electron.ipcMain.on('wsapi-updatePlaybackState', (event :any, arg :any) => {
|
||||
this.updatePlaybackState(arg);
|
||||
})
|
||||
|
||||
electron.ipcMain.on('wsapi-returnQueue', (_event: any, arg: any) => {
|
||||
electron.ipcMain.on('wsapi-returnQueue', (event :any, arg :any) => {
|
||||
this.returnQueue(JSON.parse(arg));
|
||||
});
|
||||
|
||||
electron.ipcMain.on('wsapi-returnSearch', (_event: any, arg: any) => {
|
||||
electron.ipcMain.on('wsapi-returnSearch', (event :any, arg :any) => {
|
||||
console.log("SEARCH")
|
||||
this.returnSearch(JSON.parse(arg));
|
||||
});
|
||||
|
||||
electron.ipcMain.on('wsapi-returnSearchLibrary', (_event: any, arg: any) => {
|
||||
electron.ipcMain.on('wsapi-returnSearchLibrary', (event :any, arg :any) => {
|
||||
this.returnSearchLibrary(JSON.parse(arg));
|
||||
});
|
||||
|
||||
electron.ipcMain.on('wsapi-returnDynamic', (_event: any, arg: any, type: any) => {
|
||||
electron.ipcMain.on('wsapi-returnDynamic', (event :any, arg :any, type :any) => {
|
||||
this.returnDynamic(JSON.parse(arg), type);
|
||||
});
|
||||
|
||||
electron.ipcMain.on('wsapi-returnMusicKitApi', (_event: any, arg: any, method: any) => {
|
||||
electron.ipcMain.on('wsapi-returnMusicKitApi', (event :any, arg :any, method :any) => {
|
||||
this.returnMusicKitApi(JSON.parse(arg), method);
|
||||
});
|
||||
|
||||
electron.ipcMain.on('wsapi-returnLyrics', (_event: any, arg: any) => {
|
||||
electron.ipcMain.on('wsapi-returnLyrics', (event :any, arg :any) => {
|
||||
this.returnLyrics(JSON.parse(arg));
|
||||
});
|
||||
electron.ipcMain.on('wsapi-returnvolumeMax', (_event: any, arg: any) => {
|
||||
|
@ -88,20 +91,20 @@ export class wsapi {
|
|||
})
|
||||
console.log(`WebSocketServer started on port: ${this.port}`);
|
||||
|
||||
const defaultResponse: standardResponse = {status: 0, data: {}, message: "OK", type: "generic"};
|
||||
const defaultResponse :standardResponse = {status :0, data:{}, message:"OK", type:"generic"};
|
||||
|
||||
|
||||
this.wss.on('connection', (ws: any) => {
|
||||
this.wss.on('connection', (ws : any) => {
|
||||
ws.id = this.createId();
|
||||
console.log(`Client ${ws.id} connected`)
|
||||
this.clients.push(ws);
|
||||
ws.on('message', function incoming(_message: any) {
|
||||
ws.on('message', function incoming(message : any) {
|
||||
|
||||
});
|
||||
// ws on message
|
||||
ws.on('message', (message: any) => {
|
||||
ws.on('message', (message : any) => {
|
||||
let data = JSON.parse(message);
|
||||
let response: standardResponse = {status: 0, data: {}, message: "OK", type: "generic"};
|
||||
let response :standardResponse = {status :0, data:{}, message:"OK", type:"generic"};
|
||||
if (data.action) {
|
||||
data.action.toLowerCase();
|
||||
}
|
||||
|
@ -140,9 +143,9 @@ export class wsapi {
|
|||
this._win.webContents.executeJavaScript(`wsapi.toggleShuffle()`);
|
||||
break;
|
||||
case "set-shuffle":
|
||||
if (data.shuffle == true) {
|
||||
if(data.shuffle == true) {
|
||||
this._win.webContents.executeJavaScript(`MusicKit.getInstance().shuffleMode = 1`);
|
||||
} else {
|
||||
}else{
|
||||
this._win.webContents.executeJavaScript(`MusicKit.getInstance().shuffleMode = 0`);
|
||||
}
|
||||
break;
|
||||
|
@ -240,7 +243,7 @@ export class wsapi {
|
|||
break;
|
||||
case "quit":
|
||||
electron.app.quit();
|
||||
break;
|
||||
break;
|
||||
}
|
||||
ws.send(JSON.stringify(response));
|
||||
});
|
||||
|
@ -253,56 +256,48 @@ export class wsapi {
|
|||
ws.send(JSON.stringify(defaultResponse));
|
||||
});
|
||||
}
|
||||
|
||||
sendToClient(_id: any) {
|
||||
sendToClient(id : any) {
|
||||
// replace the clients.forEach with a filter to find the client that requested
|
||||
}
|
||||
|
||||
updatePlaybackState(attr: any) {
|
||||
const response: standardResponse = {status: 0, data: attr, message: "OK", type: "playbackStateUpdate"};
|
||||
updatePlaybackState(attr : any) {
|
||||
const response : standardResponse = {status: 0, data: attr, message: "OK", type:"playbackStateUpdate"};
|
||||
this.clients.forEach(function each(client: any) {
|
||||
client.send(JSON.stringify(response));
|
||||
});
|
||||
}
|
||||
|
||||
returnMusicKitApi(results: any, method: any) {
|
||||
const response: standardResponse = {status: 0, data: results, message: "OK", type: `musickitapi.${method}`};
|
||||
this.clients.forEach(function each(client: any) {
|
||||
returnMusicKitApi(results :any, method :any) {
|
||||
const response : standardResponse = {status :0, data: results, message:"OK", type:`musickitapi.${method}`};
|
||||
this.clients.forEach(function each(client :any) {
|
||||
client.send(JSON.stringify(response));
|
||||
});
|
||||
}
|
||||
|
||||
returnDynamic(results: any, type: any) {
|
||||
const response: standardResponse = {status: 0, data: results, message: "OK", type: type};
|
||||
this.clients.forEach(function each(client: any) {
|
||||
returnDynamic(results :any, type :any) {
|
||||
const response : standardResponse = {status :0, data: results, message: "OK", type: type};
|
||||
this.clients.forEach(function each(client :any) {
|
||||
client.send(JSON.stringify(response));
|
||||
});
|
||||
}
|
||||
|
||||
returnLyrics(results: any) {
|
||||
const response: standardResponse = {status: 0, data: results, message: "OK", type: "lyrics"};
|
||||
this.clients.forEach(function each(client: any) {
|
||||
returnLyrics(results :any) {
|
||||
const response : standardResponse = {status :0, data: results, message: "OK", type: "lyrics"};
|
||||
this.clients.forEach(function each(client :any) {
|
||||
client.send(JSON.stringify(response));
|
||||
});
|
||||
}
|
||||
|
||||
returnSearch(results: any) {
|
||||
const response: standardResponse = {status: 0, data: results, message: "OK", type: "searchResults"};
|
||||
this.clients.forEach(function each(client: any) {
|
||||
returnSearch(results :any) {
|
||||
const response : standardResponse = {status :0, data: results, message: "OK", type: "searchResults"};
|
||||
this.clients.forEach(function each(client :any) {
|
||||
client.send(JSON.stringify(response));
|
||||
});
|
||||
}
|
||||
|
||||
returnSearchLibrary(results: any) {
|
||||
const response: standardResponse = {status: 0, data: results, message: "OK", type: "searchResultsLibrary"};
|
||||
this.clients.forEach(function each(client: any) {
|
||||
returnSearchLibrary(results :any) {
|
||||
const response: standardResponse = {status :0, data :results, message:"OK", type:"searchResultsLibrary"};
|
||||
this.clients.forEach(function each(client :any) {
|
||||
client.send(JSON.stringify(response));
|
||||
});
|
||||
}
|
||||
|
||||
returnQueue(queue: any) {
|
||||
const response: standardResponse = {status: 0, data: queue, message: "OK", type: "queue"};
|
||||
this.clients.forEach(function each(client: any) {
|
||||
returnQueue(queue :any) {
|
||||
const response : standardResponse = {status :0,data :queue, message:"OK", type:"queue"};
|
||||
this.clients.forEach(function each(client :any) {
|
||||
client.send(JSON.stringify(response));
|
||||
});
|
||||
}
|
||||
|
|
60
src/main/plugins/Extras/examplePlugin.ts
Normal file
|
@ -0,0 +1,60 @@
|
|||
let i = 1, k = 1;
|
||||
export default class ExamplePlugin {
|
||||
/**
|
||||
* Private variables for interaction in plugins
|
||||
*/
|
||||
private _win: any;
|
||||
private _app: any;
|
||||
private _store: any;
|
||||
|
||||
/**
|
||||
* Base Plugin Details (Eventually implemented into a GUI in settings)
|
||||
*/
|
||||
public name: string = 'examplePlugin';
|
||||
public description: string = 'Example plugin';
|
||||
public version: string = '1.0.0';
|
||||
public author: string = 'Example author';
|
||||
|
||||
/**
|
||||
* Runs on plugin load (Currently run on application start)
|
||||
*/
|
||||
constructor(app: any, store: any) {
|
||||
this._app = app;
|
||||
this._store = store;
|
||||
console.debug(`[Plugin][${this.name}] Loading Complete.`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs on app ready
|
||||
*/
|
||||
onReady(win: any): void {
|
||||
this._win = win;
|
||||
console.debug(`[Plugin][${this.name}] Ready.`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs on app stop
|
||||
*/
|
||||
onBeforeQuit(): void {
|
||||
console.debug(`[Plugin][${this.name}] Stopped.`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs on playback State Change
|
||||
* @param attributes Music Attributes (attributes.state = current state)
|
||||
*/
|
||||
onPlaybackStateDidChange(attributes: object): void {
|
||||
console.log('onPlaybackStateDidChange has been called ' + i + ' times');
|
||||
i++
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs on song change
|
||||
* @param attributes Music Attributes
|
||||
*/
|
||||
onNowPlayingItemDidChange(attributes: object): void {
|
||||
console.log('onNowPlayingDidChange has been called ' + k + ' times');
|
||||
k++
|
||||
}
|
||||
|
||||
}
|
37
src/main/plugins/Extras/sendSongToTitlebar.ts
Normal file
|
@ -0,0 +1,37 @@
|
|||
export default class sendSongToTitlebar {
|
||||
/**
|
||||
* Base Plugin Details (Eventually implemented into a GUI in settings)
|
||||
*/
|
||||
public name: string = 'sendSongToTitlebar';
|
||||
public description: string = 'Sets the app\'s titlebar to the Song title';
|
||||
public version: string = '0.0.1';
|
||||
public author: string = 'Cider Collective (credit to 8times9 via #147)';
|
||||
/**
|
||||
* Runs on plugin load (Currently run on application start)
|
||||
*/
|
||||
private _win: any;
|
||||
private _app: any;
|
||||
constructor() {}
|
||||
/**
|
||||
* Runs on app ready
|
||||
*/
|
||||
onReady(win: any): void {
|
||||
this._win = win;
|
||||
}
|
||||
/**
|
||||
* Runs on app stop
|
||||
*/
|
||||
onBeforeQuit(): void {}
|
||||
/**
|
||||
* Runs on playback State Change
|
||||
* @param attributes Music Attributes (attributes.state = current state)
|
||||
*/
|
||||
onPlaybackStateDidChange(attributes: any): void {
|
||||
this._win.setTitle(`${(attributes != null && attributes.name != null && attributes.name.length > 0) ? (attributes.name + " - ") : ''}Cider`)
|
||||
}
|
||||
/**
|
||||
* Runs on song change
|
||||
* @param attributes Music Attributes
|
||||
*/
|
||||
onNowPlayingItemDidChange(attributes: object): void {}
|
||||
}
|
|
@ -184,7 +184,7 @@ export default class mpris {
|
|||
|
||||
/**
|
||||
* Runs on playback State Change
|
||||
* @param attributes Music Attributes (attributes.status = current state)
|
||||
* @param attributes Music Attributes (attributes.state = current state)
|
||||
*/
|
||||
@mpris.linuxOnly
|
||||
onPlaybackStateDidChange(attributes: object): void {
|
||||
|
|
BIN
src/main/thumbaricons/backwardPng.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
src/main/thumbaricons/forwardPng.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
src/main/thumbaricons/pausePng.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
src/main/thumbaricons/playPng.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
4
src/renderer/AppHeader.svg
Normal file
After Width: | Height: | Size: 14 KiB |
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 300 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(0.30081,0,0,0.30081,-41.1651,-47.9227)">
|
||||
<g transform="matrix(1.26848,0,0,1.26848,167,195.512)">
|
||||
<circle cx="101" cy="102.5" r="79.5" style="fill:rgb(15,15,15);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.260038,0,0,0.260038,167,195.511)">
|
||||
<g id="Release.afdesign">
|
||||
<g>
|
||||
<path d="M501,21C765.367,21 980,235.633 980,500C980,764.367 765.367,979 501,979C236.633,979 22,764.367 22,500C22,235.633 236.633,21 501,21ZM501,169C683.684,169 832,317.316 832,500C832,682.684 683.684,831 501,831C318.316,831 170,682.684 170,500C170,317.316 318.316,169 501,169Z" style="fill:rgb(255,38,84);"/>
|
||||
<path d="M501,224C653.053,224 776.5,347.447 776.5,499.5C776.5,651.553 653.053,775 501,775C348.947,775 225.5,651.553 225.5,499.5C225.5,347.447 348.947,224 501,224ZM589.165,492.207C595.163,495.672 595.163,504.328 589.165,507.793L439.502,594.256C433.502,597.722 426,593.392 426,586.463L426,413.537C426,406.608 433.502,402.278 439.502,405.744L589.165,492.207Z" style="fill:rgb(255,38,84);"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(10.0544,0,0,10.0544,472.765,384.95)">
|
||||
<g transform="matrix(16,0,0,16,0,0)">
|
||||
<path d="M0.705,-0.473C0.685,-0.641 0.558,-0.737 0.389,-0.737C0.197,-0.737 0.05,-0.602 0.05,-0.364C0.05,-0.126 0.195,0.01 0.389,0.01C0.576,0.01 0.688,-0.114 0.705,-0.248L0.549,-0.249C0.535,-0.171 0.474,-0.126 0.392,-0.126C0.281,-0.126 0.206,-0.208 0.206,-0.364C0.206,-0.515 0.28,-0.601 0.393,-0.601C0.477,-0.601 0.538,-0.553 0.549,-0.473L0.705,-0.473Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,12.0341,0)">
|
||||
<path d="M0.06,-0L0.212,-0L0.212,-0.545L0.06,-0.545L0.06,-0ZM0.136,-0.616C0.181,-0.616 0.218,-0.65 0.218,-0.692C0.218,-0.734 0.181,-0.769 0.136,-0.769C0.092,-0.769 0.055,-0.734 0.055,-0.692C0.055,-0.65 0.092,-0.616 0.136,-0.616Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,16.3864,0)">
|
||||
<path d="M0.261,0.009C0.349,0.009 0.395,-0.042 0.416,-0.087L0.423,-0.087L0.423,-0L0.572,-0L0.572,-0.727L0.421,-0.727L0.421,-0.454L0.416,-0.454C0.396,-0.498 0.352,-0.553 0.261,-0.553C0.141,-0.553 0.04,-0.46 0.04,-0.272C0.04,-0.089 0.137,0.009 0.261,0.009ZM0.309,-0.112C0.235,-0.112 0.195,-0.178 0.195,-0.273C0.195,-0.367 0.234,-0.432 0.309,-0.432C0.383,-0.432 0.424,-0.37 0.424,-0.273C0.424,-0.175 0.382,-0.112 0.309,-0.112Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,26.5511,0)">
|
||||
<path d="M0.309,0.011C0.444,0.011 0.535,-0.055 0.556,-0.156L0.416,-0.165C0.401,-0.124 0.362,-0.102 0.311,-0.102C0.236,-0.102 0.188,-0.152 0.188,-0.234L0.188,-0.234L0.559,-0.234L0.559,-0.276C0.559,-0.461 0.447,-0.553 0.303,-0.553C0.142,-0.553 0.038,-0.439 0.038,-0.27C0.038,-0.097 0.141,0.011 0.309,0.011ZM0.188,-0.328C0.191,-0.39 0.238,-0.44 0.305,-0.44C0.371,-0.44 0.417,-0.393 0.417,-0.328L0.188,-0.328Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,36.1136,0)">
|
||||
<path d="M0.06,-0L0.212,-0L0.212,-0.309C0.212,-0.376 0.261,-0.422 0.327,-0.422C0.348,-0.422 0.377,-0.418 0.391,-0.414L0.391,-0.548C0.378,-0.551 0.359,-0.553 0.344,-0.553C0.283,-0.553 0.233,-0.518 0.213,-0.45L0.207,-0.45L0.207,-0.545L0.06,-0.545L0.06,-0Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(-0.0132579,-1.62362e-18,-1.62362e-18,0.0132579,288.703,42.7877)">
|
||||
<g id="g3003">
|
||||
<path id="path3005" d="M1611,832C1611,796.667 1598.67,766.667 1574,742L923,91C897.667,65.667 867.333,53 832,53C796,53 766,65.667 742,91L91,742C65.667,766 53,796 53,832C53,867.333 65.667,897.667 91,923L165,998C191,1022.67 221.333,1035 256,1035C291.333,1035 321.333,1022.67 346,998L832,512L1318,998C1342.67,1022.67 1372.67,1035 1408,1035C1442.67,1035 1473,1022.67 1499,998L1574,923C1598.67,897 1611,866.667 1611,832Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4.5 KiB |
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 300 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(0.30081,0,0,0.30081,-41.1651,-47.9227)">
|
||||
<g transform="matrix(1.26848,0,0,1.26848,167,195.512)">
|
||||
<circle cx="101" cy="102.5" r="79.5" style="fill:rgb(15,15,15);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.260038,0,0,0.260038,167,195.511)">
|
||||
<g id="Release.afdesign">
|
||||
<g>
|
||||
<path d="M501,21C765.367,21 980,235.633 980,500C980,764.367 765.367,979 501,979C236.633,979 22,764.367 22,500C22,235.633 236.633,21 501,21ZM501,169C683.684,169 832,317.316 832,500C832,682.684 683.684,831 501,831C318.316,831 170,682.684 170,500C170,317.316 318.316,169 501,169Z" style="fill:rgb(255,38,84);"/>
|
||||
<path d="M501,224C653.053,224 776.5,347.447 776.5,499.5C776.5,651.553 653.053,775 501,775C348.947,775 225.5,651.553 225.5,499.5C225.5,347.447 348.947,224 501,224ZM589.165,492.207C595.163,495.672 595.163,504.328 589.165,507.793L439.502,594.256C433.502,597.722 426,593.392 426,586.463L426,413.537C426,406.608 433.502,402.278 439.502,405.744L589.165,492.207Z" style="fill:rgb(255,38,84);"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(10.0544,0,0,10.0544,472.765,384.95)">
|
||||
<g transform="matrix(16,0,0,16,0,0)">
|
||||
<path d="M0.705,-0.473C0.685,-0.641 0.558,-0.737 0.389,-0.737C0.197,-0.737 0.05,-0.602 0.05,-0.364C0.05,-0.126 0.195,0.01 0.389,0.01C0.576,0.01 0.688,-0.114 0.705,-0.248L0.549,-0.249C0.535,-0.171 0.474,-0.126 0.392,-0.126C0.281,-0.126 0.206,-0.208 0.206,-0.364C0.206,-0.515 0.28,-0.601 0.393,-0.601C0.477,-0.601 0.538,-0.553 0.549,-0.473L0.705,-0.473Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,12.0341,0)">
|
||||
<path d="M0.06,-0L0.212,-0L0.212,-0.545L0.06,-0.545L0.06,-0ZM0.136,-0.616C0.181,-0.616 0.218,-0.65 0.218,-0.692C0.218,-0.734 0.181,-0.769 0.136,-0.769C0.092,-0.769 0.055,-0.734 0.055,-0.692C0.055,-0.65 0.092,-0.616 0.136,-0.616Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,16.3864,0)">
|
||||
<path d="M0.261,0.009C0.349,0.009 0.395,-0.042 0.416,-0.087L0.423,-0.087L0.423,-0L0.572,-0L0.572,-0.727L0.421,-0.727L0.421,-0.454L0.416,-0.454C0.396,-0.498 0.352,-0.553 0.261,-0.553C0.141,-0.553 0.04,-0.46 0.04,-0.272C0.04,-0.089 0.137,0.009 0.261,0.009ZM0.309,-0.112C0.235,-0.112 0.195,-0.178 0.195,-0.273C0.195,-0.367 0.234,-0.432 0.309,-0.432C0.383,-0.432 0.424,-0.37 0.424,-0.273C0.424,-0.175 0.382,-0.112 0.309,-0.112Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,26.5511,0)">
|
||||
<path d="M0.309,0.011C0.444,0.011 0.535,-0.055 0.556,-0.156L0.416,-0.165C0.401,-0.124 0.362,-0.102 0.311,-0.102C0.236,-0.102 0.188,-0.152 0.188,-0.234L0.188,-0.234L0.559,-0.234L0.559,-0.276C0.559,-0.461 0.447,-0.553 0.303,-0.553C0.142,-0.553 0.038,-0.439 0.038,-0.27C0.038,-0.097 0.141,0.011 0.309,0.011ZM0.188,-0.328C0.191,-0.39 0.238,-0.44 0.305,-0.44C0.371,-0.44 0.417,-0.393 0.417,-0.328L0.188,-0.328Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,36.1136,0)">
|
||||
<path d="M0.06,-0L0.212,-0L0.212,-0.309C0.212,-0.376 0.261,-0.422 0.327,-0.422C0.348,-0.422 0.377,-0.418 0.391,-0.414L0.391,-0.548C0.378,-0.551 0.359,-0.553 0.344,-0.553C0.283,-0.553 0.233,-0.518 0.213,-0.45L0.207,-0.45L0.207,-0.545L0.06,-0.545L0.06,-0Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(0.0132579,0,0,-0.0132579,266.642,57.2123)">
|
||||
<g id="g3003">
|
||||
<path id="path3005" d="M1611,832C1611,796.667 1598.67,766.667 1574,742L923,91C897.667,65.667 867.333,53 832,53C796,53 766,65.667 742,91L91,742C65.667,766 53,796 53,832C53,867.333 65.667,897.667 91,923L165,998C191,1022.67 221.333,1035 256,1035C291.333,1035 321.333,1022.67 346,998L832,512L1318,998C1342.67,1022.67 1372.67,1035 1408,1035C1442.67,1035 1473,1022.67 1499,998L1574,923C1598.67,897 1611,866.667 1611,832Z" style="fill:rgb(235,235,235);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 35 KiB |
|
@ -1,49 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 112.197 112.197" style="enable-background:new 0 0 112.197 112.197;" xml:space="preserve">
|
||||
<g>
|
||||
<circle style="fill:#55ACEE;" cx="56.099" cy="56.098" r="56.098"/>
|
||||
<g>
|
||||
<path style="fill:#F1F2F2;" d="M90.461,40.316c-2.404,1.066-4.99,1.787-7.702,2.109c2.769-1.659,4.894-4.284,5.897-7.417
|
||||
c-2.591,1.537-5.462,2.652-8.515,3.253c-2.446-2.605-5.931-4.233-9.79-4.233c-7.404,0-13.409,6.005-13.409,13.409
|
||||
c0,1.051,0.119,2.074,0.349,3.056c-11.144-0.559-21.025-5.897-27.639-14.012c-1.154,1.98-1.816,4.285-1.816,6.742
|
||||
c0,4.651,2.369,8.757,5.965,11.161c-2.197-0.069-4.266-0.672-6.073-1.679c-0.001,0.057-0.001,0.114-0.001,0.17
|
||||
c0,6.497,4.624,11.916,10.757,13.147c-1.124,0.308-2.311,0.471-3.532,0.471c-0.866,0-1.705-0.083-2.523-0.239
|
||||
c1.706,5.326,6.657,9.203,12.526,9.312c-4.59,3.597-10.371,5.74-16.655,5.74c-1.08,0-2.15-0.063-3.197-0.188
|
||||
c5.931,3.806,12.981,6.025,20.553,6.025c24.664,0,38.152-20.432,38.152-38.153c0-0.581-0.013-1.16-0.039-1.734
|
||||
C86.391,45.366,88.664,43.005,90.461,40.316L90.461,40.316z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.5 KiB |
|
@ -56,7 +56,7 @@ const CiderAudio = {
|
|||
}
|
||||
if (app.cfg.audio.spatial){
|
||||
CiderAudio.spatialOn()
|
||||
}
|
||||
}
|
||||
CiderAudio.hierarchical_loading();
|
||||
},
|
||||
normalizerOn: function (){
|
||||
|
|
27
src/renderer/logo-simple.svg
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 313 105" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(3.125,0,0,3.125,0,0)">
|
||||
<g transform="matrix(1.38696,0,0,1.38696,-183.553,-76.7485)">
|
||||
<g transform="matrix(16,0,0,16,160.665,73.4177)">
|
||||
<path d="M0.705,-0.473C0.685,-0.641 0.558,-0.737 0.389,-0.737C0.197,-0.737 0.05,-0.602 0.05,-0.364C0.05,-0.126 0.195,0.01 0.389,0.01C0.576,0.01 0.688,-0.114 0.705,-0.248L0.549,-0.249C0.535,-0.171 0.474,-0.126 0.392,-0.126C0.281,-0.126 0.206,-0.208 0.206,-0.364C0.206,-0.515 0.28,-0.601 0.393,-0.601C0.477,-0.601 0.538,-0.553 0.549,-0.473L0.705,-0.473Z" style="fill:white;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,172.699,73.4177)">
|
||||
<path d="M0.06,-0L0.212,-0L0.212,-0.545L0.06,-0.545L0.06,-0ZM0.136,-0.616C0.181,-0.616 0.218,-0.65 0.218,-0.692C0.218,-0.734 0.181,-0.769 0.136,-0.769C0.092,-0.769 0.055,-0.734 0.055,-0.692C0.055,-0.65 0.092,-0.616 0.136,-0.616Z" style="fill:white;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,177.051,73.4177)">
|
||||
<path d="M0.261,0.009C0.349,0.009 0.395,-0.042 0.416,-0.087L0.423,-0.087L0.423,-0L0.572,-0L0.572,-0.727L0.421,-0.727L0.421,-0.454L0.416,-0.454C0.396,-0.498 0.352,-0.553 0.261,-0.553C0.141,-0.553 0.04,-0.46 0.04,-0.272C0.04,-0.089 0.137,0.009 0.261,0.009ZM0.309,-0.112C0.235,-0.112 0.195,-0.178 0.195,-0.273C0.195,-0.367 0.234,-0.432 0.309,-0.432C0.383,-0.432 0.424,-0.37 0.424,-0.273C0.424,-0.175 0.382,-0.112 0.309,-0.112Z" style="fill:white;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,187.216,73.4177)">
|
||||
<path d="M0.309,0.011C0.444,0.011 0.535,-0.055 0.556,-0.156L0.416,-0.165C0.401,-0.124 0.362,-0.102 0.311,-0.102C0.236,-0.102 0.188,-0.152 0.188,-0.234L0.188,-0.234L0.559,-0.234L0.559,-0.276C0.559,-0.461 0.447,-0.553 0.303,-0.553C0.142,-0.553 0.038,-0.439 0.038,-0.27C0.038,-0.097 0.141,0.011 0.309,0.011ZM0.188,-0.328C0.191,-0.39 0.238,-0.44 0.305,-0.44C0.371,-0.44 0.417,-0.393 0.417,-0.328L0.188,-0.328Z" style="fill:white;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(16,0,0,16,196.778,73.4177)">
|
||||
<path d="M0.06,-0L0.212,-0L0.212,-0.309C0.212,-0.376 0.261,-0.422 0.327,-0.422C0.348,-0.422 0.377,-0.418 0.391,-0.414L0.391,-0.548C0.378,-0.551 0.359,-0.553 0.344,-0.553C0.283,-0.553 0.233,-0.518 0.213,-0.45L0.207,-0.45L0.207,-0.545L0.06,-0.545L0.06,-0Z" style="fill:white;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
<circle cx="17" cy="16.667" r="12.333" style="fill:rgb(235,235,235);"/>
|
||||
<g id="g147" transform="matrix(0.297476,0,0,0.297476,-16.7212,-19.0819)">
|
||||
<path id="path41" d="M113.553,67.234C111.989,67.44 110.373,67.38 108.796,67.538C105.581,67.86 102.374,68.548 99.283,69.479C85.683,73.576 74.237,83.188 67.62,95.728C58.974,112.114 59.92,132.602 69.683,148.275C73.899,155.044 79.648,160.705 86.34,165.013C90.987,168.005 96.247,170.235 101.606,171.575C107.932,173.157 114.607,173.607 121.076,172.802C139.182,170.549 155.227,158.921 162.858,142.301C165.794,135.905 167.337,128.957 167.644,121.946C168.67,98.52 152.877,76.772 130.7,69.694C126.785,68.444 122.737,67.681 118.642,67.399C116.992,67.285 115.202,67.018 113.553,67.234M112.226,83.813C116.656,83.29 121.632,84.115 125.833,85.514C130.752,87.152 135.254,89.717 139.108,93.203C153.094,105.857 154.806,128.026 143.09,142.744C140.415,146.104 137.152,149.006 133.466,151.217C128.993,153.901 123.948,155.665 118.753,156.221C113.863,156.745 108.876,156.366 104.15,154.943C99.89,153.66 95.81,151.611 92.313,148.85C77.992,137.54 73.888,116.673 83.621,101.038C86.308,96.722 89.827,93.066 93.973,90.133C99.448,86.26 105.67,84.586 112.226,83.813M112.226,89.802C106.903,90.501 101.862,91.851 97.402,95.001C93.9,97.475 90.841,100.562 88.619,104.246C80.752,117.287 83.774,134.719 95.853,144.135C98.477,146.18 101.448,147.812 104.593,148.901C109.23,150.505 114.244,150.887 119.085,150.235C123.337,149.662 127.573,148.069 131.143,145.694C135.459,142.822 139.035,139.018 141.507,134.447C148.532,121.459 144.666,104.627 132.913,95.798C129.999,93.609 126.685,91.926 123.178,90.925C119.742,89.945 115.8,89.332 112.226,89.802M107.138,109.717C108.23,109.447 110.211,111.095 111.12,111.636C114.483,113.639 117.898,115.564 121.297,117.505C122.215,118.029 124.992,119.047 124.931,120.287C124.871,121.486 122.008,122.553 121.076,123.084C117.931,124.873 114.817,126.715 111.673,128.504C110.475,129.186 108.937,130.499 107.58,130.751C105.799,131.083 106.363,127.602 106.363,126.593L106.363,113.76C106.363,112.776 105.865,110.031 107.138,109.717Z" style="fill:rgb(255,91,109);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 5 KiB |
29
src/renderer/logotmp2.svg
Normal file
After Width: | Height: | Size: 11 KiB |
|
@ -96,9 +96,6 @@ const wsapi = {
|
|||
toggleShuffle() {
|
||||
MusicKit.getInstance().shuffleMode = MusicKit.getInstance().shuffleMode === 0 ? 1 : 0
|
||||
},
|
||||
togglePlayPause() {
|
||||
app.mk.isPlaying ? app.mk.pause() : app.mk.play()
|
||||
},
|
||||
toggleRepeat() {
|
||||
if(MusicKit.getInstance().repeatMode == 0) {
|
||||
MusicKit.getInstance().repeatMode = 1
|
||||
|
|
2165
src/renderer/style-old.css
Normal file
|
@ -1,14 +0,0 @@
|
|||
# Themes (WIP)
|
||||
|
||||
## Making a theme
|
||||
* If one does not already exist, create a new theme directory in the user data folder.
|
||||
* **Windows:** `%appdata%/Cider/themes`
|
||||
* **Mac:** `~/Library/Application Support/Cider/themes`
|
||||
* **Linux:** `~/.config/Cider/themes`
|
||||
* Create a `theme.less` file with the name of the theme.
|
||||
* In Cider, select the theme in the settings.
|
||||
* To enable hot reloading for the theme, open the DevTools and enter `less.watch()` in the console.
|
||||
|
||||
## Resources
|
||||
* The default styles.less can be found in: [src/renderer/style.less](https://github.com/ciderapp/Cider/tree/main/src/renderer/style.less)
|
||||
* [Less.js documentation](https://lesscss.org/)
|
|
@ -1,3 +0,0 @@
|
|||
#app {
|
||||
--color1: #111;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
// Default theme
|
|
@ -222,14 +222,14 @@
|
|||
items: {
|
||||
"new": {
|
||||
"icon": "./assets/feather/plus.svg",
|
||||
"name": app.getLz('action.newpreset'),
|
||||
name: "New Preset...",
|
||||
action: () => {
|
||||
this.addPreset()
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"icon": "./assets/feather/x-circle.svg",
|
||||
"name": app.getLz('action.deletepreset'),
|
||||
name: "Delete Preset",
|
||||
action: () => {
|
||||
this.deletePreset()
|
||||
}
|
||||
|
@ -280,13 +280,13 @@
|
|||
},
|
||||
deletePreset() {
|
||||
let presets = this.$root.cfg.audio.equalizer.presets
|
||||
bootbox.confirm(app.getLz('term.deletepreset.warn'), (result) => {
|
||||
bootbox.confirm("Are you sure you want to delete this preset?", (result) => {
|
||||
if (result) {
|
||||
this.changePreset("default")
|
||||
// find the preset by id (preset) and remove it
|
||||
let index = presets.findIndex(p => p.preset == this.preset)
|
||||
presets.splice(index, 1)
|
||||
notyf.success(app.getLz('term.deletedpreset'))
|
||||
notyf.success("Removed preset")
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -346,7 +346,7 @@
|
|||
},
|
||||
addPreset() {
|
||||
let self = this
|
||||
bootbox.prompt(app.getLz('term.newpreset.name'), (res) => {
|
||||
bootbox.prompt("New EQ Preset Name", (res) => {
|
||||
if (res) {
|
||||
let eqSettings = Clone(app.cfg.audio.equalizer)
|
||||
let newPreset = new self.eqPreset()
|
||||
|
@ -357,7 +357,7 @@
|
|||
newPreset.mix = eqSettings.mix
|
||||
newPreset.vibrantBass = eqSettings.vibrantBass
|
||||
app.cfg.audio.equalizer.presets.push(newPreset)
|
||||
notyf.success(app.getLz('term.addedpreset'))
|
||||
notyf.success("Added Preset")
|
||||
self.changePreset(newPreset.preset)
|
||||
}
|
||||
})
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
<h3>{{$root.getLz('term.socials')}}</h3>
|
||||
<button onclick="window.open('https://github.com/ciderapp/Cider')" class="md-btn sponsorBtn"><img style="width: 20.5px;" src="./assets/github.svg"/>{{$root.getLz('term.github')}}</button>
|
||||
<button onclick="window.open('https://discord.gg/applemusic')" class="md-btn sponsorBtn"><img src="./assets/discord.svg"/>{{$root.getLz('term.discord')}}</button>
|
||||
<button onclick="window.open('https://twitter.com/UseCider')" class="md-btn sponsorBtn"><img style="width: 20.5px;" src="./assets/twitter.svg"/>Twitter</button>
|
||||
|
||||
</div>
|
||||
<div class="col">
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<button class="md-btn md-btn-block meta-btn" @click="openUrl(selected.attributes.websiteUrl)">{{$root.getLz('podcast.website')}}</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="md-btn md-btn-block meta-btn" @click="$root.share(selected.attributes.websiteUrl)">{{$root.getLz('action.share')}}</button>
|
||||
<button class="md-btn md-btn-block meta-btn">{{$root.getLz('action.share')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -193,7 +193,6 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
|||
}
|
||||
|
||||
.lossless-badge {
|
||||
background-image: url("./assets/lossless.svg");
|
||||
background: rgb(150 150 150);
|
||||
border-radius: 6px;
|
||||
padding: 0px 6px;
|
||||
|
|