mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 11:39:16 +01:00
feat: ✨ Implement proper login and logout using UI
This commit is contained in:
parent
e0c41bb9b5
commit
3c8093a3d2
23 changed files with 273 additions and 193 deletions
|
|
@ -20,48 +20,52 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Notification } from '~/types/mastodon/notification';
|
||||
import type { Notification } from "~/types/mastodon/notification";
|
||||
|
||||
const props = defineProps<{
|
||||
notification?: Notification;
|
||||
}>();
|
||||
|
||||
const accountName = useParsedContent(props.notification?.account?.display_name ?? '', props.notification?.account?.emojis ?? [], []);
|
||||
const accountName = useParsedContent(
|
||||
props.notification?.account?.display_name ?? "",
|
||||
props.notification?.account?.emojis ?? [],
|
||||
[],
|
||||
);
|
||||
const text = computed(() => {
|
||||
if (!props.notification) return '';
|
||||
if (!props.notification) return "";
|
||||
|
||||
switch (props.notification.type) {
|
||||
case 'mention':
|
||||
return 'mentioned you';
|
||||
case 'reblog':
|
||||
return 'reblogged your note';
|
||||
case 'favourite':
|
||||
return 'liked your note';
|
||||
case 'follow':
|
||||
return 'followed you';
|
||||
case 'follow_request':
|
||||
return 'requested to follow you';
|
||||
case "mention":
|
||||
return "mentioned you";
|
||||
case "reblog":
|
||||
return "reblogged your note";
|
||||
case "favourite":
|
||||
return "liked your note";
|
||||
case "follow":
|
||||
return "followed you";
|
||||
case "follow_request":
|
||||
return "requested to follow you";
|
||||
default:
|
||||
console.error('Unknown notification type', props.notification.type)
|
||||
return '';
|
||||
console.error("Unknown notification type", props.notification.type);
|
||||
return "";
|
||||
}
|
||||
});
|
||||
const icon = computed(() => {
|
||||
if (!props.notification) return '';
|
||||
if (!props.notification) return "";
|
||||
|
||||
switch (props.notification.type) {
|
||||
case 'mention':
|
||||
return 'tabler:at';
|
||||
case 'reblog':
|
||||
return 'tabler:repeat';
|
||||
case 'favourite':
|
||||
return 'tabler:heart';
|
||||
case 'follow':
|
||||
return 'tabler:plus';
|
||||
case 'follow_request':
|
||||
return 'tabler:plus';
|
||||
case "mention":
|
||||
return "tabler:at";
|
||||
case "reblog":
|
||||
return "tabler:repeat";
|
||||
case "favourite":
|
||||
return "tabler:heart";
|
||||
case "follow":
|
||||
return "tabler:plus";
|
||||
case "follow_request":
|
||||
return "tabler:plus";
|
||||
default:
|
||||
return '';
|
||||
return "";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue