Compare commits

...

8 Commits

Author SHA1 Message Date
github-actions[bot] acf8805dac [web] Rebuild web interface 2024-04-20 21:26:29 +00:00
Alain Nussbaumer 58fbcd7e7a [web] Disable Save button when no playlist name is provided 2024-04-20 23:25:58 +02:00
Alain Nussbaumer ae973f312a [web] Remove extraneous space 2024-04-20 23:24:43 +02:00
Alain Nussbaumer 185e09c118 [web] Revert back to older version of eslint until configuration is adapted 2024-04-20 23:00:15 +02:00
github-actions[bot] 595c91d5d6 [web] Rebuild web interface 2024-04-20 20:36:33 +00:00
Alain Nussbaumer 465232f8b9 [web] Upgrade to newer versions of libraries 2024-04-20 22:35:58 +02:00
Alain Nussbaumer 13ff8fdb8e [web] Fix color of delete tag button for the dark mode 2024-04-20 22:35:58 +02:00
Alain Nussbaumer 5ce78d041d [web] Remove blanks in the search query before launching a search 2024-04-20 22:35:58 +02:00
9 changed files with 443 additions and 413 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -22,22 +22,22 @@
"mdi-vue": "^3.0.13", "mdi-vue": "^3.0.13",
"reconnectingwebsocket": "^1.0.0", "reconnectingwebsocket": "^1.0.0",
"spotify-web-api-js": "^1.5.2", "spotify-web-api-js": "^1.5.2",
"vue": "^3.4.15", "vue": "^3.4.23",
"vue-i18n": "^9.9.0", "vue-i18n": "^9.13.1",
"vue-router": "^4.2.5", "vue-router": "^4.3.2",
"vue3-click-away": "^1.2.4", "vue3-click-away": "^1.2.4",
"vue3-lazyload": "^0.3.8", "vue3-lazyload": "^0.3.8",
"vuedraggable": "^4.1.0", "vuedraggable": "^4.1.0",
"vuex": "^4.1.0" "vuex": "^4.1.0"
}, },
"devDependencies": { "devDependencies": {
"@intlify/unplugin-vue-i18n": "^2.0.0", "@intlify/unplugin-vue-i18n": "^4.0.0",
"@vitejs/plugin-vue": "^5.0.3", "@vitejs/plugin-vue": "^5.0.4",
"eslint": "^8.56.0", "eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-vue": "^9.20.1", "eslint-plugin-vue": "^9.25.0",
"prettier": "^3.2.4", "prettier": "^3.2.5",
"sass": "^1.70.0", "sass": "^1.75.0",
"vite": "^5.0.12" "vite": "^5.2.10"
} }
} }

View File

@ -3,10 +3,10 @@
<div v-if="show" class="modal is-active"> <div v-if="show" class="modal is-active">
<div class="modal-background" @click="$emit('close')" /> <div class="modal-background" @click="$emit('close')" />
<div class="modal-content"> <div class="modal-content">
<div class="card"> <form class="card" @submit.prevent="save">
<div class="card-content"> <div class="card-content">
<p class="title is-4" v-text="$t('dialog.playlist.save.title')" /> <p class="title is-4" v-text="$t('dialog.playlist.save.title')" />
<form class="mb-5" @submit.prevent="save">
<div class="field"> <div class="field">
<p class="control has-icons-left"> <p class="control has-icons-left">
<input <input
@ -14,13 +14,15 @@
v-model="playlist_name" v-model="playlist_name"
class="input is-shadowless" class="input is-shadowless"
type="text" type="text"
pattern=".+"
required
:placeholder="$t('dialog.playlist.save.playlist-name')" :placeholder="$t('dialog.playlist.save.playlist-name')"
:disabled="loading" :disabled="loading"
@input="check_name"
/> />
<mdicon class="icon is-left" name="file-music" size="16" /> <mdicon class="icon is-left" name="file-music" size="16" />
</p> </p>
</div> </div>
</form>
</div> </div>
<footer v-if="loading" class="card-footer"> <footer v-if="loading" class="card-footer">
<a class="card-footer-item has-text-dark"> <a class="card-footer-item has-text-dark">
@ -40,6 +42,7 @@
/> />
</a> </a>
<a <a
:class="{ 'is-disabled': disabled }"
class="card-footer-item has-background-info has-text-white has-text-weight-bold" class="card-footer-item has-background-info has-text-white has-text-weight-bold"
@click="save" @click="save"
> >
@ -50,7 +53,7 @@
/> />
</a> </a>
</footer> </footer>
</div> </form>
</div> </div>
<button <button
class="modal-close is-large" class="modal-close is-large"
@ -71,6 +74,7 @@ export default {
data() { data() {
return { return {
disabled: true,
playlist_name: '', playlist_name: '',
loading: false loading: false
} }
@ -89,11 +93,11 @@ export default {
}, },
methods: { methods: {
check_name(event) {
const { validity } = event.target
this.disabled = validity.patternMismatch || validity.valueMissing
},
save() { save() {
if (this.playlist_name.length < 1) {
return
}
this.loading = true this.loading = true
webapi webapi
.queue_save_playlist(this.playlist_name) .queue_save_playlist(this.playlist_name)

View File

@ -90,7 +90,6 @@ export default {
window.clearTimeout(this.timerId) window.clearTimeout(this.timerId)
this.timerId = -1 this.timerId = -1
} }
this.statusUpdate = '' this.statusUpdate = ''
this.timerId = window.setTimeout(this.update_setting, this.timerDelay) this.timerId = window.setTimeout(this.update_setting, this.timerDelay)
}, },

View File

@ -48,6 +48,7 @@
border-top-color: $grey-dark; border-top-color: $grey-dark;
} }
a.tag:hover, a.tag:hover,
a.tag.is-delete:hover,
a.dropdown-item:hover, a.dropdown-item:hover,
a.dropdown-item:focus, a.dropdown-item:focus,
a.navbar-item:hover, a.navbar-item:hover,

View File

@ -177,6 +177,7 @@ export default {
this.search_types = SEARCH_TYPES this.search_types = SEARCH_TYPES
this.search_limit = PAGE_SIZE this.search_limit = PAGE_SIZE
} }
this.search_query = this.search_query.trim()
if (!this.search_query || !this.search_query.replace(/^query:/u, '')) { if (!this.search_query || !this.search_query.replace(/^query:/u, '')) {
this.$refs.search_field.focus() this.$refs.search_field.focus()
return return

View File

@ -144,7 +144,6 @@ export default {
this.search_types = [type] this.search_types = [type]
this.search_parameters.limit = PAGE_SIZE_EXPANDED this.search_parameters.limit = PAGE_SIZE_EXPANDED
this.search_parameters.offset = 0 this.search_parameters.offset = 0
this.search() this.search()
}, },
open_search(query) { open_search(query) {
@ -168,6 +167,7 @@ export default {
this.search_types = SEARCH_TYPES this.search_types = SEARCH_TYPES
this.search_parameters.limit = PAGE_SIZE this.search_parameters.limit = PAGE_SIZE
} }
this.search_query = this.search_query.trim()
if (!this.search_query) { if (!this.search_query) {
this.$refs.search_field.focus() this.$refs.search_field.focus()
return return