mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-11 16:28:37 +01:00
new selfhosted version
This commit is contained in:
17
dashboard/composables/useDev.ts
Normal file
17
dashboard/composables/useDev.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
const data = ref<any>({});
|
||||
|
||||
function setData(name: string, value: any) {
|
||||
data.value[name] = value;
|
||||
}
|
||||
|
||||
function getData(name: string, prefix: string = '', suffix: string = '') {
|
||||
return `${prefix} ${data.value[name]} ${suffix}`;
|
||||
}
|
||||
|
||||
export function useDev() {
|
||||
const route = useRoute();
|
||||
const isDev = computed(() => route.query['dev'] === "1");
|
||||
return { isDev, setData, getData }
|
||||
}
|
||||
Reference in New Issue
Block a user