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(
|
#main-entry(
|
||||||
v-if='acknowledged'
|
v-if='acknowledged'
|
||||||
)
|
)
|
||||||
router-view
|
Transition
|
||||||
WarningPrompt(
|
router-view
|
||||||
|
#main-entry(
|
||||||
v-else
|
v-else
|
||||||
:storageId='storageId'
|
|
||||||
:warning='warning'
|
|
||||||
@acknowledged='onAcknowledgedWarning()'
|
|
||||||
)
|
)
|
||||||
|
Transition
|
||||||
|
WarningPrompt(
|
||||||
|
:storageId='storageId'
|
||||||
|
:warning='warning'
|
||||||
|
@acknowledged='onAcknowledgedWarning()'
|
||||||
|
)
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="sass">
|
<style scoped lang="sass">
|
||||||
|
|
|
@ -31,6 +31,7 @@ const hasWarnings = ref(false)
|
||||||
const hideWarnings = defineModel('showWarnings', { type: Boolean })
|
const hideWarnings = defineModel('showWarnings', { type: Boolean })
|
||||||
|
|
||||||
const onDisplayEntries = () => {
|
const onDisplayEntries = () => {
|
||||||
|
ready.value = false
|
||||||
let currentEntries = config.value.entries
|
let currentEntries = config.value.entries
|
||||||
if (!!variants.value) {
|
if (!!variants.value) {
|
||||||
variants.value.forEach((variant) => {
|
variants.value.forEach((variant) => {
|
||||||
|
@ -39,6 +40,7 @@ const onDisplayEntries = () => {
|
||||||
}
|
}
|
||||||
entries.value = currentEntries
|
entries.value = currentEntries
|
||||||
hasWarnings.value = !!Object.values(entries.value).find(other => !!other.warning)
|
hasWarnings.value = !!Object.values(entries.value).find(other => !!other.warning)
|
||||||
|
setTimeout(() => ready.value = true)
|
||||||
}
|
}
|
||||||
|
|
||||||
const onTileClicked = (clickEvent: { event: Event, id: string }) => {
|
const onTileClicked = (clickEvent: { event: Event, id: string }) => {
|
||||||
|
@ -103,16 +105,17 @@ onMounted(async () => {
|
||||||
id='warning-toggle-checkbox'
|
id='warning-toggle-checkbox'
|
||||||
v-model='hideWarnings'
|
v-model='hideWarnings'
|
||||||
)
|
)
|
||||||
.gallery(
|
Transition
|
||||||
v-if='ready'
|
.gallery(
|
||||||
)
|
v-if='ready'
|
||||||
GalleryTile(
|
|
||||||
v-for='(entry, id) in entries'
|
|
||||||
:entry='entry'
|
|
||||||
:id='id'
|
|
||||||
:hideWarnings='hideWarnings'
|
|
||||||
@click='onTileClicked($event)'
|
|
||||||
)
|
)
|
||||||
|
GalleryTile(
|
||||||
|
v-for='(entry, id) in entries'
|
||||||
|
:entry='entry'
|
||||||
|
:id='id'
|
||||||
|
:hideWarnings='hideWarnings'
|
||||||
|
@click='onTileClicked($event)'
|
||||||
|
)
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="sass">
|
<style scoped lang="sass">
|
||||||
|
|
Loading…
Add table
Reference in a new issue