Merge branch 'develop' of https://github.com/ciderapp/Cider into develop

This commit is contained in:
vapormusic 2022-02-18 14:35:19 +07:00
commit aebbf1cd51
6 changed files with 54 additions and 7 deletions

View file

@ -108,6 +108,7 @@
"term.fullscreenView": "全螢幕顯示", "term.fullscreenView": "全螢幕顯示",
"term.defaultView": "預設顯示", "term.defaultView": "預設顯示",
"term.audioSettings": "音訊設定", "term.audioSettings": "音訊設定",
"term.audioControls": "音訊控制",
"term.spacializedAudioSetting": "空間音訊設定", "term.spacializedAudioSetting": "空間音訊設定",
"term.clearAll": "清空", "term.clearAll": "清空",
"term.recentStations": "最近收聽的廣播", "term.recentStations": "最近收聽的廣播",
@ -209,6 +210,7 @@
"action.copy": "複製", "action.copy": "複製",
"action.newpreset": "新增預設", // Equalizer Preset "action.newpreset": "新增預設", // Equalizer Preset
"action.deletepreset": "刪除預設", // Equalizer Preset "action.deletepreset": "刪除預設", // Equalizer Preset
"action.open": "開啟",
// Settings - General // Settings - General
"settings.header.general": "一般", "settings.header.general": "一般",
@ -230,7 +232,7 @@
"settings.header.audio": "音訊", "settings.header.audio": "音訊",
"settings.header.audio.description": "調整 Cider 的音訊設定", "settings.header.audio.description": "調整 Cider 的音訊設定",
"settings.option.audio.volumeStep": "音量改變量", "settings.option.audio.volumeStep": "音量改變量",
"settings.option.audio.maxVolume": "最音量", "settings.option.audio.maxVolume": "最音量",
"settings.option.audio.quality": "音訊品質", // Dropdown "settings.option.audio.quality": "音訊品質", // Dropdown
"settings.header.audio.quality.hireslossless": "高品質無損壓縮", "settings.header.audio.quality.hireslossless": "高品質無損壓縮",
"settings.header.audio.quality.hireslossless.description": "(高達 24-bit/192 kHz", "settings.header.audio.quality.hireslossless.description": "(高達 24-bit/192 kHz",
@ -314,13 +316,17 @@
"settings.option.connectivity.lastfmScrobble.filterLoop": "不記錄單曲循環 (LastFM)", "settings.option.connectivity.lastfmScrobble.filterLoop": "不記錄單曲循環 (LastFM)",
// Refer to term.connect for the connect button // Refer to term.connect for the connect button
// Settings - Debug
"settings.header.debug": "除錯",
"settings.option.debug.copy_log": "複製執行紀錄檔至剪貼簿",
"settings.option.debug.openAppData": "打開 Cider 資料夾",
// Settings - Experimental // Settings - Experimental
"settings.header.experimental": "實驗性功能", "settings.header.experimental": "實驗性功能",
"settings.header.experimental.description": "調整 Cider 的實驗性功能", "settings.header.experimental.description": "調整 Cider 的實驗性功能",
"settings.option.experimental.compactUI": "使用緊密的介面設計", // Toggle "settings.option.experimental.compactUI": "使用緊密的介面設計", // Toggle
"settings.option.experimental.closeButtonBehaviour": "關閉按鈕操作", // Dropdown "settings.option.experimental.closeButtonBehaviour": "關閉按鈕操作", // Dropdown
"settings.option.experimental.close_button_hide": "關閉按鈕將 Cider 隱藏至系統列", "settings.option.experimental.close_button_hide": "關閉按鈕將 Cider 隱藏至系統列",
"settings.option.experimental.copy_log": "複製執行紀錄檔至剪貼簿",
"settings.option.experimental.inline_playlists": "將播放列表做為行内元素顯示", "settings.option.experimental.inline_playlists": "將播放列表做為行内元素顯示",
// Refer to term.disabled & term.enabled // Refer to term.disabled & term.enabled

View file

@ -91,14 +91,15 @@ export class BrowserWindow {
minHeight: 390, minHeight: 390,
frame: false, frame: false,
title: "Cider", title: "Cider",
vibrancy: "fullscreen-ui", vibrancy: "dark",
transparent: process.platform === "darwin", transparent: process.platform === "darwin",
hasShadow: false, hasShadow: true,
show: false, show: false,
backgroundColor: "#1E1E1E", // backgroundColor: "#1E1E1E",
titleBarStyle: 'hidden', titleBarStyle: 'hidden',
trafficLightPosition: {x: 15, y: 20}, trafficLightPosition: {x: 15, y: 20},
webPreferences: { webPreferences: {
experimentalFeatures: true,
nodeIntegration: true, nodeIntegration: true,
sandbox: true, sandbox: true,
allowRunningInsecureContent: true, allowRunningInsecureContent: true,
@ -129,8 +130,12 @@ export class BrowserWindow {
switch(process.platform) { switch(process.platform) {
default: default:
break;
case "win32":
this.options.backgroundColor = "#1E1E1E";
break; break;
case "linux": case "linux":
this.options.backgroundColor = "#1E1E1E";
this.options.autoHideMenuBar = true this.options.autoHideMenuBar = true
this.options.frame = true this.options.frame = true
break; break;

View file

@ -32,6 +32,7 @@ export class Plugins {
if (fs.existsSync(this.userPluginsPath)) { if (fs.existsSync(this.userPluginsPath)) {
fs.readdirSync(this.userPluginsPath).forEach(file => { fs.readdirSync(this.userPluginsPath).forEach(file => {
// Plugins V1
if (file.endsWith('.ts') || file.endsWith('.js')) { if (file.endsWith('.ts') || file.endsWith('.js')) {
if (!electron.app.isPackaged) { if (!electron.app.isPackaged) {
const plugin = require(path.join(this.userPluginsPath, file)).default; const plugin = require(path.join(this.userPluginsPath, file)).default;
@ -50,7 +51,24 @@ export class Plugins {
plugins[file] = new plugin(electron.app, utils.getStore()); plugins[file] = new plugin(electron.app, utils.getStore());
} }
} }
}
// Plugins V2
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"));
if (plugins[plugin.name] || plugin.name in plugins) {
console.log(`[${plugin.name}] Plugin already loaded / Duplicate Class Name`);
} else {
const pluginEnv = {
app: electron.app,
store: utils.getStore(),
utils: utils,
dir: pluginPath
}
plugins[plugin.name] = new plugin(pluginEnv);
}
}
} }
}); });
} }

View file

@ -452,7 +452,7 @@ const app = new Vue({
history.forward() history.forward()
}, },
getHTMLStyle() { getHTMLStyle() {
document.querySelector("html").style.background = "#222"; // document.querySelector("html").style.background = "#222";
document.querySelector("body").classList.add("notransparency") document.querySelector("body").classList.add("notransparency")
}, },
resetState() { resetState() {

View file

@ -0,0 +1,17 @@
body[platform="darwin"] {
html {
background: transparent!important;
}
&.notransparency::before {
display: none;
}
#app {
&.simplebg {
background: transparent;
}
&::before {
display: none;
}
}
}

View file

@ -3110,5 +3110,6 @@ body[platform='darwin'] {
} }
@import url("less/macos.less");
@import url("less/linux.less"); @import url("less/linux.less");
@import url("less/compact.less"); @import url("less/compact.less");