홈 피드와 템플릿 분리

This commit is contained in:
2026-04-07 12:30:20 +09:00
parent 8fc8872114
commit 2c0b5268fa
22 changed files with 652 additions and 229 deletions

View File

@@ -6,6 +6,7 @@ import { editorPath, followingFeedPath, loginPath } from '../lib/paths'
import { toApiUrl } from '../lib/runtime'
import { useAuthStore } from '../stores/auth'
import { useToast } from '../composables/useToast'
import { displayInitialFrom } from '../lib/display'
const route = useRoute()
const router = useRouter()
@@ -23,7 +24,7 @@ const brokenThumbnailIds = ref({})
const profileAvatarUrl = computed(() => (profile.value?.avatarSrc ? toApiUrl(profile.value.avatarSrc) : ''))
const profileDisplayName = computed(() => profile.value?.nickname || profile.value?.accountName || '알 수 없음')
const profileFallback = computed(() => (profile.value?.accountName || 'u').trim().charAt(0).toUpperCase() || '?')
const profileFallback = computed(() => displayInitialFrom(profile.value?.nickname, profile.value?.accountName, '?'))
const canFollow = computed(() => !!auth.user && !!profile.value && !profile.value.isSelf)
watch(error, (message) => {
@@ -49,7 +50,7 @@ function avatarSrcOf(tierList) {
}
function avatarFallbackOf(tierList) {
return (tierList.authorAccountName || profile.value?.accountName || 'u').trim().charAt(0).toUpperCase() || '?'
return displayInitialFrom(tierList.authorName, tierList.authorAccountName || profile.value?.accountName, '?')
}
function tierListThumbnailUrl(tierList) {