mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
58 lines
1.0 KiB
Vue
58 lines
1.0 KiB
Vue
<template>
|
|
<div class="right-search">
|
|
<TabsWrapper
|
|
:isOnSearchPage="isOnSearchPage"
|
|
:tabs="tabs"
|
|
@switchTab="switchTab"
|
|
:currentTab="currentTab"
|
|
>
|
|
<Tab :name="currentTab" :isOnSearchPage="isOnSearchPage" />
|
|
</TabsWrapper>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref } from "vue";
|
|
|
|
import Tab from "./Tab.vue";
|
|
import TabsWrapper from "./TabsWrapper.vue";
|
|
import useSearchStore from "@/stores/search";
|
|
|
|
const search = useSearchStore();
|
|
defineProps<{
|
|
isOnSearchPage?: boolean;
|
|
}>();
|
|
|
|
const tabs = ["tracks", "albums", "artists"];
|
|
|
|
const currentTab = ref("tracks");
|
|
|
|
function switchTab(tab: string) {
|
|
currentTab.value = tab;
|
|
search.switchTab(tab);
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.right-search {
|
|
position: relative;
|
|
overflow: hidden;
|
|
height: 100%;
|
|
width: 100%;
|
|
|
|
.heading {
|
|
padding: $medium;
|
|
border-radius: $small;
|
|
margin-bottom: $small;
|
|
font-size: 2rem;
|
|
color: $white;
|
|
}
|
|
|
|
.input {
|
|
display: flex;
|
|
align-items: center;
|
|
position: relative;
|
|
}
|
|
}
|
|
</style>
|