mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-07-29 06:02:06 +00:00
start project "move to typescript"
This commit is contained in:
parent
ead3a731ef
commit
33a9aa2c30
@ -35,6 +35,11 @@ $brown: rgb(172, 142, 104);
|
|||||||
$indigo: rgb(94, 92, 230);
|
$indigo: rgb(94, 92, 230);
|
||||||
$teal: rgb(64, 200, 224);
|
$teal: rgb(64, 200, 224);
|
||||||
|
|
||||||
|
// 60 30 10
|
||||||
|
$primary: $blue;
|
||||||
|
$accent: $indigo;
|
||||||
|
$cta: $red;
|
||||||
|
|
||||||
// media query mixins
|
// media query mixins
|
||||||
@mixin phone-only {
|
@mixin phone-only {
|
||||||
@media (max-width: 599px) {
|
@media (max-width: 599px) {
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: $card-dark;
|
background-color: #171c28;
|
||||||
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
|
||||||
Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||||
@ -97,15 +98,18 @@ button {
|
|||||||
|
|
||||||
.tabs {
|
.tabs {
|
||||||
grid-area: tabs;
|
grid-area: tabs;
|
||||||
|
border-left: solid 1px $gray3;
|
||||||
|
|
||||||
@include tablet-landscape {
|
@include tablet-landscape {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.gsearch-input {
|
.gsearch-input {
|
||||||
grid-area: search-input;
|
grid-area: search-input;
|
||||||
border-left: solid 1px $gray;
|
border-left: solid 1px $gray3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topnav {
|
.topnav {
|
||||||
@ -116,7 +120,7 @@ button {
|
|||||||
width: 15rem;
|
width: 15rem;
|
||||||
grid-area: l-sidebar;
|
grid-area: l-sidebar;
|
||||||
padding-top: 0.5rem;
|
padding-top: 0.5rem;
|
||||||
border-right: solid 1px $gray;
|
border-right: solid 1px $gray3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-bar {
|
.bottom-bar {
|
||||||
@ -156,7 +160,6 @@ button {
|
|||||||
max-width: 1504px;
|
max-width: 1504px;
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
border: solid;
|
|
||||||
margin: $small;
|
margin: $small;
|
||||||
width: calc(100% - 1rem);
|
width: calc(100% - 1rem);
|
||||||
}
|
}
|
||||||
@ -164,6 +167,7 @@ button {
|
|||||||
|
|
||||||
.r-sidebar {
|
.r-sidebar {
|
||||||
grid-area: r-sidebar;
|
grid-area: r-sidebar;
|
||||||
|
border-left: solid 1px $gray3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image {
|
.image {
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import state from "@/composables/state.js";
|
import state from "@/composables/state";
|
||||||
import perks from "@/composables/perks.js";
|
import perks from "@/composables/perks.js";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -36,7 +36,7 @@ import SongItem from "../shared/SongItem.vue";
|
|||||||
|
|
||||||
import routeLoader from "@/composables/routeLoader.js";
|
import routeLoader from "@/composables/routeLoader.js";
|
||||||
import perks from "@/composables/perks.js";
|
import perks from "@/composables/perks.js";
|
||||||
import state from "@/composables/state.js";
|
import state from "@/composables/state";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
songs: {
|
songs: {
|
||||||
|
@ -27,7 +27,7 @@ const props = defineProps({
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.l_ {
|
.l_ {
|
||||||
padding: $small;
|
padding: $small;
|
||||||
background-color: #e24a01;
|
background-color: $primary;
|
||||||
margin: $small;
|
margin: $small;
|
||||||
|
|
||||||
.l-image {
|
.l-image {
|
||||||
|
@ -32,7 +32,6 @@ const tabs = useTabStore();
|
|||||||
width: 29em;
|
width: 29em;
|
||||||
background-color: rgba(4, 12, 34, 0.103);
|
background-color: rgba(4, 12, 34, 0.103);
|
||||||
padding: 0 0 0 $small;
|
padding: 0 0 0 $small;
|
||||||
border-left: 1px solid $gray;
|
|
||||||
|
|
||||||
@include phone-only {
|
@include phone-only {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref } from "@vue/reactivity";
|
import { reactive, ref } from "@vue/reactivity";
|
||||||
|
|
||||||
import state from "@/composables/state.js";
|
import state from "@/composables/state";
|
||||||
import searchMusic from "@/composables/searchMusic.js";
|
import searchMusic from "@/composables/searchMusic.js";
|
||||||
import useDebouncedRef from "@/composables/useDebouncedRef";
|
import useDebouncedRef from "@/composables/useDebouncedRef";
|
||||||
import AlbumGrid from "@/components/Search/AlbumGrid.vue";
|
import AlbumGrid from "@/components/Search/AlbumGrid.vue";
|
||||||
|
@ -23,10 +23,9 @@ const tabs = useTabStore();
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.tabs {
|
.tabs {
|
||||||
padding: $small;
|
padding: $small;
|
||||||
border-left: 1px solid $gray;
|
|
||||||
|
|
||||||
.cont {
|
.cont {
|
||||||
background-color: $gray;
|
background-color: $gray3;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: $small;
|
gap: $small;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -44,7 +43,7 @@ const tabs = useTabStore();
|
|||||||
width: 4rem;
|
width: 4rem;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: $gray3;
|
background-color: $gray5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,12 +52,12 @@ const tabs = useTabStore();
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 4rem;
|
width: 4rem;
|
||||||
|
background-color: $accent;
|
||||||
|
|
||||||
.t-item {
|
.t-item {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
background-image: linear-gradient(to right, $blue, $red) !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- v-show="context.visible" -->
|
<!-- v-show="context.visible" -->
|
||||||
<div
|
<div
|
||||||
class="context-menu rounded"
|
class="context-menu rounded shadow-lg"
|
||||||
:class="{ 'context-menu-visible': context.visible }"
|
:class="{ 'context-menu-visible': context.visible }"
|
||||||
:style="{
|
:style="{
|
||||||
left: context.x + 'px',
|
left: context.x + 'px',
|
||||||
@ -35,7 +35,7 @@ const context = useContextStore();
|
|||||||
width: 10rem;
|
width: 10rem;
|
||||||
height: min-content;
|
height: min-content;
|
||||||
padding: $small;
|
padding: $small;
|
||||||
background: $gray;
|
background: $gray3;
|
||||||
z-index: 100000 !important;
|
z-index: 100000 !important;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -54,6 +54,7 @@ const context = useContextStore();
|
|||||||
cursor: default;
|
cursor: default;
|
||||||
padding: 0 $small;
|
padding: 0 $small;
|
||||||
border-radius: $small;
|
border-radius: $small;
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
height: 1.25rem;
|
height: 1.25rem;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import state from "@/composables/state.js";
|
import state from "@/composables/state";
|
||||||
|
|
||||||
const loading = state.loading
|
const loading = state.loading
|
||||||
</script>
|
</script>
|
||||||
|
@ -60,17 +60,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup lang="ts">
|
||||||
import perks from "@/composables/perks.js";
|
import perks from "../../composables/perks.js";
|
||||||
import state from "@/composables/state.js";
|
import state from "../../composables/state";
|
||||||
import useContextStore from "../../stores/context.js";
|
import useContextStore from "../../stores/context.js";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import trackContext from "../../composables/track_context";
|
import trackContext from "../../composables/track_context";
|
||||||
|
import { Track } from "../../interfaces.js";
|
||||||
|
|
||||||
const contextStore = useContextStore();
|
const contextStore = useContextStore();
|
||||||
const context_on = ref(false);
|
const context_on = ref(false);
|
||||||
|
|
||||||
const showContextMenu = (e) => {
|
const showContextMenu = (e: Event) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
@ -84,23 +85,21 @@ const showContextMenu = (e) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps<{
|
||||||
song: {
|
song: Track;
|
||||||
type: Object,
|
index: Number;
|
||||||
default: () => ({}),
|
}>();
|
||||||
},
|
|
||||||
index: {
|
|
||||||
type: Number,
|
|
||||||
default: () => 0,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const emit = defineEmits(["updateQeuue", "loadAlbum"]);
|
const emit = defineEmits<{
|
||||||
|
(e: "updateQueue", song: Track): void;
|
||||||
|
(e: "loadAlbum", album: string, artist: string): void;
|
||||||
|
}>();
|
||||||
|
|
||||||
function emitUpdate(song) {
|
function emitUpdate(track: Track) {
|
||||||
emit("updateQueue", song);
|
emit("updateQueue", track);
|
||||||
}
|
}
|
||||||
function emitLoadAlbum(title, artist) {
|
|
||||||
|
function emitLoadAlbum(title: string, artist: string) {
|
||||||
emit("loadAlbum", title, artist);
|
emit("loadAlbum", title, artist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import { ref } from "@vue/reactivity";
|
|||||||
import { watch } from "@vue/runtime-core";
|
import { watch } from "@vue/runtime-core";
|
||||||
import media from "./mediaNotification.js";
|
import media from "./mediaNotification.js";
|
||||||
import playAudio from "./playAudio.js";
|
import playAudio from "./playAudio.js";
|
||||||
import state from "./state.js";
|
import state from "./state";
|
||||||
|
|
||||||
const current = ref(state.current);
|
const current = ref(state.current);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import {ref} from "@vue/reactivity";
|
|||||||
|
|
||||||
import perks from "./perks";
|
import perks from "./perks";
|
||||||
import media from "./mediaNotification.js";
|
import media from "./mediaNotification.js";
|
||||||
import state from "./state.js";
|
import state from "./state";
|
||||||
|
|
||||||
const audio = ref(new Audio()).value;
|
const audio = ref(new Audio()).value;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Router from "@/router";
|
import Router from "@/router";
|
||||||
|
|
||||||
import album from "./album.js";
|
import album from "./album.js";
|
||||||
import state from "./state.js";
|
import state from "./state";
|
||||||
|
|
||||||
async function toAlbum(title, artist) {
|
async function toAlbum(title, artist) {
|
||||||
console.log("routing to album");
|
console.log("routing to album");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import state from "./state.js";
|
import state from "./state";
|
||||||
|
|
||||||
const base_url = `${state.settings.uri}/search?q=`;
|
const base_url = `${state.settings.uri}/search?q=`;
|
||||||
|
|
||||||
|
@ -26,7 +26,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 state from "@/composables/state.js";
|
import state from "@/composables/state";
|
||||||
import routeLoader from "@/composables/routeLoader.js";
|
import routeLoader from "@/composables/routeLoader.js";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -21,7 +21,7 @@ import Header from "@/components/FolderView/Header.vue";
|
|||||||
|
|
||||||
import getTracksAndDirs from "../composables/getFiles.js";
|
import getTracksAndDirs from "../composables/getFiles.js";
|
||||||
import { onMounted, watch } from "@vue/runtime-core";
|
import { onMounted, watch } from "@vue/runtime-core";
|
||||||
import state from "@/composables/state.js";
|
import state from "@/composables/state";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
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 state from "@/composables/state.js";
|
import state from "@/composables/state";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Header,
|
Header,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user