diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e824a50e..8cdd38ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,7 @@ jobs: - name: 🧪 Test project run: pnpm test:ci + timeout-minutes: 10 - name: 📝 Lint run: pnpm lint diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 47f98381..215aefe3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -38,7 +38,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.metal.outputs.tags }} labels: ${{ steps.metal.outputs.labels }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d8ff4289..5802e69f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,7 +83,7 @@ Simple approach used by most websites of relying on direction set in HTML elemen We've added some `UnoCSS` utilities styles to help you with that: - Do not use `left/right` padding and margin: for example `pl-1`. Use `padding-inline-start/end` instead. So `pl-1` should be `ps-1`, `pr-1` should be `pe-1`. The same rules apply to margin. - Do not use `rtl-` classes, such as `rtl-left-0`. -- For icons that should be rotated for RTL, add `class="rtl-flip"`. This can only be used for icons outside of elements with `dir="auto"`, such as timeline, and is the only exception from the rule above. For icons inside the timeline, it might not work as expected. +- For icons that should be rotated for RTL, add `class="rtl-flip"`. This can only be used for icons outside of elements with `dir="auto"`, such as timeline, and is the only exception to the rule above. For icons inside the timeline, it might not work as expected. - For absolute positioned elements, don't use `left/right`: for example `left-0`. Use `inset-inline-start/end` instead. `UnoCSS` shortcuts are `inset-is` for `inset-inline-start` and `inset-ie` for `inset-inline-end`. Example: `left-0` should be replaced with `inset-is-0`. - If you need to change the border radius for an entire left or right side, use `border-inline-start/end`. `UnoCSS` shortcuts are `rounded-is` for left side, `rounded-ie` for right side. Example: `rounded-l-5` should be replaced with `rounded-ie-5`. - If you need to change the border radius for one corner, use `border-start-end-radius` and similar rules. `UnoCSS` shortcuts are `rounded` + top/bottom as either `-bs` (top) or `-be` (bottom) + left/right as either `-is` (left) or `-ie` (right). Example: `rounded-tl-0` should be replaced with `rounded-bs-is-0`. diff --git a/components/common/CommonPaginator.vue b/components/common/CommonPaginator.vue index 46276eab..e370dbfa 100644 --- a/components/common/CommonPaginator.vue +++ b/components/common/CommonPaginator.vue @@ -8,6 +8,7 @@ import type { UnwrapRef } from 'vue' const { paginator, stream, + eventType, keyProp = 'id', virtualScroller = false, preprocess, @@ -17,6 +18,7 @@ const { keyProp?: keyof T virtualScroller?: boolean stream?: mastodon.streaming.Subscription + eventType?: 'update' | 'notification' preprocess?: (items: (U | T)[]) => U[] endMessage?: boolean | string }>() @@ -44,7 +46,7 @@ defineSlots<{ const { t } = useI18n() const nuxtApp = useNuxtApp() -const { items, prevItems, update, state, endAnchor, error } = usePaginator(paginator, toRef(() => stream), preprocess) +const { items, prevItems, update, state, endAnchor, error } = usePaginator(paginator, toRef(() => stream), eventType, preprocess) nuxtApp.hook('elk-logo:click', () => { update() diff --git a/components/common/CommonTabs.vue b/components/common/CommonTabs.vue index 324fc206..13e895ca 100644 --- a/components/common/CommonTabs.vue +++ b/components/common/CommonTabs.vue @@ -19,8 +19,8 @@ const tabs = computed(() => { }) }) -function toValidName(otpion: string) { - return otpion.toLowerCase().replace(/[^a-zA-Z0-9]/g, '-') +function toValidName(option: string) { + return option.toLowerCase().replace(/[^a-zA-Z0-9]/g, '-') } useCommands(() => command diff --git a/components/help/HelpPreview.vue b/components/help/HelpPreview.vue index 43e8bf24..b08aedc7 100644 --- a/components/help/HelpPreview.vue +++ b/components/help/HelpPreview.vue @@ -30,10 +30,12 @@ const vAutoFocus = (el: HTMLElement) => el.focus() {{ $t('help.desc_para6') }}

- {{ $t('help.desc_para3') }} -

+ + {{ $t('help.desc_para3') }} + +

diff --git a/components/modal/ModalMediaPreview.vue b/components/modal/ModalMediaPreview.vue index 69dca036..2670d0f8 100644 --- a/components/modal/ModalMediaPreview.vue +++ b/components/modal/ModalMediaPreview.vue @@ -37,7 +37,7 @@ onUnmounted(() => locked.value = false) diff --git a/components/notification/NotificationCard.vue b/components/notification/NotificationCard.vue index 69b0438f..a3d0eca8 100644 --- a/components/notification/NotificationCard.vue +++ b/components/notification/NotificationCard.vue @@ -4,6 +4,13 @@ import type { mastodon } from 'masto' const { notification } = defineProps<{ notification: mastodon.v1.Notification }>() + +const { t } = useI18n() + +// well-known emoji reactions types Elk does not support yet +const unsupportedEmojiReactionTypes = ['pleroma:emoji_reaction', 'reaction'] +if (unsupportedEmojiReactionTypes.includes(notification.type)) + console.warn(`[DEV] ${t('notification.missing_type')} '${notification.type}' (notification.id: ${notification.id})`)