mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +00:00
move page stores into pages folder
This commit is contained in:
@@ -35,7 +35,6 @@ import Notification from "@/components/Notification.vue";
|
||||
import useQStore from "@/stores/queue";
|
||||
import useShortcuts from "@/composables/useKeyboard";
|
||||
import Logo from "@/components/Logo.vue";
|
||||
import Content from "@/components/Content.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const context_store = useContextStore();
|
||||
|
||||
@@ -34,15 +34,15 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import useVisibility from "@/composables/useVisibility";
|
||||
import useNavStore from "@/stores/nav";
|
||||
import useAlbumStore from "@/stores/pages/album";
|
||||
import { ref } from "vue";
|
||||
import { playSources } from "../../composables/enums";
|
||||
import { formatSeconds } from "../../composables/perks";
|
||||
import { paths } from "../../config";
|
||||
import { AlbumInfo } from "../../interfaces";
|
||||
import PlayBtnRect from "../shared/PlayBtnRect.vue";
|
||||
import useVisibility from "@/composables/useVisibility";
|
||||
import useNavStore from "@/stores/nav";
|
||||
import useAlbumStore from "@/stores/album";
|
||||
|
||||
defineProps<{
|
||||
album: AlbumInfo;
|
||||
|
||||
@@ -39,18 +39,18 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { playSources, ContextSrc } from "../../composables/enums";
|
||||
import useVisibility from "@/composables/useVisibility";
|
||||
import useNavStore from "@/stores/nav";
|
||||
import usePStore from "@/stores/pages/playlist";
|
||||
import { ref } from "vue";
|
||||
import { ContextSrc, playSources } from "../../composables/enums";
|
||||
import { paths } from "../../config";
|
||||
import pContext from "../../contexts/playlist";
|
||||
import { Playlist } from "../../interfaces";
|
||||
import PlayBtnRect from "../shared/PlayBtnRect.vue";
|
||||
import useContextStore from "../../stores/context";
|
||||
import useModalStore from "../../stores/modal";
|
||||
import Option from "../shared/Option.vue";
|
||||
import pContext from "../../contexts/playlist";
|
||||
import useContextStore from "../../stores/context";
|
||||
import { paths } from "../../config";
|
||||
import usePStore from "@/stores/p.ptracks";
|
||||
import useVisibility from "@/composables/useVisibility";
|
||||
import { ref } from "vue";
|
||||
import useNavStore from "@/stores/nav";
|
||||
import PlayBtnRect from "../shared/PlayBtnRect.vue";
|
||||
|
||||
const imguri = paths.images.playlist;
|
||||
const context = useContextStore();
|
||||
|
||||
@@ -21,7 +21,7 @@ import { useRoute } from "vue-router";
|
||||
import { createNewPlaylist } from "../../composables/playlists";
|
||||
import { Track } from "../../interfaces";
|
||||
import { Notification, NotifType } from "../../stores/notification";
|
||||
import usePlaylistStore from "../../stores/playlists";
|
||||
import usePlaylistStore from "@/stores/pages/playlists";
|
||||
|
||||
const props = defineProps<{
|
||||
track?: Track;
|
||||
|
||||
@@ -47,10 +47,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from "vue";
|
||||
import { Playlist } from "../../interfaces";
|
||||
import usePStore from "@/stores/pages/playlist";
|
||||
import { onMounted } from "vue";
|
||||
import { updatePlaylist } from "../../composables/playlists";
|
||||
import usePStore from "../../stores/p.ptracks";
|
||||
import { Playlist } from "../../interfaces";
|
||||
|
||||
const pStore = usePStore();
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import useAlbumStore from "@/stores/album";
|
||||
import usePStore from "@/stores/p.ptracks";
|
||||
|
||||
import PlayBtn from "@/components/shared/PlayBtn.vue";
|
||||
import { playSources, Routes } from "@/composables/enums";
|
||||
import useAlbumStore from "@/stores/pages/album";
|
||||
import usePStore from "@/stores/pages/playlist";
|
||||
import { computed } from "@vue/reactivity";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
|
||||
const things = computed(() => {
|
||||
const route = useRoute();
|
||||
let thing = {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { playSources } from "@/composables/enums";
|
||||
import useAlbumStore from "@/stores/album";
|
||||
import usePlaylistStore from "@/stores/p.ptracks";
|
||||
import useAlbumStore from "@/stores/pages/album";
|
||||
import usePlaylistStore from "@/stores/pages/playlist";
|
||||
import usePlayFrom from "@/composables/usePlayFrom";
|
||||
import useQStore from "@/stores/queue";
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
<script setup lang="ts">
|
||||
import { playSources } from "@/composables/enums";
|
||||
import usePlayFrom from "@/composables/usePlayFrom";
|
||||
import useQStore from "@/stores/queue";
|
||||
import useFStore from "@/stores/folder";
|
||||
import useAStore from "@/stores/album";
|
||||
import usePStore from "@/stores/p.ptracks";
|
||||
import useAStore from "@/stores/pages/album";
|
||||
import usePStore from "@/stores/pages/playlist";
|
||||
import useQStore from "@/stores/queue";
|
||||
|
||||
defineProps<{
|
||||
source: playSources;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { playSources } from "@/composables/enums";
|
||||
|
||||
import useAStore from "@/stores/pages/album";
|
||||
import useFStore from "@/stores/pages/folder";
|
||||
import usePStore from "@/stores/pages/playlist";
|
||||
import useQStore from "@/stores/queue";
|
||||
import useFStore from "@/stores/folder";
|
||||
import useAStore from "@/stores/album";
|
||||
import usePStore from "@/stores/p.ptracks";
|
||||
|
||||
|
||||
const queue = useQStore;
|
||||
const folder = useFStore;
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import { createRouter, createWebHashHistory } from "vue-router";
|
||||
import Home from "../views/Home.vue";
|
||||
import FolderView from "../views/FolderView.vue";
|
||||
import PlaylistView from "../views/PlaylistView.vue";
|
||||
import Playlists from "../views/Playlists.vue";
|
||||
import Home from "@/views/Home.vue";
|
||||
import FolderView from "@/views/FolderView.vue";
|
||||
import PlaylistView from "@/views/PlaylistView.vue";
|
||||
import Playlists from "@/views/Playlists.vue";
|
||||
|
||||
import AlbumsExplorer from "../views/AlbumsExplorer.vue";
|
||||
import AlbumView from "../views/AlbumView.vue";
|
||||
import AlbumsExplorer from "@/views/AlbumsExplorer.vue";
|
||||
import AlbumView from "@/views/AlbumView.vue";
|
||||
|
||||
import ArtistsExplorer from "../views/ArtistsExplorer.vue";
|
||||
import SettingsView from "../views/SettingsView.vue";
|
||||
import ArtistsExplorer from "@/views/ArtistsExplorer.vue";
|
||||
import SettingsView from "@/views/SettingsView.vue";
|
||||
|
||||
import usePStore from "../stores/playlists";
|
||||
import usePTrackStore from "../stores/p.ptracks";
|
||||
import useFStore from "../stores/folder";
|
||||
import useAStore from "../stores/album";
|
||||
import state from "../composables/state";
|
||||
import usePStore from "@/stores/pages/playlists";
|
||||
import usePTrackStore from "@/stores/pages/playlist";
|
||||
import useFStore from "@/stores/pages/folder";
|
||||
import useAStore from "@/stores/pages/album";
|
||||
import state from "@/composables/state";
|
||||
|
||||
const routes = [
|
||||
{
|
||||
@@ -1,10 +1,10 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { Track, Artist, AlbumInfo } from "../interfaces";
|
||||
import { Track, Artist, AlbumInfo } from "../../interfaces";
|
||||
import {
|
||||
getAlbumTracks,
|
||||
getAlbumArtists,
|
||||
getAlbumBio,
|
||||
} from "../composables/album";
|
||||
} from "../../composables/album";
|
||||
|
||||
export default defineStore("album", {
|
||||
state: () => ({
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { Folder, Track } from "../interfaces";
|
||||
import { Folder, Track } from "../../interfaces";
|
||||
|
||||
import fetchThem from "../composables/getFilesAndFolders";
|
||||
import fetchThem from "../../composables/getFilesAndFolders";
|
||||
|
||||
export default defineStore("FolderDirs&Tracks", {
|
||||
state: () => ({
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { getPlaylist } from "../composables/playlists";
|
||||
import { Track, Playlist } from "../interfaces";
|
||||
import { getPlaylist } from "../../composables/playlists";
|
||||
import { Track, Playlist } from "../../interfaces";
|
||||
|
||||
export default defineStore("playlist-tracks", {
|
||||
state: () => ({
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { Playlist } from "../interfaces";
|
||||
import { getAllPlaylists } from "../composables/playlists";
|
||||
import { Playlist } from "../../interfaces";
|
||||
import { getAllPlaylists } from "../../composables/playlists";
|
||||
|
||||
export default defineStore("playlists", {
|
||||
state: () => ({
|
||||
@@ -23,7 +23,7 @@ import AlbumBio from "../components/AlbumView/AlbumBio.vue";
|
||||
import SongList from "../components/FolderView/SongList.vue";
|
||||
import FeaturedArtists from "../components/PlaylistView/FeaturedArtists.vue";
|
||||
|
||||
import useAStore from "../stores/album";
|
||||
import useAStore from "../stores/pages/album";
|
||||
import { onBeforeRouteUpdate } from "vue-router";
|
||||
|
||||
const album = useAStore();
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<script setup lang="ts">
|
||||
import { ref } from "@vue/reactivity";
|
||||
import { onBeforeRouteUpdate } from "vue-router";
|
||||
|
||||
import SongList from "@/components/FolderView/SongList.vue";
|
||||
import FolderList from "@/components/FolderView/FolderList.vue";
|
||||
|
||||
import useFStore from "../stores/folder";
|
||||
import useFStore from "../stores/pages/folder";
|
||||
import useLoaderStore from "../stores/loader";
|
||||
|
||||
const loader = useLoaderStore();
|
||||
@@ -24,7 +24,7 @@ const scrollable = ref(null);
|
||||
|
||||
onBeforeRouteUpdate((to) => {
|
||||
loader.startLoading();
|
||||
FStore.fetchAll(to.params.path)
|
||||
FStore.fetchAll(to.params.path as string)
|
||||
.then(() => {
|
||||
scrollable.value.scrollTop = 0;
|
||||
})
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Header from "../components/PlaylistView/Header.vue";
|
||||
import SongList from "../components/FolderView/SongList.vue";
|
||||
import FeaturedArtists from "../components/PlaylistView/FeaturedArtists.vue";
|
||||
import usePTrackStore from "../stores/p.ptracks";
|
||||
import Header from "@/components/PlaylistView/Header.vue";
|
||||
import SongList from "@/components/FolderView/SongList.vue";
|
||||
import FeaturedArtists from "@/components/PlaylistView/FeaturedArtists.vue";
|
||||
import usePTrackStore from "@/stores/pages/playlist";
|
||||
|
||||
const playlist = usePTrackStore();
|
||||
</script>
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import PlaylistCard from "../components/playlists/PlaylistCard.vue";
|
||||
import PlaylistCard from "@/components/playlists/PlaylistCard.vue";
|
||||
|
||||
import usePStore from "../stores/playlists";
|
||||
import NewPlaylistCard from "../components/playlists/NewPlaylistCard.vue";
|
||||
import usePStore from "@/stores/pages/playlists";
|
||||
import NewPlaylistCard from "@/components/playlists/NewPlaylistCard.vue";
|
||||
const pStore = usePStore();
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user