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