this pr changes the style for pwa and adds the possibility for a different nav bar
+1
-1
app/components/Settings/SettingsSheet.vue
+1
-1
app/components/Settings/SettingsSheet.vue
···
96
96
class="bg-surface border-secondary h-8 cursor-pointer rounded border px-2 text-white"
97
97
>
98
98
<option value="classic">{{ t(`classic`) }}</option>
99
-
<option value="modern">{{ t(`modern`) }}</option>
99
+
<option value="floating">{{ t(`floating`) }}</option>
100
100
</select>
101
101
</div>
102
102
+6
-5
app/components/Utils/Sheet.vue
+6
-5
app/components/Utils/Sheet.vue
···
23
23
24
24
const useModal = useMediaQuery("(min-width: 40rem)");
25
25
26
-
const { standalone } = useIsPwa();
26
+
const isPwa = useIsPwa();
27
27
</script>
28
28
29
29
<template>
···
37
37
<DrawerContent
38
38
class="bg-surface fixed bottom-0 z-30 flex h-106 w-dvw flex-col gap-2 rounded-t-lg drop-shadow-lg"
39
39
>
40
-
<div class="h-full">
40
+
<div class="h-full" :data-pwa="isPwa">
41
41
<VisuallyHidden>
42
-
42
+
<DrawerTitle>{{ title }}</DrawerTitle>
43
43
<DrawerDescription>{{ title }}</DrawerDescription>
44
44
</VisuallyHidden>
45
45
<DrawerHandle class="my-2" />
46
46
<div
47
-
class="h-full overflow-auto px-2 pb-7"
48
-
:class="{'pb-17': standalone}"
47
+
class="
48
+
h-full overflow-auto px-2 pb-7
49
+
pwa:pb-17"
49
50
>
50
51
<slot />
51
52
</div>
+4
-4
app/composables/useIsPwa.ts
+4
-4
app/composables/useIsPwa.ts
···
5
5
}
6
6
7
7
export function useIsPwa() {
8
-
const standalone = ref(false);
8
+
const isPwa = ref(false);
9
9
10
10
onMounted(() => {
11
-
standalone.value =
11
+
isPwa.value =
12
12
window.matchMedia("(display-mode: standalone)").matches ||
13
-
(window.navigator as NavigatorStandalone).standalone!;
13
+
(window.navigator as NavigatorStandalone).standalone === true;
14
14
});
15
15
16
-
return { standalone };
16
+
return isPwa;
17
17
}
+1
-1
app/composables/useSettings.ts
+1
-1
app/composables/useSettings.ts
+1
-1
i18n/locales/de.json
+1
-1
i18n/locales/de.json
+2
-2
i18n/locales/en.json
+2
-2
i18n/locales/en.json
History
2 rounds
0 comments
benni043.tngl.sh
submitted
#1
merge conflicts detected
expand
collapse
expand
collapse
- app/components/Nav/HorizontalNav.vue:4
- app/components/Settings/SettingsSheet.vue:52
- app/components/Utils/Sheet.vue:33
- app/composables/useSettings.ts:1
- i18n/locales/de.json:34
- i18n/locales/en.json:34
expand 0 comments
benni043.tngl.sh
submitted
#0
1 commit
expand
collapse
mobile styling improvements implemented