diff --git a/src/components/Modal.vue b/src/components/Modal.vue new file mode 100644 index 0000000..dfacdde --- /dev/null +++ b/src/components/Modal.vue @@ -0,0 +1,71 @@ + + + + + {{ text }} + + {{ $t("modal.close") }} + + + + + + + + + diff --git a/src/views/album.vue b/src/views/album.vue index b68e2f6..bd64c32 100644 --- a/src/views/album.vue +++ b/src/views/album.vue @@ -90,20 +90,11 @@ /> - - - - {{ album.description }} - - {{ $t("modal.close") }} - - - - + @@ -122,6 +113,7 @@ import ButtonTwoTone from "@/components/ButtonTwoTone.vue"; import TrackList from "@/components/TrackList.vue"; import CoverRow from "@/components/CoverRow.vue"; import Cover from "@/components/Cover.vue"; +import Modal from "@/components/Modal.vue"; export default { name: "Album", @@ -131,6 +123,7 @@ export default { TrackList, ExplicitSymbol, CoverRow, + Modal, }, data() { return { @@ -305,49 +298,6 @@ export default { } } -.shade { - background: rgba(255, 255, 255, 0.38); - position: fixed; - top: 0; - bottom: 0; - left: 0; - right: 0; - display: flex; - justify-content: center; - align-items: center; - .description-full { - background: rgba(255, 255, 255, 0.78); - box-shadow: 0 12px 16px -8px rgba(0, 0, 0, 0.1); - border: 1px solid rgba(0, 0, 0, 0.08); - backdrop-filter: blur(12px); - padding: 32px; - border-radius: 12px; - width: 50vw; - margin: auto 0; - font-size: 14px; - z-index: 100; - display: flex; - flex-direction: column; - - .close { - display: flex; - justify-content: flex-end; - font-size: 16px; - margin-top: 20px; - color: #335eea; - cursor: pointer; - } - } -} - -.fade-enter-active, -.fade-leave-active { - transition: opacity 0.2s; -} -.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ { - opacity: 0; -} - .explicit-symbol { opacity: 0.28; color: var(--color-text); diff --git a/src/views/playlist.vue b/src/views/playlist.vue index fe66a9d..0a37547 100644 --- a/src/views/playlist.vue +++ b/src/views/playlist.vue @@ -112,20 +112,11 @@ - - - - {{ playlist.description }} - - {{ $t("modal.close") }} - - - - + @@ -140,6 +131,7 @@ import { isAccountLoggedIn } from "@/utils/auth"; import ButtonTwoTone from "@/components/ButtonTwoTone.vue"; import TrackList from "@/components/TrackList.vue"; import Cover from "@/components/Cover.vue"; +import Modal from "@/components/Modal.vue"; const specialPlaylist = { 2829816518: { @@ -234,6 +226,7 @@ export default { Cover, ButtonTwoTone, TrackList, + Modal, }, data() { return { @@ -412,41 +405,6 @@ export default { } } -.shade { - background: rgba(255, 255, 255, 0.38); - position: fixed; - top: 0; - bottom: 0; - left: 0; - right: 0; - display: flex; - justify-content: center; - align-items: center; - .description-full { - background: rgba(255, 255, 255, 0.78); - box-shadow: 0 12px 16px -8px rgba(0, 0, 0, 0.1); - border: 1px solid rgba(0, 0, 0, 0.08); - backdrop-filter: blur(12px); - padding: 32px; - border-radius: 12px; - width: 50vw; - margin: auto 0; - font-size: 14px; - z-index: 100; - display: flex; - flex-direction: column; - - .close { - display: flex; - justify-content: flex-end; - font-size: 16px; - margin-top: 20px; - color: #335eea; - cursor: pointer; - } - } -} - .special-playlist { margin-top: 192px; margin-bottom: 128px; @@ -647,12 +605,4 @@ export default { } } } - -.fade-enter-active, -.fade-leave-active { - transition: opacity 0.2s; -} -.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ { - opacity: 0; -}