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

This commit is contained in:
booploops 2022-02-09 04:27:32 -08:00
commit 7f852a4981
3 changed files with 21 additions and 7 deletions

View file

@ -33,6 +33,15 @@ 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 => {
if (file.endsWith('.ts') || file.endsWith('.js')) { if (file.endsWith('.ts') || file.endsWith('.js')) {
if (!electron.app.isPackaged) {
const plugin = require(path.join(this.userPluginsPath, file)).default;
file = file.replace('.ts', '').replace('.js', '');
if (plugins[file] || plugin in plugins) {
console.log(`[${plugin.name}] Plugin already loaded / Duplicate Class Name`);
} else {
plugins[file] = new plugin(electron.app, utils.getStore());
}
} else {
const plugin = require(path.join(this.userPluginsPath, file)); const plugin = require(path.join(this.userPluginsPath, file));
file = file.replace('.ts', '').replace('.js', ''); file = file.replace('.ts', '').replace('.js', '');
if (plugins[file] || plugin in plugins) { if (plugins[file] || plugin in plugins) {
@ -41,6 +50,8 @@ export class Plugins {
plugins[file] = new plugin(electron.app, utils.getStore()); plugins[file] = new plugin(electron.app, utils.getStore());
} }
} }
}
}); });
} }
console.log('[PluginHandler] Loaded plugins:', Object.keys(plugins)); console.log('[PluginHandler] Loaded plugins:', Object.keys(plugins));

View file

@ -293,7 +293,10 @@ const app = new Vue({
}, },
mainMenuVisibility(val) { mainMenuVisibility(val) {
if (val) { if (val) {
(this.chrome.userinfo.id) ? this.chrome.menuOpened = !this.chrome.menuOpened : false (this.mk.isAuthorized) ? this.chrome.menuOpened = !this.chrome.menuOpened : false;
if (!this.mk.isAuthorized){
this.mk.authorize()
}
} else { } else {
setTimeout(() => { setTimeout(() => {
this.chrome.menuOpened = false this.chrome.menuOpened = false

View file

@ -172,7 +172,7 @@
<div class="player-volume-glyph decrease"></div> <div class="player-volume-glyph decrease"></div>
</div> </div>
<div class="col"> <div class="col">
<input type="range" class="web-slider volume-slider" :max="getVolumeMax()" min="0" step="0.01" <input type="range" class="web-slider volume-slider" :max="player.maxVolume" min="0" step="0.01" :pseudo-value="getVolumeMax()"
@input="setVolume($event.target.value)" :value="player.currentMediaItem.volume"> @input="setVolume($event.target.value)" :value="player.currentMediaItem.volume">
</div> </div>
<div class="col-auto"> <div class="col-auto">