2026-06-06 14:08:01 +09:00
|
|
|
<script setup>
|
|
|
|
|
import { computed } from 'vue'
|
2026-06-28 11:02:44 +09:00
|
|
|
import { RouterLink, useRouter } from 'vue-router'
|
2026-06-06 14:08:01 +09:00
|
|
|
import { useAuthStore } from '@/stores/auth'
|
|
|
|
|
|
|
|
|
|
const auth = useAuthStore()
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
|
|
|
|
const u = computed(() => auth.user || {})
|
|
|
|
|
const roleLabel = computed(() => (u.value.role === 'ADMIN' ? '관리자' : '일반회원'))
|
2026-06-28 11:02:44 +09:00
|
|
|
const isPremium = computed(() => auth.isPremium)
|
|
|
|
|
const planLabel = computed(() => (isPremium.value ? '유료 멤버십' : '무료'))
|
2026-06-06 14:08:01 +09:00
|
|
|
|
|
|
|
|
function goEdit() {
|
|
|
|
|
router.push('/settings/account/edit')
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="account-info">
|
|
|
|
|
|
|
|
|
|
<section class="card">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<span class="k">이름</span>
|
|
|
|
|
<span class="v">{{ u.name || '-' }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<span class="k">이메일</span>
|
|
|
|
|
<span class="v">{{ u.email || '-' }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<span class="k">권한</span>
|
|
|
|
|
<span class="v">{{ roleLabel }}</span>
|
|
|
|
|
</div>
|
2026-06-28 11:02:44 +09:00
|
|
|
<div class="row">
|
|
|
|
|
<span class="k">멤버십</span>
|
|
|
|
|
<span class="v">
|
|
|
|
|
<span :class="{ premium: isPremium }">{{ planLabel }}</span>
|
|
|
|
|
<RouterLink v-if="!isPremium" to="/upgrade" class="up-link">업그레이드 →</RouterLink>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2026-06-06 14:08:01 +09:00
|
|
|
</section>
|
|
|
|
|
|
2026-06-27 23:53:32 +09:00
|
|
|
<button type="button" class="primary-btn" @click="goEdit">이름 변경</button>
|
2026-06-06 14:08:01 +09:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.account-info {
|
|
|
|
|
max-width: 560px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
}
|
|
|
|
|
.back {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 0.3rem;
|
|
|
|
|
margin-bottom: 0.75rem;
|
|
|
|
|
padding: 0.3rem 0.1rem;
|
|
|
|
|
border: 0;
|
|
|
|
|
background: transparent;
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
opacity: 0.75;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
}
|
|
|
|
|
.back:hover {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
.back svg {
|
|
|
|
|
width: 18px;
|
|
|
|
|
height: 18px;
|
|
|
|
|
}
|
|
|
|
|
.page-title {
|
|
|
|
|
font-size: 1.4rem;
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
}
|
|
|
|
|
.card {
|
|
|
|
|
background: var(--color-background-soft);
|
|
|
|
|
border: 1px solid var(--color-border);
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
.row {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
padding: 0.95rem 1.1rem;
|
|
|
|
|
border-bottom: 1px solid var(--color-border);
|
|
|
|
|
}
|
|
|
|
|
.row:last-child {
|
|
|
|
|
border-bottom: 0;
|
|
|
|
|
}
|
|
|
|
|
.k {
|
|
|
|
|
font-size: 0.88rem;
|
|
|
|
|
opacity: 0.65;
|
|
|
|
|
}
|
|
|
|
|
.v {
|
|
|
|
|
font-size: 0.95rem;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
text-align: right;
|
|
|
|
|
word-break: break-all;
|
|
|
|
|
}
|
2026-06-28 11:02:44 +09:00
|
|
|
.v .premium {
|
|
|
|
|
color: #b8860b;
|
|
|
|
|
}
|
|
|
|
|
.up-link {
|
|
|
|
|
margin-left: 0.5rem;
|
|
|
|
|
font-size: 0.82rem;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: hsla(160, 100%, 37%, 1);
|
|
|
|
|
}
|
2026-06-06 14:08:01 +09:00
|
|
|
.primary-btn {
|
|
|
|
|
width: 100%;
|
|
|
|
|
margin-top: 1.25rem;
|
|
|
|
|
padding: 0.8rem 1rem;
|
|
|
|
|
border: 1px solid hsla(160, 100%, 37%, 1);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
background: hsla(160, 100%, 37%, 1);
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 0.98rem;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
.primary-btn:hover {
|
|
|
|
|
background: hsla(160, 100%, 32%, 1);
|
|
|
|
|
}
|
|
|
|
|
.hint {
|
|
|
|
|
margin-top: 1.25rem;
|
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
opacity: 0.6;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
</style>
|