A simple to-do app focused on tasks that can be completed within a specific time span. taskline.tobinio.dev/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

custom variant fix #5

open opened by benni043.tngl.sh targeting main from benni043.tngl.sh/task-line: mobile-styling
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:4d7tshmkdmu3kss6q2v5tzka/sh.tangled.repo.pull/3ml4cdxw64s22
+118 -30
Diff #0
+58 -21
app/components/Nav/HorizontalNav.vue
··· 7 7 </script> 8 8 9 9 <template> 10 - <div class="bg-surface fixed bottom-0 flex h-12 w-dvw justify-between"> 11 - <div class="relativ -z-10 flex"> 12 - <button 13 - type="button" 14 - data-testid="settings-button" 15 - class="bg-secondary hover:bg-secondary-hover relative m-1 flex aspect-square h-10 cursor-pointer items-center justify-center rounded transition-colors" 16 - @click="() => isSettingsSheetOpen = true" 17 - > 18 - <Icon name="material-symbols:settings-outline-rounded" size="24" /> 19 - </button> 10 + <div class="flex justify-center"> 11 + <div 12 + class=" 13 + bg-surface fixed bottom-0 flex h-12 w-dvw justify-between 14 + 15 + floating:bottom-6 16 + floating:max-w-[90vw] 17 + floating:h-18 18 + floating:items-center 19 + floating:rounded-4xl 20 + floating:border 21 + floating:border-white/10 22 + floating:px-2 23 + floating:shadow-2xl 24 + 25 + pwa:bottom-12 26 + pwa:bg-transparent 27 + 28 + floating:pwa:bottom-6 29 + " 30 + > 31 + <div class="relativ -z-10 flex"> 32 + <button 33 + type="button" 34 + data-testid="settings-button" 35 + class=" 36 + bg-secondary hover:bg-secondary-hover relative m-1 flex aspect-square h-10 cursor-pointer items-center justify-center rounded transition-colors 37 + floating:rounded-3xl 38 + floating:h-12 39 + " 40 + @click="() => isSettingsSheetOpen = true" 41 + > 42 + <Icon name="material-symbols:settings-outline-rounded" size="24" /> 43 + </button> 44 + <button 45 + type="button" 46 + class=" 47 + bg-secondary hover:bg-secondary-hover relative m-1 flex aspect-square h-10 cursor-pointer items-center justify-center rounded transition-colors 48 + floating:rounded-3xl 49 + floating:h-12 50 + " 51 + @click="() => isFilterSheetOpen = true" 52 + > 53 + <Icon 54 + v-if="isFiltering" 55 + name="material-symbols:filter-alt" 56 + size="24" 57 + /> 58 + <Icon v-else name="material-symbols:filter-alt-outline" size="24" /> 59 + </button> 60 + </div> 20 61 <button 21 62 type="button" 22 - class="bg-secondary hover:bg-secondary-hover relative m-1 flex aspect-square h-10 cursor-pointer items-center justify-center rounded transition-colors" 23 - @click="() => isFilterSheetOpen = true" 63 + class=" 64 + bg-primary hover:bg-primary-hover relative m-1 flex aspect-square h-10 cursor-pointer items-center justify-center rounded transition-colors 65 + floating:rounded-3xl 66 + floating:h-12 67 + " 68 + @click="() => isNewSheetOpen = true" 24 69 > 25 - <Icon v-if="isFiltering" name="material-symbols:filter-alt" size="24" /> 26 - <Icon v-else name="material-symbols:filter-alt-outline" size="24" /> 70 + <Icon name="material-symbols:add-2-rounded" size="24" /> 27 71 </button> 28 72 </div> 29 - <button 30 - type="button" 31 - class="bg-primary hover:bg-primary-hover relative m-1 flex aspect-square h-10 cursor-pointer items-center justify-center rounded transition-colors" 32 - @click="() => isNewSheetOpen = true" 33 - > 34 - <Icon name="material-symbols:add-2-rounded" size="24" /> 35 - </button> 36 73 </div> 37 74 </template>
+17 -3
app/components/Settings/SettingsSheet.vue
··· 52 52 53 53 <template> 54 54 <Sheet :is-open="isOpen" title="Settings Sheet" @close="close"> 55 - <div data-testid="settings-sheet" class="flex flex-col gap-1"> 55 + <div data-testid="settings-sheet" class="flex flex-col gap-4"> 56 56 <div class="flex gap-1"> 57 57 <div> 58 58 <h2 class="text-muted-text text-lg">{{ t("login") }}</h2> ··· 66 66 class="bg-surface border-secondary h-8 cursor-pointer rounded border px-2 text-white" 67 67 :value="locale" 68 68 @change=" 69 - onLanguageChange(($event.target as HTMLSelectElement).value) 70 - " 69 + onLanguageChange(($event.target as HTMLSelectElement).value) 70 + " 71 71 > 72 72 <option v-for="lang in locales" :key="lang.code" :value="lang.code"> 73 73 {{ t(`languageNames.${lang.code}`) }} 74 74 </option> 75 75 </select> 76 76 </div> 77 + </div> 77 78 79 + <div class="flex gap-1"> 78 80 <div> 79 81 <h2 class="text-muted-text text-lg">{{ t("push") }}</h2> 80 82 <button ··· 88 90 </div> 89 91 90 92 <div> 93 + <h2 class="text-muted-text text-lg">{{ t("design") }}</h2> 94 + <select 95 + v-model="settings.design" 96 + class="bg-surface border-secondary h-8 cursor-pointer rounded border px-2 text-white" 97 + > 98 + <option value="classic">{{ t(`classic`) }}</option> 99 + <option value="floating">{{ t(`floating`) }}</option> 100 + </select> 101 + </div> 102 + 103 + <div> 91 104 <h2 class="text-muted-text text-lg">{{ t("insertionPoint") }}</h2> 92 105 <select 93 106 ··· 98 111 </select> 99 112 </div> 100 113 </div> 114 + 101 115 <Categories /> 102 116 <Tags /> 103 117 <ApiKeys />
+9 -3
app/components/Utils/Sheet.vue
··· 33 33 @click="emit('close')" 34 34 /> 35 35 <DrawerContent 36 - class="bg-surface fixed bottom-0 z-30 flex h-96 w-dvw flex-col gap-2 rounded-t-lg drop-shadow-lg" 36 + class="bg-surface fixed bottom-0 z-30 flex h-106 w-dvw flex-col gap-2 rounded-t-lg drop-shadow-lg" 37 37 > 38 38 <div class="h-full"> 39 39 <VisuallyHidden> 40 - 40 + <DrawerTitle>{{ title }}</DrawerTitle> 41 41 <DrawerDescription>{{ title }}</DrawerDescription> 42 42 </VisuallyHidden> 43 43 <DrawerHandle class="my-2" /> 44 - <div class="h-full overflow-auto px-2 pb-7"><slot /></div> 44 + <div 45 + class=" 46 + h-full overflow-auto px-2 pb-7 47 + pwa:pb-17" 48 + > 49 + <slot /> 50 + </div> 45 51 </div> 46 52 </DrawerContent> 47 53 </DrawerPortal>
+17
app/composables/useIsPwa.ts
··· 1 + import { onMounted, ref } from "vue"; 2 + 3 + interface NavigatorStandalone extends Navigator { 4 + standalone?: boolean; 5 + } 6 + 7 + export function useIsPwa() { 8 + const isPwa = ref(false); 9 + 10 + onMounted(() => { 11 + isPwa.value = 12 + window.matchMedia("(display-mode: standalone)").matches || 13 + (window.navigator as NavigatorStandalone).standalone === true; 14 + }); 15 + 16 + return isPwa; 17 + }
+2
app/composables/useSettings.ts
··· 1 1 type Settings = { 2 2 insertionPoint: "top" | "bottom"; 3 + design: "classic" | "floating"; 3 4 }; 4 5 5 6 export function useSettings() { 6 7 const settings = useLocalStorage<Settings>("settings", { 7 8 insertionPoint: "bottom", 9 + design: "classic", 8 10 }); 9 11 return { settings }; 10 12 }
+4 -1
i18n/locales/de.json
··· 34 34 "tagSelect": { 35 35 "notUsedYet": "Nicht verwendet" 36 36 }, 37 - "push": "Webpush" 37 + "push": "Webpush", 38 + "design": "Design", 39 + "classic": "Klassisch", 40 + "floating": "Schwebend" 38 41 }
+4 -1
i18n/locales/en.json
··· 34 34 "push": "Webpush", 35 35 "tagSelect": { 36 36 "notUsedYet": "Not used yet" 37 - } 37 + }, 38 + "design": "Design", 39 + "classic": "Classic", 40 + "floating": "Floating" 38 41 }
+3
app/assets/css/main.css
··· 102 102 ::-webkit-scrollbar-thumb:hover { 103 103 background: #555; 104 104 } 105 + 106 + @custom-variant floating (&:where([data-design="floating"] *)); 107 + @custom-variant pwa (&:where([data-pwa="true"] *));
+4 -1
app/pages/index.vue
··· 36 36 }); 37 37 38 38 const { isMobile } = useDevice(); 39 + 40 + const isPwa = useIsPwa(); 41 + const { settings } = useSettings(); 39 42 </script> 40 43 <template> 41 - <div> 44 + <div :data-design="settings.design" :data-pwa="isPwa"> 42 45 <FilterSheet v-model:is-open="isFilterSheetOpen" /> 43 46 <SettingsSheet v-model:is-open="isSettingsSheetOpen" /> 44 47 <EditTodoSheet />

History

1 round 0 comments
sign up or login to add to the discussion
benni043.tngl.sh submitted #0
3 commits
expand
mobile styling improvements implemented
fixed
custom variant fix
merge conflicts detected
expand
  • 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