mirror of
https://github.com/modrinth/code.git
synced 2026-07-31 13:16:38 +00:00
add installation settings tooltip (#6916)
This commit is contained in:
@@ -21,7 +21,7 @@ import OverflowMenu, {
|
||||
import TagTagItem from '#ui/components/base/TagTagItem.vue'
|
||||
import TeleportOverflowMenu from '#ui/components/base/TeleportOverflowMenu.vue'
|
||||
import { useRelativeTime } from '#ui/composables/how-ago'
|
||||
import { useVIntl } from '#ui/composables/i18n'
|
||||
import { defineMessages, useVIntl } from '#ui/composables/i18n'
|
||||
import { commonMessages } from '#ui/utils/common-messages'
|
||||
|
||||
import type {
|
||||
@@ -33,6 +33,13 @@ import type {
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
const messages = defineMessages({
|
||||
installationSettingsTooltip: {
|
||||
id: 'content.modpack-card.installation-settings',
|
||||
defaultMessage: 'Installation settings',
|
||||
},
|
||||
})
|
||||
|
||||
interface Props {
|
||||
project: ContentModpackCardProject
|
||||
projectLink?: string | RouteLocationRaw
|
||||
@@ -218,7 +225,10 @@ onUnmounted(() => {
|
||||
</ButtonStyled>
|
||||
|
||||
<ButtonStyled v-if="hasSettingsListener" type="outlined" circular>
|
||||
<button @click="emit('settings')">
|
||||
<button
|
||||
v-tooltip="formatMessage(messages.installationSettingsTooltip)"
|
||||
@click="emit('settings')"
|
||||
>
|
||||
<Settings2Icon />
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
@@ -244,7 +254,7 @@ onUnmounted(() => {
|
||||
</template>
|
||||
<template #settings>
|
||||
<Settings2Icon class="size-5" />
|
||||
{{ formatMessage(commonMessages.settingsLabel) }}
|
||||
{{ formatMessage(messages.installationSettingsTooltip) }}
|
||||
</template>
|
||||
</TeleportOverflowMenu>
|
||||
</ButtonStyled>
|
||||
|
||||
@@ -566,6 +566,9 @@
|
||||
"content.inline-backup.world-label": {
|
||||
"defaultMessage": "world"
|
||||
},
|
||||
"content.modpack-card.installation-settings": {
|
||||
"defaultMessage": "Installation settings"
|
||||
},
|
||||
"content.page-layout.additional-content": {
|
||||
"defaultMessage": "Additional content"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user