mirror of
https://github.com/rommapp/romm.git
synced 2026-12-03 10:33:22 +01:00
scan feedback is now more consistent
This commit is contained in:
@@ -63,6 +63,7 @@ async def scan_platforms(
|
||||
except FolderStructureNotMatchException as e:
|
||||
log.error(e)
|
||||
await sm.emit("scan:done_ko", e.message)
|
||||
await sm.emit("scan:done_ko_s", e.message)
|
||||
return
|
||||
|
||||
platform_list = [
|
||||
@@ -119,12 +120,13 @@ async def scan_platforms(
|
||||
_added_rom = dbromh.add_rom(scanned_rom)
|
||||
rom = dbromh.get_roms(_added_rom.id)
|
||||
|
||||
log.debug(rom.platform_id)
|
||||
|
||||
await sm.emit(
|
||||
"scan:scanning_rom",
|
||||
{
|
||||
"platform_name": platform.name,
|
||||
"platform_slug": platform.slug,
|
||||
"platform_id": platform.id,
|
||||
**RomSchema.model_validate(rom).model_dump(),
|
||||
},
|
||||
)
|
||||
|
||||
@@ -4,14 +4,102 @@ import { api } from "@/services/api";
|
||||
import storeAuth from "@/stores/auth";
|
||||
import storeConfig from "@/stores/config";
|
||||
import storeHeartbeat from "@/stores/heartbeat";
|
||||
import socket from "@/services/socket";
|
||||
import { onBeforeMount } from "vue";
|
||||
import cookie from "js-cookie";
|
||||
import PlatformIcon from "@/components/Platform/PlatformIcon.vue";
|
||||
import storeGalleryFilter from "@/stores/galleryFilter";
|
||||
import storePlatforms, { type Platform } from "@/stores/platforms";
|
||||
import storeRoms from "@/stores/roms";
|
||||
import storeScanning from "@/stores/scanning";
|
||||
import type { Events } from "@/types/emitter";
|
||||
import { normalizeString } from "@/utils";
|
||||
import type { Emitter } from "mitt";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { inject, onBeforeUnmount, ref } from "vue";
|
||||
|
||||
// Props
|
||||
const scanningStore = storeScanning();
|
||||
const { scanning, scanningPlatforms } = storeToRefs(scanningStore);
|
||||
const completeRescan = ref(false);
|
||||
const rescanUnidentified = ref(false);
|
||||
const platforms = storePlatforms();
|
||||
const platformsToScan = ref<Platform[]>([]);
|
||||
const romsStore = storeRoms();
|
||||
const galleryFilter = storeGalleryFilter();
|
||||
const isFiltered = normalizeString(galleryFilter.filter).trim() != "";
|
||||
const emitter = inject<Emitter<Events>>("emitter");
|
||||
|
||||
// Props
|
||||
const authStore = storeAuth();
|
||||
const heartbeatStore = storeHeartbeat();
|
||||
const configStore = storeConfig();
|
||||
|
||||
function scrollToBottom() {
|
||||
window.scrollTo(0, document.body.scrollHeight);
|
||||
}
|
||||
|
||||
socket.on("scan:scanning_platform", ({ name, slug, id }) => {
|
||||
scanningPlatforms.value.push({ name, slug, id, roms: [] });
|
||||
window.setTimeout(scrollToBottom, 100);
|
||||
});
|
||||
|
||||
socket.on(
|
||||
"scan:scanning_rom",
|
||||
({ platform_name, platform_slug, ...rom }) => {
|
||||
romsStore.add([rom]);
|
||||
if (isFiltered) {
|
||||
romsStore.setFiltered(romsStore.filteredRoms);
|
||||
} else {
|
||||
romsStore.setFiltered(romsStore.allRoms);
|
||||
}
|
||||
|
||||
let scannedPlatform = scanningPlatforms.value.find(
|
||||
(p) => p.slug === platform_slug
|
||||
);
|
||||
|
||||
// Add the platform if the socket dropped and it's missing
|
||||
if (scannedPlatform) {
|
||||
scanningPlatforms.value.push(scannedPlatform);
|
||||
scannedPlatform = scanningPlatforms.value.pop();
|
||||
}
|
||||
|
||||
scannedPlatform?.roms.push(rom);
|
||||
window.setTimeout(scrollToBottom, 100);
|
||||
}
|
||||
);
|
||||
|
||||
socket.on("scan:done", () => {
|
||||
scanningStore.set(false);
|
||||
socket.disconnect();
|
||||
|
||||
emitter?.emit("refreshDrawer", null);
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: "Scan completed successfully!",
|
||||
icon: "mdi-check-bold",
|
||||
color: "green",
|
||||
timeout: 4000,
|
||||
});
|
||||
});
|
||||
|
||||
socket.on("scan:done_ko", (msg) => {
|
||||
scanningStore.set(false);
|
||||
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: `Scan couldn't be completed. Something went wrong: ${msg}`,
|
||||
icon: "mdi-close-circle",
|
||||
color: "red",
|
||||
});
|
||||
socket.disconnect();
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
socket.off("scan:scanning_platform");
|
||||
socket.off("scan:scanning_rom");
|
||||
socket.off("scan:done");
|
||||
socket.off("scan:done_ko");
|
||||
});
|
||||
|
||||
onBeforeMount(async () => {
|
||||
const { data: heartBeatData } = await api.get("/heartbeat");
|
||||
heartbeatStore.set(heartBeatData);
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
import DrawerToggle from "@/components/AppBar/DrawerToggle.vue";
|
||||
import storeScanning from "@/stores/scanning";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
// Props
|
||||
const scanning = storeScanning();
|
||||
const scanningStore = storeScanning();
|
||||
const { scanning } = storeToRefs(scanningStore);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-app-bar elevation="1" density="comfortable">
|
||||
<v-progress-linear
|
||||
color="romm-accent-1"
|
||||
:active="scanning.value"
|
||||
:active="scanning"
|
||||
:indeterminate="true"
|
||||
absolute
|
||||
/>
|
||||
|
||||
@@ -42,14 +42,14 @@ async function deleteRoms() {
|
||||
return;
|
||||
});
|
||||
|
||||
romsStore.remove(roms.value);
|
||||
emitter?.emit("refreshDrawer", null);
|
||||
closeDialog();
|
||||
|
||||
await router.push({
|
||||
name: "platform",
|
||||
params: { platform: roms.value[0].platform_id },
|
||||
});
|
||||
|
||||
romsStore.remove(roms.value);
|
||||
emitter?.emit("refreshDrawer", null);
|
||||
closeDialog();
|
||||
}
|
||||
|
||||
function closeDialog() {
|
||||
|
||||
@@ -1,77 +1,50 @@
|
||||
<script setup lang="ts">
|
||||
import type { Events } from "@/types/emitter";
|
||||
import type { Emitter } from "mitt";
|
||||
import { inject, onBeforeUnmount } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import socket from "@/services/socket";
|
||||
import storeGalleryFilter from "@/stores/galleryFilter";
|
||||
import storePlatforms from "@/stores/platforms";
|
||||
import storeRoms from "@/stores/roms";
|
||||
import storeScanning from "@/stores/scanning";
|
||||
import type { Events } from "@/types/emitter";
|
||||
import { normalizeString } from "@/utils";
|
||||
import type { Emitter } from "mitt";
|
||||
import { inject, onBeforeUnmount } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
// Props
|
||||
const emitter = inject<Emitter<Events>>("emitter");
|
||||
const platformsStore = storePlatforms();
|
||||
const route = useRoute();
|
||||
const platform = platformsStore.get(Number(route.params.platform));
|
||||
const scanning = storeScanning();
|
||||
const scanningStore = storeScanning();
|
||||
const romsStore = storeRoms();
|
||||
const galleryFilter = storeGalleryFilter();
|
||||
const isFiltered = normalizeString(galleryFilter.filter).trim() != "";
|
||||
|
||||
socket.on("scan:scanning_rom", (rom) => {
|
||||
romsStore.add([rom]);
|
||||
if (isFiltered) {
|
||||
romsStore.setFiltered(romsStore.filteredRoms);
|
||||
} else {
|
||||
romsStore.setFiltered(romsStore.allRoms);
|
||||
}
|
||||
});
|
||||
|
||||
// Functions
|
||||
socket.on("scan:done", () => {
|
||||
scanning.set(false);
|
||||
socket.disconnect();
|
||||
emitter?.emit("refreshDrawer", null);
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: "Scan completed successfully!",
|
||||
icon: "mdi-check-bold",
|
||||
color: "green",
|
||||
timeout: 4000,
|
||||
});
|
||||
});
|
||||
|
||||
socket.on("scan:done_ko", (msg) => {
|
||||
scanning.set(false);
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: `Scan couldn't be completed. Something went wrong: ${msg}`,
|
||||
icon: "mdi-close-circle",
|
||||
color: "red",
|
||||
});
|
||||
socket.disconnect();
|
||||
});
|
||||
// socket.on("scan:scanning_rom", ({ ...rom }) => {
|
||||
// romsStore.add([rom]);
|
||||
// if (isFiltered) {
|
||||
// romsStore.setFiltered(romsStore.filteredRoms);
|
||||
// } else {
|
||||
// romsStore.setFiltered(romsStore.allRoms);
|
||||
// }
|
||||
// });
|
||||
|
||||
async function scan() {
|
||||
scanning.set(true);
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: `Scanning ${platform?.name}...`,
|
||||
icon: "mdi-loading mdi-spin",
|
||||
color: "romm-accent-1",
|
||||
});
|
||||
scanningStore.set(true);
|
||||
|
||||
if (!socket.connected) socket.connect();
|
||||
|
||||
socket.emit("scan", {
|
||||
platforms: [platform?.id],
|
||||
rescan: false,
|
||||
completeRescan: false,
|
||||
});
|
||||
}
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
socket.off("scan:done");
|
||||
socket.off("scan:done_ko");
|
||||
});
|
||||
// onBeforeUnmount(() => {
|
||||
// socket.off("scan:scanning_rom_s");
|
||||
// socket.off("scan:done_s");
|
||||
// socket.off("scan:done_ko_s");
|
||||
// });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import type { Events } from "@/types/emitter";
|
||||
import type { Emitter } from "mitt";
|
||||
import { inject } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import type { Emitter } from "mitt";
|
||||
import type { Events } from "@/types/emitter";
|
||||
|
||||
import api_rom from "@/services/api_rom";
|
||||
import socket from "@/services/socket";
|
||||
import storeAuth from "@/stores/auth";
|
||||
import storeRoms from "@/stores/roms";
|
||||
import socket from "@/services/socket";
|
||||
import storeScanning from "@/stores/scanning";
|
||||
import api_rom from "@/services/api_rom";
|
||||
|
||||
// Event listeners bus
|
||||
const emitter = inject<Emitter<Events>>("emitter");
|
||||
@@ -16,7 +16,7 @@ const emitter = inject<Emitter<Events>>("emitter");
|
||||
// Props
|
||||
const auth = storeAuth();
|
||||
const romsStore = storeRoms();
|
||||
const scanning = storeScanning();
|
||||
const scanningStore = storeScanning();
|
||||
const route = useRoute();
|
||||
|
||||
socket.on("scan:scanning_rom", ({ id }) => {
|
||||
@@ -25,7 +25,7 @@ socket.on("scan:scanning_rom", ({ id }) => {
|
||||
});
|
||||
|
||||
socket.on("scan:done", () => {
|
||||
scanning.set(false);
|
||||
scanningStore.set(false);
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: "Scan completed successfully!",
|
||||
icon: "mdi-check-bold",
|
||||
@@ -35,7 +35,7 @@ socket.on("scan:done", () => {
|
||||
});
|
||||
|
||||
socket.on("scan:done_ko", (msg: string) => {
|
||||
scanning.set(false);
|
||||
scanningStore.set(false);
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: `Scan couldn't be completed. Something went wrong: ${msg}`,
|
||||
icon: "mdi-close-circle",
|
||||
@@ -46,7 +46,7 @@ socket.on("scan:done_ko", (msg: string) => {
|
||||
|
||||
// Functions
|
||||
async function onScan() {
|
||||
scanning.set(true);
|
||||
scanningStore.set(true);
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: `Scanning ${route.params.platform}...`,
|
||||
icon: "mdi-loading mdi-spin",
|
||||
|
||||
@@ -7,7 +7,6 @@ export const api_save = api;
|
||||
async function uploadSaves({ rom, saves }: { rom: Rom; saves: File[] }) {
|
||||
let formData = new FormData();
|
||||
saves.forEach((save) => formData.append("saves", save));
|
||||
console.log(saves);
|
||||
return api.post("/saves", formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
import { defineStore } from "pinia";
|
||||
import type { Rom } from "@/stores/roms";
|
||||
|
||||
export default defineStore("scanning", {
|
||||
state: () => ({ value: false }),
|
||||
state: () => ({
|
||||
scanning: false,
|
||||
scanningPlatforms: [] as {
|
||||
name: string;
|
||||
slug: string;
|
||||
id: number;
|
||||
roms: Rom[];
|
||||
}[],
|
||||
}),
|
||||
|
||||
actions: {
|
||||
set(scanning: boolean) {
|
||||
this.value = scanning;
|
||||
this.scanning = scanning;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -6,16 +6,18 @@ import { useDisplay } from "vuetify";
|
||||
|
||||
import AppBar from "@/components/AppBar/Base.vue";
|
||||
import Drawer from "@/components/Drawer/Base.vue";
|
||||
import api_user from "@/services/api_user";
|
||||
import api_platform from "@/services/api_platform";
|
||||
import api_user from "@/services/api_user";
|
||||
import storeAuth from "@/stores/auth";
|
||||
import storePlatforms from "@/stores/platforms";
|
||||
import storeScanning from "@/stores/scanning";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
// Props
|
||||
const { mdAndDown } = useDisplay();
|
||||
const scanningStore = storeScanning();
|
||||
const { scanning } = storeToRefs(scanningStore);
|
||||
const platformsStore = storePlatforms();
|
||||
const scanning = storeScanning();
|
||||
const auth = storeAuth();
|
||||
|
||||
// Event listeners bus
|
||||
@@ -43,7 +45,7 @@ onMounted(async () => {
|
||||
<v-progress-linear
|
||||
id="scan-progress-bar"
|
||||
color="romm-accent-1"
|
||||
:active="scanning.value"
|
||||
:active="scanning"
|
||||
:indeterminate="true"
|
||||
absolute
|
||||
fixed
|
||||
@@ -60,6 +62,6 @@ onMounted(async () => {
|
||||
|
||||
<style scoped>
|
||||
#scan-progress-bar {
|
||||
z-index: 1000 !important;
|
||||
z-index: 1001 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,81 +1,92 @@
|
||||
<script setup lang="ts">
|
||||
import PlatformIcon from "@/components/Platform/PlatformIcon.vue";
|
||||
import socket from "@/services/socket";
|
||||
import storeGalleryFilter from "@/stores/galleryFilter";
|
||||
import storePlatforms, { type Platform } from "@/stores/platforms";
|
||||
import type { Rom } from "@/stores/roms";
|
||||
import storeRoms from "@/stores/roms";
|
||||
import storeScanning from "@/stores/scanning";
|
||||
import type { Events } from "@/types/emitter";
|
||||
import { normalizeString } from "@/utils";
|
||||
import type { Emitter } from "mitt";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { inject, onBeforeUnmount, ref } from "vue";
|
||||
|
||||
// Props
|
||||
const platforms = storePlatforms();
|
||||
const platformsToScan = ref<Platform[]>([]);
|
||||
const scanning = storeScanning();
|
||||
const scannedPlatforms = ref<
|
||||
{ name: string; slug: string; id: number; roms: Rom[] }[]
|
||||
>([]);
|
||||
const scanningStore = storeScanning();
|
||||
const { scanning, scanningPlatforms } = storeToRefs(scanningStore);
|
||||
const completeRescan = ref(false);
|
||||
const rescanUnidentified = ref(false);
|
||||
const platforms = storePlatforms();
|
||||
const platformsToScan = ref<Platform[]>([]);
|
||||
const romsStore = storeRoms();
|
||||
const galleryFilter = storeGalleryFilter();
|
||||
const isFiltered = normalizeString(galleryFilter.filter).trim() != "";
|
||||
|
||||
// Event listeners bus
|
||||
const emitter = inject<Emitter<Events>>("emitter");
|
||||
// const emitter = inject<Emitter<Events>>("emitter");
|
||||
|
||||
socket.on("scan:scanning_platform", ({ name, slug, id }) => {
|
||||
scannedPlatforms.value.push({ name, slug, id, roms: [] });
|
||||
window.setTimeout(scrollToBottom, 100);
|
||||
});
|
||||
// socket.on("scan:scanning_platform", ({ name, slug, id }) => {
|
||||
// scanningPlatforms.value.push({ name, slug, id, roms: [] });
|
||||
// window.setTimeout(scrollToBottom, 100);
|
||||
// });
|
||||
|
||||
socket.on(
|
||||
"scan:scanning_rom",
|
||||
({ platform_name, platform_slug, platform_id, ...rom }) => {
|
||||
let scannedPlatform = scannedPlatforms.value.find(
|
||||
(p) => p.slug === platform_slug
|
||||
);
|
||||
// socket.on(
|
||||
// "scan:scanning_rom",
|
||||
// ({ platform_name, platform_slug, platform_id, ...rom }) => {
|
||||
// romsStore.add([rom]);
|
||||
// if (isFiltered) {
|
||||
// romsStore.setFiltered(romsStore.filteredRoms);
|
||||
// } else {
|
||||
// romsStore.setFiltered(romsStore.allRoms);
|
||||
// }
|
||||
|
||||
// Add the platform if the socket dropped and it's missing
|
||||
if (scannedPlatform) {
|
||||
scannedPlatforms.value.push(scannedPlatform);
|
||||
scannedPlatform = scannedPlatforms.value.pop();
|
||||
}
|
||||
// let scannedPlatform = scanningPlatforms.value.find(
|
||||
// (p) => p.slug === platform_slug
|
||||
// );
|
||||
|
||||
scannedPlatform?.roms.push(rom);
|
||||
window.setTimeout(scrollToBottom, 100);
|
||||
}
|
||||
);
|
||||
// // Add the platform if the socket dropped and it's missing
|
||||
// if (scannedPlatform) {
|
||||
// scanningPlatforms.value.push(scannedPlatform);
|
||||
// scannedPlatform = scanningPlatforms.value.pop();
|
||||
// }
|
||||
|
||||
socket.on("scan:done", () => {
|
||||
scanning.set(false);
|
||||
socket.disconnect();
|
||||
// scannedPlatform?.roms.push(rom);
|
||||
// window.setTimeout(scrollToBottom, 100);
|
||||
// }
|
||||
// );
|
||||
|
||||
emitter?.emit("refreshDrawer", null);
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: "Scan completed successfully!",
|
||||
icon: "mdi-check-bold",
|
||||
color: "green",
|
||||
timeout: 4000,
|
||||
});
|
||||
});
|
||||
// socket.on("scan:done", () => {
|
||||
// scanningStore.set(false);
|
||||
// socket.disconnect();
|
||||
|
||||
socket.on("scan:done_ko", (msg) => {
|
||||
scanning.set(false);
|
||||
// emitter?.emit("refreshDrawer", null);
|
||||
// emitter?.emit("snackbarShow", {
|
||||
// msg: "Scan completed successfully!",
|
||||
// icon: "mdi-check-bold",
|
||||
// color: "green",
|
||||
// timeout: 4000,
|
||||
// });
|
||||
// });
|
||||
|
||||
emitter?.emit("snackbarShow", {
|
||||
msg: `Scan couldn't be completed. Something went wrong: ${msg}`,
|
||||
icon: "mdi-close-circle",
|
||||
color: "red",
|
||||
});
|
||||
socket.disconnect();
|
||||
});
|
||||
// socket.on("scan:done_ko", (msg) => {
|
||||
// scanningStore.set(false);
|
||||
|
||||
// emitter?.emit("snackbarShow", {
|
||||
// msg: `Scan couldn't be completed. Something went wrong: ${msg}`,
|
||||
// icon: "mdi-close-circle",
|
||||
// color: "red",
|
||||
// });
|
||||
// socket.disconnect();
|
||||
// });
|
||||
|
||||
// Functions
|
||||
function scrollToBottom() {
|
||||
window.scrollTo(0, document.body.scrollHeight);
|
||||
}
|
||||
// function scrollToBottom() {
|
||||
// window.scrollTo(0, document.body.scrollHeight);
|
||||
// }
|
||||
|
||||
async function scan() {
|
||||
scanning.set(true);
|
||||
scannedPlatforms.value = [];
|
||||
scanningStore.set(true);
|
||||
scanningPlatforms.value = [];
|
||||
|
||||
if (!socket.connected) socket.connect();
|
||||
|
||||
@@ -87,10 +98,10 @@ async function scan() {
|
||||
}
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
socket.off("scan:scanning_platform");
|
||||
socket.off("scan:scanning_rom");
|
||||
socket.off("scan:done");
|
||||
socket.off("scan:done_ko");
|
||||
// socket.off("scan:scanning_platform");
|
||||
// socket.off("scan:scanning_rom");
|
||||
// socket.off("scan:done");
|
||||
// socket.off("scan:done_ko");
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -141,10 +152,10 @@ onBeforeUnmount(() => {
|
||||
<v-row class="pa-4" no-gutters>
|
||||
<v-btn
|
||||
@click="scan()"
|
||||
:disabled="scanning.value"
|
||||
:disabled="scanning"
|
||||
prepend-icon="mdi-magnify-scan"
|
||||
rounded="0"
|
||||
:loading="scanning.value"
|
||||
:loading="scanning"
|
||||
>Scan
|
||||
<template v-slot:loader>
|
||||
<v-progress-circular
|
||||
@@ -167,14 +178,13 @@ onBeforeUnmount(() => {
|
||||
<v-row
|
||||
no-gutters
|
||||
class="align-center pa-4"
|
||||
v-for="platform in scannedPlatforms"
|
||||
v-for="platform in scanningPlatforms"
|
||||
>
|
||||
<v-col>
|
||||
<v-list-item :to="{ name: 'platform', params: { platform: platform.id } }">
|
||||
<v-avatar
|
||||
:rounded="0"
|
||||
size="40"
|
||||
>
|
||||
<v-list-item
|
||||
:to="{ name: 'platform', params: { platform: platform.id } }"
|
||||
>
|
||||
<v-avatar :rounded="0" size="40">
|
||||
<platform-icon :slug="platform.slug"></platform-icon>
|
||||
</v-avatar>
|
||||
<span class="text-body-2 ml-5"> {{ platform.name }}</span>
|
||||
|
||||
@@ -1,19 +1,31 @@
|
||||
<script setup lang="ts">
|
||||
import storeAuth from "@/stores/auth";
|
||||
import storeHeartbeat from "@/stores/heartbeat";
|
||||
import storeScanning from "@/stores/scanning";
|
||||
import ControlPanelConfig from "@/views/Settings/ControlPanel/Config/Base.vue";
|
||||
import ControlPanelGeneral from "@/views/Settings/ControlPanel/General/Base.vue";
|
||||
import ControlPanelUsers from "@/views/Settings/ControlPanel/Users/Base.vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { ref } from "vue";
|
||||
|
||||
// Props
|
||||
const authStore = storeAuth();
|
||||
const heartbeatStore = storeHeartbeat();
|
||||
const tab = ref("general");
|
||||
const scanningStore = storeScanning();
|
||||
const { scanning } = storeToRefs(scanningStore);
|
||||
</script>
|
||||
<template>
|
||||
<!-- Settings tabs -->
|
||||
<v-app-bar elevation="0" density="compact">
|
||||
<v-progress-linear
|
||||
id="scan-progress-bar"
|
||||
color="romm-accent-1"
|
||||
:active="scanning"
|
||||
:indeterminate="true"
|
||||
absolute
|
||||
fixed
|
||||
/>
|
||||
<v-tabs v-model="tab" slider-color="romm-accent-1" class="bg-primary">
|
||||
<v-tab value="general" rounded="0">General</v-tab>
|
||||
<v-tab value="config" rounded="0">Config</v-tab>
|
||||
|
||||
Reference in New Issue
Block a user