mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 12:35:30 +02:00
add more tooltips
This commit is contained in:
parent
bc9228f73a
commit
50c3a53d6e
11 changed files with 108 additions and 15 deletions
|
|
@ -2,6 +2,13 @@
|
||||||
<v-menu>
|
<v-menu>
|
||||||
<template #activator="{ props }">
|
<template #activator="{ props }">
|
||||||
<v-icon-btn
|
<v-icon-btn
|
||||||
|
v-tooltip:bottom="
|
||||||
|
$formatMessage({
|
||||||
|
description: 'Locale selector button: tooltip',
|
||||||
|
defaultMessage: 'Language',
|
||||||
|
id: 'XR+P68',
|
||||||
|
})
|
||||||
|
"
|
||||||
v-bind="props"
|
v-bind="props"
|
||||||
icon="i-mdi:translate"
|
icon="i-mdi:translate"
|
||||||
:aria-label="
|
:aria-label="
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,10 @@
|
||||||
<v-menu>
|
<v-menu>
|
||||||
<template #activator="{ props }">
|
<template #activator="{ props }">
|
||||||
<v-icon-btn
|
<v-icon-btn
|
||||||
|
v-tooltip:bottom="message"
|
||||||
v-bind="props"
|
v-bind="props"
|
||||||
icon="i-mdi:view-grid-plus"
|
icon="i-mdi:view-grid-plus"
|
||||||
:aria-label="
|
:aria-label="message"
|
||||||
$formatMessage({
|
|
||||||
description: 'Page size selector button: aria-label',
|
|
||||||
defaultMessage: 'page size selector',
|
|
||||||
id: '2EMvSm',
|
|
||||||
})
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -44,6 +39,9 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PageSize } from '@/types/page'
|
import type { PageSize } from '@/types/page'
|
||||||
|
import { useIntl } from 'vue-intl'
|
||||||
|
|
||||||
|
const intl = useIntl()
|
||||||
|
|
||||||
const pageSize = defineModel<PageSize>({ required: true })
|
const pageSize = defineModel<PageSize>({ required: true })
|
||||||
|
|
||||||
|
|
@ -51,6 +49,12 @@ const { sizes = [20, 50, 100, 200, 500], allowUnpaged = false } = defineProps<{
|
||||||
sizes?: number[]
|
sizes?: number[]
|
||||||
allowUnpaged?: boolean
|
allowUnpaged?: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
const message = intl.formatMessage({
|
||||||
|
description: 'Page size selector button',
|
||||||
|
defaultMessage: 'Page size',
|
||||||
|
id: 'XXr6pI',
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts"></script>
|
<script lang="ts"></script>
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,24 @@
|
||||||
color="primary"
|
color="primary"
|
||||||
>
|
>
|
||||||
<v-btn
|
<v-btn
|
||||||
|
v-tooltip:bottom="
|
||||||
|
$formatMessage({
|
||||||
|
description: 'View mode scroll button tooltip',
|
||||||
|
defaultMessage: 'Scroll',
|
||||||
|
id: '3DBPuv',
|
||||||
|
})
|
||||||
|
"
|
||||||
icon="i-mdi:infinity"
|
icon="i-mdi:infinity"
|
||||||
value="scroll"
|
value="scroll"
|
||||||
/>
|
/>
|
||||||
<v-btn
|
<v-btn
|
||||||
|
v-tooltip:bottom="
|
||||||
|
$formatMessage({
|
||||||
|
description: 'View mode paginated button tooltip',
|
||||||
|
defaultMessage: 'Paginated',
|
||||||
|
id: 'bCFD9B',
|
||||||
|
})
|
||||||
|
"
|
||||||
icon="i-mdi:view-grid"
|
icon="i-mdi:view-grid"
|
||||||
value="paged"
|
value="paged"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,13 @@
|
||||||
<v-slider
|
<v-slider
|
||||||
v-if="display.smAndUp.value"
|
v-if="display.smAndUp.value"
|
||||||
v-model="appStore.gridCardWidth"
|
v-model="appStore.gridCardWidth"
|
||||||
|
v-tooltip:bottom="
|
||||||
|
$formatMessage({
|
||||||
|
description: 'Poster size slider tooltip',
|
||||||
|
defaultMessage: 'Poster size',
|
||||||
|
id: 'O9hZBS',
|
||||||
|
})
|
||||||
|
"
|
||||||
:min="130"
|
:min="130"
|
||||||
:max="200"
|
:max="200"
|
||||||
color="surface-darken"
|
color="surface-darken"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,9 @@
|
||||||
disable-route-watcher
|
disable-route-watcher
|
||||||
>
|
>
|
||||||
<v-icon-btn
|
<v-icon-btn
|
||||||
|
v-tooltip:bottom="closeMessage"
|
||||||
icon="i-mdi:close"
|
icon="i-mdi:close"
|
||||||
|
:aria-label="closeMessage"
|
||||||
variant="text"
|
variant="text"
|
||||||
class="position-absolute top-0 right-0 me-2 mt-1"
|
class="position-absolute top-0 right-0 me-2 mt-1"
|
||||||
style="z-index: 2"
|
style="z-index: 2"
|
||||||
|
|
@ -23,8 +25,18 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useIntl } from 'vue-intl'
|
||||||
|
|
||||||
|
const intl = useIntl()
|
||||||
|
|
||||||
const model = defineModel<boolean>({ default: false })
|
const model = defineModel<boolean>({ default: false })
|
||||||
const { location = 'end' } = defineProps<{
|
const { location = 'end' } = defineProps<{
|
||||||
location?: 'top' | 'end' | 'bottom' | 'start' | 'left' | 'right'
|
location?: 'top' | 'end' | 'bottom' | 'start' | 'left' | 'right'
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
const closeMessage = intl.formatMessage({
|
||||||
|
description: 'Temp drawer: close button',
|
||||||
|
defaultMessage: 'Close',
|
||||||
|
id: '/mhcNO',
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<v-icon-btn
|
<v-icon-btn
|
||||||
|
v-tooltip:bottom="
|
||||||
|
$formatMessage({
|
||||||
|
description: 'Theme selector button: tooltip',
|
||||||
|
defaultMessage: 'Theme',
|
||||||
|
id: 'e8DJzj',
|
||||||
|
})
|
||||||
|
"
|
||||||
:icon="themeIcon"
|
:icon="themeIcon"
|
||||||
:aria-label="
|
:aria-label="
|
||||||
$formatMessage({
|
$formatMessage({
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,13 @@
|
||||||
/>
|
/>
|
||||||
<v-icon
|
<v-icon
|
||||||
v-else
|
v-else
|
||||||
|
v-tooltip:bottom="
|
||||||
|
$formatMessage({
|
||||||
|
description: 'Generate API key dialog: copy button tooltip',
|
||||||
|
defaultMessage: 'Copy to clipboard',
|
||||||
|
id: 'oOtDhj',
|
||||||
|
})
|
||||||
|
"
|
||||||
icon="i-mdi:content-copy"
|
icon="i-mdi:content-copy"
|
||||||
@click="copy(createdKey.key)"
|
@click="copy(createdKey.key)"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<v-app-bar elevation="1">
|
<v-app-bar elevation="1">
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<v-app-bar-nav-icon @click="appStore.drawer = !appStore.drawer">
|
<v-app-bar-nav-icon
|
||||||
|
v-tooltip:bottom="tooltipMessage"
|
||||||
|
@click="appStore.drawer = !appStore.drawer"
|
||||||
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
<v-badge
|
<v-badge
|
||||||
:model-value="unreadCount > 0 && !appStore.drawer"
|
:model-value="unreadCount > 0 && !appStore.drawer"
|
||||||
|
|
@ -34,9 +37,24 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAppStore } from '@/stores/app'
|
import { useAppStore } from '@/stores/app'
|
||||||
import { useAnnouncements } from '@/colada/announcements'
|
import { useAnnouncements } from '@/colada/announcements'
|
||||||
|
import { useIntl } from 'vue-intl'
|
||||||
|
|
||||||
|
const intl = useIntl()
|
||||||
|
|
||||||
const appStore = useAppStore()
|
const appStore = useAppStore()
|
||||||
const { unreadCount } = useAnnouncements()
|
const { unreadCount } = useAnnouncements()
|
||||||
|
|
||||||
|
const expandMessage = intl.formatMessage({
|
||||||
|
description: 'Locale selector button: tooltip expand',
|
||||||
|
defaultMessage: 'Expand menu',
|
||||||
|
id: 'wGVZsf',
|
||||||
|
})
|
||||||
|
const collapseMessage = intl.formatMessage({
|
||||||
|
description: 'Locale selector button: tooltip collapse',
|
||||||
|
defaultMessage: 'Collapse menu',
|
||||||
|
id: 'UgQ5iO',
|
||||||
|
})
|
||||||
|
const tooltipMessage = computed(() => (appStore.drawer ? collapseMessage : expandMessage))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts"></script>
|
<script lang="ts"></script>
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,10 @@
|
||||||
}}</v-list-item-title>
|
}}</v-list-item-title>
|
||||||
<template #append>
|
<template #append>
|
||||||
<v-icon-btn
|
<v-icon-btn
|
||||||
|
v-tooltip:bottom="closeMessage"
|
||||||
icon="i-mdi:close"
|
icon="i-mdi:close"
|
||||||
variant="text"
|
variant="text"
|
||||||
:aria-label="
|
:aria-label="closeMessage"
|
||||||
$formatMessage({
|
|
||||||
description: 'Reorder library drawer: aria label',
|
|
||||||
defaultMessage: 'close',
|
|
||||||
id: 'Ept33T',
|
|
||||||
})
|
|
||||||
"
|
|
||||||
@click="appStore.reorderLibraries = false"
|
@click="appStore.reorderLibraries = false"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -107,7 +102,9 @@ import type { components } from '@/generated/openapi/komga'
|
||||||
import { CLIENT_SETTING_USER, type ClientSettingUserLibrary } from '@/types/ClientSettingsUser'
|
import { CLIENT_SETTING_USER, type ClientSettingUserLibrary } from '@/types/ClientSettingsUser'
|
||||||
import { useUpdateClientSettingsUser } from '@/colada/client-settings'
|
import { useUpdateClientSettingsUser } from '@/colada/client-settings'
|
||||||
import { useAppStore } from '@/stores/app'
|
import { useAppStore } from '@/stores/app'
|
||||||
|
import { useIntl } from 'vue-intl'
|
||||||
|
|
||||||
|
const intl = useIntl()
|
||||||
const appStore = useAppStore()
|
const appStore = useAppStore()
|
||||||
|
|
||||||
const { unpinned, pinned, refresh } = useLibraries()
|
const { unpinned, pinned, refresh } = useLibraries()
|
||||||
|
|
@ -139,6 +136,12 @@ const draggableConfig = {
|
||||||
chosenClass: 'chosen',
|
chosenClass: 'chosen',
|
||||||
animation: 150,
|
animation: 150,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const closeMessage = intl.formatMessage({
|
||||||
|
description: 'Reorder library drawer: close button',
|
||||||
|
defaultMessage: 'Close',
|
||||||
|
id: 'lPZ5hy',
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,13 @@
|
||||||
<template #append>
|
<template #append>
|
||||||
<v-icon-btn
|
<v-icon-btn
|
||||||
v-if="isAdmin"
|
v-if="isAdmin"
|
||||||
|
v-tooltip:bottom="
|
||||||
|
$formatMessage({
|
||||||
|
description: 'Add library button: tooltip',
|
||||||
|
defaultMessage: 'Create library',
|
||||||
|
id: '70/wK4',
|
||||||
|
})
|
||||||
|
"
|
||||||
icon="i-mdi:plus"
|
icon="i-mdi:plus"
|
||||||
variant="text"
|
variant="text"
|
||||||
:aria-label="
|
:aria-label="
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,13 @@
|
||||||
offset-y="7"
|
offset-y="7"
|
||||||
>
|
>
|
||||||
<v-icon-btn
|
<v-icon-btn
|
||||||
|
v-tooltip:bottom="
|
||||||
|
$formatMessage({
|
||||||
|
description: 'Filter button: tooltip',
|
||||||
|
defaultMessage: 'Show filters',
|
||||||
|
id: 'kFQatO',
|
||||||
|
})
|
||||||
|
"
|
||||||
icon="i-mdi:filter-variant"
|
icon="i-mdi:filter-variant"
|
||||||
@click="filterDrawer = true"
|
@click="filterDrawer = true"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue