관리자 토스트 표시 컴포넌트 공통화

This commit is contained in:
2026-07-23 16:29:19 +09:00
parent 180213f6ed
commit f1bc980b61
17 changed files with 63 additions and 149 deletions

View File

@@ -200,17 +200,6 @@ onMounted(showStoredToast)
@preview="previewPost"
@delete="deletePost"
/>
<div
v-if="toast"
class="admin-post-edit__toast fixed right-5 top-5 z-[100] max-w-[min(24rem,calc(100vw-2.5rem))] rounded border px-4 py-3 text-sm font-semibold shadow-lg"
:class="{
'border-green-200 bg-green-50 text-green-800': toast.type === 'success',
'border-red-200 bg-red-50 text-red-800': toast.type === 'error',
'border-line bg-white text-ink': toast.type === 'info'
}"
role="status"
>
{{ toast.message }}
</div>
<AdminToast :toast="toast" />
</section>
</template>

View File

@@ -203,17 +203,6 @@ onBeforeRouteLeave(async () => {
</p>
</div>
</div>
<div
v-if="toast"
class="admin-post-editor__toast fixed right-5 top-5 z-[100] max-w-[min(24rem,calc(100vw-2.5rem))] rounded border px-4 py-3 text-sm font-semibold shadow-lg"
:class="{
'border-green-200 bg-green-50 text-green-800': toast.type === 'success',
'border-red-200 bg-red-50 text-red-800': toast.type === 'error',
'border-line bg-white text-ink': toast.type === 'info'
}"
role="status"
>
{{ toast.message }}
</div>
<AdminToast :toast="toast" />
</section>
</template>