forked from Mirrors/elk
Merge branch 'main' into userquin/feat-pwa-install-banner
# Conflicts: # layouts/default.vue
This commit is contained in:
commit
c416f892ba
39 changed files with 484 additions and 324 deletions
5
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
5
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
name: 🐞 Bug report
|
||||
about: Report an issue
|
||||
labels: ['s: pending triage', 'c: bug']
|
||||
---
|
56
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
56
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
@ -1,56 +0,0 @@
|
|||
name: 🐞 Bug report
|
||||
description: Report an issue
|
||||
labels: ['s: pending triage', 'c: bug']
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
|
||||
If you are unsure whether your problem is a bug or not, you can check the following:
|
||||
|
||||
- use our [Discord community](https://chat.elk.zone)
|
||||
- open a new [discussion](https://github.com/elk-zone/elk/discussions) and ask your question there
|
||||
|
||||
- type: checkboxes
|
||||
id: checkboxes
|
||||
attributes:
|
||||
label: Pre-Checks
|
||||
description: Before submitting the issue, please make sure you do the following
|
||||
options:
|
||||
# - label: Follow our [Code of Conduct](https://github.com/elk-zone/elk/blob/main/CODE_OF_CONDUCT.md).
|
||||
# required: true
|
||||
# - label: Read the [Contributing Guidelines](https://github.com/elk-zone/elk/blob/main/CONTRIBUTING.md).
|
||||
# required: true
|
||||
- label: Check that there isn't [already an issue](https://github.com/elk-zone/elk/issues) that reports the same bug to avoid creating a duplicate.
|
||||
required: true
|
||||
- label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/elk-zone/elk/discussions) or join our [Discord Chat Server](https://chat.elk.zone).
|
||||
required: true
|
||||
- label: Providing a screenshot or video to reproduce the issue or show visually what was meant.
|
||||
required: true
|
||||
- label: I am willing to provide a PR.
|
||||
|
||||
- type: textarea
|
||||
id: bug-description
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: A clear and concise description of what the bug is.
|
||||
placeholder: I am doing ... What I expect is ... What actually happening is ...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: reproduction
|
||||
attributes:
|
||||
label: Reproduction video or screenshot
|
||||
description: |
|
||||
A video or screenshot that visually shows the issue.
|
||||
**Tip:** You can attach images or recordings files by clicking this area to highlight it and then dragging files in.
|
||||
|
||||
- type: textarea
|
||||
id: additional-context
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: |
|
||||
Anything else relevant? Please tell us here, e.g. your used web browser and/or you are on desktop or mobile.
|
||||
**Tip:** You can attach images or recordings files by clicking this area to highlight it and then dragging files in.
|
5
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
5
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
name: 🚀 New feature proposal
|
||||
about: Propose a new feature
|
||||
labels: 's: pending triage'
|
||||
---
|
35
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
35
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
|
@ -1,35 +0,0 @@
|
|||
name: 🚀 New feature proposal
|
||||
description: Propose a new feature
|
||||
labels: ['s: pending triage'] # This will automatically assign the 's: pending triage' label
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: Thanks for your interest in the project and taking the time to fill out this feature report!
|
||||
|
||||
- type: textarea
|
||||
id: feature-description
|
||||
attributes:
|
||||
label: Clear and concise description of the problem
|
||||
description: 'As a user I want [goal / wish] so that [benefit]. If you intend to submit a PR for this issue, tell us in the description. Thanks!'
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: suggested-solution
|
||||
attributes:
|
||||
label: Suggested solution
|
||||
description: 'In section [xy] we could provide following feature...'
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: alternative
|
||||
attributes:
|
||||
label: Alternative
|
||||
description: Clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
- type: textarea
|
||||
id: additional-context
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Any other context about the feature request here.
|
5
.github/ISSUE_TEMPLATE/freestyle.md
vendored
5
.github/ISSUE_TEMPLATE/freestyle.md
vendored
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
name: Freestyle Report
|
||||
about: Create a report to help us improve
|
||||
labels: 'pending triage' # This will automatically assign the 'pending triage' label
|
||||
---
|
26
.github/PULL_REQUEST_TEMPLATE.md
vendored
26
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -1,26 +0,0 @@
|
|||
<!-- Thank you for contributing! -->
|
||||
|
||||
### Description
|
||||
|
||||
<!-- Please insert your description here and provide especially info about the "what" this PR is solving -->
|
||||
|
||||
### Additional context
|
||||
|
||||
<!-- e.g. is there anything you'd like reviewers to focus on? -->
|
||||
|
||||
---
|
||||
|
||||
### What is the purpose of this pull request? <!-- (put an "X" next to an item) -->
|
||||
|
||||
- [ ] Bug fix
|
||||
- [ ] New Feature
|
||||
- [ ] Documentation update
|
||||
- [ ] Translations update
|
||||
- [ ] Other
|
||||
|
||||
### Before submitting the PR, please make sure you do the following
|
||||
|
||||
- [ ] Read the [Contributing Guidelines](https://github.com/elk-zone/elk/blob/main/CONTRIBUTING.md).
|
||||
- [ ] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
|
||||
- [ ] Provide related snapshots or videos.
|
||||
- [ ] Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`).
|
|
@ -9,7 +9,7 @@ const serverName = $computed(() => getServerName(account))
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<p line-clamp-1 whitespace-pre-wrap break-all text-secondary-light dir="ltr">
|
||||
<p line-clamp-1 whitespace-pre-wrap break-all text-secondary-light leading-tight dir="ltr">
|
||||
<!-- fix: #274 only line-clamp-1 can be used here, using text-ellipsis is not valid -->
|
||||
<span text-secondary>{{ getShortHandle(account) }}</span>
|
||||
<span v-if="serverName" text-secondary-light>@{{ serverName }}</span>
|
||||
|
|
|
@ -20,6 +20,7 @@ const relationship = $(useRelationship(account))
|
|||
|
||||
const namedFields = ref<mastodon.v1.AccountField[]>([])
|
||||
const iconFields = ref<mastodon.v1.AccountField[]>([])
|
||||
const hasHeader = $computed(() => !account.header.endsWith('/original/missing.png'))
|
||||
|
||||
function getFieldIconTitle(fieldName: string) {
|
||||
return fieldName === 'Joined' ? t('account.joined') : fieldName
|
||||
|
@ -85,9 +86,9 @@ const isNotifiedOnPost = $computed(() => !!relationship?.notifying)
|
|||
|
||||
<template>
|
||||
<div flex flex-col>
|
||||
<button border="b base" z-1>
|
||||
<img h-50 height="200" w-full object-cover :src="account.header" :alt="t('account.profile_description', [account.username])" @click="previewHeader">
|
||||
</button>
|
||||
<component :is="hasHeader ? 'button' : 'div'" border="b base" z-1 @click="hasHeader ? previewHeader() : undefined">
|
||||
<img h-50 height="200" w-full object-cover :src="account.header" :alt="t('account.profile_description', [account.username])">
|
||||
</component>
|
||||
<div p4 mt--18 flex flex-col gap-4>
|
||||
<div relative>
|
||||
<div flex="~ col gap-2 1">
|
||||
|
|
|
@ -19,10 +19,8 @@ defineProps<{
|
|||
</NuxtLink>
|
||||
<div flex-auto />
|
||||
<div flex items-center>
|
||||
<NuxtLink :to="getAccountRoute(account.moved as any)">
|
||||
<button btn-solid h-fit>
|
||||
{{ $t('account.go_to_profile') }}
|
||||
</button>
|
||||
<NuxtLink :to="getAccountRoute(account.moved as any)" btn-solid inline-block h-fit>
|
||||
{{ $t('account.go_to_profile') }}
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
|
|
27
components/common/CommonPreviewPrompt.vue
Normal file
27
components/common/CommonPreviewPrompt.vue
Normal file
|
@ -0,0 +1,27 @@
|
|||
<script setup lang="ts">
|
||||
const build = useBuildInfo()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
m-2 p5 bg-rose:10 relative
|
||||
rounded-lg of-hidden
|
||||
flex="~ col gap-3"
|
||||
>
|
||||
<h2 font-bold text-rose>
|
||||
{{ $t('help.build_preview.title') }}
|
||||
</h2>
|
||||
<p>
|
||||
<i18n-t keypath="help.build_preview.desc1">
|
||||
<NuxtLink :href="`https://github.com/elk-zone/elk/commit/${build.commit}`" target="_blank" text-rose hover:underline>
|
||||
<code>{{ build.commit.slice(0, 7) }}</code>
|
||||
</NuxtLink>
|
||||
</i18n-t>
|
||||
</p>
|
||||
<p>{{ $t('help.build_preview.desc2') }}</p>
|
||||
<p font-bold>
|
||||
{{ $t('help.build_preview.desc3') }}
|
||||
</p>
|
||||
<div i-ri-git-pull-request-line absolute text-10em bottom--10 inset-ie--10 text-rose op10 class="-z-1" />
|
||||
</div>
|
||||
</template>
|
37
components/nav/NavLogo.vue
Normal file
37
components/nav/NavLogo.vue
Normal file
|
@ -0,0 +1,37 @@
|
|||
<template>
|
||||
<span shrink-0 aspect="1/1" sm:h-8 xl:h-10 class="rtl-flip"><svg
|
||||
xmlns="http://www.w3.org/2000/svg" w-full
|
||||
aspect="1/1" sm:h-8 xl:h-10 sm:w-8 xl:w-10 viewBox="0 0 250 250" fill="none"
|
||||
>
|
||||
<mask id="a" width="240" height="234" x="4" y="1" maskUnits="userSpaceOnUse" style="mask-type:alpha">
|
||||
<path
|
||||
fill="#D9D9D9"
|
||||
d="M244 123c0 64.617-38.383 112-103 112-64.617 0-103-30.883-103-95.5C38 111.194-8.729 36.236 8 16 29.46-9.959 88.689 6 125 6c64.617 0 119 52.383 119 117Z"
|
||||
/>
|
||||
</mask>
|
||||
<g mask="url(#a)">
|
||||
<path
|
||||
class="body"
|
||||
d="M116.94 88.1c-13.344 1.552-20.436-2.019-24.706 10.71 0 0 14.336 21.655 52.54 21.112-2.135 8.848-1.144 15.368-1.144 23.207 0 26.079-20.589 48.821-65.961 48.821-23.03 0-51.015 4.191-72.367 15.911-15.175 8.305-27.048 20.336-32.302 37.023l5.956 8.461 11.4.155v47.889l-13.91 21.966L-19.556 387h13.192l1.144-51.227c6.558-3.881 21.58-13.971 34.391-29.494 17.386-20.879 30.731-51.227 15.022-88.793l11.744-5.045c12.887 30.814 8.388 57.514-2.898 79.013 21.58-.698 40.11-2.095 55.819-4.734l-3.584-43.698 12.659-1.087L129.98 387h13.116l2.212-94.459c10.447-4.502 34.239-21.034 45.372-78.47 1.372-6.986 2.135-12.885 2.516-17.93 1.754-12.806 2.745-27.243 3.051-43.698l-18.683-5.976h57.42l5.567-12.807c-5.414.233-11.896-2.639-11.896-2.639l1.297-6.209H242l-65.199-34.384c-7.244 2.794-14.87 6.442-20.208 10.866-4.27-3.105-19.063-12.807-39.653-13.195Z"
|
||||
/>
|
||||
<path
|
||||
class="wood"
|
||||
d="M6.217 24.493 18.494 21c5.948 21.577 13.345 33.375 22.648 39.352 8.388 5.099 19.75 5.239 31.799 4.579-3.508-1.164-6.787-2.794-9.837-5.045-6.787-5.045-12.582-13.428-16.929-28.64l12.201-3.649c3.279 11.488 7.092 18.085 12.201 21.888 5.11 3.726 11.286 4.657 18.606 5.433 13.726 1.553 30.884 2.174 52.312 12.264 2.898 1.086 5.872 2.483 8.769 4.036-.381-.776-.762-1.553-1.296-2.406-3.66-5.822-10.828-11.953-24.097-16.92l4.27-12.109c21.581 7.917 30.121 19.171 33.553 28.097 3.965 10.168 1.525 18.124 1.525 18.124-3.05 1.009-6.1 2.406-9.608 3.492-6.634-4.579-12.887-8.033-18.835-10.75-21.962-8.304-43.466-2.638-62.53-.853-14.336 1.32-27.452.698-38.814-6.598-11.21-7.14-21.047-20.8-28.215-46.802Z"
|
||||
/>
|
||||
<path
|
||||
class="wood"
|
||||
d="M90.098 45.294c-2.516-5.744-4.041-12.807-3.355-21.5l12.659.932c-.763 10.555 2.897 17.696 7.015 22.353-5.338-.931-10.447-1.04-16.319-1.785ZM170.167 43.974l8.312-9.702c21.58 19.094 8.159 46.415 8.159 46.415l-11.819-1.32c-.382-6.24-1.144-17.836-6.635-24.371 3.584 1.84 6.635 3.865 9.99 6.908 0-5.666-1.754-12.341-8.007-17.93Z"
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
svg path.wood {
|
||||
fill: var(--c-text-secondary);
|
||||
}
|
||||
svg path.body {
|
||||
fill: var(--c-text-base);
|
||||
}
|
||||
</style>
|
|
@ -53,7 +53,7 @@ const noUserVisual = computed(() => isHydrated.value && props.userOnly && !curre
|
|||
:tabindex="noUserDisable ? -1 : null"
|
||||
@click="$scrollToTop"
|
||||
>
|
||||
<CommonTooltip :disabled="!isMediumScreen" :content="text" placement="right">
|
||||
<CommonTooltip :disabled="!isMediumOrLargeScreen" :content="text" placement="right">
|
||||
<div
|
||||
flex items-center gap4
|
||||
w-fit rounded-3
|
||||
|
|
|
@ -22,14 +22,14 @@ router.afterEach(() => {
|
|||
to="/"
|
||||
external
|
||||
>
|
||||
<img :alt="$t('app_logo')" src="/logo.svg" shrink-0 aspect="1/1" sm:h-8 xl:h-10 class="rtl-flip">
|
||||
<NavLogo shrink-0 aspect="1/1" sm:h-8 xl:h-10 class="rtl-flip" />
|
||||
<div hidden xl:block>
|
||||
{{ $t('app_name') }} <sup text-sm italic text-secondary mt-1>{{ env === 'release' ? 'alpha' : env }}</sup>
|
||||
</div>
|
||||
</NuxtLink>
|
||||
<div
|
||||
hidden xl:flex items-center me-8 mt-2
|
||||
:class="{ 'pointer-events-none op40': !back || back === '/', 'xl:flex': $route.name !== 'tag' }"
|
||||
:class="{ 'pointer-events-none op0': !back || back === '/', 'xl:flex': $route.name !== 'tag' }"
|
||||
>
|
||||
<NuxtLink
|
||||
:aria-label="$t('nav.back')"
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
<script setup>
|
||||
const disabled = computed(() => !isHydrated.value || !currentUser.value)
|
||||
const disabledVisual = computed(() => isHydrated.value && !currentUser.value)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<button
|
||||
flex="~ gap2 center"
|
||||
w-9 h-9 py2
|
||||
xl="w-auto h-auto"
|
||||
rounded-3
|
||||
cursor-pointer disabled:pointer-events-none
|
||||
text-primary
|
||||
border-1 border-primary
|
||||
:class="disabledVisual ? 'op25' : 'hover:bg-primary hover:text-inverted'"
|
||||
:disabled="disabled"
|
||||
@click="openPublishDialog()"
|
||||
>
|
||||
<div i-ri:quill-pen-line />
|
||||
<span hidden xl:block>{{ $t('action.compose') }}</span>
|
||||
</button>
|
||||
</template>
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { EditorContent } from '@tiptap/vue-3'
|
||||
import stringLength from 'string-length'
|
||||
import type { mastodon } from 'masto'
|
||||
import type { Draft } from '~/types'
|
||||
|
||||
|
@ -62,7 +63,7 @@ const { editor } = useTiptap({
|
|||
onPaste: handlePaste,
|
||||
})
|
||||
const characterCount = $computed(() => {
|
||||
let length = htmlToText(editor.value?.getHTML() || '').length
|
||||
let length = stringLength(htmlToText(editor.value?.getHTML() || ''))
|
||||
|
||||
if (draft.mentions) {
|
||||
// + 1 is needed as mentions always need a space seperator at the end
|
||||
|
|
|
@ -42,6 +42,12 @@ const copyLink = async (status: mastodon.v1.Status) => {
|
|||
await clipboard.copy(url)
|
||||
}
|
||||
|
||||
const copyOriginalLink = async (status: mastodon.v1.Status) => {
|
||||
const url = status.url
|
||||
if (url)
|
||||
await clipboard.copy(url)
|
||||
}
|
||||
|
||||
const { share, isSupported: isShareSupported } = useShare()
|
||||
const shareLink = async (status: mastodon.v1.Status) => {
|
||||
const url = getPermalinkUrl(status)
|
||||
|
@ -169,6 +175,13 @@ const showFavoritedAndBoostedBy = () => {
|
|||
@click="copyLink(status)"
|
||||
/>
|
||||
|
||||
<CommonDropdownItem
|
||||
:text="$t('menu.copy_original_link_to_post')"
|
||||
icon="i-ri:links-fill"
|
||||
:command="command"
|
||||
@click="copyOriginalLink(status)"
|
||||
/>
|
||||
|
||||
<CommonDropdownItem
|
||||
v-if="isShareSupported"
|
||||
:text="$t('menu.share_post')"
|
||||
|
|
|
@ -65,9 +65,11 @@ const video = ref<HTMLVideoElement | undefined>()
|
|||
const prefersReducedMotion = usePreferredReducedMotion()
|
||||
const isAudio = $computed(() => attachment.type === 'audio')
|
||||
|
||||
const enableAutoplay = usePreferences('enableAutoplay')
|
||||
|
||||
useIntersectionObserver(video, (entries) => {
|
||||
const ready = video.value?.dataset.ready === 'true'
|
||||
if (prefersReducedMotion.value === 'reduce') {
|
||||
if (prefersReducedMotion.value === 'reduce' || !enableAutoplay.value) {
|
||||
if (ready && !video.value?.paused)
|
||||
video.value?.pause()
|
||||
|
||||
|
|
|
@ -469,6 +469,7 @@ function transformCollapseMentions(status?: mastodon.v1.Status, inReplyToStatus?
|
|||
return node
|
||||
const mentions: (Node | undefined)[] = []
|
||||
const children = node.children as Node[]
|
||||
let trimContentStart: (() => void) | undefined
|
||||
for (const child of children) {
|
||||
// mention
|
||||
if (isMention(child)) {
|
||||
|
@ -480,8 +481,11 @@ function transformCollapseMentions(status?: mastodon.v1.Status, inReplyToStatus?
|
|||
}
|
||||
// other content, stop collapsing
|
||||
else {
|
||||
if (child.type === TEXT_NODE)
|
||||
child.value = child.value.trimStart()
|
||||
if (child.type === TEXT_NODE) {
|
||||
trimContentStart = () => {
|
||||
child.value = child.value.trimStart()
|
||||
}
|
||||
}
|
||||
// remove <br> after mention
|
||||
if (child.name === 'br')
|
||||
mentions.push(undefined)
|
||||
|
@ -495,6 +499,7 @@ function transformCollapseMentions(status?: mastodon.v1.Status, inReplyToStatus?
|
|||
let mentionsCount = 0
|
||||
let contextualMentionsCount = 0
|
||||
let removeNextSpacing = false
|
||||
|
||||
const contextualMentions = mentions.filter((mention) => {
|
||||
if (!mention)
|
||||
return false
|
||||
|
@ -508,24 +513,30 @@ function transformCollapseMentions(status?: mastodon.v1.Status, inReplyToStatus?
|
|||
mentionsCount++
|
||||
if (inReplyToStatus) {
|
||||
const mentionHandle = getMentionHandle(mention)
|
||||
if (inReplyToStatus.account.acct === mentionHandle || inReplyToStatus.mentions.some(m => m.acct === mentionHandle))
|
||||
if (inReplyToStatus.account.acct === mentionHandle || inReplyToStatus.mentions.some(m => m.acct === mentionHandle)) {
|
||||
removeNextSpacing = true
|
||||
return false
|
||||
}
|
||||
}
|
||||
contextualMentionsCount++
|
||||
}
|
||||
return true
|
||||
})
|
||||
}) as Node[]
|
||||
|
||||
// We have a special case for single mentions that are part of a reply.
|
||||
// We already have the replying to badge in this case or the status is connected to the previous one.
|
||||
// This is needed because the status doesn't included the in Reply to handle, only the account id.
|
||||
// But this covers the majority of cases.
|
||||
const showMentions = !(contextualMentionsCount === 0 || (mentionsCount === 1 && status?.inReplyToAccountId))
|
||||
const grouped = contextualMentionsCount > 2
|
||||
if (!showMentions || grouped)
|
||||
trimContentStart?.()
|
||||
|
||||
const contextualChildren = children.slice(mentions.length)
|
||||
const mentionNodes = showMentions ? (grouped ? [h('mention-group', null, ...contextualMentions)] : contextualMentions) : []
|
||||
return {
|
||||
...node,
|
||||
children: showMentions ? [h('mention-group', null, ...contextualMentions), ...contextualChildren] : contextualChildren,
|
||||
children: [...mentionNodes, ...contextualChildren],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,3 +4,4 @@ export const breakpoints = useBreakpoints(breakpointsTailwind)
|
|||
|
||||
export const isSmallScreen = breakpoints.smallerOrEqual('md')
|
||||
export const isMediumScreen = breakpoints.smallerOrEqual('lg')
|
||||
export const isMediumOrLargeScreen = breakpoints.between('sm', 'xl')
|
||||
|
|
|
@ -8,6 +8,7 @@ export interface PreferencesSettings {
|
|||
hideFavoriteCount: boolean
|
||||
hideFollowerCount: boolean
|
||||
grayscaleMode: boolean
|
||||
enableAutoplay: boolean
|
||||
experimentalVirtualScroller: boolean
|
||||
experimentalGitHubCards: boolean
|
||||
experimentalUserPicker: boolean
|
||||
|
@ -58,6 +59,7 @@ export const DEFAULT__PREFERENCES_SETTINGS: PreferencesSettings = {
|
|||
hideFavoriteCount: false,
|
||||
hideFollowerCount: false,
|
||||
grayscaleMode: false,
|
||||
enableAutoplay: true,
|
||||
experimentalVirtualScroller: true,
|
||||
experimentalGitHubCards: true,
|
||||
experimentalUserPicker: true,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { withoutProtocol } from 'ufo'
|
||||
import type { mastodon } from 'masto'
|
||||
import type { EffectScope, Ref } from 'vue'
|
||||
import type { MaybeComputedRef, RemovableRef } from '@vueuse/core'
|
||||
|
@ -68,7 +69,7 @@ const publicInstance = ref<ElkInstance | null>(null)
|
|||
export const currentInstance = computed<null | ElkInstance>(() => currentUser.value ? instances.value[currentUser.value.server] ?? null : publicInstance.value)
|
||||
|
||||
export function getInstanceDomain(instance: ElkInstance) {
|
||||
return instance.accountDomain || instance.uri
|
||||
return instance.accountDomain || withoutProtocol(instance.uri)
|
||||
}
|
||||
|
||||
export const publicServer = ref('')
|
||||
|
@ -322,7 +323,7 @@ export function clearUserLocalStorage(account?: mastodon.v1.Account) {
|
|||
if (!account)
|
||||
return
|
||||
|
||||
const id = `${account.acct}@${currentInstance.value?.uri || currentServer.value}`
|
||||
const id = `${account.acct}@${currentInstance.value ? getInstanceDomain(currentInstance.value) : currentServer.value}`
|
||||
|
||||
// @ts-expect-error bind value to the function
|
||||
const cacheMap = useUserLocalStorage._ as Map<string, UseUserLocalStorageCache> | undefined
|
||||
|
|
59
docs/content/2.deployment/1.netlify.md
Normal file
59
docs/content/2.deployment/1.netlify.md
Normal file
|
@ -0,0 +1,59 @@
|
|||
# Netlify and Cloudflare
|
||||
|
||||
Want to host Elk for your Mastodon instance? You came to the right place!
|
||||
|
||||
For this guide we're going to use Netlify for hosting the app, and Cloudflare for key value storage. Both of which can be used on their free tiers if your instance is small.
|
||||
|
||||
## Forking Elk
|
||||
|
||||
In order to use Netlify with Elk, we'll need to fork the Elk repo.
|
||||
|
||||
Fork the repository from [https://github.com/elk-zone/elk](https://github.com/elk-zone/elk). Make sure you deselect "Copy the main branch only" if you want to use the stable `release` branch.
|
||||
![The settings to use for forking the Elk repository](/docs/images/selfhosting-guide/github-fork.png)
|
||||
|
||||
## Importing the Elk repo into Netlify
|
||||
|
||||
On the main page of your Netlify dashboard, press the "Import from GitHub" button. Point it to your Elk fork.
|
||||
|
||||
On the third page with Site settings, change the "Branch to deploy" to `release` if you wish. Press "Deploy site".
|
||||
|
||||
That's one step done! Keep the tab open while we hop over to CloudFlare for a bit.
|
||||
|
||||
## Setting up CloudFlare Workers KV
|
||||
|
||||
From your CloudFlare dashboard, open "Workers". If this is your first time opening this tab, CloudFlare will ask you to set up a free custom Cloudflare Workers subdomain. Follow the instructions.
|
||||
|
||||
Go to "KV" and create a new namespace.
|
||||
|
||||
Then go to "Overview" and click on API tokens. We want to create an API token that will let Elk modify our newly made Worker. Click on "Create token" and then in the Custom token section click "Get started".
|
||||
|
||||
The only permission that we'll need is to edit the Workers KV Storage.
|
||||
![The settings to use for the CloudFlare API token](/docs/images/selfhosting-guide/cf-api-token-settings.png)
|
||||
|
||||
Save the newly made token in a safe spot. Keep the tab open while we'll configure the environment variables on Netlify.
|
||||
|
||||
## Setting the environment variables on Netlify
|
||||
|
||||
On your project page, go to "Site settings", and open the "Environment variables" section.
|
||||
|
||||
There are 5 environment variables to add.
|
||||
|
||||
| Environment variable | What it is |
|
||||
|---|---|
|
||||
| NUXT_CLOUDFLARE_ACCOUNT_ID | This is your CloudFlare Account ID. You can find it in "Workers > Overview". |
|
||||
| NUXT_CLOUDFLARE_API_TOKEN | Put your CloudFlare API token here. |
|
||||
| NUXT_CLOUDFLARE_NAMESPACE_ID | This is your CloudFlare KV Namespace ID. You can find it in "Workers > KV". |
|
||||
| NUXT_STORAGE_DRIVER | Because we're using CloudFlare, we'll need to set this to `cloudflare`. |
|
||||
| NUXT_PUBLIC_DEFAULT_SERVER | This is the address of the Mastodon instance that will show up when a user visits your Elk deployment and is not logged in. If you don't make that variable, it will point to `m.webtoo.ls` by default. |
|
||||
|
||||
That's it! All that's left to do is...
|
||||
|
||||
## Deploy Elk!
|
||||
On your project page open the Deploys tab, click on "Trigger deploy" and "Deploy site". In a few minutes Elk should be up and running!
|
||||
|
||||
## Use a custom domain
|
||||
If you want to use a custom domain, go to "Domain settings" on your Netlify project page, and press "Add custom domain". If your domain is not bought from Netlify, it will ask you to add a CNAME record. Do that.
|
||||
|
||||
Once the custom domain is added, you'll need to add an SSL/TLS certificate. At the bottom of the page press "Verify DNS configuration" and if it succeeds, press "Provision certificate". If that fails, you may need to wait some time until your DNS propagetes.
|
||||
|
||||
And that's it! Enjoy your instance's Elk!
|
BIN
docs/public/images/selfhosting-guide/cf-api-token-settings.png
Normal file
BIN
docs/public/images/selfhosting-guide/cf-api-token-settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
BIN
docs/public/images/selfhosting-guide/github-fork.png
Normal file
BIN
docs/public/images/selfhosting-guide/github-fork.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
|
@ -2,7 +2,7 @@
|
|||
import { usePreferences } from '~/composables/settings'
|
||||
|
||||
const route = useRoute()
|
||||
const userSettings = useUserSettings()
|
||||
const info = useBuildInfo()
|
||||
|
||||
const wideLayout = computed(() => route.meta.wideLayout ?? false)
|
||||
|
||||
|
@ -63,8 +63,10 @@ const isGrayscale = usePreferences('grayscaleMode')
|
|||
<div sticky top-0 h-screen flex="~ col" gap-2 py3 ms-2>
|
||||
<slot name="right">
|
||||
<div flex-auto />
|
||||
|
||||
<PwaPrompt />
|
||||
<PwaInstallPrompt />
|
||||
<LazyCommonPreviewPrompt v-if="info.env === 'preview'" />
|
||||
<NavFooter />
|
||||
</slot>
|
||||
</div>
|
||||
|
|
|
@ -330,6 +330,7 @@
|
|||
},
|
||||
"notifications_settings": "Benachrichtigungen",
|
||||
"preferences": {
|
||||
"enable_autoplay": "Autoplay aktivieren",
|
||||
"github_cards": "GitHub Cards",
|
||||
"hide_boost_count": "Boost-Zähler ausblenden",
|
||||
"hide_favorite_count": "Favoritenzahl ausblenden",
|
||||
|
|
|
@ -117,6 +117,7 @@
|
|||
"block_account": "Block {0}",
|
||||
"block_domain": "Block domain {0}",
|
||||
"copy_link_to_post": "Copy link to this post",
|
||||
"copy_original_link_to_post": "Copy original link to this post",
|
||||
"delete": "Delete",
|
||||
"delete_and_redraft": "Delete & re-draft",
|
||||
"direct_message_account": "Direct message {0}",
|
||||
|
|
|
@ -156,6 +156,12 @@
|
|||
"unsupported_file_format": "Unsupported file format"
|
||||
},
|
||||
"help": {
|
||||
"build_preview": {
|
||||
"desc1": "You are currently viewing a preview version of Elk from the community - {0}.",
|
||||
"desc2": "It may contains unreviewed or even malicious changes.",
|
||||
"desc3": "Don't log in with your real account.",
|
||||
"title": "Preview deploy"
|
||||
},
|
||||
"desc_highlight": "Expect some bugs and missing features here and there.",
|
||||
"desc_para1": "Thanks for your interest in trying out Elk, our work-in-progress Mastodon web client!",
|
||||
"desc_para2": "we are working hard on the development and improving it over time.",
|
||||
|
@ -172,6 +178,7 @@
|
|||
"block_account": "Block {0}",
|
||||
"block_domain": "Block domain {0}",
|
||||
"copy_link_to_post": "Copy link to this post",
|
||||
"copy_original_link_to_post": "Copy original link to this post",
|
||||
"delete": "Delete",
|
||||
"delete_and_redraft": "Delete & re-draft",
|
||||
"direct_message_account": "Direct message {0}",
|
||||
|
@ -282,7 +289,8 @@
|
|||
"sponsors": "Sponsors",
|
||||
"sponsors_body_1": "Elk is made possible thanks the generous sponsoring and help of:",
|
||||
"sponsors_body_2": "And all the companies and individuals sponsoring Elk Team and the members.",
|
||||
"sponsors_body_3": "If you're enjoying the app, consider sponsoring us:"
|
||||
"sponsors_body_3": "If you're enjoying the app, consider sponsoring us:",
|
||||
"version": "Version"
|
||||
},
|
||||
"account_settings": {
|
||||
"description": "Edit your account settings in Mastodon UI",
|
||||
|
@ -360,6 +368,7 @@
|
|||
},
|
||||
"notifications_settings": "Notifications",
|
||||
"preferences": {
|
||||
"enable_autoplay": "Enable Autoplay",
|
||||
"github_cards": "GitHub Cards",
|
||||
"grayscale_mode": "Grayscale mode",
|
||||
"hide_boost_count": "Hide boost count",
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
"muted_users": "Utilisateur·ice·s masqué·e·s",
|
||||
"muting": "Masqué·e",
|
||||
"mutuals": "Abonné·e·s",
|
||||
"notifications_on_post_disable": "Arrêtez de me notifier lorsque {username} publie",
|
||||
"notifications_on_post_enable": "M'avertir lorsque {username} publie",
|
||||
"notify_on_post": "",
|
||||
"pinned": "Épinglés",
|
||||
"posts": "Messages",
|
||||
"posts_count": "{0} Messages",
|
||||
|
@ -35,14 +38,18 @@
|
|||
"profile_unavailable": "Profil non accessible",
|
||||
"unblock": "Débloquer",
|
||||
"unfollow": "Ne plus suivre",
|
||||
"unmute": "Réafficher"
|
||||
"unmute": "Réafficher",
|
||||
"view_other_followers": "Les abonné·e·s d'autres instances peuvent ne pas être affiché·e·s.",
|
||||
"view_other_following": "Les suivis d'autres instances peuvent ne pas être affichés."
|
||||
},
|
||||
"action": {
|
||||
"apply": "Appliquer",
|
||||
"bookmark": "Ajouter aux marque-pages",
|
||||
"bookmarked": "Ajouté aux marque-pages",
|
||||
"boost": "Partager",
|
||||
"boost_count": "{0}",
|
||||
"boosted": "Partagé",
|
||||
"clear_publish_failed": "Effacer les erreurs de publication",
|
||||
"clear_upload_failed": "Effacer les erreurs de téléversement de fichier",
|
||||
"close": "Fermer",
|
||||
"compose": "Composer",
|
||||
|
@ -50,12 +57,14 @@
|
|||
"edit": "Éditer",
|
||||
"enter_app": "Entrer dans l'application",
|
||||
"favourite": "J'aime",
|
||||
"favourite_count": "{0}",
|
||||
"favourited": "Aimé",
|
||||
"more": "Plus",
|
||||
"next": "Suivant",
|
||||
"prev": "Précédent",
|
||||
"publish": "Publier",
|
||||
"reply": "Répondre",
|
||||
"reply_count": "{0}",
|
||||
"reset": "Réinitialiser",
|
||||
"save": "Enregistrer",
|
||||
"save_changes": "Enregistrer les changements",
|
||||
|
@ -94,6 +103,16 @@
|
|||
"drafts": "Brouillons ({v})"
|
||||
},
|
||||
"confirm": {
|
||||
"block_account": {
|
||||
"cancel": "Annuler",
|
||||
"confirm": "Bloquer",
|
||||
"title": "Voulez-vous vraiment bloquer {0} ?"
|
||||
},
|
||||
"block_domain": {
|
||||
"cancel": "Annuler",
|
||||
"confirm": "Bloquer",
|
||||
"title": "Voulez-vous vraiment bloquer {0} ?"
|
||||
},
|
||||
"common": {
|
||||
"cancel": "Non",
|
||||
"confirm": "Oui",
|
||||
|
@ -103,11 +122,33 @@
|
|||
"cancel": "Annuler",
|
||||
"confirm": "Supprimer",
|
||||
"title": "Certain·e de vouloir supprimer ce message ?"
|
||||
},
|
||||
"mute_account": {
|
||||
"cancel": "Annuler",
|
||||
"confirm": "Mettre en sourdine",
|
||||
"title": "Voulez-vous vraiment mettre en sourdine {0} ?"
|
||||
},
|
||||
"show_reblogs": {
|
||||
"cancel": "Annuler",
|
||||
"confirm": "Afficher",
|
||||
"title": "Voulez-vous vraiment afficher les partages de {0} ?"
|
||||
},
|
||||
"unfollow": {
|
||||
"cancel": "Annuler",
|
||||
"confirm": "Se désabonner",
|
||||
"title": "Voulez-vous vraiment vous désabonner ?"
|
||||
}
|
||||
},
|
||||
"conversation": {
|
||||
"with": "avec"
|
||||
},
|
||||
"custom_cards": {
|
||||
"stackblitz": {
|
||||
"lines": "Lignes {0}",
|
||||
"open": "Ouvrir",
|
||||
"snippet_from": "Extrait de {0}"
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"account_not_found": "Compte {0} non trouvé",
|
||||
"explore-list-empty": "Pas de tendance en ce moment. Revenez plus tard!",
|
||||
|
@ -117,6 +158,12 @@
|
|||
"unsupported_file_format": "Format de fichier non supporté"
|
||||
},
|
||||
"help": {
|
||||
"build_preview": {
|
||||
"desc1": "Vous consultez actuellement une version d'aperçu d'Elk de la communauté - {0}.",
|
||||
"desc2": "Elle peut contenir des modifications non révisées voire même malveillantes.",
|
||||
"desc3": "Ne vous connectez pas avec votre compte réel.",
|
||||
"title": "Aperçu du déploiement"
|
||||
},
|
||||
"desc_highlight": "Il est possible de rencontrer, par-ci par-là, quelques bugs et fonctionnalités manquantes.",
|
||||
"desc_para1": "Merci de l'intérêt pour Elk, notre client Mastodon en cours de développement !",
|
||||
"desc_para2": "Nous travaillons dur sur le développement et l'améliorons au fur et à mesure. Nous allons open-sourcer l'application une fois qu'elle sera prête pour un usage public.",
|
||||
|
@ -133,11 +180,15 @@
|
|||
"block_account": "Bloquer {0}",
|
||||
"block_domain": "Bloquer le domaine {0}",
|
||||
"copy_link_to_post": "Copier le lien du message",
|
||||
"copy_original_link_to_post": "Copiez le lien d'origine vers ce message",
|
||||
"delete": "Supprimer",
|
||||
"delete_and_redraft": "Supprimer et réécrire",
|
||||
"delete_confirm": {
|
||||
"cancel": ""
|
||||
},
|
||||
"direct_message_account": "Message direct à {0}",
|
||||
"edit": "Éditer",
|
||||
"hide_reblogs": "Cacher les boosts de {0}",
|
||||
"hide_reblogs": "Cacher les partages de {0}",
|
||||
"mention_account": "Mentionner {0}",
|
||||
"mute_account": "Mettre en sourdine {0}",
|
||||
"mute_conversation": "Message muet",
|
||||
|
@ -164,6 +215,7 @@
|
|||
"blocked_users": "Utilisateur·ice·s bloqué·e·s",
|
||||
"bookmarks": "Marque-pages",
|
||||
"built_at": "Dernière compilation {0}",
|
||||
"compose": "Composer",
|
||||
"conversations": "Conversations",
|
||||
"explore": "Explorer",
|
||||
"favourites": "Favoris",
|
||||
|
@ -238,9 +290,10 @@
|
|||
"sponsor_action": "Soutenez-nous",
|
||||
"sponsor_action_desc": "Pour financer l'équipe développant Elk",
|
||||
"sponsors": "Donateur·ice·s",
|
||||
"sponsors_body_1": "Elk existe grâce au généreux soutien de :",
|
||||
"sponsors_body_1": "Elk existe grâce aux généreux soutien de :",
|
||||
"sponsors_body_2": "Et toutes les personnes et sociétés soutenant l'équipe Elk et ses membres.",
|
||||
"sponsors_body_3": "Si vous appréciez l'application, envisagez de nous soutenir :"
|
||||
"sponsors_body_3": "Si vous appréciez l'application, envisagez de nous soutenir :",
|
||||
"version": "Version"
|
||||
},
|
||||
"account_settings": {
|
||||
"description": "Modifiez les paramètres de votre compte dans l'interface de Mastodon",
|
||||
|
@ -260,7 +313,8 @@
|
|||
"xl": "Très grande",
|
||||
"xs": "Très petite"
|
||||
},
|
||||
"system_mode": "Système"
|
||||
"system_mode": "Système",
|
||||
"theme_color": "Couleur du thème"
|
||||
},
|
||||
"language": {
|
||||
"display_language": "Langue d'affichage",
|
||||
|
@ -295,7 +349,8 @@
|
|||
"clear_error": "Effacer l'erreur",
|
||||
"permission_denied": "Autorisation refusée : activez les notifications dans votre navigateur.",
|
||||
"request_error": "Une erreur s'est produite lors de la demande d'abonnement, réessayez et si l'erreur persiste, veuillez signaler le problème auprès du dépôt Elk.",
|
||||
"title": "Impossible de s'abonner aux notifications push"
|
||||
"title": "Impossible de s'abonner aux notifications push",
|
||||
"too_many_registrations": "En raison des limitations du navigateur, Elk ne peut pas utiliser le service de notifications push pour plusieurs comptes sur différents serveurs. \nVous devez vous désabonner des notifications push sur un autre compte et réessayer."
|
||||
},
|
||||
"title": "Paramètres des notifications push",
|
||||
"undo_settings": "Annuler les changements de paramètres",
|
||||
|
@ -316,7 +371,9 @@
|
|||
},
|
||||
"notifications_settings": "Notifications",
|
||||
"preferences": {
|
||||
"enable_autoplay": "Activer la lecture automatique",
|
||||
"github_cards": "GitHub Cards",
|
||||
"grayscale_mode": "Mode niveaux de gris",
|
||||
"hide_boost_count": "Cacher les compteurs de partages",
|
||||
"hide_favorite_count": "Cacher les compteurs de favoris",
|
||||
"hide_follower_count": "Cacher les compteurs d'abonné·e·s",
|
||||
|
@ -348,12 +405,18 @@
|
|||
"label": "Utilisateur·ice·s connecté·e·s"
|
||||
}
|
||||
},
|
||||
"share-target": {
|
||||
"description": "Elk peut être configuré pour que vous puissiez partager du contenu à partir d'autres applications, installez simplement Elk sur votre appareil ou ordinateur et connectez-vous.",
|
||||
"hint": "Pour partager du contenu avec Elk, Elk doit être installé et vous devez être connecté.",
|
||||
"title": "Partager avec Elk"
|
||||
},
|
||||
"state": {
|
||||
"attachments_exceed_server_limit": "Le nombre de pièces jointes a dépassé la limite par message.",
|
||||
"attachments_limit_error": "Limite par publication dépassée",
|
||||
"edited": "(Édité)",
|
||||
"editing": "Édition",
|
||||
"loading": "Chargement...",
|
||||
"publish_failed": "La publication a échoué",
|
||||
"publishing": "Envoi",
|
||||
"upload_failed": "Le téléversement a échoué",
|
||||
"uploading": "Téléversement en cours..."
|
||||
|
@ -444,6 +507,7 @@
|
|||
},
|
||||
"tooltip": {
|
||||
"add_content_warning": "Ajouter un avertissement de contenu",
|
||||
"add_emojis": "Ajouter des émoticônes",
|
||||
"add_media": "Ajouter des images, une vidéo ou un fichier audio",
|
||||
"add_publishable_content": "Ajouter du contenu à publier",
|
||||
"change_content_visibility": "Ajuster la confidentialité du message",
|
||||
|
@ -452,6 +516,7 @@
|
|||
"explore_links_intro": "Ces actualités sont sujets à discussions sur ce serveur et sur d'autres serveurs du réseau décentralisé.",
|
||||
"explore_posts_intro": "Ces publications de ce serveur et d'autres serveurs du réseau décentralisé gagnent du terrain sur ce serveur en ce moment.",
|
||||
"explore_tags_intro": "Ces hashtags gagnent du terrain sur ce serveur et sur d'autres serveurs du réseau décentralisé.",
|
||||
"publish_failed": "Fermez les messages ayant échoué en haut de l'éditeur pour republier les messages",
|
||||
"toggle_code_block": "Ajouter un bloc de code"
|
||||
},
|
||||
"user": {
|
||||
|
|
|
@ -28,31 +28,34 @@
|
|||
"muted_users": "Pengguna dibisukan",
|
||||
"muting": "Bisukan",
|
||||
"mutuals": "Terkait",
|
||||
"notifications_on_post_disable": "Berhenti memberi tahu saya saat {username} memposting",
|
||||
"notifications_on_post_enable": "Beri tahu saya jika {username} memposting",
|
||||
"notify_on_post": "Beri tahu saya jika {username} memposting",
|
||||
"pinned": "Disematkan",
|
||||
"pinned": "Dilekatkan",
|
||||
"posts": "Posting",
|
||||
"posts_count": "{0} Pos|{0} Pos|{0} Pos",
|
||||
"profile_description": "tajuk profil {0}",
|
||||
"profile_unavailable": "Profil tidak tersedia",
|
||||
"unblock": "Buka blokir",
|
||||
"unfollow": "Berhenti mengikuti",
|
||||
"unmute": "Membunyikan",
|
||||
"unmute": "Bunyikan",
|
||||
"view_other_followers": "Pengikut dari contoh lain mungkin tidak ditampilkan.",
|
||||
"view_other_following": "Mengikuti dari contoh lain mungkin tidak ditampilkan."
|
||||
},
|
||||
"action": {
|
||||
"apply": "Terapkan",
|
||||
"bookmark": "Tandai",
|
||||
"bookmark": "Markah",
|
||||
"bookmarked": "Ditandai",
|
||||
"boost": "Dorong",
|
||||
"boost": "Dukung",
|
||||
"boost_count": "{0}",
|
||||
"boosted": "Didorong",
|
||||
"boosted": "Didukung",
|
||||
"clear_publish_failed": "Hapus error publikasi",
|
||||
"clear_upload_failed": "Hapus kesalahan pengunggahan file",
|
||||
"close": "Menutup",
|
||||
"compose": "Menyusun",
|
||||
"confirm": "Mengonfirmasi",
|
||||
"close": "Tutup",
|
||||
"compose": "Menulis",
|
||||
"confirm": "Konfirmasi",
|
||||
"edit": "Sunting",
|
||||
"enter_app": "Masukkan Aplikasi",
|
||||
"enter_app": "Masuk Aplikasi",
|
||||
"favourite": "Favorit",
|
||||
"favourite_count": "{0}",
|
||||
"favourited": "Difavoritkan",
|
||||
|
@ -85,8 +88,8 @@
|
|||
"sign_in_desc": "Tambahkan akun yang ada",
|
||||
"switch_account": "Beralih ke {0}",
|
||||
"switch_account_desc": "Beralih ke akun lain",
|
||||
"toggle_dark_mode": "Beralih ke mode gelap",
|
||||
"toggle_zen_mode": "Beralih ke mode zen"
|
||||
"toggle_dark_mode": "Beralih ke modus gelap",
|
||||
"toggle_zen_mode": "Beralih ke modus zen"
|
||||
},
|
||||
"common": {
|
||||
"confirm_dialog": {
|
||||
|
@ -104,9 +107,52 @@
|
|||
"draft_title": "Draf {0}",
|
||||
"drafts": "Draf ({v})"
|
||||
},
|
||||
"confirm": {
|
||||
"block_account": {
|
||||
"cancel": "Batalkan",
|
||||
"confirm": "Blokir",
|
||||
"title": "Yakin ingin memblokir {0}?"
|
||||
},
|
||||
"block_domain": {
|
||||
"cancel": "Batalkan",
|
||||
"confirm": "Blokir",
|
||||
"title": "Yakin ingin memblokir {0}?"
|
||||
},
|
||||
"common": {
|
||||
"cancel": "Tidak",
|
||||
"confirm": "Ya"
|
||||
},
|
||||
"delete_posts": {
|
||||
"cancel": "Batalkan",
|
||||
"confirm": "Hapus",
|
||||
"title": "Yakin ingin menghapus postingan ini?"
|
||||
},
|
||||
"mute_account": {
|
||||
"cancel": "Batalkan",
|
||||
"confirm": "Bisukan",
|
||||
"title": "Yakin ingin membisukan {0}?"
|
||||
},
|
||||
"show_reblogs": {
|
||||
"cancel": "Batalkan",
|
||||
"confirm": "Tampilkan",
|
||||
"title": "Yakin ingin menampilkan dukungan dari {0}?"
|
||||
},
|
||||
"unfollow": {
|
||||
"cancel": "Batalkan",
|
||||
"confirm": "Berhenti mengikuti",
|
||||
"title": "Anda yakin ingin berhenti mengikuti?"
|
||||
}
|
||||
},
|
||||
"conversation": {
|
||||
"with": "dengan"
|
||||
},
|
||||
"custom_cards": {
|
||||
"stackblitz": {
|
||||
"lines": "Garis {0}",
|
||||
"open": "Buka",
|
||||
"snippet_from": "Cuplikan dari {0}"
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"account_not_found": "Akun {0} tidak ditemukan",
|
||||
"explore-list-empty": "Tidak ada yang sedang tren saat ini. \nPeriksa kembali nanti!",
|
||||
|
@ -131,7 +177,7 @@
|
|||
"menu": {
|
||||
"block_account": "Blokir {0}",
|
||||
"block_domain": "Blokir domain {0}",
|
||||
"copy_link_to_post": "Salin tautan ke pos ini",
|
||||
"copy_link_to_post": "Salin tautan pos ini",
|
||||
"delete": "Hapus",
|
||||
"delete_and_redraft": "Hapus dan buat ulang draf",
|
||||
"delete_confirm": {
|
||||
|
@ -142,18 +188,18 @@
|
|||
"direct_message_account": "Pesan langsung {0}",
|
||||
"edit": "Sunting",
|
||||
"hide_reblogs": "Sembunyikan dukungan dari {0}",
|
||||
"mention_account": "Penyebutan {0}",
|
||||
"mention_account": "Sebut {0}",
|
||||
"mute_account": "Bisukan {0}",
|
||||
"mute_conversation": "Nonaktifkan postingan ini",
|
||||
"open_in_original_site": "Buka di situs asli",
|
||||
"pin_on_profile": "Sematkan di profil",
|
||||
"share_post": "Bagikan postingan ini",
|
||||
"show_favourited_and_boosted_by": "Tunjukkan siapa yang difavoritkan dan didukung",
|
||||
"show_reblogs": "Tampilkan peningkatan dari {0}",
|
||||
"show_favourited_and_boosted_by": "Tampilkan siapa yang memfavoritkan dan mendukung",
|
||||
"show_reblogs": "Tampilkan dukungan dari {0}",
|
||||
"show_untranslated": "Tampilkan versi non-terjemahan",
|
||||
"toggle_theme": {
|
||||
"dark": "Beralih mode gelap",
|
||||
"light": "Beralih mode cahaya"
|
||||
"dark": "Beralih ke modus gelap",
|
||||
"light": "Beralih ke modus terang"
|
||||
},
|
||||
"translate_post": "Terjemahkan pos",
|
||||
"unblock_account": "Buka blokir {0}",
|
||||
|
@ -166,11 +212,11 @@
|
|||
"back": "Kembali",
|
||||
"blocked_domains": "Domain yang diblokir",
|
||||
"blocked_users": "Pengguna diblokir",
|
||||
"bookmarks": "Penanda",
|
||||
"built_at": "Dibangun {0}",
|
||||
"bookmarks": "Markah",
|
||||
"built_at": "Diperbarui {0}",
|
||||
"compose": "Menyusun",
|
||||
"conversations": "Percakapan",
|
||||
"explore": "Mengeksplorasi",
|
||||
"explore": "Jelajahi",
|
||||
"favourites": "Favorit",
|
||||
"federated": "Federasi",
|
||||
"home": "Beranda",
|
||||
|
@ -185,14 +231,14 @@
|
|||
"settings": "Pengaturan",
|
||||
"show_intro": "Tampilkan pengantar",
|
||||
"toggle_theme": "Beralih Tema",
|
||||
"zen_mode": "Mode Zen"
|
||||
"zen_mode": "Modus Zen"
|
||||
},
|
||||
"notification": {
|
||||
"favourited_post": "memfavoritkan kiriman Anda",
|
||||
"followed_you": "mengikutimu",
|
||||
"followed_you_count": "{0} orang mengikuti Anda|{0} orang mengikuti Anda|{0} orang mengikuti Anda",
|
||||
"missing_type": "NOTIFIKASI HILANG.jenis:",
|
||||
"reblogged_post": "me-reblog posting Anda",
|
||||
"reblogged_post": "mendukung posting Anda",
|
||||
"request_to_follow": "meminta untuk mengikuti Anda",
|
||||
"signed_up": "mendaftar",
|
||||
"update_status": "memperbarui postingannya"
|
||||
|
@ -205,9 +251,9 @@
|
|||
"the_thread": "utas"
|
||||
},
|
||||
"pwa": {
|
||||
"dismiss": "Membubarkan",
|
||||
"title": "Pembaruan Elk baru tersedia!",
|
||||
"update": "Memperbarui",
|
||||
"dismiss": "Batalkan",
|
||||
"title": "Pembaruan Elk tersedia!",
|
||||
"update": "Perbarui",
|
||||
"update_available_short": "Perbarui Elk",
|
||||
"webmanifest": {
|
||||
"canary": {
|
||||
|
@ -239,25 +285,25 @@
|
|||
"settings": {
|
||||
"about": {
|
||||
"label": "Tentang",
|
||||
"meet_the_team": "Temui Tim",
|
||||
"sponsor_action": "Sponsori kami",
|
||||
"meet_the_team": "Tim Pengembang",
|
||||
"sponsor_action": "Dukung kami",
|
||||
"sponsor_action_desc": "Untuk mendukung tim mengembangkan Elk",
|
||||
"sponsors": "Sponsor",
|
||||
"sponsors_body_1": "Elk dimungkinkan berkat sponsor yang murah hati dan bantuan dari:",
|
||||
"sponsors_body_2": "Dan semua perusahaan dan individu yang mensponsori Elk Team dan para anggotanya.",
|
||||
"sponsors_body_3": "Jika Anda menikmati aplikasi ini, pertimbangkan untuk mensponsori kami:"
|
||||
"sponsors": "Sponsorship",
|
||||
"sponsors_body_1": "Elk dimungkinkan berkat pendukung yang murah hati dan bantuan dari:",
|
||||
"sponsors_body_2": "Dan semua perusahaan dan individu yang mendukung Tim Elk dan para anggotanya.",
|
||||
"sponsors_body_3": "Jika Anda menikmati aplikasi ini, pertimbangkan untuk mendukung kami:"
|
||||
},
|
||||
"account_settings": {
|
||||
"description": "Edit pengaturan akun Anda di Mastodon UI",
|
||||
"description": "Sunting pengaturan akun Anda di Mastodon UI",
|
||||
"label": "Pengaturan akun"
|
||||
},
|
||||
"interface": {
|
||||
"color_mode": "Mode Warna",
|
||||
"dark_mode": "Mode Gelap",
|
||||
"color_mode": "Berwarna",
|
||||
"dark_mode": "Gelap",
|
||||
"default": "(bawaan)",
|
||||
"font_size": "Ukuran huruf",
|
||||
"label": "Antarmuka",
|
||||
"light_mode": "Mode Cahaya",
|
||||
"light_mode": "Terang",
|
||||
"size_label": {
|
||||
"lg": "Besar",
|
||||
"md": "Medium",
|
||||
|
@ -265,7 +311,8 @@
|
|||
"xl": "Ekstra besar",
|
||||
"xs": "Ekstra kecil"
|
||||
},
|
||||
"system_mode": "Sistem"
|
||||
"system_mode": "Sistem",
|
||||
"theme_color": "Warna Tema"
|
||||
},
|
||||
"language": {
|
||||
"display_language": "Bahasa tampilan",
|
||||
|
@ -280,7 +327,7 @@
|
|||
"alerts": {
|
||||
"favourite": "Favorit",
|
||||
"follow": "Pengikut baru",
|
||||
"mention": "Penyebutan",
|
||||
"mention": "Sebutan",
|
||||
"poll": "Polling",
|
||||
"reblog": "Reblog posting Anda",
|
||||
"title": "Pemberitahuan apa yang harus diterima?"
|
||||
|
@ -323,8 +370,9 @@
|
|||
"notifications_settings": "Notifikasi",
|
||||
"preferences": {
|
||||
"github_cards": "Kartu GitHub",
|
||||
"hide_boost_count": "Sembunyikan jumlah peningkatan",
|
||||
"hide_favorite_count": "Sembunyikan hitungan favorit",
|
||||
"grayscale_mode": "Modus Hitam Putih",
|
||||
"hide_boost_count": "Sembunyikan jumlah dukungan",
|
||||
"hide_favorite_count": "Sembunyikan jumlah favorit",
|
||||
"hide_follower_count": "Sembunyikan jumlah pengikut",
|
||||
"label": "Preferensi",
|
||||
"title": "Fitur Eksperimental",
|
||||
|
@ -334,7 +382,7 @@
|
|||
"profile": {
|
||||
"appearance": {
|
||||
"bio": "Bio",
|
||||
"description": "Edit avatar, nama pengguna, profil, dll.",
|
||||
"description": "Sunting avatar, nama pengguna, profil, dll.",
|
||||
"display_name": "Nama tampilan",
|
||||
"label": "Penampilan",
|
||||
"profile_metadata": "Metadata profil",
|
||||
|
@ -343,7 +391,7 @@
|
|||
},
|
||||
"featured_tags": {
|
||||
"description": "Orang-orang dapat menelusuri kiriman publik Anda di bawah tagar ini.",
|
||||
"label": "Hashtag unggulan"
|
||||
"label": "Tagar unggulan"
|
||||
},
|
||||
"label": "Profil"
|
||||
},
|
||||
|
@ -362,23 +410,24 @@
|
|||
"state": {
|
||||
"attachments_exceed_server_limit": "Jumlah lampiran melebihi batas per posting.",
|
||||
"attachments_limit_error": "Batas per posting terlampaui",
|
||||
"edited": "(Diedit)",
|
||||
"editing": "Mengedit",
|
||||
"edited": "(Disunting)",
|
||||
"editing": "Menyunting",
|
||||
"loading": "Memuat...",
|
||||
"publish_failed": "Publikasi gagal",
|
||||
"publishing": "Penerbitan",
|
||||
"upload_failed": "Gagal mengunggah",
|
||||
"uploading": "Mengunggah..."
|
||||
},
|
||||
"status": {
|
||||
"boosted_by": "Didorong Oleh",
|
||||
"edited": "Diedit {0}",
|
||||
"favourited_by": "Favorit Oleh",
|
||||
"boosted_by": "Didukung Oleh",
|
||||
"edited": "Disunting {0}",
|
||||
"favourited_by": "Difavoritkan Oleh",
|
||||
"filter_hidden_phrase": "Difilter oleh",
|
||||
"filter_removed_phrase": "Dihapus oleh filter",
|
||||
"filter_show_anyway": "Tetap tampilkan",
|
||||
"img_alt": {
|
||||
"desc": "Keterangan",
|
||||
"dismiss": "Membubarkan"
|
||||
"dismiss": "Batalkan"
|
||||
},
|
||||
"poll": {
|
||||
"count": "{0} suara|{0} suara|{0} suara",
|
||||
|
@ -396,7 +445,7 @@
|
|||
},
|
||||
"status_history": {
|
||||
"created": "dibuat {0}",
|
||||
"edited": "diubah {0}"
|
||||
"edited": "disunting {0}"
|
||||
},
|
||||
"tab": {
|
||||
"for_you": "Untuk kamu",
|
||||
|
@ -410,9 +459,9 @@
|
|||
},
|
||||
"tag": {
|
||||
"follow": "Ikuti",
|
||||
"follow_label": "Ikuti tag {0}",
|
||||
"follow_label": "Ikuti tagar {0}",
|
||||
"unfollow": "Berhenti mengikuti",
|
||||
"unfollow_label": "Berhenti mengikuti tag {0}"
|
||||
"unfollow_label": "Berhenti mengikuti tagar {0}"
|
||||
},
|
||||
"time_ago_options": {
|
||||
"day_future": "dalam 0 hari|besok|dalam {n} hari",
|
||||
|
@ -436,8 +485,8 @@
|
|||
"short_month_past": "{n}bln",
|
||||
"short_second_future": "dalam {n}dtk",
|
||||
"short_second_past": "{n}dtk",
|
||||
"short_week_future": "di {n}mg",
|
||||
"short_week_past": "{n}mg",
|
||||
"short_week_future": "di {n}mng",
|
||||
"short_week_past": "{n}mng",
|
||||
"short_year_future": "di {n}th",
|
||||
"short_year_past": "{n}th",
|
||||
"week_future": "dalam 0 minggu|minggu depan|dalam {n} minggu",
|
||||
|
@ -464,13 +513,14 @@
|
|||
"explore_links_intro": "Berita-berita ini sedang dibicarakan oleh orang-orang di server ini dan server-server lain dari jaringan terdesentralisasi saat ini.",
|
||||
"explore_posts_intro": "Postingan-postingan ini dari server ini dan server lain di jaringan terdesentralisasi sedang mendapatkan daya tarik di server ini sekarang.",
|
||||
"explore_tags_intro": "Tagar-tagar ini mendapatkan daya tarik di antara orang-orang di server ini dan server lain dari jaringan terdesentralisasi saat ini.",
|
||||
"toggle_code_block": "Alihkan blok kode"
|
||||
"publish_failed": "Tutup pesan yang gagal di bagian atas editor untuk mempublikasikan ulang postingan",
|
||||
"toggle_code_block": "Tulis sebagai blok kode"
|
||||
},
|
||||
"user": {
|
||||
"add_existing": "Tambahkan akun yang ada",
|
||||
"server_address_label": "Alamat Server Mastodon",
|
||||
"sign_in_desc": "Masuk untuk mengikuti profil atau hashtag, favorit, berbagi dan membalas posting, atau berinteraksi dari akun Anda di server lain.",
|
||||
"sign_in_notice_title": "Melihat {0} data publik",
|
||||
"sign_in_notice_title": "Menampilkan data publik {0}",
|
||||
"sign_out_account": "Keluar {0}",
|
||||
"tip_no_account": "Jika Anda belum memiliki akun Mastodon, {0}.",
|
||||
"tip_register_account": "pilih server Anda dan daftarkan"
|
||||
|
|
|
@ -244,7 +244,8 @@
|
|||
"sponsors": "スポンサー",
|
||||
"sponsors_body_1": "Elkは以下の寛大なスポンサー",
|
||||
"sponsors_body_2": "そして、Elkのチームとメンバーを支援してくれているすべての企業と個人のおかげで実現しました。",
|
||||
"sponsors_body_3": "もしアプリを楽しんでくれているなら、サポートすることを考えてみてください。"
|
||||
"sponsors_body_3": "もしアプリを楽しんでくれているなら、サポートすることを考えてみてください。",
|
||||
"version": "バージョン"
|
||||
},
|
||||
"account_settings": {
|
||||
"description": "Mastodon UIでアカウントの設定を編集します",
|
||||
|
|
|
@ -156,6 +156,12 @@
|
|||
"unsupported_file_format": "Formato de ficheiro não suportado"
|
||||
},
|
||||
"help": {
|
||||
"build_preview": {
|
||||
"desc1": "Está atualmente a visualizar uma versão prévia do Elk produzida pela comunidade - {0}.",
|
||||
"desc2": "Pode conter alterações não revistas ou mesmo maliciosas.",
|
||||
"desc3": "Não inicie sessão com a sua conta real.",
|
||||
"title": "Produção de pré-visualização"
|
||||
},
|
||||
"desc_highlight": "Espere alguns problemas e funcionalidades em falta.",
|
||||
"desc_para1": "Obrigado pelo seu interesse em experimentar o Elk, o nosso aplicativo web para o Mastodon, ainda em construção!",
|
||||
"desc_para2": "Estamos a trabalhar arduamente no seu desenvolvimento e melhoria ao longo do tempo.",
|
||||
|
@ -172,6 +178,7 @@
|
|||
"block_account": "Bloquear {0}",
|
||||
"block_domain": "Bloquear domínio {0}",
|
||||
"copy_link_to_post": "Copiar ligação para esta publicação",
|
||||
"copy_original_link_to_post": "Copiar ligação original para esta publicação",
|
||||
"delete": "Eliminar",
|
||||
"delete_and_redraft": "Eliminar & re-editar",
|
||||
"direct_message_account": "Mensagem direta a {0}",
|
||||
|
@ -280,7 +287,8 @@
|
|||
"sponsors": "Patrocinadores",
|
||||
"sponsors_body_1": "O Elk é possível graças ao genoroso patrocinio e ajuda de:",
|
||||
"sponsors_body_2": "E todas as empresas e pessoas que apoiam a Equipa do Elk e os seus membros.",
|
||||
"sponsors_body_3": "Se está a gostar de utilizar esta aplicação, considere apoiar-nos:"
|
||||
"sponsors_body_3": "Se está a gostar de utilizar esta aplicação, considere apoiar-nos:",
|
||||
"version": "Versão"
|
||||
},
|
||||
"account_settings": {
|
||||
"description": "Editar as configurações da sua conta na aplicação web do Mastodon",
|
||||
|
@ -358,6 +366,7 @@
|
|||
},
|
||||
"notifications_settings": "Notificações",
|
||||
"preferences": {
|
||||
"enable_autoplay": "Habilitar Repodrução Automática",
|
||||
"github_cards": "Cartões do GitHub",
|
||||
"grayscale_mode": "Modo tons de cinza",
|
||||
"hide_boost_count": "Esconder contagem de partilhas",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"type": "module",
|
||||
"version": "0.5.0",
|
||||
"version": "0.6.1",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@7.9.0",
|
||||
"license": "MIT",
|
||||
|
@ -57,7 +57,8 @@
|
|||
"pinia": "^2.0.28",
|
||||
"shiki": "^0.12.1",
|
||||
"shiki-es": "^0.1.2",
|
||||
"slimeform": "^0.8.0",
|
||||
"slimeform": "^0.9.0",
|
||||
"string-length": "^5.0.1",
|
||||
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log",
|
||||
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
||||
"tiny-decode": "^0.1.3",
|
||||
|
|
|
@ -33,7 +33,7 @@ const handleShowCommit = () => {
|
|||
|
||||
<template v-if="isHydrated">
|
||||
<SettingsItem
|
||||
text="Version"
|
||||
:text="$t('settings.about.version')"
|
||||
:to="showCommit ? `https://github.com/elk-zone/elk/commit/${buildInfo.commit}` : undefined"
|
||||
external target="_blank"
|
||||
@click="handleShowCommit"
|
||||
|
|
|
@ -39,6 +39,12 @@ const userSettings = useUserSettings()
|
|||
>
|
||||
{{ $t('settings.preferences.grayscale_mode') }}
|
||||
</SettingsToggleItem>
|
||||
<SettingsToggleItem
|
||||
:checked="getPreferences(userSettings, 'enableAutoplay')"
|
||||
@click="togglePreferences('enableAutoplay')"
|
||||
>
|
||||
{{ $t('settings.preferences.enable_autoplay') }}
|
||||
</SettingsToggleItem>
|
||||
<h2 px6 py4 mt2 font-bold text-xl flex="~ gap-1" items-center>
|
||||
<div i-ri-flask-line />
|
||||
{{ $t('settings.preferences.title') }}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import type { mastodon } from 'masto'
|
||||
import { ofetch } from 'ofetch'
|
||||
import { useForm } from 'slimeform'
|
||||
import { parse } from 'ultrahtml'
|
||||
import type { Component } from 'vue'
|
||||
|
||||
definePageMeta({
|
||||
middleware: 'auth',
|
||||
|
@ -15,6 +17,9 @@ useHeadFixed({
|
|||
|
||||
const { client } = $(useMasto())
|
||||
|
||||
const avatarInput = ref<any>()
|
||||
const headerInput = ref<any>()
|
||||
|
||||
const account = $computed(() => currentUser.value?.account)
|
||||
|
||||
const onlineSrc = $computed(() => ({
|
||||
|
@ -22,7 +27,7 @@ const onlineSrc = $computed(() => ({
|
|||
header: account?.header || '',
|
||||
}))
|
||||
|
||||
const { form, reset, submitter, dirtyFields, isError } = useForm({
|
||||
const { form, reset, submitter, isDirty, dirtyFields, isError } = useForm({
|
||||
form: () => {
|
||||
// For complex types of objects, a deep copy is required to ensure correct comparison of initial and modified values
|
||||
const fieldsAttributes = Array.from({ length: maxAccountFieldCount.value }, (_, i) => {
|
||||
|
@ -52,8 +57,7 @@ const { form, reset, submitter, dirtyFields, isError } = useForm({
|
|||
},
|
||||
})
|
||||
|
||||
const isDirty = $computed(() => !isEmptyObject(dirtyFields.value))
|
||||
const isCanSubmit = computed(() => !isError.value && isDirty)
|
||||
const isCanSubmit = computed(() => !isError.value && isDirty.value)
|
||||
|
||||
const { submit, submitting } = submitter(async ({ dirtyFields }) => {
|
||||
if (!isCanSubmit.value)
|
||||
|
@ -82,6 +86,15 @@ const refreshInfo = async () => {
|
|||
reset()
|
||||
}
|
||||
|
||||
useDropZone(avatarInput, (files) => {
|
||||
if (files?.[0])
|
||||
form.avatar = files[0]
|
||||
})
|
||||
useDropZone(headerInput, (files) => {
|
||||
if (files?.[0])
|
||||
form.header = files[0]
|
||||
})
|
||||
|
||||
onHydrated(refreshInfo)
|
||||
onReactivated(refreshInfo)
|
||||
</script>
|
||||
|
@ -99,6 +112,7 @@ onReactivated(refreshInfo)
|
|||
<!-- banner -->
|
||||
<div of-hidden bg="gray-500/20" aspect="3">
|
||||
<CommonInputImage
|
||||
ref="headerInput"
|
||||
v-model="form.header"
|
||||
:original="onlineSrc.header"
|
||||
w-full h-full
|
||||
|
@ -109,6 +123,7 @@ onReactivated(refreshInfo)
|
|||
<!-- avatar -->
|
||||
<div px-4 flex="~ gap4">
|
||||
<CommonInputImage
|
||||
ref="avatarInput"
|
||||
v-model="form.avatar"
|
||||
:original="onlineSrc.avatar"
|
||||
mt--10
|
||||
|
|
|
@ -105,9 +105,10 @@ importers:
|
|||
shiki-es: ^0.1.2
|
||||
simple-git: ^3.15.1
|
||||
simple-git-hooks: ^2.8.1
|
||||
slimeform: ^0.8.0
|
||||
slimeform: ^0.9.0
|
||||
stale-dep: ^0.3.1
|
||||
std-env: ^3.3.1
|
||||
string-length: ^5.0.1
|
||||
tauri-plugin-log-api: github:tauri-apps/tauri-plugin-log
|
||||
tauri-plugin-store-api: github:tauri-apps/tauri-plugin-store
|
||||
theme-vitesse: ^0.6.0
|
||||
|
@ -159,7 +160,8 @@ importers:
|
|||
pinia: 2.0.28_typescript@4.9.4
|
||||
shiki: 0.12.1
|
||||
shiki-es: 0.1.2
|
||||
slimeform: 0.8.0
|
||||
slimeform: 0.9.0
|
||||
string-length: 5.0.1
|
||||
tauri-plugin-log-api: github.com/tauri-apps/tauri-plugin-log/9d2a19ad05fafeb80991006e14f0f95fe1109aba
|
||||
tauri-plugin-store-api: github.com/tauri-apps/tauri-plugin-store/c71665bf5dcf48ae70a88d622eb38b2548b60a5d
|
||||
tiny-decode: 0.1.3
|
||||
|
@ -4369,7 +4371,6 @@ packages:
|
|||
/ansi-regex/6.0.1:
|
||||
resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==}
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/ansi-styles/3.2.1:
|
||||
resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
|
||||
|
@ -4847,6 +4848,11 @@ packages:
|
|||
snake-case: 3.0.4
|
||||
tslib: 2.4.1
|
||||
|
||||
/char-regex/2.0.1:
|
||||
resolution: {integrity: sha512-oSvEeo6ZUD7NepqAat3RqoucZ5SeqLJgOvVIwkafu6IP3V0pO38s/ypdVUmDDK6qIIHNlYHJAKX9E7R7HoKElw==}
|
||||
engines: {node: '>=12.20'}
|
||||
dev: false
|
||||
|
||||
/character-entities-html4/2.1.0:
|
||||
resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==}
|
||||
dev: true
|
||||
|
@ -10809,8 +10815,8 @@ packages:
|
|||
is-fullwidth-code-point: 4.0.0
|
||||
dev: true
|
||||
|
||||
/slimeform/0.8.0:
|
||||
resolution: {integrity: sha512-oh0GY3qPkN1ouH3TQex/+SbVsgGmJhZvgz8NqfECuMuSy7k0NOQNUudH/bebcAY7fIk5nVunMS2GPfo4UWwmDw==}
|
||||
/slimeform/0.9.0:
|
||||
resolution: {integrity: sha512-HTerdfrMNAx3JQQIuyJnjH5Ci/ntWUmahzcfUd7GUWtDD7C8Q/wZ7vg+v96C3o2bQ+G1/VXvy3m672KTtTRJNA==}
|
||||
peerDependencies:
|
||||
vue: '>=3'
|
||||
dev: false
|
||||
|
@ -10954,6 +10960,14 @@ packages:
|
|||
engines: {node: '>=0.6.19'}
|
||||
dev: true
|
||||
|
||||
/string-length/5.0.1:
|
||||
resolution: {integrity: sha512-9Ep08KAMUn0OadnVaBuRdE2l615CQ508kr0XMadjClfYpdCyvrbFp6Taebo8yyxokQ4viUd/xPPUA4FGgUa0ow==}
|
||||
engines: {node: '>=12.20'}
|
||||
dependencies:
|
||||
char-regex: 2.0.1
|
||||
strip-ansi: 7.0.1
|
||||
dev: false
|
||||
|
||||
/string-width/4.2.3:
|
||||
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
|
||||
engines: {node: '>=8'}
|
||||
|
@ -11041,7 +11055,6 @@ packages:
|
|||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
ansi-regex: 6.0.1
|
||||
dev: true
|
||||
|
||||
/strip-bom/3.0.0:
|
||||
resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}
|
||||
|
|
|
@ -92,25 +92,6 @@ exports[`html-parse > empty > html 1`] = `""`;
|
|||
|
||||
exports[`html-parse > empty > text 1`] = `""`;
|
||||
|
||||
exports[`html-parse > hide mentions in context > html 1`] = `
|
||||
"<p>
|
||||
<mention-group
|
||||
><span class=\\"h-card\\"
|
||||
><a
|
||||
href=\\"/@haoqun@webtoo.ls\\"
|
||||
class=\\"u-url mention\\"
|
||||
rel=\\"nofollow noopener noreferrer\\"
|
||||
target=\\"_blank\\"
|
||||
>@<span>haoqun</span></a
|
||||
></span
|
||||
></mention-group
|
||||
>Great to see this happening
|
||||
</p>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`html-parse > hide mentions in context > text 1`] = `"@haoqunGreat to see this happening"`;
|
||||
|
||||
exports[`html-parse > html entities > html 1`] = `
|
||||
"<p>Hello <World />.</p>
|
||||
"
|
||||
|
@ -161,50 +142,3 @@ exports[`html-parse > link + mention > html 1`] = `
|
|||
`;
|
||||
|
||||
exports[`html-parse > link + mention > text 1`] = `"Happy 🤗 we’re now using @vitest (migrated from chai+mocha) https://github.com/ayoayco/astro-reactive-library/pull/203"`;
|
||||
|
||||
exports[`html-parse > mentions without context > html 1`] = `
|
||||
"<p>
|
||||
<mention-group
|
||||
><span class=\\"h-card\\"
|
||||
><a
|
||||
href=\\"/@haoqun@webtoo.ls\\"
|
||||
class=\\"u-url mention\\"
|
||||
rel=\\"nofollow noopener noreferrer\\"
|
||||
target=\\"_blank\\"
|
||||
>@<span>haoqun</span></a
|
||||
></span
|
||||
></mention-group
|
||||
>Great to see this happening
|
||||
</p>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`html-parse > mentions without context > text 1`] = `"@haoqunGreat to see this happening"`;
|
||||
|
||||
exports[`html-parse > show mentions in context > html 1`] = `
|
||||
"<p>
|
||||
<mention-group
|
||||
><span class=\\"h-card\\"
|
||||
><a
|
||||
href=\\"/@haoqun@webtoo.ls\\"
|
||||
class=\\"u-url mention\\"
|
||||
rel=\\"nofollow noopener noreferrer\\"
|
||||
target=\\"_blank\\"
|
||||
>@<span>haoqun</span></a
|
||||
></span
|
||||
>
|
||||
<span class=\\"h-card\\"
|
||||
><a
|
||||
href=\\"/@antfu@webtoo.ls\\"
|
||||
class=\\"u-url mention\\"
|
||||
rel=\\"nofollow noopener noreferrer\\"
|
||||
target=\\"_blank\\"
|
||||
>@<span>antfu</span></a
|
||||
></span
|
||||
></mention-group
|
||||
>Great to see this happening
|
||||
</p>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`html-parse > show mentions in context > text 1`] = `"@haoqun @antfuGreat to see this happening"`;
|
||||
|
|
|
@ -91,21 +91,21 @@ describe('content-rich', () => {
|
|||
})
|
||||
expect(formatted).toMatchInlineSnapshot(`
|
||||
"<p>
|
||||
<mention-group
|
||||
><span class=\\"h-card\\"
|
||||
><a
|
||||
class=\\"u-url mention\\"
|
||||
rel=\\"nofollow noopener noreferrer\\"
|
||||
to=\\"/m.webtoo.ls/@elk\\"
|
||||
></a
|
||||
></span>
|
||||
<span class=\\"h-card\\"
|
||||
><a
|
||||
class=\\"u-url mention\\"
|
||||
rel=\\"nofollow noopener noreferrer\\"
|
||||
to=\\"/m.webtoo.ls/@elk\\"
|
||||
></a></span></mention-group
|
||||
>content
|
||||
<span class=\\"h-card\\"
|
||||
><a
|
||||
class=\\"u-url mention\\"
|
||||
rel=\\"nofollow noopener noreferrer\\"
|
||||
to=\\"/m.webtoo.ls/@elk\\"
|
||||
></a
|
||||
></span>
|
||||
<span class=\\"h-card\\"
|
||||
><a
|
||||
class=\\"u-url mention\\"
|
||||
rel=\\"nofollow noopener noreferrer\\"
|
||||
to=\\"/m.webtoo.ls/@elk\\"
|
||||
></a
|
||||
></span>
|
||||
content
|
||||
<span class=\\"h-card\\"
|
||||
><a
|
||||
class=\\"u-url mention\\"
|
||||
|
@ -151,19 +151,53 @@ describe('content-rich', () => {
|
|||
`)
|
||||
})
|
||||
|
||||
it('shows some collapsed mentions', async () => {
|
||||
it('shows some collapsed mentions inline', async () => {
|
||||
const { formatted } = await render('<p><span class="h-card"><a href="https://m.webtoo.ls/@elk" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>elk</span></a></span> <span class="h-card"><a href="https://m.webtoo.ls/@antfu" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>antfu</span></a></span> content</p>', {
|
||||
collapseMentionLink: true,
|
||||
inReplyToStatus: { account: { acct: 'elk@webtoo.ls' }, mentions: [] as mastodon.v1.StatusMention[] } as mastodon.v1.Status,
|
||||
})
|
||||
expect(formatted).toMatchInlineSnapshot(`
|
||||
"<p>
|
||||
<mention-group>
|
||||
<span class=\\"h-card\\"
|
||||
<span class=\\"h-card\\"
|
||||
><a
|
||||
class=\\"u-url mention\\"
|
||||
rel=\\"nofollow noopener noreferrer\\"
|
||||
to=\\"/m.webtoo.ls/@antfu\\"
|
||||
></a
|
||||
></span>
|
||||
content
|
||||
</p>
|
||||
"
|
||||
`)
|
||||
})
|
||||
|
||||
it('shows some collapsed mentions grouped', async () => {
|
||||
const { formatted } = await render('<p><span class="h-card"><a href="https://m.webtoo.ls/@elk" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>elk</span></a></span> <span class="h-card"><a href="https://m.webtoo.ls/@antfu" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>antfu</span></a></span> <span class="h-card"><a href="https://m.webtoo.ls/@patak" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>patak</span></a></span> <span class="h-card"><a href="https://m.webtoo.ls/@sxzz" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>sxzz</span></a></span>content</p>', {
|
||||
collapseMentionLink: true,
|
||||
inReplyToStatus: { account: { acct: 'elk@webtoo.ls' }, mentions: [] as mastodon.v1.StatusMention[] } as mastodon.v1.Status,
|
||||
})
|
||||
expect(formatted).toMatchInlineSnapshot(`
|
||||
"<p>
|
||||
<mention-group
|
||||
><span class=\\"h-card\\"
|
||||
><a
|
||||
class=\\"u-url mention\\"
|
||||
rel=\\"nofollow noopener noreferrer\\"
|
||||
to=\\"/m.webtoo.ls/@antfu\\"
|
||||
></a
|
||||
></span>
|
||||
<span class=\\"h-card\\"
|
||||
><a
|
||||
class=\\"u-url mention\\"
|
||||
rel=\\"nofollow noopener noreferrer\\"
|
||||
to=\\"/m.webtoo.ls/@patak\\"
|
||||
></a
|
||||
></span>
|
||||
<span class=\\"h-card\\"
|
||||
><a
|
||||
class=\\"u-url mention\\"
|
||||
rel=\\"nofollow noopener noreferrer\\"
|
||||
to=\\"/m.webtoo.ls/@sxzz\\"
|
||||
></a></span></mention-group
|
||||
>content
|
||||
</p>
|
||||
|
|
Loading…
Reference in a new issue