[web] Migrate to Bulma 1.0.2

This commit is contained in:
Alain Nussbaumer 2024-09-24 20:31:51 +02:00
parent 87ec17c243
commit 66c2873d32
43 changed files with 261 additions and 289 deletions

View File

@ -3062,9 +3062,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "5.4.3", "version": "5.4.6",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.3.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.6.tgz",
"integrity": "sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q==", "integrity": "sha512-IeL5f8OO5nylsgzd9tq4qD2QqI0k2CQLGrWD0rCN0EQJZpBK5vJAx0I+GDkMOXxQX/OfFHMuLIx6ddAxGX/k+Q==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {

View File

@ -5,7 +5,6 @@
<router-view v-slot="{ Component }"> <router-view v-slot="{ Component }">
<component :is="Component" /> <component :is="Component" />
</router-view> </router-view>
<modal-dialog-remote-pairing <modal-dialog-remote-pairing
:show="pairing_active" :show="pairing_active"
@close="pairing_active = false" @close="pairing_active = false"
@ -18,7 +17,7 @@
<navbar-bottom /> <navbar-bottom />
<div <div
v-show="show_burger_menu || show_player_menu" v-show="show_burger_menu || show_player_menu"
class="fd-overlay-fullscreen" class="overlay-fullscreen"
@click="show_burger_menu = show_player_menu = false" @click="show_burger_menu = show_player_menu = false"
/> />
</div> </div>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="media is-align-items-center pt-0"> <div class="media is-align-items-center pt-0">
<div class="media-left"> <div class="media-left">
<a class="button is-white is-small" @click="toggle"> <a class="button is-small" @click="toggle">
<mdicon class="icon" :name="icon" /> <mdicon class="icon" :name="icon" />
</a> </a>
</div> </div>

View File

@ -2,7 +2,7 @@
<div class="media is-align-items-center pt-0"> <div class="media is-align-items-center pt-0">
<div class="media-left"> <div class="media-left">
<a <a
class="button is-white is-small" class="button is-small"
:class="{ 'has-text-grey-light': !output.selected }" :class="{ 'has-text-grey-light': !output.selected }"
@click="toggle" @click="toggle"
> >

View File

@ -2,7 +2,7 @@
<div class="media is-align-items-center pt-0"> <div class="media is-align-items-center pt-0">
<div class="media-left"> <div class="media-left">
<a <a
class="button is-white is-small" class="button is-small"
:class="{ :class="{
'has-text-grey-light': !playing && !loading, 'has-text-grey-light': !playing && !loading,
'is-loading': loading 'is-loading': loading

View File

@ -1,14 +1,22 @@
<template> <template>
<label class="toggle"> <div class="field">
<input <label class="toggle">
:checked="modelValue" <div class="control is-flex is-align-content-center">
type="checkbox" <input
class="toggle-checkbox is-rounded mr-2" :checked="modelValue"
@change="$emit('update:modelValue', !modelValue)" type="checkbox"
/> class="toggle-checkbox"
<div class="toggle-switch"></div> @change="$emit('update:modelValue', !modelValue)"
<slot name="label" class="toggle-label" /> />
</label> <div class="toggle-switch" />
<slot name="label" />
<slot name="info" />
</div>
</label>
<p v-if="$slots['help']" class="help notification">
<slot name="help" />
</p>
</div>
</template> </template>
<script> <script>
@ -29,10 +37,11 @@ export default {
.toggle-switch { .toggle-switch {
display: inline-block; display: inline-block;
background: var(--bulma-grey-light); background: var(--bulma-grey-lighter);
border-radius: 1rem; border-radius: 1rem;
width: 2.75rem; min-width: 2.5rem;
height: 1.5rem; width: 2.5rem;
height: 1.25rem;
position: relative; position: relative;
vertical-align: middle; vertical-align: middle;
transition: background 0.25s; transition: background 0.25s;
@ -49,18 +58,18 @@ export default {
width: 1rem; width: 1rem;
height: 1rem; height: 1rem;
position: absolute; position: absolute;
top: 0.25rem; top: 0.125rem;
left: 0.25rem; left: 0.125rem;
transition: left 0.25s; transition: left 0.25s;
} }
.toggle:hover .toggle-switch:before { .toggle:hover .toggle-switch:before {
background: var(--bulma-white); background: var(--bulma-white);
} }
.toggle-checkbox:checked + .toggle-switch { .toggle-checkbox:checked + .toggle-switch {
background: var(--bulma-primary); background: var(--bulma-dark);
} }
.toggle-checkbox:checked + .toggle-switch:before { .toggle-checkbox:checked + .toggle-switch:before {
left: 1.5rem; left: 1.375rem;
} }
.toggle-checkbox { .toggle-checkbox {

View File

@ -3,7 +3,7 @@
<div v-if="!item.isItem" class="py-5"> <div v-if="!item.isItem" class="py-5">
<span <span
:id="`index_${item.index}`" :id="`index_${item.index}`"
class="tag is-info is-light is-small has-text-weight-bold" class="tag is-small has-text-weight-bold"
v-text="item.index" v-text="item.index"
/> />
</div> </div>

View File

@ -4,7 +4,7 @@
<div class="media-content"> <div class="media-content">
<span <span
:id="`index_${item.index}`" :id="`index_${item.index}`"
class="tag is-info is-light is-small has-text-weight-bold" class="tag is-small has-text-weight-bold"
v-text="item.index" v-text="item.index"
/> />
</div> </div>

View File

@ -4,7 +4,7 @@
<div class="media-content"> <div class="media-content">
<span <span
:id="`index_${item.index}`" :id="`index_${item.index}`"
class="tag is-info is-light is-small has-text-weight-bold" class="tag is-small has-text-weight-bold"
v-text="item.index" v-text="item.index"
/> />
</div> </div>

View File

@ -4,7 +4,7 @@
<div class="media-content"> <div class="media-content">
<span <span
:id="`index_${item.index}`" :id="`index_${item.index}`"
class="tag is-info is-light is-small has-text-weight-bold" class="tag is-small has-text-weight-bold"
v-text="item.index" v-text="item.index"
/> />
</div> </div>

View File

@ -3,7 +3,7 @@
<div v-if="!item.isItem" class="py-5"> <div v-if="!item.isItem" class="py-5">
<span <span
:id="`index_${item.index}`" :id="`index_${item.index}`"
class="tag is-info is-light is-small has-text-weight-bold" class="tag is-small has-text-weight-bold"
v-text="item.index" v-text="item.index"
/> />
</div> </div>

View File

@ -11,17 +11,13 @@
</a> </a>
<a <a
v-if="delete_action" v-if="delete_action"
class="card-footer-item has-background-danger has-text-white has-text-weight-bold" class="card-footer-item has-background-danger"
@click="$emit('delete')" @click="$emit('delete')"
> >
<mdicon class="icon" name="delete" size="16" /> <mdicon class="icon" name="delete" size="16" />
<span class="is-size-7" v-text="delete_action" /> <span class="is-size-7" v-text="delete_action" />
</a> </a>
<a <a v-if="ok_action" class="card-footer-item" @click="$emit('ok')">
v-if="ok_action"
class="card-footer-item has-background-info has-text-white has-text-weight-bold"
@click="$emit('ok')"
>
<mdicon class="icon" name="check" size="16" /> <mdicon class="icon" name="check" size="16" />
<span class="is-size-7" v-text="ok_action" /> <span class="is-size-7" v-text="ok_action" />
</a> </a>

View File

@ -7,7 +7,7 @@
<input <input
ref="url_field" ref="url_field"
v-model="url" v-model="url"
class="input is-shadowless" class="input"
type="url" type="url"
pattern="http[s]?://.+" pattern="http[s]?://.+"
required required
@ -33,7 +33,7 @@
</a> </a>
<a <a
:class="{ 'is-disabled': disabled }" :class="{ 'is-disabled': disabled }"
class="card-footer-item has-background-info has-text-white has-text-weight-bold" class="card-footer-item"
@click="add_stream" @click="add_stream"
> >
<mdicon class="icon" name="playlist-plus" size="16" /> <mdicon class="icon" name="playlist-plus" size="16" />

View File

@ -8,7 +8,7 @@
<input <input
ref="url_field" ref="url_field"
v-model="url" v-model="url"
class="input is-shadowless" class="input"
type="url" type="url"
pattern="http[s]?://.+" pattern="http[s]?://.+"
required required

View File

@ -8,7 +8,7 @@
<input <input
ref="playlist_name_field" ref="playlist_name_field"
v-model="playlist_name" v-model="playlist_name"
class="input is-shadowless" class="input"
type="text" type="text"
pattern=".+" pattern=".+"
required required
@ -34,7 +34,7 @@
</a> </a>
<a <a
:class="{ 'is-disabled': disabled }" :class="{ 'is-disabled': disabled }"
class="card-footer-item has-background-info has-text-white has-text-weight-bold" class="card-footer-item has-text-weight-bold"
@click="save" @click="save"
> >
<mdicon class="icon" name="content-save" size="16" /> <mdicon class="icon" name="content-save" size="16" />

View File

@ -23,10 +23,7 @@
<mdicon class="icon" name="cancel" size="16" /> <mdicon class="icon" name="cancel" size="16" />
<span class="is-size-7" v-text="$t('dialog.remote-pairing.cancel')" /> <span class="is-size-7" v-text="$t('dialog.remote-pairing.cancel')" />
</a> </a>
<a <a class="card-footer-item" @click="kickoff_pairing">
class="card-footer-item has-background-info has-text-white has-text-weight-bold"
@click="kickoff_pairing"
>
<mdicon class="icon" name="cellphone" size="16" /> <mdicon class="icon" name="cellphone" size="16" />
<span class="is-size-7" v-text="$t('dialog.remote-pairing.pair')" /> <span class="is-size-7" v-text="$t('dialog.remote-pairing.pair')" />
</a> </a>

View File

@ -9,8 +9,8 @@
> >
<template #modal-content> <template #modal-content>
<div v-if="!libraryStore.updating"> <div v-if="!libraryStore.updating">
<p class="mb-3" v-text="$t('dialog.update.info')" />
<div v-if="spotify_enabled || rss.tracks > 0" class="field"> <div v-if="spotify_enabled || rss.tracks > 0" class="field">
<label class="label" v-text="$t('dialog.update.info')" />
<div class="control"> <div class="control">
<div class="select is-small"> <div class="select is-small">
<select v-model="libraryStore.update_dialog_scan_kind"> <select v-model="libraryStore.update_dialog_scan_kind">
@ -30,13 +30,11 @@
</div> </div>
</div> </div>
</div> </div>
<div class="field"> <control-switch v-model="rescan_metadata">
<control-switch v-model="rescan_metadata"> <template #label>
<template #label> <span v-text="$t('dialog.update.rescan-metadata')" />
<span v-text="$t('dialog.update.rescan-metadata')" /> </template>
</template> </control-switch>
</control-switch>
</div>
</div> </div>
<div v-else> <div v-else>
<p class="mb-3" v-text="$t('dialog.update.progress')" /> <p class="mb-3" v-text="$t('dialog.update.progress')" />

View File

@ -18,9 +18,9 @@
<control-link <control-link
:to="{ name: 'now-playing' }" :to="{ name: 'now-playing' }"
exact exact
class="navbar-item is-expanded is-clipped is-size-7" class="navbar-item is-justify-content-flex-start is-expanded is-clipped is-size-7"
> >
<div class="fd-is-text-clipped"> <div class="is-text-clipped">
<strong v-text="current.title" /> <strong v-text="current.title" />
<br /> <br />
<span v-text="current.artist" /> <span v-text="current.artist" />
@ -134,3 +134,11 @@ export default {
} }
} }
</script> </script>
<style scoped>
.is-text-clipped {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -1,23 +1,23 @@
<template> <template>
<div class="field"> <control-switch v-model="setting.value" @update:model-value="update">
<control-switch <template #label>
:id="setting.name" <slot name="label" />
v-model="setting.value" </template>
@update:model-value="update_setting" <template #info>
> <mdicon
<template #label> v-if="isSuccess"
<slot name="label" /> class="icon has-text-info"
</template> name="check"
</control-switch> size="16"
<i />
class="is-size-7" <mdicon
:class="{ 'has-text-info': is_success, 'has-text-danger': is_error }" v-if="isError"
v-text="info" class="icon has-text-danger"
/> name="close"
<p v-if="$slots['info']" class="help"> size="16"
<slot name="info" /> />
</p> </template>
</div> </control-switch>
</template> </template>
<script> <script>
@ -48,18 +48,10 @@ export default {
}, },
computed: { computed: {
info() { isError() {
if (this.is_success) {
return this.$t('setting.saved')
} else if (this.is_error) {
return this.$t('setting.not-saved')
}
return ''
},
is_error() {
return this.statusUpdate === 'error' return this.statusUpdate === 'error'
}, },
is_success() { isSuccess() {
return this.statusUpdate === 'success' return this.statusUpdate === 'success'
}, },
setting() { setting() {
@ -76,13 +68,13 @@ export default {
}, },
methods: { methods: {
clear_status() { clearStatus() {
if (this.is_error) { if (this.is_error) {
this.setting.value = !this.setting.value this.setting.value = !this.setting.value
} }
this.statusUpdate = '' this.statusUpdate = ''
}, },
update_setting() { update() {
this.timerId = -1 this.timerId = -1
const setting = { const setting = {
category: this.category, category: this.category,
@ -99,7 +91,7 @@ export default {
this.statusUpdate = 'error' this.statusUpdate = 'error'
}) })
.finally(() => { .finally(() => {
this.timerId = window.setTimeout(this.clear_status, this.timerDelay) this.timerId = window.setTimeout(this.clearStatus, this.timerDelay)
}) })
} }
} }

View File

@ -241,6 +241,7 @@
"compiled-with": "Compiliert mit Unterstützung von {options}.", "compiled-with": "Compiliert mit Unterstützung von {options}.",
"library": "Bibliothek", "library": "Bibliothek",
"more": "mehr", "more": "mehr",
"name": "Name",
"total-playtime": "Gesamte Spielzeit", "total-playtime": "Gesamte Spielzeit",
"tracks": "Tracks", "tracks": "Tracks",
"update": "Neu einlesen", "update": "Neu einlesen",
@ -407,8 +408,8 @@
"count": "{count} Track|{count} Track|{count} Tracks", "count": "{count} Track|{count} Track|{count} Tracks",
"edit": "Bearbeiten", "edit": "Bearbeiten",
"hide-previous": "Vorherige verbergen", "hide-previous": "Vorherige verbergen",
"title": "Warteschlange", "save": "Speichern",
"save": "Speichern" "title": "Warteschlange"
}, },
"radio": { "radio": {
"count": "{count} Station|{count} Station|{count} Stationen", "count": "{count} Station|{count} Station|{count} Stationen",
@ -494,8 +495,7 @@
"spotify": { "spotify": {
"no-support": "OwnTone wurde entweder ohne Unterstützung für Spotify erstellt oder libspotify ist nicht installiert.", "no-support": "OwnTone wurde entweder ohne Unterstützung für Spotify erstellt oder libspotify ist nicht installiert.",
"logged-as": "Angemeldet als ", "logged-as": "Angemeldet als ",
"requirements": "Spotify Premium Abo erforderlich.", "requirements": "Spotify Premium Abo erforderlich. Zugriff auf die Spotify Web-Api ermöglicht scannen der Spotify-Blibliothek. Erforderliche scopes sind: ",
"scopes": "Zugriff auf die Spotify Web-Api ermöglicht scannen der Spotify-Blibliothek. Erforderliche scopes sind: ",
"user": "Zugriff gestattet für ", "user": "Zugriff gestattet für ",
"authorize": "Authorisiere Web-API-Zugriff", "authorize": "Authorisiere Web-API-Zugriff",
"grant-access": "Zugriff auf die Spotify Web-API gestatten", "grant-access": "Zugriff auf die Spotify Web-API gestatten",
@ -571,10 +571,6 @@
"toggle-lyrics": "Liedtexte anzeigen/verbergen" "toggle-lyrics": "Liedtexte anzeigen/verbergen"
} }
}, },
"setting": {
"not-saved": " (Fehler beim Speichern der Einstellungen)",
"saved": " (Einstellungen gesichert)"
},
"server": { "server": {
"connection-failed": "Fehler bei Verbindung zum OwnTone-Server", "connection-failed": "Fehler bei Verbindung zum OwnTone-Server",
"missing-port": "Fehlender Websocket-Port", "missing-port": "Fehlender Websocket-Port",

View File

@ -241,6 +241,7 @@
"compiled-with": "Compiled with support for {options}.", "compiled-with": "Compiled with support for {options}.",
"library": "Library", "library": "Library",
"more": "more", "more": "more",
"name": "Name",
"total-playtime": "Total playtime", "total-playtime": "Total playtime",
"tracks": "Tracks", "tracks": "Tracks",
"update": "Update", "update": "Update",
@ -407,8 +408,8 @@
"count": "{count} track|{count} track|{count} tracks", "count": "{count} track|{count} track|{count} tracks",
"edit": "Edit", "edit": "Edit",
"hide-previous": "Hide previous", "hide-previous": "Hide previous",
"title": "Queue", "save": "Save",
"save": "Save" "title": "Queue"
}, },
"radio": { "radio": {
"count": "{count} station|{count} station|{count} stations", "count": "{count} station|{count} station|{count} stations",
@ -494,8 +495,7 @@
"spotify": { "spotify": {
"no-support": "OwnTone was either built without support for Spotify or libspotify is not installed.", "no-support": "OwnTone was either built without support for Spotify or libspotify is not installed.",
"logged-as": "Logged in as ", "logged-as": "Logged in as ",
"requirements": "You must have a Spotify premium account.", "requirements": "You must have a Spotify premium account. Access to the Spotify Web API enables scanning of your Spotify library. Required scopes are: ",
"scopes": "Access to the Spotify Web API enables scanning of your Spotify library. Required scopes are: ",
"user": "Access granted for ", "user": "Access granted for ",
"authorize": "Authorize Web API access", "authorize": "Authorize Web API access",
"grant-access": "Grant access to the Spotify Web API", "grant-access": "Grant access to the Spotify Web API",
@ -571,10 +571,6 @@
"toggle-lyrics": "Toggle lyrics" "toggle-lyrics": "Toggle lyrics"
} }
}, },
"setting": {
"not-saved": " (error saving setting)",
"saved": " (setting saved)"
},
"server": { "server": {
"connection-failed": "Failed to connect to OwnTone server", "connection-failed": "Failed to connect to OwnTone server",
"missing-port": "Missing websocket port", "missing-port": "Missing websocket port",

View File

@ -241,6 +241,7 @@
"compiled-with": "Compilé avec les options {options}.", "compiled-with": "Compilé avec les options {options}.",
"library": "Bibliothèque", "library": "Bibliothèque",
"more": "plus", "more": "plus",
"name": "Nom",
"total-playtime": "Durée totale de lecture", "total-playtime": "Durée totale de lecture",
"tracks": "Pistes", "tracks": "Pistes",
"update": "Actualiser", "update": "Actualiser",
@ -407,8 +408,8 @@
"count": "{count} piste|{count} piste|{count} pistes", "count": "{count} piste|{count} piste|{count} pistes",
"edit": "Éditer", "edit": "Éditer",
"hide-previous": "Masquer lhistorique", "hide-previous": "Masquer lhistorique",
"queue": "File dattente", "save": "Enregistrer",
"save": "Enregistrer" "title": "File dattente"
}, },
"radio": { "radio": {
"count": "{count} station|{count} station|{count} stations", "count": "{count} station|{count} station|{count} stations",
@ -494,8 +495,7 @@
"spotify": { "spotify": {
"no-support": "Loption Spotify nest pas présente.", "no-support": "Loption Spotify nest pas présente.",
"logged-as": "Connecté en tant que ", "logged-as": "Connecté en tant que ",
"requirements": "Vous devez posséder un compte Spotify Premium.", "requirements": "Vous devez posséder un compte Spotify Premium. Laccès à lAPI de Spotify permet lanalyse de votre bibliothèque Spotify. Les champs dapplication requis sont les suivants :",
"scopes": "Laccès à lAPI de Spotify permet lanalyse de votre bibliothèque Spotify. Les champs dapplication requis sont les suivants :",
"user": "Accès autorisé pour ", "user": "Accès autorisé pour ",
"authorize": "Autoriser laccès à lAPI", "authorize": "Autoriser laccès à lAPI",
"grant-access": "Accordez laccès à lAPI de Spotify", "grant-access": "Accordez laccès à lAPI de Spotify",
@ -571,10 +571,6 @@
"toggle-lyrics": "Voir/Cacher les paroles" "toggle-lyrics": "Voir/Cacher les paroles"
} }
}, },
"setting": {
"not-saved": " (erreur à lenregistrement du réglage)",
"saved": " (réglage enregistré)"
},
"server": { "server": {
"connection-failed": "Échec de connexion au serveur", "connection-failed": "Échec de connexion au serveur",
"missing-port": "Port websocket manquant", "missing-port": "Port websocket manquant",

View File

@ -241,6 +241,7 @@
"compiled-with": "编译支持来自于 {options}", "compiled-with": "编译支持来自于 {options}",
"library": "资料库", "library": "资料库",
"more": "更多", "more": "更多",
"name": "名称",
"total-playtime": "总播放时长", "total-playtime": "总播放时长",
"tracks": "曲目总数", "tracks": "曲目总数",
"update": "更新", "update": "更新",
@ -407,8 +408,8 @@
"count": "{count} 只曲目|{count} 只曲目", "count": "{count} 只曲目|{count} 只曲目",
"edit": "编辑", "edit": "编辑",
"hide-previous": "隐藏历史", "hide-previous": "隐藏历史",
"title": "清单", "save": "保存",
"save": "保存" "title": "清单"
}, },
"radio": { "radio": {
"count": "{count} 个电台|{count} 个电台", "count": "{count} 个电台|{count} 个电台",
@ -494,8 +495,7 @@
"spotify": { "spotify": {
"no-support": "OwnTone的构建没有来自 Spotify 官方的支持,也未安装 libspotify", "no-support": "OwnTone的构建没有来自 Spotify 官方的支持,也未安装 libspotify",
"logged-as": "登录为 ", "logged-as": "登录为 ",
"requirements": "您必须拥有 Spotify付费帐户", "requirements": "您必须拥有 Spotify付费帐户。访问 Spotify Web API 可以扫描您的 Spotify库。所需范围是",
"scopes": "访问 Spotify Web API 可以扫描您的 Spotify库。所需范围是",
"user": "授予访问权限", "user": "授予访问权限",
"authorize": "授权 Web API 访问", "authorize": "授权 Web API 访问",
"grant-access": "授予对 Spotify Web API 的访问权限", "grant-access": "授予对 Spotify Web API 的访问权限",
@ -571,10 +571,6 @@
"toggle-lyrics": "显示/隐藏歌词" "toggle-lyrics": "显示/隐藏歌词"
} }
}, },
"setting": {
"not-saved": " (设置保存错误)",
"saved": " (设置已保存)"
},
"server": { "server": {
"connection-failed": "无法连接到 OwnTone 服务器", "connection-failed": "无法连接到 OwnTone 服务器",
"missing-port": "缺少 websocket 端口", "missing-port": "缺少 websocket 端口",

View File

@ -241,6 +241,7 @@
"compiled-with": "編譯支持來自於 {options}", "compiled-with": "編譯支持來自於 {options}",
"library": "資料庫", "library": "資料庫",
"more": "更多", "more": "更多",
"name": "名稱",
"total-playtime": "總播放時長", "total-playtime": "總播放時長",
"tracks": "曲目總數", "tracks": "曲目總數",
"update": "更新", "update": "更新",
@ -407,8 +408,8 @@
"count": "{count} 首曲目|{count} 首曲目", "count": "{count} 首曲目|{count} 首曲目",
"edit": "編輯", "edit": "編輯",
"hide-previous": "隱藏歷史", "hide-previous": "隱藏歷史",
"title": "清單", "save": "儲存",
"save": "儲存" "title": "清單"
}, },
"radio": { "radio": {
"count": "{count} 個電台|{count} 個電台", "count": "{count} 個電台|{count} 個電台",
@ -494,8 +495,7 @@
"spotify": { "spotify": {
"no-support": "OwnTone並無 Spotify 官方的支持,也未安裝 libspotify", "no-support": "OwnTone並無 Spotify 官方的支持,也未安裝 libspotify",
"logged-as": "登入為 ", "logged-as": "登入為 ",
"requirements": "您必須擁有 Spotify付費帳戶", "requirements": "您必須擁有 Spotify付費帳戶。訪問 Spotify Web API 可以掃描您的 Spotify庫。所需範圍是",
"scopes": "訪問 Spotify Web API 可以掃描您的 Spotify庫。所需範圍是",
"user": "授予訪問權限", "user": "授予訪問權限",
"authorize": "授權 Web API 訪問", "authorize": "授權 Web API 訪問",
"grant-access": "授予對 Spotify Web API 的訪問權限", "grant-access": "授予對 Spotify Web API 的訪問權限",
@ -571,10 +571,6 @@
"toggle-lyrics": "顯示/隱藏歌詞" "toggle-lyrics": "顯示/隱藏歌詞"
} }
}, },
"setting": {
"not-saved": " (設定儲存錯誤)",
"saved": " (設定已儲存)"
},
"server": { "server": {
"connection-failed": "無法連接到 OwnTone 伺服器", "connection-failed": "無法連接到 OwnTone 伺服器",
"missing-port": "缺少 websocket 端口", "missing-port": "缺少 websocket 端口",

View File

@ -11,12 +11,6 @@
cursor: move; cursor: move;
} }
.fd-is-text-clipped {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.fd-tabs-section { .fd-tabs-section {
padding-bottom: 0; padding-bottom: 0;
padding-top: 0; padding-top: 0;
@ -44,6 +38,11 @@
} }
} }
.navbar-item {
width: var(--bulma-navbar-height);
justify-content: center;
}
.fd-cover { .fd-cover {
align-items: center; align-items: center;
display: flex; display: flex;
@ -112,24 +111,16 @@
/* Only scroll content if modal contains a card component */ /* Only scroll content if modal contains a card component */
.modal-content .card-content { .modal-content .card-content {
max-height: calc(100vh - 200px); max-height: calc(100vh - calc(4 * var(--bulma-navbar-height)));
overflow: auto; overflow: auto;
} }
/* Show scrollbar for navbar menu in desktop mode if content exceeds the screen size */
@include desktop {
.navbar-dropdown {
max-height: calc(100vh - calc(2 * var(--bulma-navbar-height)) - 2rem);
overflow: auto;
}
}
.buttons { .buttons {
@include mobile { @include mobile {
&.fd-is-centered-mobile { &.is-centered-mobile {
justify-content: center; justify-content: center;
&:not(.has-addons) { &:not(.has-addons) {
.button:not(.is-fullwidth) { .button {
margin-left: 0.25rem; margin-left: 0.25rem;
margin-right: 0.25rem; margin-right: 0.25rem;
} }
@ -157,7 +148,7 @@
} }
} }
.fd-overlay-fullscreen { .overlay-fullscreen {
@extend .is-overlay; @extend .is-overlay;
z-index: 25; z-index: 25;
background-color: rgba(10, 10, 10, 0.2); background-color: rgba(10, 10, 10, 0.2);
@ -187,9 +178,9 @@
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
background: var(--bulma-light); background: var(--bulma-light);
border: 1px solid var(--bulma-grey-light); border: 1px solid var(--bulma-grey-lighter);
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
background: var(--bulma-grey-light); background: var(--bulma-grey-lighter);
border: 1px solid var(--bulma-grey-dark); border: 1px solid var(--bulma-grey-dark);
} }
} }
@ -209,12 +200,12 @@
background: linear-gradient( background: linear-gradient(
90deg, 90deg,
var(--bulma-dark) var(--sx), var(--bulma-dark) var(--sx),
var(--bulma-grey-light) var(--sx) var(--bulma-grey-lighter) var(--sx)
); );
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
background: linear-gradient( background: linear-gradient(
90deg, 90deg,
var(--bulma-grey-light) var(--sx), var(--bulma-grey-lighter) var(--sx),
var(--bulma-grey-dark) var(--sx) var(--bulma-grey-dark) var(--sx)
); );
} }

View File

@ -5,13 +5,11 @@
<div class="column is-four-fifths"> <div class="column is-four-fifths">
<div class="content"> <div class="content">
<nav class="level"> <nav class="level">
<!-- Left side -->
<div class="level-left"> <div class="level-left">
<div class="level-item"> <div class="level-item">
<p class="title is-4" v-text="$t('page.about.library')" /> <p class="title is-4" v-text="$t('page.about.library')" />
</div> </div>
</div> </div>
<!-- Right side -->
<div class="level-right"> <div class="level-right">
<div v-if="library.updating"> <div v-if="library.updating">
<a <a
@ -31,7 +29,7 @@
<div class="media"> <div class="media">
<div <div
class="media-content has-text-weight-bold" class="media-content has-text-weight-bold"
v-text="$t('page.about.library')" v-text="$t('page.about.name')"
/> />
<div class="media-right" v-text="configuration.library_name" /> <div class="media-right" v-text="configuration.library_name" />
</div> </div>

View File

@ -6,13 +6,16 @@
<p class="subtitle is-6 has-text-link"> <p class="subtitle is-6 has-text-link">
<a class="has-text-link" @click="open_artist" v-text="album.artist" /> <a class="has-text-link" @click="open_artist" v-text="album.artist" />
</p> </p>
<div class="buttons fd-is-centered-mobile mt-5"> <div class="buttons is-centered-mobile mt-5">
<a class="button is-small is-dark is-rounded" @click="play"> <a
class="button has-background-light is-small is-rounded"
@click="play"
>
<mdicon class="icon" name="shuffle" size="16" /> <mdicon class="icon" name="shuffle" size="16" />
<span v-text="$t('page.album.shuffle')" /> <span v-text="$t('page.album.shuffle')" />
</a> </a>
<a <a
class="button is-small is-light is-rounded" class="button is-small has-background-light is-rounded"
@click="show_details_modal = true" @click="show_details_modal = true"
> >
<mdicon class="icon" name="dots-horizontal" size="16" /> <mdicon class="icon" name="dots-horizontal" size="16" />

View File

@ -10,7 +10,7 @@
v-text="album.artists[0].name" v-text="album.artists[0].name"
/> />
</p> </p>
<div class="buttons fd-is-centered-mobile mt-5"> <div class="buttons is-centered-mobile mt-5">
<a class="button is-small is-dark is-rounded" @click="play"> <a class="button is-small is-dark is-rounded" @click="play">
<mdicon class="icon" name="shuffle" size="16" /> <mdicon class="icon" name="shuffle" size="16" />
<span v-text="$t('page.spotify.album.shuffle')" /> <span v-text="$t('page.spotify.album.shuffle')" />

View File

@ -7,22 +7,25 @@
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
<p class="heading" v-text="$t('page.albums.filter')" /> <p class="heading" v-text="$t('page.albums.filter')" />
<div class="field"> <control-switch v-model="uiStore.hide_singles">
<control-switch v-model="uiStore.hide_singles"> <template #label>
<template #label> <span v-text="$t('page.albums.hide-singles')" />
<span v-text="$t('page.albums.hide-singles')" /> </template>
</template> <template #help>
</control-switch> <span v-text="$t('page.albums.hide-singles-help')" />
<p class="help" v-text="$t('page.albums.hide-singles-help')" /> </template>
</div> </control-switch>
<div v-if="spotify_enabled" class="field"> <control-switch
<control-switch v-model="uiStore.hide_spotify"> v-if="spotify_enabled"
<template #label> v-model="uiStore.hide_spotify"
<span v-text="$t('page.albums.hide-spotify')" /> >
</template> <template #label>
</control-switch> <span v-text="$t('page.albums.hide-spotify')" />
<p class="help" v-text="$t('page.albums.hide-spotify-help')" /> </template>
</div> <template #help>
<span v-text="$t('page.albums.hide-spotify-help')" />
</template>
</control-switch>
</div> </div>
<div class="column"> <div class="column">
<p class="heading" v-text="$t('page.albums.sort.title')" /> <p class="heading" v-text="$t('page.albums.sort.title')" />

View File

@ -5,14 +5,17 @@
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
<p class="heading" v-text="$t('page.artist.filter')" /> <p class="heading" v-text="$t('page.artist.filter')" />
<div v-if="spotify_enabled" class="field"> <control-switch
<control-switch v-model="uiStore.hide_spotify"> v-if="spotify_enabled"
<template #label> v-model="uiStore.hide_spotify"
<span v-text="$t('page.artist.hide-spotify')" /> >
</template> <template #label>
</control-switch> <span v-text="$t('page.artist.hide-spotify')" />
<p class="help" v-text="$t('page.artist.hide-spotify-help')" /> </template>
</div> <template #help>
<span v-text="$t('page.artist.hide-spotify-help')" />
</template>
</control-switch>
</div> </div>
<div class="column"> <div class="column">
<p class="heading" v-text="$t('page.artist.sort.title')" /> <p class="heading" v-text="$t('page.artist.sort.title')" />

View File

@ -6,14 +6,17 @@
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
<p class="heading" v-text="$t('page.artist.filter')" /> <p class="heading" v-text="$t('page.artist.filter')" />
<div v-if="spotify_enabled" class="field"> <control-switch
<control-switch v-model="uiStore.hide_spotify"> v-if="spotify_enabled"
<template #label> v-model="uiStore.hide_spotify"
<span v-text="$t('page.artist.hide-spotify')" /> >
</template> <template #label>
</control-switch> <span v-text="$t('page.artist.hide-spotify')" />
<p class="help" v-text="$t('page.artist.hide-spotify-help')" /> </template>
</div> <template #help>
<span v-text="$t('page.artist.hide-spotify-help')" />
</template>
</control-switch>
</div> </div>
<div class="column"> <div class="column">
<p class="heading" v-text="$t('page.artist.sort.title')" /> <p class="heading" v-text="$t('page.artist.sort.title')" />

View File

@ -6,22 +6,24 @@
<index-button-list :indices="artists.indices" /> <index-button-list :indices="artists.indices" />
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
<p class="heading" v-text="$t('page.artists.filter')" /> <p v-text="$t('page.artists.filter')" class="heading" />
<div class="field"> <control-switch v-model="uiStore.hide_singles">
<control-switch v-model="uiStore.hide_singles"> <template #label>
<template #label> <span v-text="$t('page.artists.hide-singles')" />
<span v-text="$t('page.artists.hide-singles')" /> </template>
</template> <template #help>
</control-switch> <span v-text="$t('page.artists.hide-singles-help')" />
<p class="help" v-text="$t('page.artists.hide-singles-help')" /> </template>
</div> </control-switch>
<div v-if="spotify_enabled" class="field"> <div v-if="spotify_enabled" class="field">
<control-switch v-model="uiStore.hide_spotify"> <control-switch v-model="uiStore.hide_spotify">
<template #label> <template #label>
<span v-text="$t('page.artists.hide-spotify')" /> <span v-text="$t('page.artists.hide-spotify')" />
</template> </template>
<template #help>
<span v-text="$t('page.artists.hide-spotify-help')" />
</template>
</control-switch> </control-switch>
<p class="help" v-text="$t('page.artists.hide-spotify-help')" />
</div> </div>
</div> </div>
<div class="column"> <div class="column">

View File

@ -6,7 +6,7 @@
<p class="subtitle is-6 has-text-link"> <p class="subtitle is-6 has-text-link">
<a class="has-text-link" @click="open_artist" v-text="album.artist" /> <a class="has-text-link" @click="open_artist" v-text="album.artist" />
</p> </p>
<div class="buttons fd-is-centered-mobile mt-5"> <div class="buttons is-centered-mobile mt-5">
<a class="button is-small is-dark is-rounded" @click="play"> <a class="button is-small is-dark is-rounded" @click="play">
<mdicon class="icon" name="play" size="16" /> <mdicon class="icon" name="play" size="16" />
<span v-text="$t('page.audiobooks.album.play')" /> <span v-text="$t('page.audiobooks.album.play')" />

View File

@ -12,7 +12,7 @@
<nav class="level"> <nav class="level">
<p class="level-item"> <p class="level-item">
<router-link <router-link
class="button is-light is-small is-rounded" class="button is-small is-rounded"
:to="{ name: 'music-recently-added' }" :to="{ name: 'music-recently-added' }"
> >
{{ $t('page.music.show-more') }} {{ $t('page.music.show-more') }}
@ -32,7 +32,7 @@
<nav class="level"> <nav class="level">
<p class="level-item"> <p class="level-item">
<router-link <router-link
class="button is-light is-small is-rounded" class="button is-small is-rounded"
:to="{ name: 'music-recently-played' }" :to="{ name: 'music-recently-played' }"
> >
{{ $t('page.music.show-more') }} {{ $t('page.music.show-more') }}

View File

@ -13,7 +13,7 @@
<p class="level-item"> <p class="level-item">
<router-link <router-link
:to="{ name: 'music-spotify-new-releases' }" :to="{ name: 'music-spotify-new-releases' }"
class="button is-light is-small is-rounded" class="button is-small is-rounded"
> >
{{ $t('page.spotify.music.show-more') }} {{ $t('page.spotify.music.show-more') }}
</router-link> </router-link>
@ -36,7 +36,7 @@
<p class="level-item"> <p class="level-item">
<router-link <router-link
:to="{ name: 'music-spotify-featured-playlists' }" :to="{ name: 'music-spotify-featured-playlists' }"
class="button is-light is-small is-rounded" class="button is-small is-rounded"
> >
{{ $t('page.spotify.music.show-more') }} {{ $t('page.spotify.music.show-more') }}
</router-link> </router-link>

View File

@ -1,56 +1,56 @@
<template> <template>
<div class="hero is-full-height"> <div class="hero is-full-height">
<div v-if="track.id > 0" class="hero-body is-flex is-align-items-center"> <div class="hero-body is-flex is-align-items-center">
<div class="container has-text-centered" style="max-width: 500px">
<cover-artwork
:url="track.artwork_url"
:artist="track.artist"
:album="track.album"
class="is-clickable fd-has-shadow fd-cover-big-image"
:class="{ 'is-masked': lyricsStore.pane }"
@click="open_dialog(track)"
/>
<lyrics-pane v-if="lyricsStore.pane" />
<control-slider
v-model:value="track_progress"
class="mt-5"
:disabled="is_live"
:max="track_progress_max"
:cursor="cursor"
@change="seek"
@mousedown="start_dragging"
@mouseup="end_dragging"
/>
<div class="is-flex is-justify-content-space-between">
<p class="subtitle is-7" v-text="track_elapsed_time" />
<p class="subtitle is-7" v-text="track_total_time" />
</div>
<p class="title is-5" v-text="track.title" />
<p class="title is-6" v-text="track.artist" />
<p
v-if="composer"
class="subtitle is-6 has-text-grey has-text-weight-bold"
v-text="composer"
/>
<p v-if="track.album" class="subtitle is-6" v-text="track.album" />
<p
v-if="settingsStore.show_filepath_now_playing"
class="subtitle is-6 has-text-grey"
v-text="track.path"
/>
</div>
</div>
<div v-else class="hero-body is-flex is-align-items-center">
<div class="container has-text-centered"> <div class="container has-text-centered">
<p class="title is-5" v-text="$t('page.now-playing.title')" /> <div v-if="track.id" class="mx-auto" style="max-width: 32rem">
<p class="subtitle" v-text="$t('page.now-playing.info')" /> <cover-artwork
:url="track.artwork_url"
:artist="track.artist"
:album="track.album"
class="is-clickable fd-has-shadow fd-cover-big-image"
:class="{ 'is-masked': lyricsStore.pane }"
@click="open_dialog(track)"
/>
<lyrics-pane v-if="lyricsStore.pane" />
<control-slider
v-model:value="track_progress"
class="mt-5"
:disabled="is_live"
:max="track_progress_max"
:cursor="cursor"
@change="seek"
@mousedown="start_dragging"
@mouseup="end_dragging"
/>
<div class="is-flex is-justify-content-space-between">
<p class="subtitle is-7" v-text="track_elapsed_time" />
<p class="subtitle is-7" v-text="track_total_time" />
</div>
<p class="title is-5" v-text="track.title" />
<p class="title is-6" v-text="track.artist" />
<p
v-if="composer"
class="subtitle is-6 has-text-grey has-text-weight-bold"
v-text="composer"
/>
<p v-if="track.album" class="subtitle is-6" v-text="track.album" />
<p
v-if="settingsStore.show_filepath_now_playing"
class="subtitle is-6 has-text-grey"
v-text="track.path"
/>
</div>
<div v-else>
<p class="title is-5" v-text="$t('page.now-playing.title')" />
<p class="subtitle" v-text="$t('page.now-playing.info')" />
</div>
</div> </div>
<modal-dialog-queue-item
:show="show_details_modal"
:item="selected_item"
@close="show_details_modal = false"
/>
</div> </div>
<modal-dialog-queue-item
:show="show_details_modal"
:item="selected_item"
@close="show_details_modal = false"
/>
</div> </div>
</template> </template>

View File

@ -6,7 +6,7 @@
<p class="subtitle is-6"> <p class="subtitle is-6">
<br /> <br />
</p> </p>
<div class="buttons fd-is-centered-mobile mt-5"> <div class="buttons is-centered-mobile mt-5">
<a class="button is-small is-dark is-rounded" @click="play"> <a class="button is-small is-dark is-rounded" @click="play">
<mdicon class="icon" name="play" size="16" /> <mdicon class="icon" name="play" size="16" />
<span v-text="$t('page.podcast.play')" /> <span v-text="$t('page.podcast.play')" />

View File

@ -9,7 +9,7 @@
<input <input
ref="search_field" ref="search_field"
v-model="search_query" v-model="search_query"
class="input is-rounded is-shadowless" class="input is-rounded"
type="text" type="text"
:placeholder="$t('page.search.placeholder')" :placeholder="$t('page.search.placeholder')"
autocomplete="off" autocomplete="off"
@ -60,7 +60,7 @@
<nav v-if="show_all_button(items)" class="level"> <nav v-if="show_all_button(items)" class="level">
<p class="level-item"> <p class="level-item">
<a <a
class="button is-light is-small is-rounded" class="button is-small is-rounded"
@click="expand(type)" @click="expand(type)"
v-text=" v-text="
$t(`page.search.show-${type}s`, items.total, { $t(`page.search.show-${type}s`, items.total, {

View File

@ -9,7 +9,7 @@
<input <input
ref="search_field" ref="search_field"
v-model="search_query" v-model="search_query"
class="input is-rounded is-shadowless" class="input is-rounded"
type="text" type="text"
:placeholder="$t('page.spotify.search.placeholder')" :placeholder="$t('page.spotify.search.placeholder')"
autocomplete="off" autocomplete="off"
@ -55,7 +55,7 @@
<nav v-if="show_all_button(items)" class="level"> <nav v-if="show_all_button(items)" class="level">
<p class="level-item"> <p class="level-item">
<a <a
class="button is-light is-small is-rounded" class="button is-small is-rounded"
@click="expand(type)" @click="expand(type)"
v-text=" v-text="
$t(`page.spotify.search.show-${type}s`, items.total, { $t(`page.spotify.search.show-${type}s`, items.total, {

View File

@ -9,18 +9,19 @@
/> />
</template> </template>
<template #content> <template #content>
<div v-if="!spotify.spotify_installed" class="notification is-size-7"> <div v-if="!spotify.spotify_installed" class="notification help">
<p v-text="$t('page.settings.services.spotify.no-support')" /> <p v-text="$t('page.settings.services.spotify.no-support')" />
</div> </div>
<div v-if="spotify.spotify_installed"> <div v-if="spotify.spotify_installed">
<div class="notification is-size-7"> <div>
<span v-text="$t('page.settings.services.spotify.requirements')" />
</div>
<div class="mt-5">
<p <p
class="content" class="content"
v-text="$t('page.settings.services.spotify.grant-access')" v-text="$t('page.settings.services.spotify.grant-access')"
/> />
<div class="notification help">
<p v-text="$t('page.settings.services.spotify.requirements')" />
<p v-text="spotify_required_scope.join(', ')" />
</div>
<p v-if="spotify.webapi_token_valid"> <p v-if="spotify.webapi_token_valid">
<span v-text="$t('page.settings.services.spotify.user')" /> <span v-text="$t('page.settings.services.spotify.user')" />
<code v-text="spotify.webapi_user" /> <code v-text="spotify.webapi_user" />
@ -29,25 +30,21 @@
<span v-text="$t('page.settings.services.spotify.reauthorize')" /> <span v-text="$t('page.settings.services.spotify.reauthorize')" />
<code v-text="spotify_missing_scope.join()" /> <code v-text="spotify_missing_scope.join()" />
</p> </p>
<div class="field mt-5"> <div
v-if="
!spotify.webapi_token_valid || spotify_missing_scope.length > 0
"
class="field"
>
<div class="control"> <div class="control">
<a <a
class="button" class="button"
:class="{
'is-info':
!spotify.webapi_token_valid ||
spotify_missing_scope.length > 0
}"
:href="spotify.oauth_uri" :href="spotify.oauth_uri"
v-text="$t('page.settings.services.spotify.authorize')" v-text="$t('page.settings.services.spotify.authorize')"
/> />
</div> </div>
</div> </div>
<p class="help"> <div v-if="spotify.webapi_token_valid" class="field">
<span v-text="$t('page.settings.services.spotify.scopes')" />
<code v-text="spotify_required_scope.join(', ')" />
</p>
<div v-if="spotify.webapi_token_valid" class="field mt-5">
<div class="control"> <div class="control">
<a <a
class="button is-danger" class="button is-danger"

View File

@ -50,17 +50,14 @@
v-text="$t('page.settings.devices.speaker-pairing-info')" v-text="$t('page.settings.devices.speaker-pairing-info')"
/> />
<div v-for="output in outputs" :key="output.id"> <div v-for="output in outputs" :key="output.id">
<div class="field"> <control-switch
<control-switch v-model="output.selected"
:id="output.id" @update:model-value="toggleOutput(output.id)"
v-model="output.selected" >
@update:model-value="toggleOutput(output.id)" <template #label>
> <span v-text="output.name" />
<template #label> </template>
<span v-text="output.name" /> </control-switch>
</template>
</control-switch>
</div>
<form <form
v-if="output.needs_auth_key" v-if="output.needs_auth_key"
class="mb-5" class="mb-5"

View File

@ -6,14 +6,13 @@
<section v-if="$slots.options" ref="options"> <section v-if="$slots.options" ref="options">
<slot name="options" /> <slot name="options" />
<nav class="buttons is-centered"> <nav class="buttons is-centered">
<router-link class="button is-small is-white" :to="position"> <router-link class="button is-small" :to="position">
<mdicon class="icon" :name="icon" size="16" /> <mdicon class="icon" :name="icon" size="16" />
</router-link> </router-link>
</nav> </nav>
</section> </section>
<div :class="{ 'is-full-height': $slots.options }"> <div>
<nav id="top" class="level is-clipped"> <nav id="top" class="level is-clipped">
<!-- Left side -->
<div class="level-left is-flex-shrink-1"> <div class="level-left is-flex-shrink-1">
<div <div
class="level-item is-flex-shrink-1 has-text-centered-mobile" class="level-item is-flex-shrink-1 has-text-centered-mobile"
@ -23,7 +22,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- Right side -->
<div class="level-right has-text-centered-mobile"> <div class="level-right has-text-centered-mobile">
<slot name="heading-right" /> <slot name="heading-right" />
</div> </div>

View File

@ -6,13 +6,11 @@
<div class="column is-four-fifths"> <div class="column is-four-fifths">
<div class="columns is-flex-direction-row-reverse"> <div class="columns is-flex-direction-row-reverse">
<div class="column fd-has-cover"> <div class="column fd-has-cover">
<!-- Slot heading right -->
<slot name="heading-right" /> <slot name="heading-right" />
</div> </div>
<div <div
class="column m-auto is-three-fifths has-text-centered-mobile" class="column m-auto is-three-fifths has-text-centered-mobile"
> >
<!-- Slot heading left -->
<slot name="heading-left" /> <slot name="heading-left" />
</div> </div>
</div> </div>