plugins adjustment
This commit is contained in:
parent
50ed8a357e
commit
5383581f8f
3 changed files with 146 additions and 155 deletions
|
@ -4,10 +4,15 @@ const CiderFrontAPI = {
|
||||||
this.id = "";
|
this.id = "";
|
||||||
this.name = "";
|
this.name = "";
|
||||||
this.onClick = () => { };
|
this.onClick = () => { };
|
||||||
|
this.top = false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
AddMenuEntry(entry) {
|
AddMenuEntry(entry) {
|
||||||
|
if (entry?.top) {
|
||||||
|
app.pluginMenuTopEntries.push(entry);
|
||||||
|
} else {
|
||||||
app.pluginMenuEntries.push(entry);
|
app.pluginMenuEntries.push(entry);
|
||||||
|
}
|
||||||
app.pluginInstalled = true;
|
app.pluginInstalled = true;
|
||||||
},
|
},
|
||||||
StyleSheets: {
|
StyleSheets: {
|
||||||
|
|
|
@ -18,6 +18,7 @@ const app = new Vue({
|
||||||
mk: {},
|
mk: {},
|
||||||
pluginInstalled: false,
|
pluginInstalled: false,
|
||||||
pluginMenuEntries: [],
|
pluginMenuEntries: [],
|
||||||
|
pluginMenuTopEntries: [],
|
||||||
lz: ipcRenderer.sendSync("get-i18n", "en_US"),
|
lz: ipcRenderer.sendSync("get-i18n", "en_US"),
|
||||||
lzListing: ipcRenderer.sendSync("get-i18n-listing"),
|
lzListing: ipcRenderer.sendSync("get-i18n-listing"),
|
||||||
radiohls: null,
|
radiohls: null,
|
||||||
|
|
|
@ -2,16 +2,9 @@
|
||||||
<transition name="wpfade">
|
<transition name="wpfade">
|
||||||
<div class="usermenu-container" v-if="chrome.menuOpened">
|
<div class="usermenu-container" v-if="chrome.menuOpened">
|
||||||
<div class="usermenu-body">
|
<div class="usermenu-body">
|
||||||
<button
|
<button class="app-sidebar-button" style="width: 100%" @click="appRoute('apple-account-settings')">
|
||||||
class="app-sidebar-button"
|
<img class="sidebar-user-icon" loading="lazy"
|
||||||
style="width: 100%"
|
:src="getMediaItemArtwork(chrome.hideUserInfo ? './assets/logocut.png' : (chrome.userinfo.attributes['artwork'] ? chrome.userinfo.attributes['artwork']['url'] : ''), 26)" />
|
||||||
@click="appRoute('apple-account-settings')"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
class="sidebar-user-icon"
|
|
||||||
loading="lazy"
|
|
||||||
:src="getMediaItemArtwork(chrome.hideUserInfo ? './assets/logocut.png' : (chrome.userinfo.attributes['artwork'] ? chrome.userinfo.attributes['artwork']['url'] : ''), 26)"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div class="sidebar-user-text" v-if="!chrome.hideUserInfo">
|
<div class="sidebar-user-text" v-if="!chrome.hideUserInfo">
|
||||||
<template v-if="chrome.userinfo.id || mk.isAuthorized">
|
<template v-if="chrome.userinfo.id || mk.isAuthorized">
|
||||||
|
@ -43,11 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<!-- Use 20px SVG for usermenu icon -->
|
<!-- Use 20px SVG for usermenu icon -->
|
||||||
<button
|
<button class="usermenu-item" v-if="cfg.general.privateEnabled" @click="cfg.general.privateEnabled = false">
|
||||||
class="usermenu-item"
|
|
||||||
v-if="cfg.general.privateEnabled"
|
|
||||||
@click="cfg.general.privateEnabled = false"
|
|
||||||
>
|
|
||||||
<span class="usermenu-item-icon">
|
<span class="usermenu-item-icon">
|
||||||
<%- include("../svg/x.svg") %>
|
<%- include("../svg/x.svg") %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -63,10 +52,7 @@
|
||||||
$root.getLz("action.showWebRemoteQR")
|
$root.getLz("action.showWebRemoteQR")
|
||||||
}}</span>
|
}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="usermenu-item" @click="modals.castMenu = true">
|
||||||
class="usermenu-item"
|
|
||||||
@click="modals.castMenu = true"
|
|
||||||
>
|
|
||||||
<span class="usermenu-item-icon">
|
<span class="usermenu-item-icon">
|
||||||
<%- include("../svg/cast.svg") %>
|
<%- include("../svg/cast.svg") %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -74,10 +60,7 @@
|
||||||
$root.getLz("term.cast")
|
$root.getLz("term.cast")
|
||||||
}}</span>
|
}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="usermenu-item" @click="modals.audioSettings = true">
|
||||||
class="usermenu-item"
|
|
||||||
@click="modals.audioSettings = true"
|
|
||||||
>
|
|
||||||
<span class="usermenu-item-icon">
|
<span class="usermenu-item-icon">
|
||||||
<%- include("../svg/headphones.svg") %>
|
<%- include("../svg/headphones.svg") %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -85,11 +68,7 @@
|
||||||
$root.getLz("term.audioSettings")
|
$root.getLz("term.audioSettings")
|
||||||
}}</span>
|
}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="usermenu-item" v-if="pluginInstalled" @click="modals.pluginMenu = true">
|
||||||
class="usermenu-item"
|
|
||||||
v-if="pluginInstalled"
|
|
||||||
@click="modals.pluginMenu = true"
|
|
||||||
>
|
|
||||||
<span class="usermenu-item-icon">
|
<span class="usermenu-item-icon">
|
||||||
<%- include("../svg/grid.svg") %>
|
<%- include("../svg/grid.svg") %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -113,6 +92,12 @@
|
||||||
$root.getLz("term.settings")
|
$root.getLz("term.settings")
|
||||||
}}</span>
|
}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button class="usermenu-item" v-for="entry in $root.pluginMenuTopEntries" @click="entry.onClick()">
|
||||||
|
<span class="usermenu-item-icon" style="right: 2.5px">
|
||||||
|
<%- include("../svg/grid.svg") %>
|
||||||
|
</span>
|
||||||
|
<span class="usermenu-item-name">{{entry.name}}</span>
|
||||||
|
</button>
|
||||||
<button class="usermenu-item" @click="unauthorize()">
|
<button class="usermenu-item" @click="unauthorize()">
|
||||||
<span class="usermenu-item-icon" style="right: 2.5px">
|
<span class="usermenu-item-icon" style="right: 2.5px">
|
||||||
<%- include("../svg/log-out.svg") %>
|
<%- include("../svg/log-out.svg") %>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue