diff --git a/components/help/HelpPreview.vue b/components/help/HelpPreview.vue
index 90cc4e58..8e37f4f6 100644
--- a/components/help/HelpPreview.vue
+++ b/components/help/HelpPreview.vue
@@ -30,7 +30,7 @@ const emit = defineEmits<{
{{ $t('help.desc_para3') }}
-
+
diff --git a/components/publish/PublishAttachment.vue b/components/publish/PublishAttachment.vue
index fa29a2e7..3e1a29ec 100644
--- a/components/publish/PublishAttachment.vue
+++ b/components/publish/PublishAttachment.vue
@@ -34,7 +34,7 @@ const toggleApply = () => {
text-white px2 py2 rounded-full cursor-pointer
@click="$emit('remove')"
>
-
+
diff --git a/components/publish/PublishWidget.vue b/components/publish/PublishWidget.vue
index 9a055aa8..93eed711 100644
--- a/components/publish/PublishWidget.vue
+++ b/components/publish/PublishWidget.vue
@@ -147,7 +147,7 @@ defineExpose({
>
diff --git a/components/user/UserSwitcher.vue b/components/user/UserSwitcher.vue
index 21774835..e8a766f1 100644
--- a/components/user/UserSwitcher.vue
+++ b/components/user/UserSwitcher.vue
@@ -51,7 +51,7 @@ const clickUser = (user: UserLogin) => {
:text="$t('user.sign_out_account', [getFullHandle(currentUser.account)])"
icon="i-ri:logout-box-line rtl-flip"
w-full
- @click="signout"
+ @click="signOut"
/>
diff --git a/composables/about.ts b/composables/about.ts
index 89d9df79..d793c76f 100644
--- a/composables/about.ts
+++ b/composables/about.ts
@@ -7,7 +7,7 @@ export interface Team {
mastodon: string
}
-export const teams: Team[] = [
+export const elkTeamMembers: Team[] = [
{
github: 'antfu',
display: 'Anthony Fu',
diff --git a/composables/command.ts b/composables/command.ts
index 6c19171b..da2c5a26 100644
--- a/composables/command.ts
+++ b/composables/command.ts
@@ -349,7 +349,7 @@ export const provideGlobalCommands = () => {
icon: 'i-ri:logout-box-line',
onActivate() {
- signout()
+ signOut()
},
})
}
diff --git a/composables/content-render.ts b/composables/content-render.ts
index 26d35073..3d736f84 100644
--- a/composables/content-render.ts
+++ b/composables/content-render.ts
@@ -21,7 +21,7 @@ export function contentToVNode(
return h(Fragment, (tree.children as Node[] || []).map(n => treeToVNode(n)))
}
-export function nodeToVNode(node: Node): VNode | string | null {
+function nodeToVNode(node: Node): VNode | string | null {
if (node.type === TEXT_NODE)
return node.value
diff --git a/composables/masto/account.ts b/composables/masto/account.ts
index b97c4ba1..a1041ca3 100644
--- a/composables/masto/account.ts
+++ b/composables/masto/account.ts
@@ -7,14 +7,14 @@ export function getDisplayName(account: mastodon.v1.Account, options?: { rich?:
return displayName.replace(/:([\w-]+?):/g, '')
}
-export function acctToShortHandle(acct: string) {
+export function accountToShortHandle(acct: string) {
return `@${acct.includes('@') ? acct.split('@')[0] : acct}`
}
export function getShortHandle({ acct }: mastodon.v1.Account) {
if (!acct)
return ''
- return acctToShortHandle(acct)
+ return accountToShortHandle(acct)
}
export function getServerName(account: mastodon.v1.Account) {
diff --git a/composables/masto/masto.ts b/composables/masto/masto.ts
index c9726830..d64addaa 100644
--- a/composables/masto/masto.ts
+++ b/composables/masto/masto.ts
@@ -47,7 +47,7 @@ export function mastoLogin(masto: ElkMasto, user: Pick | RemovableRef>(STORAGE_KEY_SERVERS, mock ? mock.server : {}, { deep: true })
-export const nodes = useLocalStorage>(STORAGE_KEY_NODES, {}, { deep: true })
+const nodes = useLocalStorage>(STORAGE_KEY_NODES, {}, { deep: true })
const currentUserHandle = useLocalStorage(STORAGE_KEY_CURRENT_USER_HANDLE, mock ? mock.user.account.id : '')
+export const instanceStorage = useLocalStorage>(STORAGE_KEY_SERVERS, mock ? mock.server : {}, { deep: true })
export type ElkInstance = Partial & {
uri: string
/** support GoToSocial */
accountDomain?: string | null
}
-export const getInstanceCache = (server: string): mastodon.v1.Instance | undefined => instances.value[server]
+export const getInstanceCache = (server: string): mastodon.v1.Instance | undefined => instanceStorage.value[server]
export const currentUser = computed(() => {
if (currentUserHandle.value) {
@@ -65,7 +65,7 @@ export const currentUser = computed(() => {
})
const publicInstance = ref(null)
-export const currentInstance = computed(() => currentUser.value ? instances.value[currentUser.value.server] ?? null : publicInstance.value)
+export const currentInstance = computed(() => currentUser.value ? instanceStorage.value[currentUser.value.server] ?? null : publicInstance.value)
export function getInstanceDomain(instance: ElkInstance) {
return instance.accountDomain || withoutProtocol(instance.uri)
@@ -231,7 +231,7 @@ export async function switchUser(user: UserLogin) {
}
}
-export async function signout() {
+export async function signOut() {
// TODO: confirm
if (!currentUser.value)
return
@@ -246,7 +246,7 @@ export async function signout() {
// Clear stale data
clearUserLocalStorage()
if (!users.value.some((u, i) => u.server === currentUser.value!.server && i !== index))
- delete instances.value[currentUser.value.server]
+ delete instanceStorage.value[currentUser.value.server]
await removePushNotifications(currentUser.value)
diff --git a/pages/settings/about/index.vue b/pages/settings/about/index.vue
index 7524d7d2..8a8ade13 100644
--- a/pages/settings/about/index.vue
+++ b/pages/settings/about/index.vue
@@ -115,7 +115,7 @@ const handleShowCommit = () => {
{
+ await Promise.all(elkTeamMembers.reduce((acc, { github }) => {
acc.push(...sizes.map(s => download(`https://github.com/${github}.png?size=${s}`, join(avatarsDir, `${github}-${s}x${s}.png`))))
return acc
}, [] as Promise[]))