mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
scroll to top on page change
This commit is contained in:
+19
-18
@@ -21,22 +21,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Navigation from "./components/LeftSidebar/Navigation.vue";
|
import Navigation from "@/components/LeftSidebar/Navigation.vue";
|
||||||
|
|
||||||
import Main from "./components/RightSideBar/Main.vue";
|
import RightSideBar from "@/components/RightSideBar/Main.vue";
|
||||||
import nowPlaying from "./components/LeftSidebar/nowPlaying.vue";
|
import nowPlaying from "@/components/LeftSidebar/nowPlaying.vue";
|
||||||
import NavBar from "./components/nav/NavBar.vue";
|
import NavBar from "@/components/nav/NavBar.vue";
|
||||||
import Tabs from "./components/RightSideBar/Tabs.vue";
|
import Tabs from "@/components/RightSideBar/Tabs.vue";
|
||||||
import SearchInput from "./components/RightSideBar/SearchInput.vue";
|
import SearchInput from "@/components/RightSideBar/SearchInput.vue";
|
||||||
import useContextStore from "./stores/context";
|
import useContextStore from "@/stores/context";
|
||||||
import ContextMenu from "./components/contextMenu.vue";
|
import ContextMenu from "@/components/contextMenu.vue";
|
||||||
import Modal from "./components/modal.vue";
|
import Modal from "@/components/modal.vue";
|
||||||
import Notification from "./components/Notification.vue";
|
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";
|
||||||
|
|
||||||
const RightSideBar = Main;
|
|
||||||
const context_store = useContextStore();
|
const context_store = useContextStore();
|
||||||
const queue = useQStore();
|
const queue = useQStore();
|
||||||
const app_dom = document.getElementById("app");
|
const app_dom = document.getElementById("app");
|
||||||
@@ -49,6 +50,10 @@ app_dom.addEventListener("click", (e) => {
|
|||||||
context_store.hideContextMenu();
|
context_store.hideContextMenu();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useRouter().afterEach(() => {
|
||||||
|
document.getElementById("acontent")?.scrollTo(0, 0);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -65,10 +70,6 @@ app_dom.addEventListener("click", (e) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.r-sidebar {
|
.r-sidebar {
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup lang="ts">
|
||||||
import useTabStore from "../../stores/tabs";
|
import useTabStore from "../../stores/tabs";
|
||||||
|
|
||||||
const tabs = useTabStore();
|
const tabs = useTabStore();
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup lang="ts">
|
||||||
import useContextStore from "../stores/context";
|
import useContextStore from "../stores/context";
|
||||||
|
|
||||||
const context = useContextStore();
|
const context = useContextStore();
|
||||||
|
|||||||
Reference in New Issue
Block a user