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.name = "";
|
||||
this.onClick = () => { };
|
||||
this.top = false
|
||||
},
|
||||
},
|
||||
AddMenuEntry(entry) {
|
||||
if (entry?.top) {
|
||||
app.pluginMenuTopEntries.push(entry);
|
||||
} else {
|
||||
app.pluginMenuEntries.push(entry);
|
||||
}
|
||||
app.pluginInstalled = true;
|
||||
},
|
||||
StyleSheets: {
|
||||
|
|
|
@ -18,6 +18,7 @@ const app = new Vue({
|
|||
mk: {},
|
||||
pluginInstalled: false,
|
||||
pluginMenuEntries: [],
|
||||
pluginMenuTopEntries: [],
|
||||
lz: ipcRenderer.sendSync("get-i18n", "en_US"),
|
||||
lzListing: ipcRenderer.sendSync("get-i18n-listing"),
|
||||
radiohls: null,
|
||||
|
|
|
@ -2,16 +2,9 @@
|
|||
<transition name="wpfade">
|
||||
<div class="usermenu-container" v-if="chrome.menuOpened">
|
||||
<div class="usermenu-body">
|
||||
<button
|
||||
class="app-sidebar-button"
|
||||
style="width: 100%"
|
||||
@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)"
|
||||
/>
|
||||
<button class="app-sidebar-button" style="width: 100%" @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">
|
||||
<template v-if="chrome.userinfo.id || mk.isAuthorized">
|
||||
|
@ -43,11 +36,7 @@
|
|||
</div>
|
||||
</button>
|
||||
<!-- Use 20px SVG for usermenu icon -->
|
||||
<button
|
||||
class="usermenu-item"
|
||||
v-if="cfg.general.privateEnabled"
|
||||
@click="cfg.general.privateEnabled = false"
|
||||
>
|
||||
<button class="usermenu-item" v-if="cfg.general.privateEnabled" @click="cfg.general.privateEnabled = false">
|
||||
<span class="usermenu-item-icon">
|
||||
<%- include("../svg/x.svg") %>
|
||||
</span>
|
||||
|
@ -63,10 +52,7 @@
|
|||
$root.getLz("action.showWebRemoteQR")
|
||||
}}</span>
|
||||
</button>
|
||||
<button
|
||||
class="usermenu-item"
|
||||
@click="modals.castMenu = true"
|
||||
>
|
||||
<button class="usermenu-item" @click="modals.castMenu = true">
|
||||
<span class="usermenu-item-icon">
|
||||
<%- include("../svg/cast.svg") %>
|
||||
</span>
|
||||
|
@ -74,10 +60,7 @@
|
|||
$root.getLz("term.cast")
|
||||
}}</span>
|
||||
</button>
|
||||
<button
|
||||
class="usermenu-item"
|
||||
@click="modals.audioSettings = true"
|
||||
>
|
||||
<button class="usermenu-item" @click="modals.audioSettings = true">
|
||||
<span class="usermenu-item-icon">
|
||||
<%- include("../svg/headphones.svg") %>
|
||||
</span>
|
||||
|
@ -85,11 +68,7 @@
|
|||
$root.getLz("term.audioSettings")
|
||||
}}</span>
|
||||
</button>
|
||||
<button
|
||||
class="usermenu-item"
|
||||
v-if="pluginInstalled"
|
||||
@click="modals.pluginMenu = true"
|
||||
>
|
||||
<button class="usermenu-item" v-if="pluginInstalled" @click="modals.pluginMenu = true">
|
||||
<span class="usermenu-item-icon">
|
||||
<%- include("../svg/grid.svg") %>
|
||||
</span>
|
||||
|
@ -113,6 +92,12 @@
|
|||
$root.getLz("term.settings")
|
||||
}}</span>
|
||||
</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()">
|
||||
<span class="usermenu-item-icon" style="right: 2.5px">
|
||||
<%- include("../svg/log-out.svg") %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue