reemember warnings toggle, add tooltips
This commit is contained in:
parent
246d352761
commit
2b1c357603
5 changed files with 5 additions and 36 deletions
|
@ -36,7 +36,6 @@
|
|||
"vite-ssg": "26.1.1",
|
||||
"vue": "3.5.13",
|
||||
"vue-router": "4.5.0",
|
||||
"vue-tippy": "6.7.0",
|
||||
"vue-tsc": "2.2.8"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,6 +79,7 @@ onMounted(async () => {
|
|||
.input.labeled-checkbox(
|
||||
v-for='tag in tags'
|
||||
:id='tag.tagId'
|
||||
v-tooltip.bottom='tag.description'
|
||||
)
|
||||
label(
|
||||
:for='`${tag.tagId}-toggle`'
|
||||
|
|
|
@ -5,6 +5,7 @@ import type { HLJSApi } from 'highlight.js'
|
|||
const marked = import('marked')
|
||||
import { markedHighlight } from 'marked-highlight'
|
||||
import PrimeVue from 'primevue/config'
|
||||
import Tooltip from 'primevue/tooltip'
|
||||
import Aura from '@primevue/themes/aura'
|
||||
import { definePreset } from '@primeuix/themes'
|
||||
|
||||
|
@ -73,6 +74,7 @@ export const createApp = ViteSSG(
|
|||
}
|
||||
},
|
||||
})
|
||||
.directive('tooltip', Tooltip)
|
||||
initializeRouteStore(routes, globals as unknown as SiteGlobals)
|
||||
},
|
||||
)
|
||||
|
|
|
@ -91,6 +91,7 @@ onMounted(async () => {
|
|||
document.title = routeConfig.fullTitle
|
||||
ready.value = true
|
||||
hasWarnings.value = !!(await Promise.all(Object.values(list.entries))).find(other => !!other.warnings)
|
||||
hideWarnings.value = storage.read(`${storageId}::hideWarnings`) || false
|
||||
emits('loaded')
|
||||
})
|
||||
</script>
|
||||
|
@ -105,6 +106,7 @@ onMounted(async () => {
|
|||
)
|
||||
.input.labeled-checkbox(
|
||||
v-if='hasWarnings && !config.removeHideWarningsToggle'
|
||||
v-tooltip.bottom='"Whether to uncensor entries with warnings"'
|
||||
)
|
||||
label(
|
||||
for='warning-toggle-checkbox'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue