Skip to content

Commit 9146e43

Browse files
committed
Fix card obstructed by app bar
1 parent 2131b7e commit 9146e43

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

app/assets/main.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ $default-font: 'Kanit', sans-serif;
2121
backdrop-filter: blur(5px);
2222
}
2323

24+
.v-dialog .v-overlay__content:has(.pass-card) {
25+
margin-top: 64px;
26+
}
27+
2428
:root {
2529
--v-overlay-opacity: .5;
2630
}

app/components/pass-card.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template lang="pug">
2-
v-card.pa-6(
2+
v-card.pa-6.pass-card(
33
:width='cardSize * 30 - 4 + 48'
44
v-bind='$attrs'
55
)

app/pages/index.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ import { mdiArrowLeft, mdiArrowUp, mdiCogOutline, mdiRestore } from '@mdi/js'
7171
import { useWords } from '~/composables/words';
7272
import { waitFor } from '~/utils/timing';
7373
74-
const { width: windowWidth } = useWindowSize()
74+
const { width: windowWidth, height: windowHeight } = useWindowSize()
7575
7676
const username = useLocalStorage('username', '')
7777
const pin = ref('')
@@ -82,7 +82,10 @@ const selectedCard = ref<any | null>(null)
8282
const cardPreviews = ref([])
8383
const showCard = ref(false)
8484
const selectedCardVisible = refDebounced(showCard, 100)
85-
const zoomLevel = computed(() => windowWidth.value > 740 ? 2 : Math.max(1, windowWidth.value / 370))
85+
const zoomLevel = computed(() => {
86+
const viewportSize = Math.min(windowWidth.value, windowHeight.value - 64)
87+
return viewportSize > 740 ? 2 : Math.max(1, viewportSize / 370)
88+
})
8689
8790
const setRowsOptions = [1, 2, 3, 4]
8891
const setRows = useLocalStorage('set-rows', 1)

public/images/screenshot.png

-21.7 KB
Loading

0 commit comments

Comments
 (0)