main ➔ zio/dev

This commit is contained in:
Ducky 2024-06-09 19:28:07 +01:00
commit a0c161fb92
32 changed files with 12354 additions and 8383 deletions

View file

@ -56,7 +56,7 @@ async function removeUserNote() {
<template>
<CommonDropdown :eager-mount="command">
<button flex gap-1 items-center w-full rounded op75 hover="op100 text-purple" group aria-label="More actions">
<button flex gap-1 items-center w-full rounded op75 hover="op100 text-purple" group :aria-label="t('actions.more')">
<div rounded-5 p2 elk-group-hover="bg-purple/10">
<div i-ri:more-2-fill />
</div>

View file

@ -8,7 +8,7 @@ const vAutoFocus = (el: HTMLElement) => el.focus()
<template>
<div my-8 px-3 sm:px-8 md:max-w-200 flex="~ col gap-4" relative>
<button v-auto-focus type="button" btn-action-icon absolute top--8 right-0 m1 aria-label="Close" @click="emit('close')">
<button v-auto-focus type="button" btn-action-icon absolute top--8 right-0 m1 :aria-label="$t('action.close')" @click="emit('close')">
<span i-ri:close-line />
</button>

View file

@ -32,14 +32,14 @@ const shortcutItemGroups = computed<ShortcutItemGroup[]>(() => [
description: t('magic_keys.groups.navigation.shortcut_help'),
shortcut: { keys: ['?'], isSequence: false },
},
// {
// description: t('magic_keys.groups.navigation.next_status'),
// shortcut: { keys: ['j'], isSequence: false },
// },
// {
// description: t('magic_keys.groups.navigation.previous_status'),
// shortcut: { keys: ['k'], isSequence: false },
// },
{
description: t('magic_keys.groups.navigation.next_status'),
shortcut: { keys: ['j'], isSequence: false },
},
{
description: t('magic_keys.groups.navigation.previous_status'),
shortcut: { keys: ['k'], isSequence: false },
},
{
description: t('magic_keys.groups.navigation.go_to_search'),
shortcut: { keys: ['/'], isSequence: false },

View file

@ -63,7 +63,7 @@ function handleFavouritedBoostedByClose() {
</ModalDialog>
<ModalDialog
v-model="isPublishDialogOpen"
max-w-180 flex
max-w-180 flex flex-col
@close="handlePublishClose"
>
<!-- This `w-0` style is used to avoid overflow problems in flex layoutsso don't remove it unless you know what you're doing -->

View file

@ -39,14 +39,14 @@ onUnmounted(() => locked.value = false)
<template>
<div relative h-full w-full flex pt-12 @click="onClick">
<button
v-if="hasNext" pointer-events-auto btn-action-icon bg="black/20" :aria-label="$t('action.previous')"
v-if="hasNext" pointer-events-auto btn-action-icon bg="black/20" :aria-label="$t('action.next')"
hover:bg="black/40" dark:bg="white/30" dark-hover:bg="white/20" absolute top="1/2" right-1 z5
:title="$t('action.next')" @click="next"
>
<div i-ri:arrow-right-s-line text-white />
</button>
<button
v-if="hasPrev" pointer-events-auto btn-action-icon bg="black/20" aria-label="action.next"
v-if="hasPrev" pointer-events-auto btn-action-icon bg="black/20" :aria-label="$t('action.prev')"
hover:bg="black/40" dark:bg="white/30" dark:hover-bg="white/20" absolute top="1/2" left-1 z5
:title="$t('action.prev')" @click="prev"
>
@ -71,7 +71,7 @@ onUnmounted(() => locked.value = false)
<div absolute top-0 w-full flex justify-end>
<button
btn-action-icon bg="black/30" aria-label="action.close" hover:bg="black/40" dark:bg="white/30"
btn-action-icon bg="black/30" :aria-label="$t('action.close')" hover:bg="black/40" dark:bg="white/30"
dark:hover-bg="white/20" pointer-events-auto shrink-0 @click="emit('close')"
>
<div i-ri:close-line text-white />

View file

@ -10,7 +10,7 @@ defineModel<boolean>()
<button
flex items-center place-content-center h-full flex-1 class="select-none"
:class="show ? '!text-primary' : ''"
aria-label="More menu"
:aria-label="$t('nav.more_menu')"
@click="toggleVisible"
>
<span :class="show ? 'i-ri:close-fill' : 'i-ri:more-fill'" />

View file

@ -97,7 +97,7 @@ function resetModal() {
<b text-primary>@{{ account.acct }}</b>
</i18n-t>
</h2>
<button ref="dismissButton" btn-action-icon absolute top--8 right-0 m1 aria-label="Close" @click="emit('close')">
<button ref="dismissButton" btn-action-icon absolute top--8 right-0 m1 :aria-label="$t('action.close')" @click="emit('close')">
<div i-ri:close-line />
</button>

View file

@ -15,34 +15,34 @@ const { disabled = false } = defineProps<{
:disabled="disabled"
:class="disabled ? 'opacity-50 cursor-not-allowed' : ''"
>
<div
<span
w-full flex px5 py3 md:gap2 gap4 items-center
transition-250
:class="disabled ? '' : 'group-hover:bg-active'"
group-focus-visible:ring="2 current"
>
<div flex-1 flex items-center md:gap2 gap4>
<div
<span flex-1 flex items-center md:gap2 gap4>
<span
v-if="icon" flex items-center justify-center
flex-shrink-0
:class="$slots.description ? 'w-12 h-12' : ''"
>
<slot name="icon">
<div v-if="icon" :class="icon" md:text-size-inherit text-xl />
<span v-if="icon" :class="icon" md:text-size-inherit text-xl />
</slot>
</div>
<div space-y-1>
<p :class="checked ? 'text-base' : 'text-secondary'">
</span>
<span space-y-1>
<span :class="checked ? 'text-base' : 'text-secondary'">
<slot>
<span>{{ text }}</span>
</slot>
</p>
<p v-if="$slots.description" text-sm text-secondary>
</span>
<span v-if="$slots.description" block text-sm text-secondary>
<slot name="description" />
</p>
</div>
</div>
<div text-lg :class="checked ? 'i-ri-checkbox-line text-primary' : 'i-ri-checkbox-blank-line text-secondary'" />
</div>
</span>
</span>
</span>
<span text-lg :class="checked ? 'i-ri-checkbox-line text-primary' : 'i-ri-checkbox-blank-line text-secondary'" />
</span>
</button>
</template>

View file

@ -211,7 +211,7 @@ watch(shouldLoadAttachment, () => {
rounded-lg
h-full
w-full
aria-label="Open image preview dialog"
:aria-label="$t('action.open_image_preview_dialog')"
relative
@click="!shouldLoadAttachment ? loadAttachment() : openMediaPreview(attachments ? attachments : [attachment], attachments?.indexOf(attachment) || 0)"
>

View file

@ -44,7 +44,9 @@ const allowEmbeddedMedia = computed(() => status.card?.html && embeddedMediaPref
<StatusBody v-if="(!isFiltered && isSensitiveNonSpoiler) || hideAllMedia" :status="status" :newer="newer" :with-action="!isDetails" :class="isDetails ? 'text-xl' : ''" />
<StatusSpoiler :enabled="hasSpoilerOrSensitiveMedia || isFiltered" :filter="isFiltered" :sensitive-non-spoiler="isSensitiveNonSpoiler || hideAllMedia" :is-d-m="isDM">
<template v-if="spoilerTextPresent" #spoiler>
<p>{{ status.spoilerText }}</p>
<p>
<ContentRich :content="status.spoilerText" :emojis="status.emojis" :markdown="false" />
</p>
</template>
<template v-else-if="filterPhrase" #spoiler>
<p>{{ `${$t('status.filter_hidden_phrase')}: ${filterPhrase}` }}</p>

View file

@ -20,7 +20,7 @@ function clickUser(user: UserLogin) {
<button
flex rounded
cursor-pointer
aria-label="Switch user"
:aria-label="$t('action.switch_account')"
:class="user.account.acct === currentUser?.account.acct ? '' : 'op25 grayscale'"
hover="filter-none op100"
@click="clickUser(user)"

View file

@ -36,7 +36,7 @@ function processSignIn() {
<button
flex rounded px4 py3 text-left
hover:bg-active cursor-pointer transition-100
aria-label="Switch user"
:aria-label="$t('action.switch_account')"
@click="clickUser(user)"
>
<AccountInfo :account="user.account" :hover-card="false" square />