[feat]dialog header action tooltip support (#219)
* fix: remove duplicate variables resulting from merging * feat(dialog): add tooltip support for header buttons
This commit is contained in:
-10
@@ -92,16 +92,6 @@ onMounted(() => {
|
||||
|
||||
const openManagerDialog = () => {
|
||||
const { cardWidth, gutter, aspect, flat } = config
|
||||
// choose icon depending on current layout
|
||||
const layoutIcon = flat.value ? 'pi pi-folder-open' : 'pi pi-th-large'
|
||||
// determine hidden files setting
|
||||
const includeHidden =
|
||||
app.ui?.settings.getSettingValue('ModelManager.Scan.IncludeHiddenFiles') ??
|
||||
false
|
||||
const hiddenIcon = includeHidden ? 'pi pi-eye' : 'pi pi-eye-slash'
|
||||
const hiddenTooltip = includeHidden
|
||||
? t('hideHiddenFiles')
|
||||
: t('showHiddenFiles')
|
||||
|
||||
const layoutIcon = flat.value ? 'pi pi-th-large' : 'pi pi-folder-open'
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<Button
|
||||
v-for="action in item.headerButtons"
|
||||
:key="action.key"
|
||||
v-tooltip.top="action.tooltip"
|
||||
severity="secondary"
|
||||
:text="true"
|
||||
:rounded="true"
|
||||
|
||||
@@ -6,6 +6,7 @@ interface HeaderButton {
|
||||
key: string
|
||||
icon: string
|
||||
command: () => void
|
||||
tooltip?: string
|
||||
}
|
||||
|
||||
export interface DialogItem {
|
||||
|
||||
Reference in New Issue
Block a user