added <svg-icon/> to several places
This commit is contained in:
parent
60f34e91d6
commit
ca419149ce
6 changed files with 21 additions and 24 deletions
|
@ -81,7 +81,7 @@ Vue.component("sidebar-library-item", {
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
if (this.svgIcon) {
|
if (this.svgIcon) {
|
||||||
this.svgIconData = await this.app.getSvgIcon(this.svgIcon);
|
this.svgIconData = this.svgIcon;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {},
|
methods: {},
|
||||||
|
|
|
@ -338,7 +338,9 @@
|
||||||
|
|
||||||
#app.twopanel .app-chrome:not(.chrome-bottom) .app-chrome--center .top-nav-group .app-sidebar-item {
|
#app.twopanel .app-chrome:not(.chrome-bottom) .app-chrome--center .top-nav-group .app-sidebar-item {
|
||||||
min-width: 110px;
|
min-width: 110px;
|
||||||
font-size: 0em;
|
.sidebar-item-text {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar-icon {
|
.sidebar-icon {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
@ -353,7 +355,9 @@
|
||||||
|
|
||||||
#app.twopanel .app-chrome:not(.chrome-bottom) .app-chrome--center .top-nav-group .app-sidebar-item {
|
#app.twopanel .app-chrome:not(.chrome-bottom) .app-chrome--center .top-nav-group .app-sidebar-item {
|
||||||
min-width: 60px;
|
min-width: 60px;
|
||||||
font-size: 0em;
|
.sidebar-item-text {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar-icon {
|
.sidebar-icon {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
|
|
@ -858,6 +858,7 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-sidebar-item {
|
.app-sidebar-item {
|
||||||
|
--iconSize: 18px;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
|
@ -872,6 +873,7 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
||||||
transition: transform 0.1s;
|
transition: transform 0.1s;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
|
||||||
&.app-sidebar-item-playlist {
|
&.app-sidebar-item-playlist {
|
||||||
-webkit-user-drag: element;
|
-webkit-user-drag: element;
|
||||||
|
@ -887,6 +889,10 @@ input[type=range].web-slider::-webkit-slider-runnable-track {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
>._svg-icon {
|
||||||
|
--size: var(--iconSize);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-sidebar-item:hover {
|
.app-sidebar-item:hover {
|
||||||
|
|
|
@ -158,23 +158,10 @@
|
||||||
</div>
|
</div>
|
||||||
<template v-if="!cfg.general.sidebarCollapsed.playlists">
|
<template v-if="!cfg.general.sidebarCollapsed.playlists">
|
||||||
<button class="app-sidebar-item" @click="playlistHeaderContextMenu">
|
<button class="app-sidebar-item" @click="playlistHeaderContextMenu">
|
||||||
<div class="sidebar-icon">
|
<svg-icon url="./assets/feather/plus.svg"></svg-icon>
|
||||||
<svg
|
<div class="sidebar-item-text">
|
||||||
width="46"
|
{{ getLz("action.createNew") }}
|
||||||
height="46"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
stroke-width="2"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<path d="M12 5v14"></path>
|
|
||||||
<path d="M5 12h14"></path>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
{{ getLz("action.createNew") }}
|
|
||||||
</button>
|
</button>
|
||||||
<sidebar-playlist
|
<sidebar-playlist
|
||||||
v-for="item in getPlaylistFolderChildren('p.playlistsroot')"
|
v-for="item in getPlaylistFolderChildren('p.playlistsroot')"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
:href="item.href"
|
:href="item.href"
|
||||||
@click='clickEvent()'>
|
@click='clickEvent()'>
|
||||||
<template v-if="!renaming">
|
<template v-if="!renaming">
|
||||||
<div class="sidebar-icon" :key="item.id" v-html="icon"></div> {{ item.attributes.name }}
|
<svg-icon :url="icon"/> {{ item.attributes.name }}
|
||||||
<small class="presentNotice" v-if="hasRelatedMediaItems">(Track present)</small>
|
<small class="presentNotice" v-if="hasRelatedMediaItems">(Track present)</small>
|
||||||
</template>
|
</template>
|
||||||
<input type="text" v-model="item.attributes.name" class="pl-rename-field" @blur="rename()" @keydown.enter="rename()" v-else>
|
<input type="text" v-model="item.attributes.name" class="pl-rename-field" @blur="rename()" @keydown.enter="rename()" v-else>
|
||||||
|
@ -57,9 +57,9 @@
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
if (this.item.type !== "library-playlist-folders") {
|
if (this.item.type !== "library-playlist-folders") {
|
||||||
this.icon = await this.$root.getSvgIcon("./assets/feather/list.svg")
|
this.icon = ("./assets/feather/list.svg")
|
||||||
} else {
|
} else {
|
||||||
this.icon = await this.$root.getSvgIcon("./assets/feather/folder.svg")
|
this.icon = ("./assets/feather/folder.svg")
|
||||||
}
|
}
|
||||||
let playlistMap = this.$root.playlists.trackMapping
|
let playlistMap = this.$root.playlists.trackMapping
|
||||||
if (this.relateMediaItems.length != 0) {
|
if (this.relateMediaItems.length != 0) {
|
||||||
|
|
|
@ -123,8 +123,8 @@
|
||||||
<script type="text/x-template" id="sidebar-library-item">
|
<script type="text/x-template" id="sidebar-library-item">
|
||||||
<button class="app-sidebar-item"
|
<button class="app-sidebar-item"
|
||||||
:class="$parent.getSidebarItemClass(page)" @click="$root.setWindowHash(page)">
|
:class="$parent.getSidebarItemClass(page)" @click="$root.setWindowHash(page)">
|
||||||
<div class="sidebar-icon" v-html="svgIconData" v-if="svgIconData != ''"></div>
|
<svg-icon :url="svgIconData" v-if="svgIconData != ''" />
|
||||||
{{ name }}
|
<span class="sidebar-item-text">{{ name }}</span>
|
||||||
</button>
|
</button>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue