Merge remote-tracking branch 'origin/develop' into update-owo
This commit is contained in:
commit
5e2d965f63
26 changed files with 13842 additions and 455 deletions
|
@ -39,6 +39,7 @@
|
|||
"@sentry/electron": "^3.0.2",
|
||||
"@sentry/integrations": "^6.18.1",
|
||||
"adm-zip": "0.4.10",
|
||||
|
||||
"castv2-client": "^1.2.0",
|
||||
"chokidar": "^3.5.3",
|
||||
"discord-rpc": "^4.0.1",
|
||||
|
@ -48,7 +49,7 @@
|
|||
"electron-notarize": "^1.1.1",
|
||||
"electron-store": "^8.0.1",
|
||||
"electron-updater": "^4.6.5",
|
||||
"electron-vibrancy-updated": "git+https://github.com/ciderapp/electron-vibrancy-updated",
|
||||
|
||||
"electron-window-state": "^5.0.3",
|
||||
"express": "^4.17.3",
|
||||
"get-port": "^5.1.1",
|
||||
|
@ -76,7 +77,7 @@
|
|||
"@types/express": "^4.17.13",
|
||||
"@types/qrcode-terminal": "^0.12.0",
|
||||
"@types/ws": "^8.5.1",
|
||||
"electron": "git+https://github.com/castlabs/electron-releases.git#16-x-y",
|
||||
"electron": "git+https://github.com/castlabs/electron-releases.git",
|
||||
"electron-builder": "^22.14.13",
|
||||
"electron-builder-notarize-pkg": "^1.2.0",
|
||||
"electron-webpack": "^2.8.2",
|
||||
|
|
Binary file not shown.
|
@ -201,13 +201,13 @@
|
|||
"action.unfollow": "Unfollow",
|
||||
"action.unfollow.success": "Unfollowed",
|
||||
"action.unfollow.error": "Error Unfollowing",
|
||||
"action.relaunch.confirm": "Do you want to relaunch Cider?",
|
||||
"action.playNext": "Play Next",
|
||||
"action.playLater": "Play Later",
|
||||
"action.startRadio": "Start Radio",
|
||||
"action.goToArtist": "Go to Artist",
|
||||
"action.goToAlbum": "Go to Album",
|
||||
"action.showInPlaylist": "Show in Playlist",
|
||||
"action.showInAppleMusic": "Show in Apple Music",
|
||||
"action.moveToTop": "Move out of Folder",
|
||||
"action.share": "Share",
|
||||
"action.rename": "Rename",
|
||||
|
@ -231,6 +231,7 @@
|
|||
"action.newpreset": "New Preset...",
|
||||
"action.deletepreset": "Delete Preset",
|
||||
"action.open": "Open",
|
||||
"action.relaunch.confirm": "Do you want to relaunch Cider?",
|
||||
"settings.header.general": "General",
|
||||
"settings.header.general.description": "Adjust the general settings for Cider.",
|
||||
"settings.option.general.language": "Language",
|
||||
|
@ -316,8 +317,6 @@
|
|||
"settings.option.visual.hardwareAcceleration.description": "Requires relaunch",
|
||||
"settings.header.visual.hardwareAcceleration.default": "Default",
|
||||
"settings.header.visual.hardwareAcceleration.webGPU": "WebGPU",
|
||||
"settings.option.visual.transparent": "Transparent frame",
|
||||
"settings.option.visual.transparent.description": "Transparent frame (needs Theme Support , requires relaunch)",
|
||||
"settings.header.visual.theme": "Theme",
|
||||
"settings.option.visual.theme.github.download": "Install from GitHub URL",
|
||||
"settings.option.visual.theme.github.explore": "Explore GitHub Themes",
|
||||
|
@ -326,6 +325,15 @@
|
|||
"settings.prompt.visual.theme.github.URL": "Enter the URL of the theme you want to install",
|
||||
"settings.notyf.visual.theme.install.success": "Theme installed successfully",
|
||||
"settings.notyf.visual.theme.install.error": "Theme installation failed",
|
||||
"settings.header.visual.plugin": "Plugin",
|
||||
"settings.option.visual.plugin.github.download": "Install from GitHub URL",
|
||||
"settings.option.visual.plugin.github.explore": "Explore GitHub Plugins",
|
||||
"settings.header.visual.plugin.github.page": "Plugins from GitHub",
|
||||
"settings.option.visual.plugin.github.install.confirm": "Are you sure you want to install {{ repo }}?",
|
||||
"settings.prompt.visual.plugin.github.URL": "Enter the URL of the plugin you want to install",
|
||||
"settings.prompt.visual.plugin.github.success": "Plugin installed successfully, Press OK to relaunch Cider",
|
||||
"settings.notyf.visual.plugin.install.success": "Plugin installed successfully",
|
||||
"settings.notyf.visual.plugin.install.error": "Plugin installation failed",
|
||||
"settings.option.visual.theme.default": "Cider",
|
||||
"settings.option.visual.theme.dark": "Dark",
|
||||
"settings.option.visual.showPersonalInfo": "Show Personal Info",
|
||||
|
@ -359,6 +367,8 @@
|
|||
"settings.option.experimental.inline_playlists": "Inline Playlists and Albums",
|
||||
"settings.option.advanced.playlistTrackMapping": "Playlist Track Mapping",
|
||||
"settings.option.advanced.playlistTrackMapping.description": "Enables deep scanning of playlists to determine which tracks are in which playlists. Playlist cache build times can increase significantly.",
|
||||
"settings.option.visual.transparent": "Transparent frame",
|
||||
"settings.option.visual.transparent.description": "Transparent frame (needs Theme Support , requires relaunch)",
|
||||
"spatial.notTurnedOn": "Audio Spatialization is disabled. To use, please enable it first.",
|
||||
"spatial.spatialProperties": "Spatial Properties",
|
||||
"spatial.width": "Width",
|
||||
|
|
|
@ -207,6 +207,7 @@
|
|||
"action.goToArtist": "Go to Artist",
|
||||
"action.goToAlbum": "Go to Album",
|
||||
"action.showInPlaylist": "Show in Playlist",
|
||||
"action.showInAppleMusic": "Show in Apple Music",
|
||||
"action.moveToTop": "Move out of Folder",
|
||||
"action.share": "Share",
|
||||
"action.rename": "Rename",
|
||||
|
@ -230,6 +231,7 @@
|
|||
"action.newpreset": "New Preset...",
|
||||
"action.deletepreset": "Delete Preset",
|
||||
"action.open": "Open",
|
||||
"action.relaunch.confirm": "Do you want to relaunch Cider?",
|
||||
"settings.header.general": "General",
|
||||
"settings.header.general.description": "Adjust the general settings for Cider.",
|
||||
"settings.option.general.language": "Language",
|
||||
|
@ -323,6 +325,15 @@
|
|||
"settings.prompt.visual.theme.github.URL": "Enter the URL of the theme you want to install",
|
||||
"settings.notyf.visual.theme.install.success": "Theme installed successfully",
|
||||
"settings.notyf.visual.theme.install.error": "Theme installation failed",
|
||||
"settings.header.visual.plugin": "Plugin",
|
||||
"settings.option.visual.plugin.github.download": "Install from GitHub URL",
|
||||
"settings.option.visual.plugin.github.explore": "Explore GitHub Plugins",
|
||||
"settings.header.visual.plugin.github.page": "Plugins from GitHub",
|
||||
"settings.option.visual.plugin.github.install.confirm": "Are you sure you want to install {{ repo }}?",
|
||||
"settings.prompt.visual.plugin.github.URL": "Enter the URL of the plugin you want to install",
|
||||
"settings.prompt.visual.plugin.github.success": "Plugin installed successfully, Press OK to relaunch Cider",
|
||||
"settings.notyf.visual.plugin.install.success": "Plugin installed successfully",
|
||||
"settings.notyf.visual.plugin.install.error": "Plugin installation failed",
|
||||
"settings.option.visual.theme.default": "Cider",
|
||||
"settings.option.visual.theme.dark": "Dark",
|
||||
"settings.option.visual.showPersonalInfo": "Show Personal Info",
|
||||
|
@ -356,6 +367,8 @@
|
|||
"settings.option.experimental.inline_playlists": "Inline Playlists and Albums",
|
||||
"settings.option.advanced.playlistTrackMapping": "Playlist Track Mapping",
|
||||
"settings.option.advanced.playlistTrackMapping.description": "Enables deep scanning of playlists to determine which tracks are in which playlists. Playlist cache build times can increase significantly.",
|
||||
"settings.option.visual.transparent": "Transparent frame",
|
||||
"settings.option.visual.transparent.description": "Transparent frame (needs Theme Support , requires relaunch)",
|
||||
"spatial.notTurnedOn": "Audio Spatialization is disabled. To use, please enable it first.",
|
||||
"spatial.spatialProperties": "Spatial Properties",
|
||||
"spatial.width": "Width",
|
||||
|
|
|
@ -12,6 +12,7 @@ import fetch from 'electron-fetch'
|
|||
import {wsapi} from "./wsapi";
|
||||
import {AppImageUpdater, NsisUpdater} from "electron-updater";
|
||||
import {utils} from './utils';
|
||||
import {Plugins} from "./plugins";
|
||||
|
||||
const fileWatcher = require('chokidar');
|
||||
const AdmZip = require("adm-zip");
|
||||
|
@ -60,6 +61,7 @@ export class BrowserWindow {
|
|||
"pages/replay",
|
||||
"pages/audiolabs",
|
||||
"pages/zoo",
|
||||
"pages/plugin-renderer",
|
||||
"components/mediaitem-artwork",
|
||||
"components/artwork-material",
|
||||
"components/menu-panel",
|
||||
|
@ -90,8 +92,14 @@ export class BrowserWindow {
|
|||
"components/miniplayer",
|
||||
"components/castmenu",
|
||||
"components/artist-chip",
|
||||
"components/hello-world",
|
||||
],
|
||||
appRoutes: [
|
||||
{
|
||||
page: "plugin-renderer",
|
||||
component: `<plugin-renderer></plugin-renderer>`,
|
||||
condition: "page == 'plugin-renderer'"
|
||||
},
|
||||
{
|
||||
page: "zoo",
|
||||
component: "<cider-zoo></cider-zoo>",
|
||||
|
@ -458,7 +466,10 @@ export class BrowserWindow {
|
|||
});
|
||||
|
||||
app.get("/plugins/:plugin/*", (req: {params: {plugin: string, 0: string}}, res) => {
|
||||
const plugin = req.params.plugin;
|
||||
let plugin = req.params.plugin;
|
||||
if(Plugins.getPluginFromMap(plugin)) {
|
||||
plugin = Plugins.getPluginFromMap(plugin)
|
||||
}
|
||||
const file = req.params[0];
|
||||
const pluginPath = join(utils.getPath('plugins'), plugin);
|
||||
console.log(pluginPath)
|
||||
|
@ -589,6 +600,53 @@ export class BrowserWindow {
|
|||
event.returnValue = process.platform;
|
||||
});
|
||||
|
||||
ipcMain.handle("get-github-plugin", async (event, url) => {
|
||||
const returnVal = {
|
||||
success: true,
|
||||
theme: null,
|
||||
message: ""
|
||||
}
|
||||
try {
|
||||
if (!existsSync(utils.getPath("plugins"))) {
|
||||
mkdirSync(utils.getPath("plugins"));
|
||||
}
|
||||
if (url.endsWith("/")) url = url.slice(0, -1);
|
||||
let response = await fetch(
|
||||
`${url}/archive/refs/heads/main.zip`
|
||||
);
|
||||
let repo = url.split("/").slice(-2).join("/");
|
||||
let apiRepo = await fetch(
|
||||
`https://api.github.com/repos/${repo}`
|
||||
).then((res) => res.json());
|
||||
console.debug(`REPO ID: ${apiRepo.id}`);
|
||||
// extract the files from the first folder in the zip response
|
||||
let zip = new AdmZip(await response.buffer());
|
||||
let entry = zip.getEntries()[0];
|
||||
if (!existsSync(join(utils.getPath("plugins"), "gh_" + apiRepo.id))) {
|
||||
mkdirSync(join(utils.getPath("plugins"), "gh_" + apiRepo.id));
|
||||
}
|
||||
console.log(join(utils.getPath("plugins"), "gh_" + apiRepo.id))
|
||||
zip.extractEntryTo(entry, join(utils.getPath("plugins"), "gh_" + apiRepo.id), false, true);
|
||||
let commit = await fetch(
|
||||
`https://api.github.com/repos/${repo}/commits`
|
||||
).then((res) => res.json());
|
||||
console.debug(`COMMIT SHA: ${commit[0].sha}`);
|
||||
let theme = JSON.parse(
|
||||
readFileSync(join(utils.getPath("plugins"), "gh_" + apiRepo.id, "package.json"), "utf8")
|
||||
);
|
||||
theme.id = apiRepo.id
|
||||
theme.commit = commit[0].sha
|
||||
writeFileSync(
|
||||
join(utils.getPath("plugins"), "gh_" + apiRepo.id, "package.json"),
|
||||
JSON.stringify(theme, null, 4),
|
||||
"utf8"
|
||||
);
|
||||
} catch (e) {
|
||||
returnVal.success = false;
|
||||
}
|
||||
BrowserWindow.win.webContents.send("plugin-installed", returnVal);
|
||||
});
|
||||
|
||||
ipcMain.handle("get-github-theme", async (event, url) => {
|
||||
const returnVal = {
|
||||
success: true,
|
||||
|
@ -810,7 +868,7 @@ export class BrowserWindow {
|
|||
BrowserWindow.win.webContents.openDevTools({mode: 'detach'});
|
||||
})
|
||||
|
||||
ipcMain.on('relaunchApp',(_event, _) => {
|
||||
ipcMain.handle('relaunchApp',(_event, _) => {
|
||||
app.relaunch()
|
||||
app.exit()
|
||||
})
|
||||
|
|
|
@ -19,11 +19,20 @@ export class Plugins {
|
|||
private basePluginsPath = path.join(__dirname, '../plugins');
|
||||
private userPluginsPath = path.join(electron.app.getPath('userData'), 'Plugins');
|
||||
private readonly pluginsList: any = {};
|
||||
private static PluginMap: any = {};
|
||||
|
||||
constructor() {
|
||||
this.pluginsList = this.getPlugins();
|
||||
}
|
||||
|
||||
public static getPluginFromMap(plugin: string): any {
|
||||
if(Plugins.PluginMap[plugin]) {
|
||||
return Plugins.PluginMap[plugin];
|
||||
}else{
|
||||
return plugin;
|
||||
}
|
||||
}
|
||||
|
||||
public getPlugins(): any {
|
||||
let plugins: any = {};
|
||||
|
||||
|
@ -68,10 +77,12 @@ export class Plugins {
|
|||
else if (fs.lstatSync(path.join(this.userPluginsPath, file)).isDirectory()) {
|
||||
const pluginPath = path.join(this.userPluginsPath, file);
|
||||
if (fs.existsSync(path.join(pluginPath, 'package.json'))) {
|
||||
const plugin = require(path.join(pluginPath, "index.js"));
|
||||
const pluginPackage = require(path.join(pluginPath, "package.json"));
|
||||
const plugin = require(path.join(pluginPath, pluginPackage.main));
|
||||
if (plugins[plugin.name] || plugin.name in plugins) {
|
||||
console.log(`[${plugin.name}] Plugin already loaded / Duplicate Class Name`);
|
||||
} else {
|
||||
Plugins.PluginMap[pluginPackage.name] = file;
|
||||
const pluginEnv = {
|
||||
app: electron.app,
|
||||
store: utils.getStore(),
|
||||
|
|
|
@ -86,6 +86,10 @@ export class utils {
|
|||
return bw.win
|
||||
}
|
||||
|
||||
static loadPluginFrontend(path: string): void {
|
||||
|
||||
}
|
||||
|
||||
static loadJSFrontend(path: string): void {
|
||||
bw.win.webContents.executeJavaScript(fs.readFileSync(path, "utf8"));
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require('v8-compile-cache');
|
||||
|
||||
import {app, components, ipcMain} from 'electron';
|
||||
const {app, components, ipcMain} = require('electron');
|
||||
import {join} from 'path';
|
||||
|
||||
if (!app.isPackaged) {
|
||||
|
@ -41,8 +41,7 @@ app.on('ready', () => {
|
|||
require('vue-devtools').install()
|
||||
}
|
||||
|
||||
app.whenReady().then(async () => {
|
||||
await components.whenReady();
|
||||
components.whenReady().then(async () => {
|
||||
const bw = new BrowserWindow()
|
||||
const win = await bw.createWindow()
|
||||
|
||||
|
@ -51,11 +50,11 @@ app.on('ready', () => {
|
|||
})
|
||||
|
||||
console.log('[Cider][Widevine] Status:', components.status());
|
||||
win.show();
|
||||
|
||||
win.on("ready-to-show", () => {
|
||||
Cider.bwCreated();
|
||||
CiderPlug.callPlugins('onReady', win);
|
||||
win.show();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
1
src/renderer/assets/music.svg
Normal file
1
src/renderer/assets/music.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-music"><path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle></svg>
|
After Width: | Height: | Size: 327 B |
|
@ -67,16 +67,17 @@ const CiderAudio = {
|
|||
} else {try{CiderAudio.source.disconnect(CiderAudio.context.destination)}catch(e){}}
|
||||
CiderAudio.audioNodes.gainNode = CiderAudio.context.createGain()
|
||||
CiderAudio.source.connect(CiderAudio.audioNodes.gainNode);
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.context.destination);
|
||||
if(app.cfg.audio.normalization){
|
||||
CiderAudio.normalizerOn()
|
||||
}
|
||||
if (app.cfg.audio.spatial){
|
||||
CiderAudio.spatialOn()
|
||||
}
|
||||
CiderAudio.equalizer()
|
||||
CiderAudio.equalizer();
|
||||
CiderAudio.hierarchical_loading();
|
||||
},
|
||||
normalizerOn: function (){
|
||||
},
|
||||
normalizerOn: function (){},
|
||||
normalizerOff: function (){
|
||||
CiderAudio.audioNodes.gainNode.gain.setTargetAtTime(1, CiderAudio.context.currentTime+ 1, 0.5);
|
||||
},
|
||||
|
@ -84,7 +85,7 @@ const CiderAudio = {
|
|||
spatialOn: function (){
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
CiderAudio.audioNodes.spatialNode = CiderAudio.context.createConvolver();
|
||||
|
||||
CiderAudio.audioNodes.spatialNode.normalize = true;
|
||||
switch (app.cfg.audio.maikiwiAudio.spatialType) {
|
||||
case 0:
|
||||
fetch('./audio/impulses/CiderSpatial_Conv.wav').then(async (impulseData) => {
|
||||
|
@ -109,14 +110,9 @@ const CiderAudio = {
|
|||
app.cfg.audio.maikiwiAudio.spatialType = 0;
|
||||
break;
|
||||
}
|
||||
CiderAudio.audioNodes.spatialNode.normalize = true;
|
||||
CiderAudio.audioNodes.spatialNode.connect(CiderAudio.context.destination);
|
||||
}
|
||||
else {
|
||||
try{
|
||||
CiderAudio.audioNodes.gainNode.disconnect(CiderAudio.context.destination);} catch(e){}
|
||||
CiderAudio.audioNodes.spatialNode = new ResonanceAudio(CiderAudio.context);
|
||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.context.destination);
|
||||
let roomDimensions = {
|
||||
width: 32,
|
||||
height: 12,
|
||||
|
@ -439,41 +435,110 @@ const CiderAudio = {
|
|||
hierarchical_loading: function (){
|
||||
CiderAudio.hierarchical_unloading();
|
||||
|
||||
// Vibrant Bass, CAP, Analog Warmth, Spatial
|
||||
if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier !== 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === true &&
|
||||
app.cfg.audio.spatial === true &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === true) {
|
||||
|
||||
if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier !== 0) { // Vibrant Bass
|
||||
CiderAudio.vibrantbass_h2_1(true)
|
||||
|
||||
if (app.cfg.audio.maikiwiAudio.ciderPPE === true) { // Vibrant Bass, CAP
|
||||
CiderAudio.llpw_h2_2(true, 2);
|
||||
|
||||
if (app.cfg.audio.maikiwiAudio.analogWarmth === true) { // Vibrant Bass, CAP, Analog Warmth
|
||||
CiderAudio.analogWarmth_h2_3(true, 3);
|
||||
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
if (app.cfg.audio.spatial === true) {
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) { // Vibrant Bass, CAP, Analog Warmth, Maikiwi Spatial
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
||||
CiderAudio.audioNodes.spatialNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
app.cfg.audio.normalization = true;
|
||||
console.debug('[Cider][Audio] Vibrant Bass, CAP, Analog Warmth, Maikiwi Spatial')
|
||||
}
|
||||
else {
|
||||
else { // Vibrant Bass, CAP, Analog Warmth, Spatial
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialInput.input);
|
||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, CAP, Analog Warmth, Spatial')
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
// CAP, Analog Warmth, Spatial
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier === 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === true &&
|
||||
app.cfg.audio.spatial === true &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === true) {
|
||||
else {
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, CAP, Analog Warmth')
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (app.cfg.audio.spatial === true) {
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
||||
CiderAudio.audioNodes.spatialNode.connect(CiderAudio.audioNodes.llpw[0]);
|
||||
app.cfg.audio.normalization = true
|
||||
console.debug('[Cider][Audio] Vibrant Bass, CAP, Maikiwi Spatial')
|
||||
}
|
||||
else {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialInput.input);
|
||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.llpw[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, CAP, Spatial')
|
||||
}
|
||||
}
|
||||
else {
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, CAP')
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (app.cfg.audio.maikiwiAudio.analogWarmth === true) {
|
||||
CiderAudio.analogWarmth_h2_3(true, 2);
|
||||
app.cfg.audio.normalization = true;
|
||||
|
||||
if (app.cfg.audio.spatial === true) {
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
||||
CiderAudio.audioNodes.spatialNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, Analog Warmth, Maikiwi Spatial')
|
||||
}
|
||||
else {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialInput.input);
|
||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, Analog Warmth, Spatial')
|
||||
}
|
||||
}
|
||||
else {
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, Analog Warmth')
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (app.cfg.audio.spatial === true) {
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
||||
CiderAudio.audioNodes.spatialNode.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, Maikiwi Spatial')
|
||||
}
|
||||
else {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialInput.input);
|
||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, Spatial')
|
||||
}
|
||||
}
|
||||
else {
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Vibrant Bass ends here
|
||||
else {
|
||||
if (app.cfg.audio.maikiwiAudio.ciderPPE === true) {
|
||||
CiderAudio.llpw_h2_2(true, 1);
|
||||
|
||||
if (app.cfg.audio.maikiwiAudio.analogWarmth === true) {
|
||||
CiderAudio.analogWarmth_h2_3(true, 3);
|
||||
|
||||
if (app.cfg.audio.spatial === true) {
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
||||
CiderAudio.audioNodes.spatialNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
|
@ -486,48 +551,13 @@ const CiderAudio = {
|
|||
console.debug('[Cider][Audio] CAP, Analog Warmth, Spatial')
|
||||
}
|
||||
}
|
||||
// Vibrant Bass, CAP, Spatial
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier !== 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === true &&
|
||||
app.cfg.audio.spatial === true &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === false) {
|
||||
|
||||
CiderAudio.vibrantbass_h2_1(true)
|
||||
CiderAudio.llpw_h2_2(true, 2);
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
||||
CiderAudio.audioNodes.spatialNode.connect(CiderAudio.audioNodes.llpw[0]);
|
||||
app.cfg.audio.normalization = true
|
||||
console.debug('[Cider][Audio] Vibrant Bass, CAP, Maikiwi Spatial')
|
||||
else {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
console.debug('[Cider][Audio] CAP and Analog Warmth')
|
||||
}
|
||||
}
|
||||
else {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialInput.input);
|
||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.llpw[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, CAP, Spatial')
|
||||
}
|
||||
|
||||
}
|
||||
// Vibrant Bass, CAP, Analog Warmth
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier !== 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === true &&
|
||||
app.cfg.audio.spatial === false &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === true) {
|
||||
|
||||
CiderAudio.vibrantbass_h2_1(true)
|
||||
CiderAudio.llpw_h2_2(true, 2);
|
||||
CiderAudio.analogWarmth_h2_3(true, 3);
|
||||
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, CAP, Analog Warmth')
|
||||
}
|
||||
// CAP, Spatial
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier === 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === true &&
|
||||
app.cfg.audio.spatial === true &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === false) {
|
||||
|
||||
CiderAudio.llpw_h2_2(true, 1);
|
||||
if (app.cfg.audio.spatial === true) {
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
||||
CiderAudio.audioNodes.spatialNode.connect(CiderAudio.audioNodes.llpw[0]);
|
||||
|
@ -540,13 +570,17 @@ const CiderAudio = {
|
|||
console.debug('[Cider][Audio] CAP, Spatial')
|
||||
}
|
||||
}
|
||||
// Analog Warmth, Spatial
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier === 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === false &&
|
||||
app.cfg.audio.spatial === true &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === true) {
|
||||
|
||||
else {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);
|
||||
console.debug('[Cider][Audio] CAP')
|
||||
}
|
||||
}
|
||||
} // CAP ends here
|
||||
else {
|
||||
if (app.cfg.audio.maikiwiAudio.analogWarmth === true) {
|
||||
CiderAudio.analogWarmth_h2_3(true, 1);
|
||||
|
||||
if (app.cfg.audio.spatial === true) {
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
||||
CiderAudio.audioNodes.spatialNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
|
@ -559,104 +593,17 @@ const CiderAudio = {
|
|||
console.debug('[Cider][Audio] Analog Warmth, Spatial')
|
||||
}
|
||||
}
|
||||
// CAP, Analog Warmth
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier === 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === true &&
|
||||
app.cfg.audio.spatial === false &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === true) {
|
||||
|
||||
CiderAudio.llpw_h2_2(true, 1);
|
||||
CiderAudio.analogWarmth_h2_3(true, 3);
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
console.debug('[Cider][Audio] CAP and Analog Warmth')
|
||||
}
|
||||
// Vibrant Bass, Analog Warmth
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier !== 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === false &&
|
||||
app.cfg.audio.spatial === false &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === true) {
|
||||
|
||||
CiderAudio.vibrantbass_h2_1(true)
|
||||
CiderAudio.analogWarmth_h2_3(true, 2);
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, Analog Warmth')
|
||||
}
|
||||
|
||||
// Vibrant Bass, CAP
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier !== 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === true &&
|
||||
app.cfg.audio.spatial === false &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === false) {
|
||||
|
||||
CiderAudio.vibrantbass_h2_1(true)
|
||||
CiderAudio.llpw_h2_2(true, 2);
|
||||
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, CAP')
|
||||
}
|
||||
// Vibrant Bass, Spatial
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier !== 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === false &&
|
||||
app.cfg.audio.spatial === true &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === false) {
|
||||
|
||||
CiderAudio.vibrantbass_h2_1(true)
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
||||
CiderAudio.audioNodes.spatialNode.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, Maikiwi Spatial')
|
||||
}
|
||||
else {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialInput.input);
|
||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass, Spatial')
|
||||
}
|
||||
|
||||
}
|
||||
// Vibrant Bass
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier !== 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === false &&
|
||||
app.cfg.audio.spatial === false &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === false) {
|
||||
|
||||
CiderAudio.vibrantbass_h2_1(true)
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug('[Cider][Audio] Vibrant Bass')
|
||||
|
||||
}
|
||||
// CAP
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier === 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === true &&
|
||||
app.cfg.audio.spatial === false &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === false) {
|
||||
CiderAudio.llpw_h2_2(true, 1);
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);
|
||||
console.debug('[Cider][Audio] CAP')
|
||||
}
|
||||
// Analog Warmth
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier === 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === false &&
|
||||
app.cfg.audio.spatial === false &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === true) {
|
||||
CiderAudio.analogWarmth_h2_3(true, 1);
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||
console.debug('[Cider][Audio] Analog Warmth')
|
||||
}
|
||||
// Spatial
|
||||
else if (app.cfg.audio.maikiwiAudio.vibrantBass.multiplier === 0 &&
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE === false &&
|
||||
app.cfg.audio.spatial === true &&
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth === false){
|
||||
}
|
||||
else {
|
||||
if (app.cfg.audio.spatial === true) {
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
||||
CiderAudio.audioNodes.spatialNode.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||
app.cfg.audio.normalization = true;
|
||||
console.debug('[Cider][Audio] Maikiwi Spatial')
|
||||
}
|
||||
else {
|
||||
|
@ -664,12 +611,13 @@ const CiderAudio = {
|
|||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||
console.debug('[Cider][Audio] Spatial')
|
||||
}
|
||||
|
||||
}
|
||||
// Nothing
|
||||
else {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||
console.debug('[Cider][Audio] Nothing') // If CAP & vibrant bass is disabled
|
||||
console.debug('[Cider][Audio] Direct Mode to Equalizer')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.debug("[Cider][Audio] Finished hierarchical loading");
|
||||
|
@ -691,13 +639,11 @@ const CiderAudio = {
|
|||
CiderAudio.audioNodes.audioBands[i].gain.value = GAIN[i] * app.cfg.audio.equalizer.mix;
|
||||
}
|
||||
|
||||
// Dynamic-ish loading
|
||||
CiderAudio.hierarchical_loading();
|
||||
|
||||
for (let i = 1; i < BANDS.length; i ++) {
|
||||
CiderAudio.audioNodes.audioBands[i-1].connect(CiderAudio.audioNodes.audioBands[i]);
|
||||
}
|
||||
CiderAudio.audioNodes.audioBands[BANDS.length-1].connect(CiderAudio.context.destination);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,6 +10,22 @@ const CiderFrontAPI = {
|
|||
AddMenuEntry(entry) {
|
||||
app.pluginMenuEntries.push(entry)
|
||||
app.pluginInstalled = true
|
||||
},
|
||||
StyleSheets: {
|
||||
Add(href) {
|
||||
console.log("Adding stylesheet: " + href)
|
||||
let id = uuidv4()
|
||||
let link = document.createElement("link")
|
||||
link.rel = "stylesheet/less"
|
||||
link.type = "text/css"
|
||||
link.href = href
|
||||
link.setAttribute("css-id", id)
|
||||
// insert the link before document.querySelector("#userTheme") in head
|
||||
document.querySelector("head").insertBefore(link, document.querySelector("#userTheme"))
|
||||
less.registerStylesheetsImmediately()
|
||||
less.refresh(true, true, true)
|
||||
return link
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,17 +1,32 @@
|
|||
const MusicKitTools = {
|
||||
async v3Continuous (href, options = {}, reqOptions = {}) {
|
||||
async v3Continuous ({
|
||||
href,
|
||||
options = {},
|
||||
reqOptions = {},
|
||||
onProgress = () => {},
|
||||
onError = () => {},
|
||||
onSuccess = () => {}
|
||||
} = {}) {
|
||||
let returnData = []
|
||||
async function sendReq(href, options) {
|
||||
const response = await app.mk.api.v3.music(href, options)
|
||||
const response = await app.mk.api.v3.music(href, options).catch(error => onError)
|
||||
|
||||
returnData = returnData.concat(response.data.data)
|
||||
if(response.data.next) {
|
||||
onProgress({
|
||||
response: response,
|
||||
total: returnData.length
|
||||
})
|
||||
try {
|
||||
await sendReq(response.data.next, options)
|
||||
}catch(e){
|
||||
await sendReq(response.data.next, options)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await sendReq(href, options)
|
||||
|
||||
onSuccess(returnData)
|
||||
return returnData
|
||||
},
|
||||
getHeader() {
|
||||
|
|
|
@ -217,7 +217,11 @@ const app = new Vue({
|
|||
}
|
||||
},
|
||||
pauseButtonTimer: null,
|
||||
activeCasts: []
|
||||
activeCasts: [],
|
||||
pluginPages: {
|
||||
page: "hello-world",
|
||||
pages: [],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cfg: {
|
||||
|
@ -1488,6 +1492,11 @@ const app = new Vue({
|
|||
let page = hash[0]
|
||||
let id = hash[1]
|
||||
let isLibrary = hash[2] ?? false
|
||||
if(page == "plugin") {
|
||||
this.pluginPages.page = "plugin." + id
|
||||
this.page = "plugin-renderer"
|
||||
return
|
||||
}
|
||||
this.routeView({
|
||||
kind: page,
|
||||
id: id,
|
||||
|
@ -2048,7 +2057,7 @@ const app = new Vue({
|
|||
}
|
||||
let librarySongs = await CiderCache.getCache(cacheId)
|
||||
if (librarySongs) {
|
||||
this.library.songs.listing = librarySongs
|
||||
this.library.songs.listing.data = librarySongs
|
||||
this.searchLibrarySongs()
|
||||
}
|
||||
if (this.songstest) {
|
||||
|
@ -2058,8 +2067,9 @@ const app = new Vue({
|
|||
this.library.backgroundNotification.show = true
|
||||
this.library.backgroundNotification.message = app.getLz('notification.updatingLibrarySongs')
|
||||
|
||||
function downloadChunk() {
|
||||
const params = {
|
||||
library = await MusicKitTools.v3Continuous({
|
||||
href: `/v1/me/library/songs/`,
|
||||
options: {
|
||||
"include[library-songs]": "catalog,artists,albums",
|
||||
"fields[artists]": "name,url,id",
|
||||
"fields[albums]": "name,url,id",
|
||||
|
@ -2067,80 +2077,28 @@ const app = new Vue({
|
|||
"fields[catalog]": "artistUrl,albumUrl",
|
||||
"fields[songs]": "artistName,artistUrl,artwork,contentRating,editorialArtwork,name,playParams,releaseDate,url",
|
||||
limit: 100,
|
||||
l: self.mklang
|
||||
}
|
||||
const safeparams = {
|
||||
"platform": "web",
|
||||
"limit": 80
|
||||
}
|
||||
self.library.songs.downloadState = 1
|
||||
if (downloaded == null) {
|
||||
app.mk.api.v3.music(`/v1/me/library/songs/`, params).then((response) => {
|
||||
processChunk(response.data)
|
||||
}).catch((error) => {
|
||||
console.log('safe loading');
|
||||
app.mk.api.v3.music(`/v1/me/library/songs/`, safeparams).then((response) => {
|
||||
processChunk(response.data)
|
||||
}).catch((error) => {
|
||||
console.log('safe loading failed', error)
|
||||
app.library.songs.downloadState = 2
|
||||
app.library.backgroundNotification.show = false
|
||||
})
|
||||
})
|
||||
} else {
|
||||
if (downloaded.next != null) {
|
||||
app.mk.api.v3.music(downloaded.next, params).then((response) => {
|
||||
processChunk(response.data)
|
||||
}).catch((error) => {
|
||||
console.log('safe loading');
|
||||
app.mk.api.v3.music(downloaded.next, safeparams).then((response) => {
|
||||
processChunk(response.data)
|
||||
}).catch((error) => {
|
||||
console.log('safe loading failed', error)
|
||||
app.library.songs.downloadState = 2
|
||||
app.library.backgroundNotification.show = false
|
||||
})
|
||||
})
|
||||
} else {
|
||||
console.log("Download next", downloaded.next)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function processChunk(response) {
|
||||
downloaded = response
|
||||
library = library.concat(downloaded.data)
|
||||
l: app.mklang,
|
||||
},
|
||||
onProgress: (data) => {
|
||||
console.log(`${data.total}/${data.response.data.meta.total}`)
|
||||
self.library.backgroundNotification.show = true
|
||||
self.library.backgroundNotification.message = app.getLz('notification.updatingLibrarySongs')
|
||||
self.library.backgroundNotification.total = downloaded.meta.total
|
||||
self.library.backgroundNotification.progress = library.length
|
||||
self.library.backgroundNotification.total = data.response.data.meta.total
|
||||
self.library.backgroundNotification.progress = data.total
|
||||
},
|
||||
onSuccess: () => {
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
self.library.songs.listing = library
|
||||
self.library.songs.downloadState = 2
|
||||
self.library.backgroundNotification.show = false
|
||||
self.searchLibrarySongs()
|
||||
CiderCache.putCache(cacheId, library)
|
||||
console.log("Done!")
|
||||
|
||||
if (downloaded.meta.total == 0) {
|
||||
self.library.songs.downloadState = 3
|
||||
return
|
||||
}
|
||||
if (typeof downloaded.next == "undefined") {
|
||||
console.log("downloaded.next is undefined")
|
||||
self.library.songs.listing = library
|
||||
self.library.songs.downloadState = 2
|
||||
self.library.backgroundNotification.show = false
|
||||
self.searchLibrarySongs()
|
||||
CiderCache.putCache(cacheId, library)
|
||||
}
|
||||
if (downloaded.meta.total > library.length || typeof downloaded.meta.next != "undefined") {
|
||||
console.log(`downloading next chunk - ${library.length} songs so far`)
|
||||
downloadChunk()
|
||||
} else {
|
||||
self.library.songs.listing = library
|
||||
self.library.songs.downloadState = 2
|
||||
self.library.backgroundNotification.show = false
|
||||
self.searchLibrarySongs()
|
||||
CiderCache.putCache(cacheId, library)
|
||||
// console.log(library)
|
||||
}
|
||||
}
|
||||
|
||||
downloadChunk()
|
||||
},
|
||||
// copy the getLibrarySongsFull function except change Songs to Albums
|
||||
async getLibraryAlbumsFull(force = false, index) {
|
||||
|
@ -3379,7 +3337,7 @@ const app = new Vue({
|
|||
if (app.getThemeDirective("lcdArtworkSize") != "") {
|
||||
artworkSize = app.getThemeDirective("lcdArtworkSize")
|
||||
} else if (this.cfg.visual.directives.windowLayout == "twopanel") {
|
||||
artworkSize = 70
|
||||
artworkSize = 80
|
||||
}
|
||||
this.currentArtUrl = '';
|
||||
this.currentArtUrlRaw = '';
|
||||
|
@ -3729,6 +3687,15 @@ const app = new Vue({
|
|||
app.appRoute(`album/${app.mk.nowPlayingItem.relationships.albums.data[0].id}`)
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "showInMusic",
|
||||
"icon": "./assets/music.svg",
|
||||
"hidden": true,
|
||||
"name": app.getLz('action.showInAppleMusic'),
|
||||
"action": function () {
|
||||
app.routeView(app.mk.nowPlayingItem._container)
|
||||
}
|
||||
},
|
||||
{
|
||||
"icon": "./assets/feather/share.svg",
|
||||
"name": app.getLz('action.share'),
|
||||
|
@ -3755,6 +3722,11 @@ const app = new Vue({
|
|||
menus.normal.items = menus.normal.items.concat(this.contextExt.normal)
|
||||
}
|
||||
}
|
||||
|
||||
if(app.mk.nowPlayingItem._container["attributes"] && app.mk.nowPlayingItem._container.name != "station") {
|
||||
menus.normal.items.find(x => x.id == "showInMusic").hidden = false
|
||||
}
|
||||
|
||||
this.showMenuPanel(menus[useMenu], event)
|
||||
|
||||
try {
|
||||
|
@ -3875,7 +3847,8 @@ const app = new Vue({
|
|||
} else {
|
||||
ipcRenderer.send('windowontop', false)
|
||||
this.cfg.visual.miniplayer_top_toggle = false;
|
||||
}} else {
|
||||
}
|
||||
} else {
|
||||
ipcRenderer.send('windowontop', this.cfg.visual.miniplayer_top_toggle ?? false)
|
||||
}
|
||||
},
|
||||
|
|
13152
src/renderer/style.css
Normal file
13152
src/renderer/style.css
Normal file
File diff suppressed because it is too large
Load diff
|
@ -558,14 +558,14 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
|||
.app-sidebar-notification {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
min-height: 60px;
|
||||
min-height: 36px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-top: 1px solid rgb(200 200 200 / 15%);
|
||||
background: rgb(0 0 0 / 15%);
|
||||
flex-direction: column;
|
||||
padding: 20px 0px;
|
||||
padding: 10px 0px;
|
||||
|
||||
&.libraryNotification {
|
||||
flex-direction: row;
|
||||
|
|
40
src/renderer/themes/sweetener.css
Normal file
40
src/renderer/themes/sweetener.css
Normal file
|
@ -0,0 +1,40 @@
|
|||
.menu-panel .menu-panel-body {
|
||||
background-color: rgba(30, 30, 30, 0.45);
|
||||
backdrop-filter: blur(32px) saturate(180%);
|
||||
animation: menuIn 0.1s var(--appleEase);
|
||||
}
|
||||
@keyframes menuIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(-10px) translate3d(0, 0, 0);
|
||||
background: #1e1e1e;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
background: rgba(30, 30, 30, 0.45);
|
||||
}
|
||||
}
|
||||
.cd-mediaitem-square:not(.mediaitem-card) {
|
||||
transition: transform 0.2s var(--appleEase);
|
||||
transition-delay: 0.1s;
|
||||
padding: 12px;
|
||||
height: 250px;
|
||||
}
|
||||
.cd-mediaitem-square:not(.mediaitem-card) .artwork-container,
|
||||
.cd-mediaitem-square:not(.mediaitem-card) .info-rect {
|
||||
transition: transform 0.22s var(--appleEase);
|
||||
transition-delay: 0.05s;
|
||||
}
|
||||
.cd-mediaitem-square:not(.mediaitem-card):hover .artwork-container {
|
||||
transform: scale(1.1);
|
||||
transition: transform 0.1s var(--appleEase);
|
||||
transition-delay: 0s;
|
||||
transform-origin: center;
|
||||
}
|
||||
.cd-mediaitem-square:not(.mediaitem-card):hover .info-rect {
|
||||
z-index: 1;
|
||||
transition: transform 0.1s var(--appleEase);
|
||||
transition-delay: 0s;
|
||||
transform: translateY(8px) translate3d(0, 0, 0);
|
||||
}
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
&:hover {
|
||||
.artwork-container {
|
||||
transform : scale(1.1) translate3d(0,0,0);
|
||||
transform : scale(1.1);
|
||||
transition : transform .1s var(--appleEase);
|
||||
transition-delay: 0s;
|
||||
transform-origin: center;
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
platformInfo: {requiresCDMAttachOnStart: !0, maxSecurityLevel: d, keySystemConfig: h},
|
||||
appData: {serviceName: "Apple Music"}
|
||||
}
|
||||
|
||||
this.hls.attachMedia(this.$refs.video);
|
||||
this.hls.loadSource(this.video);
|
||||
let u = this.hls;
|
||||
|
@ -80,8 +81,8 @@
|
|||
quality = qualities[qualities.length - 1].level
|
||||
}
|
||||
}
|
||||
|
||||
this.hls.loadLevel = parseInt( quality || 1);},200)
|
||||
try{
|
||||
this.hls.loadLevel = parseInt( quality || 1);} catch(e){}},200)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -295,11 +295,19 @@
|
|||
},
|
||||
changeVibrantBass() {
|
||||
app.cfg.audio.maikiwiAudio.vibrantBass.multiplier = app.cfg.audio.equalizer.vibrantBass / 10
|
||||
CiderAudio.hierarchical_loading();
|
||||
if (app.cfg.audio.equalizer.vibrantBass != 0) {
|
||||
if (app.cfg.audio.equalizer.vibrantBass !== '0') {
|
||||
try {
|
||||
for (var i = 0; i < 21; i++) {
|
||||
CiderAudio.audioNodes.vibrantbassNode[i].gain.value = app.cfg.audio.maikiwiAudio.vibrantBass.gain[i] * (app.cfg.audio.equalizer.vibrantBass / 10);
|
||||
}}
|
||||
catch(e) {
|
||||
CiderAudio.hierarchical_loading();
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
CiderAudio.hierarchical_loading();
|
||||
}
|
||||
},
|
||||
changeMix() {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('hello-world', {
|
||||
var hw = Vue.component('hello-world', {
|
||||
template: '#hello-world',
|
||||
methods: {
|
||||
sayHello: function () {
|
||||
|
|
|
@ -45,10 +45,10 @@
|
|||
</div>
|
||||
<div class="info-rect" :style="{'padding-left': (showArtwork ? '' : '16px')}"
|
||||
@dblclick="route()">
|
||||
<div class="title text-overflow-elipsis">
|
||||
<div class="title text-overflow-elipsis" :title="item.attributes.name">
|
||||
{{ item.attributes.name }}
|
||||
</div>
|
||||
<div class="subtitle text-overflow-elipsis" style="-webkit-box-orient: horizontal;">
|
||||
<div class="subtitle text-overflow-elipsis" :title="item.attributes.artistName" style="-webkit-box-orient: horizontal;">
|
||||
<template v-if="item.attributes.artistName">
|
||||
<div class="artist item-navigate text-overflow-elipsis"
|
||||
@click="app.searchAndNavigate(item,'artist')">
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="info-rect" :class="{'info-rect-card': kind == 'card'}" :style="{'--bgartwork': getArtworkUrl(size, true)}">
|
||||
<div class="title" v-if="item.attributes.artistNames == null || kind!= 'card'" @click='app.routeView(item)'>
|
||||
<div class="title" :title="item.attributes?.name ?? (item.relationships?.contents?.data[0]?.attributes?.name ?? '')" v-if="item.attributes.artistNames == null || kind!= 'card'" @click='app.routeView(item)'>
|
||||
<div class="item-navigate text-overflow-elipsis">{{ item.attributes?.name ?? (item.relationships?.contents?.data[0]?.attributes?.name ?? '') }}</div>
|
||||
<div class="explicit-icon" v-if="item.attributes && item.attributes.contentRating == 'explicit'" style= "background-image: url(./assets/explicit.svg);height: 12px;width: 12px;filter: contrast(0);background-repeat: no-repeat;margin-top: 2.63px;margin-left: 4px;"></div>
|
||||
</div>
|
||||
<div class="subtitle item-navigate text-overflow-elipsis" @click="getSubtitleNavigation()"
|
||||
<div :title="getSubtitle()" class="subtitle item-navigate text-overflow-elipsis" @click="getSubtitleNavigation()"
|
||||
v-if="getSubtitle() != ''">
|
||||
{{ getSubtitle() }}
|
||||
</div>
|
||||
|
|
|
@ -30,10 +30,10 @@
|
|||
<small>{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.description')}}</small>
|
||||
</div>
|
||||
<div class="md-option-segment md-option-segment_auto">
|
||||
<button class="md-btn" :disabled="app.cfg.audio.maikiwiAudio.ciderPPE_value === 0.5" v-model="app.cfg.audio.maikiwiAudio.ciderPPE_value" onclick="app.cfg.audio.maikiwiAudio.ciderPPE_value = 0.5; CiderAudio.hierarchical_loading();">
|
||||
<button class="md-btn" :disabled="app.cfg.audio.maikiwiAudio.ciderPPE_value === 0.5" v-model="app.cfg.audio.maikiwiAudio.ciderPPE_value" v-on:click="ciderPPEStandard">
|
||||
{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.standard')}}
|
||||
</button>
|
||||
<button class="md-btn" style="margin-top: 5px;" :disabled="app.cfg.audio.maikiwiAudio.ciderPPE_value === 0.55" v-model="app.cfg.audio.maikiwiAudio.ciderPPE_value" onclick="app.cfg.audio.maikiwiAudio.ciderPPE_value = 0.55; CiderAudio.hierarchical_loading();">
|
||||
<button class="md-btn" style="margin-top: 5px;" :disabled="app.cfg.audio.maikiwiAudio.ciderPPE_value === 0.55" v-model="app.cfg.audio.maikiwiAudio.ciderPPE_value" v-on:click="ciderPPEClarity">
|
||||
{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.aggressive')}}
|
||||
</button>
|
||||
</div>
|
||||
|
@ -55,10 +55,10 @@
|
|||
<small>{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.analogWarmthIntensity.description')}}</small>
|
||||
</div>
|
||||
<div class="md-option-segment md-option-segment_auto">
|
||||
<button class="md-btn" :disabled="app.cfg.audio.maikiwiAudio.analogWarmth_value === 1.25" v-model="app.cfg.audio.maikiwiAudio.analogWarmth_value" onclick="app.cfg.audio.maikiwiAudio.analogWarmth_value = 1.25; CiderAudio.hierarchical_loading();">
|
||||
<button class="md-btn" :disabled="app.cfg.audio.maikiwiAudio.analogWarmth_value === 1.25" v-model="app.cfg.audio.maikiwiAudio.analogWarmth_value" v-on:click="analogWarmthSmooth">
|
||||
{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.analogWarmthIntensity.smooth')}}
|
||||
</button>
|
||||
<button class="md-btn" :disabled="app.cfg.audio.maikiwiAudio.analogWarmth_value === 1.75" v-model="app.cfg.audio.maikiwiAudio.analogWarmth_value" onclick="app.cfg.audio.maikiwiAudio.analogWarmth_value = 1.75; CiderAudio.hierarchical_loading();">
|
||||
<button class="md-btn" :disabled="app.cfg.audio.maikiwiAudio.analogWarmth_value === 1.75" v-model="app.cfg.audio.maikiwiAudio.analogWarmth_value" v-on:click="analogWarmthWarm">
|
||||
{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.analogWarmthIntensity.warm')}}
|
||||
</button>
|
||||
</div>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<small>{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.audioSpatialization.description')}}</small>
|
||||
</div>
|
||||
<div class="md-option-segment md-option-segment_auto">
|
||||
<input type="checkbox" v-model="app.cfg.audio.spatial" v-on:change="toggleSpatial" switch/>
|
||||
<input type="checkbox" v-model="app.cfg.audio.spatial" :disabled="app.cfg.audio.maikiwiAudio.spatial === true" v-on:change="toggleSpatial" switch/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext === true">
|
||||
|
@ -80,7 +80,7 @@
|
|||
<small>{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.description')}}</small>
|
||||
</div>
|
||||
<div class="md-option-segment md-option-segment_auto">
|
||||
<input type="checkbox" v-model="app.cfg.audio.maikiwiAudio.spatial" :disabled="app.cfg.audio.spatial === false" v-on:change="toggleSpatial" switch/>
|
||||
<input type="checkbox" v-model="app.cfg.audio.maikiwiAudio.spatial" :disabled="app.cfg.audio.spatial === false" v-on:change="toggleMaikiwiSpatial" switch/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.audio.maikiwiAudio.spatial === true && app.cfg.audio.spatial === true">
|
||||
|
@ -98,6 +98,59 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="opacity: 0.5; pointer-events: none">
|
||||
<div class="md-option-header">
|
||||
<span>{{$root.getLz('settings.header.unfinished')}}</span>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext === true">
|
||||
<div class="md-option-segment">
|
||||
Cider Atmosphere Realizer™️
|
||||
<br>
|
||||
<small>Realizes an entirely different musical atmosphere only to be found on state of the art audio setups.</small>
|
||||
</div>
|
||||
<div class="md-option-segment md-option-segment_auto">
|
||||
<button class="md-btn">
|
||||
Signature
|
||||
</button>
|
||||
<button class="md-btn">
|
||||
Signature+
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext === true">
|
||||
<div class="md-option-segment">
|
||||
Cider Origami™️ Vocal Enhancer/Remasterer
|
||||
<br>
|
||||
<small>Re-textures the vocals by carving out the frequencies and adjusts them to the selected profile.<br>
|
||||
<b>Modern:</b>
|
||||
Embracing 21st Century Equipment, this revives old recordings while preserving the Master's original intent.<br>
|
||||
<b>Intimate:</b>
|
||||
Bringing the vocals closer to your heart, communicating only the most personal connection between you and the artist.<br>
|
||||
<b>Breathy:</b>
|
||||
Giving the perfectionists a new voice, this adds naturality to the vocals by making them more breathy and more natural. <br>
|
||||
<b>Articulate:</b>
|
||||
Wrapping every detail of the vocal to your ear, resulting in a more expressive voice.
|
||||
</small>
|
||||
</div>
|
||||
<div class="md-option-segment md-option-segment_auto">
|
||||
<select class="md-select">
|
||||
<option value="none">{{$root.getLz('settings.header.visual.windowBackgroundStyle.none')}}
|
||||
</option>
|
||||
<option value="modern">
|
||||
Modern
|
||||
</option>
|
||||
<option value="intimate">
|
||||
Intimate
|
||||
</option>
|
||||
<option value="breathy">
|
||||
Breathy
|
||||
</option>
|
||||
<option value="articulate">
|
||||
Articulate
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
@ -120,10 +173,51 @@
|
|||
CiderAudio.hierarchical_loading();
|
||||
}
|
||||
else {
|
||||
app.cfg.audio.maikiwiAudio.spatial = false;
|
||||
CiderAudio.spatialOff()
|
||||
}
|
||||
|
||||
},
|
||||
toggleMaikiwiSpatial: function () {
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
CiderAudio.spatialOn()
|
||||
CiderAudio.hierarchical_loading();
|
||||
let normalized = Math.pow(10, (((Math.log10(app.mk.volume) * 20) + 12) / 20));
|
||||
if (normalized > 1.0) {app.mk.volume = 1}
|
||||
else {app.mk.volume = normalized}
|
||||
}
|
||||
else {
|
||||
let normalized = Math.pow(10, (((Math.log10(app.mk.volume) * 20) - 12) / 20));
|
||||
app.mk.volume = normalized
|
||||
CiderAudio.spatialOn()
|
||||
CiderAudio.hierarchical_loading();
|
||||
}
|
||||
},
|
||||
ciderPPEStandard: function () {
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE_value = 0.5;
|
||||
let LLPW_GAIN = [0.38, -1.81, -0.23, -0.51, 0.4, 0.84, 0.36, -0.34, 0.27, -1.2, -0.42, -0.67, 0.81, 1.31, -0.71, 0.68, -1.04, 0.79, -0.73, -1.33, 1.17, 0.57, 0.35, 6.33];
|
||||
for (let i = 0; i < 24; i++) {
|
||||
CiderAudio.audioNodes.llpw[i].gain.value = LLPW_GAIN[i];
|
||||
}
|
||||
},
|
||||
ciderPPEClarity: function () {
|
||||
app.cfg.audio.maikiwiAudio.ciderPPE_value = 0.55;
|
||||
let c_LLPW_GAIN = [-0.11, 0.27, -0.8, 0.57, 1.84, -0.38, 0.47, -1.56, 0.83, 1.58, -1.79, -0.45, 0.48, 1.22, -1.58, -1.59, -2.03, 2.56, -2.2, -2.48, 4.75, 10.5, 1.43, 3.76];
|
||||
for (let i = 0; i < 24; i++) {
|
||||
CiderAudio.audioNodes.llpw[i].gain.value = LLPW_GAIN[i];
|
||||
}
|
||||
},
|
||||
analogWarmthSmooth: function () {
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth_value = 1.25
|
||||
let WARMTH_GAIN = [-4.81, 0.74, 0.55, -0.84, -1.52, 0.84, 0.66, -0.29, 0.29, 0.94, 1.67, 1.62, -0.53, -0.81, -4.98, 1.43, 0.86, 1.13, -1.06, -0.95, -1.13, 1.78, -3.86];
|
||||
for (let i = 0; i < 23; i++) {
|
||||
CiderAudio.audioNodes.analogWarmth[i].gain.value = WARMTH_GAIN[i] * 1.25;
|
||||
}
|
||||
},
|
||||
analogWarmthWarm: function () {
|
||||
app.cfg.audio.maikiwiAudio.analogWarmth_value = 1.75
|
||||
let WARMTH_GAIN = [-4.81, 0.74, 0.55, -0.84, -1.52, 0.84, 0.66, -0.29, 0.29, 0.94, 1.67, 1.62, -0.53, -0.81, -4.98, 1.43, 0.86, 1.13, -1.06, -0.95, -1.13, 1.78, -3.86];
|
||||
for (let i = 0; i < 23; i++) {
|
||||
CiderAudio.audioNodes.analogWarmth[i].gain.value = WARMTH_GAIN[i] * 1.75;
|
||||
}
|
||||
}
|
||||
}})
|
||||
</script>
|
22
src/renderer/views/pages/plugin-renderer.ejs
Normal file
22
src/renderer/views/pages/plugin-renderer.ejs
Normal file
|
@ -0,0 +1,22 @@
|
|||
<script>
|
||||
Vue.component('plugin-renderer', {
|
||||
/*html*/
|
||||
template: `
|
||||
<component :is="getPage()"></component>
|
||||
`,
|
||||
data: function () {
|
||||
return {
|
||||
app: this.$root,
|
||||
}
|
||||
},
|
||||
props: {},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
getPage() {
|
||||
return this.$root.pluginPages.page
|
||||
}
|
||||
},
|
||||
}
|
||||
);
|
||||
</script>
|
|
@ -3,11 +3,11 @@
|
|||
<div class="gh-header">
|
||||
<div class="row">
|
||||
<div class="col nopadding">
|
||||
<h1 class="header-text">Plugins from GitHub</h1>
|
||||
<h1 class="header-text">{{$root.getLz('settings.header.visual.plugin.github.page')}}</h1>
|
||||
</div>
|
||||
<div class="col-auto nopadding flex-center">
|
||||
<button class="md-btn md-btn-small md-btn-block" @click="installThemeURL()">
|
||||
{{$root.getLz('settings.option.visual.theme.github.download')}}
|
||||
{{$root.getLz('settings.option.visual.plugin.github.download')}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -84,7 +84,7 @@
|
|||
},
|
||||
mounted() {
|
||||
this.getRepos();
|
||||
this.getInstalledThemes();
|
||||
// this.getInstalledThemes();
|
||||
},
|
||||
methods: {
|
||||
getInstalledThemes() {
|
||||
|
@ -124,36 +124,50 @@
|
|||
},
|
||||
installThemeRepo(repo) {
|
||||
let self = this
|
||||
let msg = app.stringTemplateParser(app.getLz('settings.option.visual.theme.github.install.confirm'), {
|
||||
let msg = app.stringTemplateParser(app.getLz('settings.option.visual.plugin.github.install.confirm'), {
|
||||
repo: repo.full_name
|
||||
});
|
||||
bootbox.confirm(msg, (res) => {
|
||||
if (res) {
|
||||
ipcRenderer.once("theme-installed", (event, arg) => {
|
||||
ipcRenderer.once("plugin-installed", (event, arg) => {
|
||||
if (arg.success) {
|
||||
self.themes = ipcRenderer.sendSync("get-themes")
|
||||
notyf.success(app.getLz('settings.notyf.visual.theme.install.success'));
|
||||
self.themes = []
|
||||
notyf.success(app.getLz('settings.notyf.visual.plugin.install.success'));
|
||||
bootbox.confirm(app.getLz("settings.prompt.visual.plugin.github.success"), (ok)=>{
|
||||
if(ok) {
|
||||
ipcRenderer.invoke("relaunchApp")
|
||||
}else{
|
||||
notyf.error(app.getLz('settings.notyf.visual.theme.install.error'));
|
||||
return
|
||||
}
|
||||
})
|
||||
} else {
|
||||
notyf.error(app.getLz('settings.notyf.visual.plugin.install.error'));
|
||||
}
|
||||
});
|
||||
ipcRenderer.invoke("get-github-theme", repo.html_url)
|
||||
ipcRenderer.invoke("get-github-plugin", repo.html_url)
|
||||
}
|
||||
})
|
||||
},
|
||||
installThemeURL() {
|
||||
let self = this
|
||||
bootbox.prompt(app.getLz('settings.prompt.visual.theme.github.URL'), (result) => {
|
||||
bootbox.prompt(app.getLz('settings.prompt.visual.plugin.github.URL'), (result) => {
|
||||
if (result) {
|
||||
ipcRenderer.once("theme-installed", (event, arg) => {
|
||||
ipcRenderer.once("plugin-installed", (event, arg) => {
|
||||
if (arg.success) {
|
||||
self.themes = ipcRenderer.sendSync("get-themes")
|
||||
notyf.success(app.getLz('settings.notyf.visual.theme.install.success'));
|
||||
bootbox.confirm(app.getLz("settings.prompt.visual.plugin.github.success"), (ok)=>{
|
||||
if(ok) {
|
||||
ipcRenderer.invoke("relaunchApp")
|
||||
}else{
|
||||
notyf.error(app.getLz('settings.notyf.visual.theme.install.error'));
|
||||
return
|
||||
}
|
||||
})
|
||||
notyf.success(app.getLz('settings.notyf.visual.plugin.install.success'));
|
||||
} else {
|
||||
notyf.error(app.getLz('settings.notyf.visual.plugin.install.error'));
|
||||
}
|
||||
});
|
||||
ipcRenderer.invoke("get-github-theme", result)
|
||||
ipcRenderer.invoke("get-github-plugin", result)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -662,6 +662,15 @@
|
|||
</div>
|
||||
<div class="settings-option-body">
|
||||
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.option.visual.plugin.github.explore')}}
|
||||
</div>
|
||||
<div class="md-option-segment md-option-segment_auto">
|
||||
<button class="md-btn" @click="$root.appRoute('plugins-github')">{{ $root.getLz("settings.option.visual.plugin.github.explore") }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.option.experimental.unknownPlugin')}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue