게시글 미디어와 편집 표시 개선 v1.7.8

This commit is contained in:
2026-06-24 09:48:10 +09:00
parent c2acecffcd
commit cab71285d8
11 changed files with 54 additions and 37 deletions

View File

@@ -53,13 +53,9 @@ const authorLabel = computed(() => 'sori.studio')
const shareModalOpen = ref(false)
const copyButtonLabel = ref('Copy link')
const currentMember = ref(null)
const currentAdmin = ref(null)
const canEditPost = computed(() => Boolean(
post.value?.authorId
&& (
currentMember.value?.id === post.value.authorId
|| currentAdmin.value?.userId === post.value.authorId
)
&& currentMember.value?.id === post.value.authorId
))
const postEditPath = computed(() => `/admin/posts/${post.value.id}`)
@@ -129,7 +125,7 @@ const shareLinks = computed(() => [
])
/**
* 현재 로그인 회원·관리자 정보를 불러온다.
* 현재 로그인 회원 정보를 불러온다.
* @returns {Promise<void>}
*/
const fetchCurrentViewer = async () => {
@@ -138,12 +134,6 @@ const fetchCurrentViewer = async () => {
} catch {
currentMember.value = null
}
try {
currentAdmin.value = await $fetch('/admin/api/auth/me?optional=1')
} catch {
currentAdmin.value = null
}
}
onMounted(() => {