transition elements
This commit is contained in:
parent
3f58b8f0af
commit
2359541fbf
2 changed files with 21 additions and 14 deletions
14
src/main.vue
14
src/main.vue
|
@ -97,13 +97,17 @@ onMounted(async () => {
|
|||
#main-entry(
|
||||
v-if='acknowledged'
|
||||
)
|
||||
router-view
|
||||
WarningPrompt(
|
||||
Transition
|
||||
router-view
|
||||
#main-entry(
|
||||
v-else
|
||||
:storageId='storageId'
|
||||
:warning='warning'
|
||||
@acknowledged='onAcknowledgedWarning()'
|
||||
)
|
||||
Transition
|
||||
WarningPrompt(
|
||||
:storageId='storageId'
|
||||
:warning='warning'
|
||||
@acknowledged='onAcknowledgedWarning()'
|
||||
)
|
||||
</template>
|
||||
|
||||
<style scoped lang="sass">
|
||||
|
|
|
@ -31,6 +31,7 @@ const hasWarnings = ref(false)
|
|||
const hideWarnings = defineModel('showWarnings', { type: Boolean })
|
||||
|
||||
const onDisplayEntries = () => {
|
||||
ready.value = false
|
||||
let currentEntries = config.value.entries
|
||||
if (!!variants.value) {
|
||||
variants.value.forEach((variant) => {
|
||||
|
@ -39,6 +40,7 @@ const onDisplayEntries = () => {
|
|||
}
|
||||
entries.value = currentEntries
|
||||
hasWarnings.value = !!Object.values(entries.value).find(other => !!other.warning)
|
||||
setTimeout(() => ready.value = true)
|
||||
}
|
||||
|
||||
const onTileClicked = (clickEvent: { event: Event, id: string }) => {
|
||||
|
@ -103,16 +105,17 @@ onMounted(async () => {
|
|||
id='warning-toggle-checkbox'
|
||||
v-model='hideWarnings'
|
||||
)
|
||||
.gallery(
|
||||
v-if='ready'
|
||||
)
|
||||
GalleryTile(
|
||||
v-for='(entry, id) in entries'
|
||||
:entry='entry'
|
||||
:id='id'
|
||||
:hideWarnings='hideWarnings'
|
||||
@click='onTileClicked($event)'
|
||||
Transition
|
||||
.gallery(
|
||||
v-if='ready'
|
||||
)
|
||||
GalleryTile(
|
||||
v-for='(entry, id) in entries'
|
||||
:entry='entry'
|
||||
:id='id'
|
||||
:hideWarnings='hideWarnings'
|
||||
@click='onTileClicked($event)'
|
||||
)
|
||||
</template>
|
||||
|
||||
<style scoped lang="sass">
|
||||
|
|
Loading…
Add table
Reference in a new issue