fix web remote volume slider, #317, cant run yarn start
This commit is contained in:
parent
63b1293903
commit
7f0b2da0be
3 changed files with 21 additions and 7 deletions
|
@ -33,13 +33,24 @@ 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')) {
|
||||||
const plugin = require(path.join(this.userPluginsPath, file));
|
if (!electron.app.isPackaged) {
|
||||||
file = file.replace('.ts', '').replace('.js', '');
|
const plugin = require(path.join(this.userPluginsPath, file)).default;
|
||||||
if (plugins[file] || plugin in plugins) {
|
file = file.replace('.ts', '').replace('.js', '');
|
||||||
console.log(`[${plugin.name}] Plugin already loaded / Duplicate Class Name`);
|
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 {
|
} else {
|
||||||
plugins[file] = new plugin(electron.app, utils.getStore());
|
const plugin = require(path.join(this.userPluginsPath, file));
|
||||||
|
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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue