mirror of
https://github.com/amir20/dozzle.git
synced 2026-01-03 19:45:01 +01:00
Vue3 (#1594)
* WIP vue3 * WIP vue3 * WIP vue3 * Migrates to vitejs * Fixes js tests and removes not needed modules * Fixes unmount * Updates to use css instead for space * Fixes tests and rebases one more time * Uses orgua * Fixes migrations bugs with oruga and fixes scroll * Fixes v-deep * Fixes icons to prod * Fixes icons to prod * Adds favicon back * Transitions some to composition api * Updates another component to comp api * Cleans defineProps * Updates log messages * Moves more to compose api * Cleans up styles and rewrites event source * Tries to fix DOMPurify * Removes postcss * WIP typescript * Improves importing * Converts all to ts * Converts main to ts * Makes changes for tsconfig * Moves more to ts * Adds typing to store * More typing * Updates to ts * Updates the rest to ts * Fixes computes * Fixes unmount * Adds cypress with custom base fixed * Fixes jest tests * Fixes golang tests * Adds gitignore for cypress * Removes int in favor of e2e with cypress * Tries to fix int tests again * Adds title * Updates e2e tests * Uses vue for isMobile * Removes app spec * Cleans up docker * Adds drop down for settings * Fixes bug with restart * Fixes scroll up bug * Adds tests for light mode
This commit is contained in:
9
assets/composables/container.ts
Normal file
9
assets/composables/container.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Ref , computed} from "vue";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
export default function useContainer(id: Ref<string>) {
|
||||
const store = useStore();
|
||||
const container = computed(() => store.getters.allContainersById[id.value]);
|
||||
|
||||
return { container };
|
||||
}
|
||||
3
assets/composables/mediaQuery.ts
Normal file
3
assets/composables/mediaQuery.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { useMediaQuery } from "@vueuse/core";
|
||||
|
||||
export const isMobile = useMediaQuery("(max-width: 770px)");
|
||||
12
assets/composables/title.ts
Normal file
12
assets/composables/title.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useTitle } from "@vueuse/core";
|
||||
import { ref, computed } from "vue";
|
||||
|
||||
const subtitle = ref("");
|
||||
|
||||
const title = computed(() => `${subtitle.value} - Dozzle`);
|
||||
|
||||
useTitle(title);
|
||||
|
||||
export function setTitle(t: string) {
|
||||
subtitle.value = t;
|
||||
}
|
||||
Reference in New Issue
Block a user