feat: implement elk permalinks (#229)
This commit is contained in:
parent
26f2dec6b6
commit
6efd3c8b55
6 changed files with 63 additions and 8 deletions
|
@ -76,8 +76,10 @@ const toggleTranslation = async () => {
|
|||
isLoading.translation = false
|
||||
}
|
||||
|
||||
const copyLink = async (url: string) => {
|
||||
await clipboard.copy(url)
|
||||
const copyLink = async (status: Status) => {
|
||||
const url = getStatusPermalink(status)
|
||||
if (url)
|
||||
await clipboard.copy(`${location.origin}${url}`)
|
||||
}
|
||||
const deleteStatus = async () => {
|
||||
// TODO confirm to delete
|
||||
|
@ -194,7 +196,7 @@ function editStatus() {
|
|||
text="Copy link to this post"
|
||||
icon="i-ri:link"
|
||||
:command="command"
|
||||
@click="copyLink(status.url)"
|
||||
@click="copyLink(status)"
|
||||
/>
|
||||
|
||||
<NuxtLink :to="status.url" target="_blank">
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
<template>
|
||||
<div p8 flex="~ col gap4">
|
||||
<div text-sm text-secondary>
|
||||
<p text-sm>
|
||||
Viewing <strong>{{ currentServer }}</strong> public data
|
||||
</p>
|
||||
<p text-sm text-secondary>
|
||||
{{ $t('nav_user.sign_in_desc') }}
|
||||
</div>
|
||||
</p>
|
||||
<button class="btn-solid text-center" @click="openSigninDialog()">
|
||||
{{ $t('action.sign_in') }}
|
||||
</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue