rename files and set max client width on viewport

This commit is contained in:
geoffrey45
2022-06-16 15:24:56 +03:00
parent 92e2420174
commit 1cc7c933b7
13 changed files with 24 additions and 27 deletions
+5 -4
View File
@@ -72,8 +72,11 @@ a {
"l-sidebar content r-sidebar" "l-sidebar content r-sidebar"
"l-sidebar content r-sidebar" "l-sidebar content r-sidebar"
"l-sidebar content tabs"; "l-sidebar content tabs";
width: 100vw; width: 100%;
align-content: center;
max-width: 2720px;
height: 100vh; height: 100vh;
margin: 0 auto;
} }
.tabs { .tabs {
@@ -87,8 +90,6 @@ a {
#gsearch-input { #gsearch-input {
grid-area: search-input; grid-area: search-input;
// border-left: solid 1px $gray3;
// border-bottom: 1px solid $gray3;
} }
.topnav { .topnav {
@@ -131,7 +132,7 @@ a {
#acontent { #acontent {
grid-area: content; grid-area: content;
width: 100%; width: 100%;
max-width: 1504px; max-width: 1955px;
padding: $small; padding: $small;
padding-left: 0; padding-left: 0;
overflow: auto; overflow: auto;
+1 -1
View File
@@ -18,7 +18,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { onMounted } from "vue"; import { onMounted } from "vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { createNewPlaylist } from "../../composables/fetch/playlists"; import { createNewPlaylist } from "../../composables/pages/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/pages/playlists"; import usePlaylistStore from "@/stores/pages/playlists";
+1 -1
View File
@@ -55,7 +55,7 @@
<script setup lang="ts"> <script setup lang="ts">
import usePStore from "@/stores/pages/playlist"; import usePStore from "@/stores/pages/playlist";
import { onMounted } from "vue"; import { onMounted } from "vue";
import { updatePlaylist } from "../../composables/fetch/playlists"; import { updatePlaylist } from "../../composables/pages/playlists";
import { Playlist } from "../../interfaces"; import { Playlist } from "../../interfaces";
const pStore = usePStore(); const pStore = usePStore();
@@ -1,6 +1,6 @@
import { getElem } from "./perks"; import { getElem } from "./perks";
export default (mouseX, mouseY) => { export default (mouseX: number, mouseY: number) => {
const scope = getElem("app", "id"); const scope = getElem("app", "id");
const contextMenu = getElem("context-menu", "class"); const contextMenu = getElem("context-menu", "class");
// ? compute what is the mouse position relative to the container element // ? compute what is the mouse position relative to the container element
@@ -1,7 +1,6 @@
import axios from "axios"; import { Folder, Track } from "@/interfaces";
import { Folder, Track } from "../interfaces"; import state from "../state";
import state from "./state"; import useAxios from "../useAxios";
import useAxios from "./useAxios";
export default async function (path: string) { export default async function (path: string) {
interface FolderData { interface FolderData {
+7 -7
View File
@@ -1,11 +1,11 @@
import { Track, AlbumInfo, Artist } from "./../interfaces";
import { ref } from "@vue/reactivity"; import { ref } from "@vue/reactivity";
import { reactive } from "vue"; import { reactive } from "vue";
import * as i from "../interfaces";
const search_query = ref(""); const search_query = ref("");
const queue = ref( const queue = ref(
Array<i.Track>({ Array<Track>({
title: "Nothing played yet", title: "Nothing played yet",
artists: ["... blah blah blah"], artists: ["... blah blah blah"],
image: "http://127.0.0.1:8900/images/thumbnails/4.webp", image: "http://127.0.0.1:8900/images/thumbnails/4.webp",
@@ -16,14 +16,14 @@ const queue = ref(
const folder_song_list = ref([]); const folder_song_list = ref([]);
const folder_list = ref([]); const folder_list = ref([]);
const current = ref(<i.Track>{ const current = ref(<Track>{
title: "Nothing played yet", title: "Nothing played yet",
artists: ["... blah blah blah"], artists: ["... blah blah blah"],
image: "http://127.0.0.1:8900/images/thumbnails/4.webp", image: "http://127.0.0.1:8900/images/thumbnails/4.webp",
trackid: "", trackid: "",
}); });
const prev = ref(<i.Track>{ const prev = ref(<Track>{
title: "Nothing played yet", title: "Nothing played yet",
artists: ["... blah blah blah"], artists: ["... blah blah blah"],
image: "http://127.0.0.1:8900/images/thumbnails/4.webp", image: "http://127.0.0.1:8900/images/thumbnails/4.webp",
@@ -31,9 +31,9 @@ const prev = ref(<i.Track>{
}); });
const album = reactive({ const album = reactive({
tracklist: Array<i.Track>(), tracklist: Array<Track>(),
info: <i.AlbumInfo>{}, info: <AlbumInfo>{},
artists: Array<i.Artist>(), artists: Array<Artist>(),
bio: "", bio: "",
}); });
+1 -1
View File
@@ -1,7 +1,7 @@
import { Playlist, Track } from "../interfaces"; import { Playlist, Track } from "../interfaces";
import Router from "../router"; import Router from "../router";
import { Option } from "../interfaces"; import { Option } from "../interfaces";
import { getAllPlaylists, addTrackToPlaylist } from "../composables/fetch/playlists"; import { getAllPlaylists, addTrackToPlaylist } from "../composables/pages/playlists";
import useQueueStore from "../stores/queue"; import useQueueStore from "../stores/queue";
import useModalStore from "../stores/modal"; import useModalStore from "../stores/modal";
+1 -2
View File
@@ -4,7 +4,7 @@ import {
getAlbumTracks, getAlbumTracks,
getAlbumArtists, getAlbumArtists,
getAlbumBio, getAlbumBio,
} from "../../composables/fetch/album"; } from "../../composables/pages/album";
export default defineStore("album", { export default defineStore("album", {
state: () => ({ state: () => ({
@@ -21,7 +21,6 @@ export default defineStore("album", {
* @param albumartist artist of the album * @param albumartist artist of the album
*/ */
async fetchTracksAndArtists(title: string, albumartist: string) { async fetchTracksAndArtists(title: string, albumartist: string) {
const tracks = await getAlbumTracks(title, albumartist); const tracks = await getAlbumTracks(title, albumartist);
const artists = await getAlbumArtists(title, albumartist); const artists = await getAlbumArtists(title, albumartist);
+2 -4
View File
@@ -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/pages/folders";
export default defineStore("FolderDirs&Tracks", { export default defineStore("FolderDirs&Tracks", {
state: () => ({ state: () => ({
@@ -13,9 +13,7 @@ export default defineStore("FolderDirs&Tracks", {
async fetchAll(path: string) { async fetchAll(path: string) {
const { tracks, folders } = await fetchThem(path); const { tracks, folders } = await fetchThem(path);
this.path = path; [this.path, this.dirs, this.tracks] = [path, folders, tracks];
this.dirs = folders;
this.tracks = tracks;
}, },
}, },
}); });
+1 -1
View File
@@ -1,5 +1,5 @@
import { defineStore } from "pinia"; import { defineStore } from "pinia";
import { getPlaylist } from "../../composables/fetch/playlists"; import { getPlaylist } from "../../composables/pages/playlists";
import { Track, Playlist } from "../../interfaces"; import { Track, Playlist } from "../../interfaces";
export default defineStore("playlist-tracks", { export default defineStore("playlist-tracks", {
+1 -1
View File
@@ -1,6 +1,6 @@
import { defineStore } from "pinia"; import { defineStore } from "pinia";
import { Playlist } from "../../interfaces"; import { Playlist } from "../../interfaces";
import { getAllPlaylists } from "../../composables/fetch/playlists"; import { getAllPlaylists } from "../../composables/pages/playlists";
export default defineStore("playlists", { export default defineStore("playlists", {
state: () => ({ state: () => ({