feat: add helper composable to check if current node is Akkoma/Pleroma

This commit is contained in:
TAKAHASHI Shuuji 2025-02-25 23:05:33 +09:00
parent 55ad2438ed
commit 32a641f2b8

View file

@ -60,6 +60,8 @@ export const currentServer = computed<string>(() => currentUser.value?.server ||
export const currentNodeInfo = computed<null | Record<string, any>>(() => nodes.value[currentServer.value] || null) export const currentNodeInfo = computed<null | Record<string, any>>(() => nodes.value[currentServer.value] || null)
export const isGotoSocial = computed(() => currentNodeInfo.value?.software?.name === 'gotosocial') export const isGotoSocial = computed(() => currentNodeInfo.value?.software?.name === 'gotosocial')
export const isGlitchEdition = computed(() => currentInstance.value?.version?.includes('+glitch')) export const isGlitchEdition = computed(() => currentInstance.value?.version?.includes('+glitch'))
export const isAkkoma = computed(() => currentNodeInfo.value?.software?.name === 'akkoma')
export const isPleroma = computed(() => currentNodeInfo.value?.software?.name === 'pleroma')
export function useUsers() { export function useUsers() {
return users return users