Skip to content

Commit

Permalink
Merge branch 'elk-zone:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mastoduy authored Jan 30, 2025
2 parents 8f62b46 + e52b34c commit 75dc870
Show file tree
Hide file tree
Showing 17 changed files with 1,356 additions and 1,032 deletions.
2 changes: 1 addition & 1 deletion components/account/AccountHoverCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const relationship = useRelationship(account)
<div v-show="relationship" flex="~ col gap2" rounded min-w-90 max-w-120 z-100 overflow-hidden p-4>
<div flex="~ gap2" items-center>
<NuxtLink :to="getAccountRoute(account)" flex-auto rounded-full hover:bg-active transition-100 pe5 me-a>
<AccountInfo :account="account" :hover-card="true" />
<AccountInfo :account="account" :hover-card="false" />
</NuxtLink>
<AccountFollowButton text-sm :account="account" :relationship="relationship" />
</div>
Expand Down
4 changes: 2 additions & 2 deletions components/modal/DurationPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ watchEffect(() => {
const duration
= days.value * 24 * 60 * 60
+ hours.value * 60 * 60
+ minutes.value * 60
+ hours.value * 60 * 60
+ minutes.value * 60
if (duration <= 0) {
isValid.value = false
Expand Down
71 changes: 52 additions & 19 deletions components/notification/NotificationGroupedFollow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ const { items } = defineProps<{
items: GroupedNotifications
}>()
const count = computed(() => items.items.length)
const maxVisibleFollows = 5
const follows = computed(() => items.items)
const visibleFollows = computed(() => follows.value.slice(0, maxVisibleFollows))
const count = computed(() => follows.value.length)
const countPlus = computed(() => Math.max(count.value - maxVisibleFollows, 0))
const isExpanded = ref(false)
const lang = computed(() => {
return (count.value > 1 || count.value === 0) ? undefined : items.items[0].status?.language
Expand All @@ -17,16 +21,29 @@ const lang = computed(() => {
<div flex items-center top-0 left-2 pt-2 px-3>
<div :class="count > 1 ? 'i-ri-group-line' : 'i-ri-user-3-line'" me-3 color-blue text-xl aria-hidden="true" />
<template v-if="count > 1">
<AccountHoverWrapper
:account="follows[0].account"
>
<NuxtLink :to="getAccountRoute(follows[0].account)">
<AccountDisplayName
:account="follows[0].account"
text-primary font-bold line-clamp-1 ws-pre-wrap break-all hover:underline
/>
</NuxtLink>
</AccountHoverWrapper>
&nbsp;{{ $t('notification.and') }}&nbsp;
<CommonLocalizedNumber
keypath="notification.followed_you_count"
:count="count"
keypath="notification.others"
:count="count - 1"
text-primary font-bold line-clamp-1 ws-pre-wrap break-all
/>
&nbsp;{{ $t('notification.followed_you') }}
</template>
<template v-else-if="count === 1">
<NuxtLink :to="getAccountRoute(items.items[0].account)">
<NuxtLink :to="getAccountRoute(follows[0].account)">
<AccountDisplayName
:account="items.items[0].account"
text-primary me-1 font-bold line-clamp-1 ws-pre-wrap break-all
:account="follows[0].account"
text-primary me-1 font-bold line-clamp-1 ws-pre-wrap break-all hover:underline
/>
</NuxtLink>
<span me-1 ws-nowrap>
Expand All @@ -35,22 +52,38 @@ const lang = computed(() => {
</template>
</div>
<div pb-2 ps8>
<div v-if="isExpanded">
<AccountCard
v-for="item in items.items"
:key="item.id"
:account="item.account"
p3
/>
<div
v-if="!isExpanded && count > 1"
flex="~ wrap gap-1.75" p4 items-center cursor-pointer
@click="isExpanded = !isExpanded"
>
<AccountHoverWrapper
v-for="follow in visibleFollows"
:key="follow.id"
:account="follow.account"
>
<NuxtLink :to="getAccountRoute(follow.account)">
<AccountAvatar :account="follow.account" w-12 h-12 />
</NuxtLink>
</AccountHoverWrapper>
<div flex="~ 1" items-center>
<span v-if="countPlus > 0" ps-2 text="base lg">+{{ countPlus }}</span>
<div i-ri:arrow-down-s-line mx-1 text-secondary text-xl aria-hidden="true" />
</div>
</div>
<div v-else flex="~ wrap gap-1.75" p4>
<div v-else>
<div v-if="count > 1" flex p-4 pb-2 cursor-pointer @click="isExpanded = !isExpanded">
<div i-ri:arrow-up-s-line ms-2 text-secondary text-xl aria-hidden="true" />
<span ps-2 text-base>Hide</span>
</div>
<AccountHoverWrapper
v-for="item in items.items"
:key="item.id"
:account="item.account"
v-for="follow in follows"
:key="follow.id"
:account="follow.account"
>
<NuxtLink :to="getAccountRoute(item.account)">
<AccountAvatar :account="item.account" w-12 h-12 />
<NuxtLink :to="getAccountRoute(follow.account)" flex gap-4 px-4 py-2>
<AccountAvatar :account="follow.account" w-12 h-12 />
<StatusAccountDetails :account="follow.account" />
</NuxtLink>
</AccountHoverWrapper>
</div>
Expand Down
3 changes: 3 additions & 0 deletions components/publish/PublishWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ async function toggleSensitive() {
}
async function publish() {
if (isPublishDisabled.value || isExceedingCharacterLimit.value)
return
const publishResult = await (threadIsActive.value ? publishThread() : publishDraft())
if (publishResult) {
if (Array.isArray(publishResult))
Expand Down
5 changes: 3 additions & 2 deletions components/status/StatusPreviewCardMoreFromAuthor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ defineProps<{
max-h-2xl
flex gap-2
my-auto
bg-gray-300
p-4 py-2
light:bg-gray-3 dark:bg-gray-8
>
<span z-0>More from</span>
<AccountInlineInfo :account="account" hover:bg-gray-300 />
<AccountInlineInfo :account="account" hover:bg-inherit ps-0 ms-0 />
</div>
</template>
105 changes: 54 additions & 51 deletions components/status/StatusPreviewCardNormal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,69 +45,72 @@ function loadAttachment() {
bg-card
hover:bg-active
:class="{
'flex': isSquare,
'flex flex-col': isSquare,
'p-4': root,
'rounded-lg': !root,
}"
target="_blank"
external
>
<div
v-if="card.image"
flex flex-col
display-block of-hidden
:class="{
'sm:(min-w-32 w-32 h-32) min-w-24 w-24 h-24': isSquare,
'w-full aspect-[1.91]': !isSquare,
'rounded-lg': root,
}"
relative
>
<CommonBlurhash
:blurhash="card.blurhash"
:src="card.image"
:width="card.width"
:height="card.height"
:alt="alt"
:should-load-image="shouldLoadAttachment"
w-full h-full object-cover
:class="!shouldLoadAttachment ? 'brightness-60' : ''"
/>
<button
v-if="!shouldLoadAttachment"
type="button"
absolute
class="status-preview-card-load bg-black/64"
p-2
transition
rounded
hover:bg-black
cursor-pointer
@click.stop.prevent="!shouldLoadAttachment ? loadAttachment() : null"
<div :class="isSquare ? 'flex' : ''">
<!-- image -->
<div
v-if="card.image"
flex flex-col
display-block of-hidden
:class="{
'sm:(min-w-32 w-32 h-32) min-w-24 w-24 h-24': isSquare,
'w-full aspect-[1.91]': !isSquare,
'rounded-lg': root,
}"
relative
>
<span
text-sm
text-white
flex flex-col justify-center items-center
gap-3 w-6 h-6
i-ri:file-download-line
<CommonBlurhash
:blurhash="card.blurhash"
:src="card.image"
:width="card.width"
:height="card.height"
:alt="alt"
:should-load-image="shouldLoadAttachment"
w-full h-full object-cover
:class="!shouldLoadAttachment ? 'brightness-60' : ''"
/>
</button>
</div>
<div
v-else
min-w-24 w-24 h-24 sm="min-w-32 w-32 h-32" bg="slate-500/10" flex justify-center items-center
:class="[
root ? 'rounded-lg' : '',
]"
>
<div :class="cardTypeIconMap[card.type]" w="30%" h="30%" text-secondary />
<button
v-if="!shouldLoadAttachment"
type="button"
absolute
class="status-preview-card-load bg-black/64"
p-2
transition
rounded
hover:bg-black
cursor-pointer
@click.stop.prevent="!shouldLoadAttachment ? loadAttachment() : null"
>
<span
text-sm
text-white
flex flex-col justify-center items-center
gap-3 w-6 h-6
i-ri:file-download-line
/>
</button>
</div>
<div
v-else
min-w-24 w-24 h-24 sm="min-w-32 w-32 h-32" bg="slate-500/10" flex justify-center items-center
:class="[
root ? 'rounded-lg' : '',
]"
>
<div :class="cardTypeIconMap[card.type]" w="30%" h="30%" text-secondary />
</div>
<!-- description -->
<StatusPreviewCardInfo :p="isSquare ? 'x-4' : '4'" :root="root" :card="card" :provider="providerName" />
</div>
<StatusPreviewCardInfo :p="isSquare ? 'x-4' : '4'" :root="root" :card="card" :provider="providerName" />
<StatusPreviewCardMoreFromAuthor
v-if="card?.authors?.[0].account"
:account="card.authors[0].account"
p-4 py-2
/>
</NuxtLink>
</template>
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
},
"devDependencies": {
"@nuxt-themes/docus": "^1.15.1",
"nuxt": "^3.15.1"
"nuxt": "^3.15.2"
}
}
18 changes: 9 additions & 9 deletions locales/ca-valencia.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
"desc3": "No inicies sessió amb el teu compte real."
},
"desc_highlight": "Espereu trobar alguns errors i que falten funcions ací i allà.",
"desc_para1": "Gràcies pel teu interès en provar Elk, el nostre client web Mastodon en procés",
"desc_para2": "estem treballant de valent en el desenvolupament i en millorar-lo.",
"desc_para1": "Gràcies pel teu interès en provar Elk, el nostre client web Mastodon en proves!",
"desc_para2": "Estem treballant de valent en el desenvolupament i en millorar-lo.",
"desc_para3": "Per a impulsar el desenvolupament, pots patrocinar l'equip a través dels patrocis de GitHub. Esperem que gaudisques d'Elk!",
"desc_para4": "Elk és de codi obert. Si vols ajudar amb proves, comentaris o contribucions,",
"desc_para5": "troba'ns a GitHub",
Expand Down Expand Up @@ -275,7 +275,7 @@
"hide_alt_indi_on_posts": "Amaga l'indicador «alt» a les publicacions",
"hide_boost_count": "Amaga el nombre d'impulsos",
"hide_favorite_count": "Amaga el nombre de preferits",
"hide_follower_count": "Amaga el nombre seguidors",
"hide_follower_count": "Amaga el nombre de seguidors",
"hide_reply_count": "Amaga el nombre de respostes",
"hide_username_emojis": "Amaga els emojis dels noms d'usuari",
"label": "Configuració",
Expand Down Expand Up @@ -352,16 +352,16 @@
"second_future": "ara|en {n} segon|en {n} segons",
"second_past": "ara|fa {n} segon|fa {n} segons",
"short_day_future": "en {n} d",
"short_day_past": "{n} d",
"short_day_past": "fa {n} d",
"short_hour_future": "en {n} h",
"short_hour_past": "{n} h",
"short_hour_past": "fa {n} h",
"short_minute_future": "en {n} min",
"short_minute_past": "{n} min",
"short_minute_past": "fa {n} min",
"short_month_future": "en {n} mes",
"short_month_past": "{n} mes",
"short_week_past": "{n}w",
"short_month_past": "fa {n} mes",
"short_week_past": "fa {n} set",
"short_year_future": "en {n} a",
"short_year_past": "{n} a",
"short_year_past": "fa {n} a",
"week_future": "en 0 setmanes|la setmana que ve|en {n} setmanes",
"year_future": "en 0 anys|l'any que ve|en {n} anys"
},
Expand Down
2 changes: 2 additions & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,12 @@
"zen_mode": "Zen Mode"
},
"notification": {
"and": "and",
"favourited_post": "favorited your post",
"followed_you": "followed you",
"followed_you_count": "{0} people followed you|{0} person followed you|{0} people followed you",
"missing_type": "MISSING notification.type:",
"others": "{0} others|{0} other|{0} others",
"reblogged_post": "boosted your post",
"reported": "{0} reported {1}",
"request_to_follow": "requested to follow you",
Expand Down
2 changes: 2 additions & 0 deletions locales/eu-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,12 @@
"zen_mode": "ZEN modua"
},
"notification": {
"and": "eta",
"favourited_post": "(e)k zure bidalketa gogoko egin du",
"followed_you": "(e)k jarraitu dizu",
"followed_you_count": "{0} pertsonak jarraitu dizute|pertsona {0}ek jarraitu dizu|{0} pertsonak jarraitu dizute",
"missing_type": "MISSING notification.type:",
"others": "beste {0}(e)k|beste {0}ek|beste {0}(e)k",
"reblogged_post": "(e)k zure bidalketari bultzada eman dio",
"reported": "{0}(e)k {1} salatu du",
"request_to_follow": "(e)k jarraipen-eskaera bidali dizu",
Expand Down
7 changes: 5 additions & 2 deletions locales/hu-HU.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"block_account": {
"cancel": "Mégsem",
"confirm": "Blokkol",
"description": "Biztosan blokkolod {0}?",
"description": "Biztosan blokkolod, {0}?",
"title": "Hozzáférés blokkolása"
},
"block_domain": {
Expand Down Expand Up @@ -265,7 +265,7 @@
"sequence_then": "miután"
},
"menu": {
"add_personal_note": "Személyes megjegyzés hozzáfőzése: {0}",
"add_personal_note": "Személyes megjegyzés hozzáfűzése: {0}",
"block_account": "Blokkol {0}",
"block_domain": "Domaint blokkol {0}",
"copy_link_to_post": "A bejegyzés hivatkozásának másolása",
Expand Down Expand Up @@ -334,10 +334,12 @@
"zen_mode": "Zen mód"
},
"notification": {
"and": "és",
"favourited_post": "hozzáaadta a bejegyésed a kedvenceihez",
"followed_you": "mostantól követ téged",
"followed_you_count": "{0} ember követ téged|{0} ember követ téged|{0} ember követ téged",
"missing_type": "HIÁNYZÓ éresítés típus:",
"others": "{0} mások|{0} más|{0} mások",
"reblogged_post": "kiemelte a bejegyzésedet",
"reported": "{0} jelentette {1}",
"request_to_follow": "kérte hogy kövessen",
Expand Down Expand Up @@ -633,6 +635,7 @@
"dismiss": "Elvetés",
"read": "Olvassa el a {0} leírását"
},
"pinned": "Kitűzött bejegyzés",
"poll": {
"count": "{0} szavazat|{0} szavazat|{0} szavazat",
"ends": "véget ér {0}",
Expand Down
Loading

0 comments on commit 75dc870

Please sign in to comment.