mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
show existing image on update playlist modal
+ some modal cleanup
This commit is contained in:
@@ -11,10 +11,10 @@
|
|||||||
height: calc(100vh);
|
height: calc(100vh);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
padding: $small;
|
|
||||||
padding-right: $medium;
|
padding-right: $medium;
|
||||||
border-right: solid 1px $gray4;
|
border-right: solid 1px $gray4;
|
||||||
margin-top: -$small;
|
margin-top: -$small;
|
||||||
|
padding-top: $small;
|
||||||
}
|
}
|
||||||
|
|
||||||
#app-grid.isSmall {
|
#app-grid.isSmall {
|
||||||
|
|||||||
@@ -38,11 +38,9 @@ import LoadMore from "./LoadMore.vue";
|
|||||||
|
|
||||||
const search = useSearchStore();
|
const search = useSearchStore();
|
||||||
|
|
||||||
const props = defineProps<{
|
defineProps<{
|
||||||
album_grid?: boolean;
|
album_grid?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
console.log(search.albums);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="new-playlist-modal" v-if="modal.visible">
|
<div class="modal" v-if="modal.visible">
|
||||||
<div class="bg" @click="modal.hideModal"></div>
|
<div class="bg" @click="modal.hideModal"></div>
|
||||||
<div class="m-content rounded">
|
<div class="m-content rounded">
|
||||||
<div class="heading">{{ modal.title }}</div>
|
<div class="heading">{{ modal.title }}</div>
|
||||||
@@ -34,7 +34,6 @@ const modal = useModalStore();
|
|||||||
* @param title
|
* @param title
|
||||||
*/
|
*/
|
||||||
function setTitle(title: string) {
|
function setTitle(title: string) {
|
||||||
console.log(title);
|
|
||||||
modal.setTitle(title);
|
modal.setTitle(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +46,7 @@ function hideModal() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.new-playlist-modal {
|
.modal {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
@@ -65,10 +64,11 @@ function hideModal() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.m-content {
|
.m-content {
|
||||||
width: 30rem;
|
width: 100%;
|
||||||
background-color: $black;
|
max-width: 35rem;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
background-color: $gray;
|
||||||
|
|
||||||
.cancel {
|
.cancel {
|
||||||
width: 2rem;
|
width: 2rem;
|
||||||
@@ -78,9 +78,10 @@ function hideModal() {
|
|||||||
right: 1rem;
|
right: 1rem;
|
||||||
background-image: url("../assets/icons/plus.svg");
|
background-image: url("../assets/icons/plus.svg");
|
||||||
transform: rotate(45deg);
|
transform: rotate(45deg);
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
transform: rotate(135deg);
|
transform: rotate(45deg) scale(1.2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
class="rounded"
|
class="rounded-sm"
|
||||||
name="name"
|
name="name"
|
||||||
id="modal-playlist-name-input"
|
id="modal-playlist-name-input"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -28,7 +28,9 @@
|
|||||||
id="update-pl-img-preview"
|
id="update-pl-img-preview"
|
||||||
class="image"
|
class="image"
|
||||||
:style="{
|
:style="{
|
||||||
backgroundImage: `url(${props.playlist.image})`,
|
backgroundImage: `url(${
|
||||||
|
paths.images.playlist + props.playlist.image
|
||||||
|
})`,
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,6 +43,7 @@ import { updatePlaylist } from "@/composables/fetch/playlists";
|
|||||||
import { Playlist } from "@/interfaces";
|
import { Playlist } from "@/interfaces";
|
||||||
import usePStore from "@/stores/pages/playlist";
|
import usePStore from "@/stores/pages/playlist";
|
||||||
import { onMounted } from "vue";
|
import { onMounted } from "vue";
|
||||||
|
import { paths } from "@/config";
|
||||||
|
|
||||||
const pStore = usePStore();
|
const pStore = usePStore();
|
||||||
|
|
||||||
@@ -132,6 +135,7 @@ function update_playlist(e: Event) {
|
|||||||
place-items: center;
|
place-items: center;
|
||||||
color: $gray1;
|
color: $gray1;
|
||||||
margin: $small 0;
|
margin: $small 0;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
#update-pl-img-preview {
|
#update-pl-img-preview {
|
||||||
width: 4.5rem;
|
width: 4.5rem;
|
||||||
|
|||||||
+6
-7
@@ -1,3 +1,6 @@
|
|||||||
|
// "local" | "remote"
|
||||||
|
let mode = "remote";
|
||||||
|
|
||||||
export interface D<T = string> {
|
export interface D<T = string> {
|
||||||
[key: string]: T;
|
[key: string]: T;
|
||||||
}
|
}
|
||||||
@@ -19,19 +22,15 @@ const imageRoutes = {
|
|||||||
raw: "/raw/",
|
raw: "/raw/",
|
||||||
};
|
};
|
||||||
|
|
||||||
let mode: string = "remote";
|
|
||||||
|
|
||||||
function toggleMode() {
|
function toggleMode() {
|
||||||
mode = mode === "local" ? "remote" : "local";
|
mode = mode === "local" ? "remote" : "local";
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDomain() {
|
const domain = () => domains[mode];
|
||||||
return domains[mode];
|
|
||||||
}
|
|
||||||
|
|
||||||
const baseImgUrl = getDomain() + ports.images;
|
const baseImgUrl = domain() + ports.images;
|
||||||
|
|
||||||
const baseApiUrl = getDomain() + ports.api;
|
const baseApiUrl = domain() + ports.api;
|
||||||
|
|
||||||
const paths = {
|
const paths = {
|
||||||
api: {
|
api: {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export default defineStore("search", () => {
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const currentTab = ref("tracks");
|
const currentTab = ref("tracks");
|
||||||
const RESULT_COUNT = 6;
|
const RESULT_COUNT = 10;
|
||||||
|
|
||||||
const loadCounter = reactive({
|
const loadCounter = reactive({
|
||||||
tracks: 0,
|
tracks: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user