사이트 정보 카드 분리
This commit is contained in:
196
components/admin/AdminSiteInfoSettingsCard.vue
Normal file
196
components/admin/AdminSiteInfoSettingsCard.vue
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
<script setup>
|
||||||
|
const logoInputRef = ref(null)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 사이트 정보 설정 카드
|
||||||
|
* @property {Object} form - 사이트 설정 폼 객체
|
||||||
|
* @property {boolean} editing - 편집 모드 여부
|
||||||
|
* @property {boolean} saving - 저장 중 여부
|
||||||
|
* @property {boolean} uploadingLogo - 로고 업로드 중 여부
|
||||||
|
* @property {boolean} hasChanges - 변경 여부
|
||||||
|
*/
|
||||||
|
defineProps({
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
editing: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
saving: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
uploadingLogo: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
hasChanges: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
defineEmits(['begin', 'cancel', 'save', 'upload-logo'])
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 로고 파일 선택창을 연다.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
const openLogoFilePicker = () => {
|
||||||
|
logoInputRef.value?.click()
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<section
|
||||||
|
id="admin-settings-section-misc"
|
||||||
|
class="admin-site-info-settings-card admin-settings-screen__card rounded-xl border border-[#e6e8eb] bg-white p-6 shadow-[0_1px_2px_rgba(15,23,42,0.04)]"
|
||||||
|
>
|
||||||
|
<div class="flex items-start justify-between gap-4">
|
||||||
|
<div class="min-w-0 flex-1">
|
||||||
|
<h2 class="text-base font-semibold text-[#15171a] md:text-lg">
|
||||||
|
사이트 정보
|
||||||
|
</h2>
|
||||||
|
<p
|
||||||
|
v-if="!editing"
|
||||||
|
class="mr-5 mt-1 text-pretty text-sm leading-relaxed text-[#657080]"
|
||||||
|
>
|
||||||
|
로고, 공개 URL, 푸터 저작권 문구를 관리합니다.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="-mr-1 mt-[-5px] flex shrink-0 items-center justify-start gap-2">
|
||||||
|
<template v-if="!editing">
|
||||||
|
<button
|
||||||
|
class="inline-flex h-7 cursor-pointer items-center justify-center rounded px-3 text-sm font-semibold whitespace-nowrap text-[#15171a] transition hover:bg-[#eceff2] hover:text-black"
|
||||||
|
type="button"
|
||||||
|
@click="$emit('begin')"
|
||||||
|
>
|
||||||
|
편집
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<button
|
||||||
|
class="inline-flex h-7 cursor-pointer items-center justify-center rounded px-3 text-sm font-semibold whitespace-nowrap text-[#5d6673] transition hover:bg-[#eceff2] hover:text-[#15171a]"
|
||||||
|
type="button"
|
||||||
|
:disabled="saving"
|
||||||
|
@click="$emit('cancel')"
|
||||||
|
>
|
||||||
|
취소
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="inline-flex h-7 cursor-pointer items-center justify-center rounded px-3 text-sm font-semibold whitespace-nowrap text-[#15171a] transition hover:bg-[#eceff2] hover:text-black disabled:opacity-50"
|
||||||
|
type="button"
|
||||||
|
:disabled="saving || !hasChanges"
|
||||||
|
@click="$emit('save')"
|
||||||
|
>
|
||||||
|
{{ saving ? '저장 중' : '저장' }}
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="!editing"
|
||||||
|
class="admin-site-info-settings-card__readonly admin-settings-screen__misc-readonly grid gap-5 pt-5"
|
||||||
|
>
|
||||||
|
<div class="flex flex-col gap-5 md:flex-row md:items-start">
|
||||||
|
<div
|
||||||
|
class="admin-settings-screen__logo-preview grid h-16 w-16 shrink-0 place-items-center overflow-hidden rounded-2xl bg-[#f7f8fa]"
|
||||||
|
:class="form.logoUrl ? 'border border-[#e6e8eb]' : 'border border-dashed border-[#cfd6df]'"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="form.logoUrl"
|
||||||
|
class="h-full w-full object-cover"
|
||||||
|
:src="form.logoUrl"
|
||||||
|
alt="사이트 로고"
|
||||||
|
>
|
||||||
|
<span v-else class="text-sm font-semibold text-[#8b95a1]">
|
||||||
|
미등록
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="admin-settings-screen__readonly-list grid min-w-0 flex-1 gap-4 text-sm">
|
||||||
|
<div class="admin-settings-screen__readonly-row grid gap-1 md:grid-cols-[7.5rem_minmax(0,1fr)] md:items-center md:gap-5">
|
||||||
|
<h3 class="text-sm font-normal text-[#3f4650]">
|
||||||
|
사이트 URL
|
||||||
|
</h3>
|
||||||
|
<p class="min-w-0 break-all text-sm font-normal leading-relaxed text-[#15171a]">
|
||||||
|
{{ form.siteUrl || '—' }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="admin-settings-screen__readonly-row grid gap-1 md:grid-cols-[7.5rem_minmax(0,1fr)] md:items-center md:gap-5">
|
||||||
|
<h3 class="text-sm font-normal text-[#3f4650]">
|
||||||
|
저작권 문구
|
||||||
|
</h3>
|
||||||
|
<p class="min-w-0 whitespace-pre-wrap text-sm font-normal leading-relaxed text-[#15171a]">
|
||||||
|
{{ form.copyrightText || '—' }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else class="admin-site-info-settings-card__edit admin-settings-screen__card-body grid gap-6">
|
||||||
|
<div class="flex flex-col gap-5 md:flex-row md:items-center md:justify-between">
|
||||||
|
<div class="flex items-center gap-4">
|
||||||
|
<div class="grid h-20 w-20 shrink-0 place-items-center overflow-hidden rounded-2xl border border-[#e6e8eb] bg-[#f7f8fa]">
|
||||||
|
<img
|
||||||
|
v-if="form.logoUrl"
|
||||||
|
class="h-full w-full object-cover"
|
||||||
|
:src="form.logoUrl"
|
||||||
|
alt="사이트 로고"
|
||||||
|
>
|
||||||
|
<span v-else class="text-2xl font-semibold text-[#9aa3ad]">
|
||||||
|
{{ form.logoText || '井' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3 class="text-base font-semibold text-[#15171a]">
|
||||||
|
로고
|
||||||
|
</h3>
|
||||||
|
<p class="mt-1 max-w-md text-sm leading-relaxed text-[#657080]">
|
||||||
|
1:1 비율 이미지로 등록합니다. 같은 이미지가 공개 로고와 파비콘으로 함께 사용됩니다.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
class="h-10 shrink-0 rounded-md border border-[#dce0e5] bg-white px-4 text-sm font-semibold text-[#15171a] transition-colors hover:bg-[#f3f5f7] disabled:opacity-50"
|
||||||
|
type="button"
|
||||||
|
:disabled="uploadingLogo"
|
||||||
|
@click="openLogoFilePicker"
|
||||||
|
>
|
||||||
|
{{ uploadingLogo ? '업로드 중' : form.logoUrl ? '로고 변경' : '로고 등록' }}
|
||||||
|
</button>
|
||||||
|
<input
|
||||||
|
ref="logoInputRef"
|
||||||
|
class="hidden"
|
||||||
|
type="file"
|
||||||
|
accept="image/jpeg,image/png,image/webp"
|
||||||
|
:disabled="uploadingLogo"
|
||||||
|
@change="$emit('upload-logo', $event)"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="admin-settings-screen__field grid gap-2 text-sm">
|
||||||
|
<span class="font-medium text-[#3f4650]">사이트 URL</span>
|
||||||
|
<input
|
||||||
|
v-model="form.siteUrl"
|
||||||
|
class="rounded-md border border-[#dce0e5] bg-white px-3 py-2 text-[#15171a] outline-none focus:border-[#15171a] focus:ring-1 focus:ring-[#15171a]"
|
||||||
|
type="url"
|
||||||
|
required
|
||||||
|
>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="admin-settings-screen__field grid gap-2 text-sm">
|
||||||
|
<span class="font-medium text-[#3f4650]">저작권 문구</span>
|
||||||
|
<input
|
||||||
|
v-model="form.copyrightText"
|
||||||
|
class="rounded-md border border-[#dce0e5] bg-white px-3 py-2 text-[#15171a] outline-none focus:border-[#15171a] focus:ring-1 focus:ring-[#15171a]"
|
||||||
|
type="text"
|
||||||
|
required
|
||||||
|
>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
@@ -258,9 +258,10 @@
|
|||||||
| pages/admin/tags/index.vue | 태그 관리(메인 태그 드래그 정렬 자동 저장·more vert 메뉴, 일반 태그 배지 more vert 메뉴·검색/정렬, 태그 추가 버튼), 액션 피드백 토스트 |
|
| pages/admin/tags/index.vue | 태그 관리(메인 태그 드래그 정렬 자동 저장·more vert 메뉴, 일반 태그 배지 more vert 메뉴·검색/정렬, 태그 추가 버튼), 액션 피드백 토스트 |
|
||||||
| pages/admin/tags/new.vue | 태그 생성 |
|
| pages/admin/tags/new.vue | 태그 생성 |
|
||||||
| pages/admin/tags/[id].vue | 태그 수정 |
|
| pages/admin/tags/[id].vue | 태그 수정 |
|
||||||
| pages/admin/settings/index.vue | 사이트 설정 Ghost형 전체 화면, 카드별 필드만 PATCH하고 성공 필드만 폼에 반영하는 독립 저장, **블로그 제목·설명** 편집 상태·저장 요청·스냅샷 복원 연결, **POST 설정** 편집 상태·저장 요청·스냅샷 복원 연결, **사이트 정보**(로고 미등록 점선 박스·URL·저작권 읽기 행), **SNS 정보**(아이콘 프리셋+주소 목록형 관리), **메인 화면**(라이트·다크 커버 상하 개별 프리뷰·드롭존 업로드·오버레이 텍스트), **브랜드** 컬러 정규화·편집 상태·저장 요청 연결, **어나운스 바**(사용 토글·맞춤 설정·hex 배경색·텍스트 정렬·읽기 모드 비활성 톤), **스팸 필터** 편집 상태·저장 요청·값 정규화 연결, **사이트 용량** 데이터 조회·새로고침 이벤트 연결, **게시물 내보내기** 요청 body 생성·작업 등록·목록 갱신·작업 액션 연결, **게시물 가져오기** 파일 검증·작업 생성 요청·작업 센터 모달 연결, 진행 중 요청 버튼 잠금 |
|
| pages/admin/settings/index.vue | 사이트 설정 Ghost형 전체 화면, 카드별 필드만 PATCH하고 성공 필드만 폼에 반영하는 독립 저장, **블로그 제목·설명** 편집 상태·저장 요청·스냅샷 복원 연결, **사이트 정보** 편집 상태·저장 요청·로고 업로드 처리 연결, **POST 설정** 편집 상태·저장 요청·스냅샷 복원 연결, **SNS 정보**(아이콘 프리셋+주소 목록형 관리), **메인 화면**(라이트·다크 커버 상하 개별 프리뷰·드롭존 업로드·오버레이 텍스트), **브랜드** 컬러 정규화·편집 상태·저장 요청 연결, **어나운스 바**(사용 토글·맞춤 설정·hex 배경색·텍스트 정렬·읽기 모드 비활성 톤), **스팸 필터** 편집 상태·저장 요청·값 정규화 연결, **사이트 용량** 데이터 조회·새로고침 이벤트 연결, **게시물 내보내기** 요청 body 생성·작업 등록·목록 갱신·작업 액션 연결, **게시물 가져오기** 파일 검증·작업 생성 요청·작업 센터 모달 연결, 진행 중 요청 버튼 잠금 |
|
||||||
| components/admin/AdminBrandSettingsCard.vue | 관리자 설정 브랜드 컬러 카드(읽기 미리보기·색상 입력·텍스트 입력·예시 배지·저장 이벤트) |
|
| components/admin/AdminBrandSettingsCard.vue | 관리자 설정 브랜드 컬러 카드(읽기 미리보기·색상 입력·텍스트 입력·예시 배지·저장 이벤트) |
|
||||||
| components/admin/AdminTitleDescriptionSettingsCard.vue | 관리자 설정 블로그 제목·설명 카드(읽기 행·편집 입력·공개 화면 미리보기·저장 이벤트) |
|
| components/admin/AdminTitleDescriptionSettingsCard.vue | 관리자 설정 블로그 제목·설명 카드(읽기 행·편집 입력·공개 화면 미리보기·저장 이벤트) |
|
||||||
|
| components/admin/AdminSiteInfoSettingsCard.vue | 관리자 설정 사이트 정보 카드(로고 미리보기·로고 파일 선택·사이트 URL·저작권 문구·저장 이벤트) |
|
||||||
| components/admin/AdminPostSettingsCard.vue | 관리자 설정 POST 설정 카드(수정일 표시·태그 최대 개수·공개 목록 표시개수·업로드 제한·저장 이벤트) |
|
| components/admin/AdminPostSettingsCard.vue | 관리자 설정 POST 설정 카드(수정일 표시·태그 최대 개수·공개 목록 표시개수·업로드 제한·저장 이벤트) |
|
||||||
| components/admin/AdminBackupSummaryCard.vue | 관리자 설정 사이트 용량 카드(콘텐츠 수량·미디어 용량·자동 생성 이미지·내보내기 파일·큰 파일·새로고침 이벤트) |
|
| components/admin/AdminBackupSummaryCard.vue | 관리자 설정 사이트 용량 카드(콘텐츠 수량·미디어 용량·자동 생성 이미지·내보내기 파일·큰 파일·새로고침 이벤트) |
|
||||||
| components/admin/AdminPostExportJobList.vue | 관리자 설정 최근 내보내기 작업 목록 카드(상태·진행도·실패 상세·파일 선택·선택 다운로드 이벤트) |
|
| components/admin/AdminPostExportJobList.vue | 관리자 설정 최근 내보내기 작업 목록 카드(상태·진행도·실패 상세·파일 선택·선택 다운로드 이벤트) |
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
- 거대 컴포넌트 책임 분리 진행.
|
- 거대 컴포넌트 책임 분리 진행.
|
||||||
- `components/admin/AdminMarkdownEditor.vue`: 미디어 모달, 슬래시 명령, 히스토리·선택 복원, 라이브/소스 전환 로직을 단계적으로 composable 또는 하위 컴포넌트로 분리.
|
- `components/admin/AdminMarkdownEditor.vue`: 미디어 모달, 슬래시 명령, 히스토리·선택 복원, 라이브/소스 전환 로직을 단계적으로 composable 또는 하위 컴포넌트로 분리.
|
||||||
- `pages/admin/settings/index.vue`: Import 작업 센터·사이트 용량·게시물 가져오기·게시물 내보내기 요청·최근 내보내기 작업 목록·스팸 필터·브랜드·POST 설정·블로그 제목/설명처럼 설정 카드별 저장·상태·검증 로직을 카드 컴포넌트 또는 composable 단위로 추가 분리.
|
- `pages/admin/settings/index.vue`: Import 작업 센터·사이트 용량·게시물 가져오기·게시물 내보내기 요청·최근 내보내기 작업 목록·스팸 필터·브랜드·POST 설정·블로그 제목/설명·사이트 정보처럼 설정 카드별 저장·상태·검증 로직을 카드 컴포넌트 또는 composable 단위로 추가 분리.
|
||||||
- `pages/admin/settings/index.vue`: 업로드 제한 셀렉트가 블로그 제목·설명 읽기 카드 안에 있으나 저장 필드는 POST 설정에 묶여 있어, 별도 업로드 제한 카드 또는 POST 설정 편집 영역으로 위치와 저장 흐름을 정리.
|
- `pages/admin/settings/index.vue`: 업로드 제한 셀렉트가 블로그 제목·설명 읽기 카드 안에 있으나 저장 필드는 POST 설정에 묶여 있어, 별도 업로드 제한 카드 또는 POST 설정 편집 영역으로 위치와 저장 흐름을 정리.
|
||||||
- `components/content/ContentMarkdownRenderer.vue`: 파싱·블록 렌더링·라이브 편집 중개·라이트박스·광고 삽입 책임을 분리.
|
- `components/content/ContentMarkdownRenderer.vue`: 파싱·블록 렌더링·라이브 편집 중개·라이트박스·광고 삽입 책임을 분리.
|
||||||
- `components/admin/AdminPostForm.vue`: 태그 입력, 대표 이미지 선택, 발행/초안 저장 상태, 우측 설정 패널 책임을 분리.
|
- `components/admin/AdminPostForm.vue`: 태그 입력, 대표 이미지 선택, 발행/초안 저장 상태, 우측 설정 패널 책임을 분리.
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# 업데이트 이력
|
# 업데이트 이력
|
||||||
|
|
||||||
|
## v1.11.28
|
||||||
|
|
||||||
|
- 관리자 설정의 사이트 정보 카드를 `AdminSiteInfoSettingsCard` 컴포넌트로 분리.
|
||||||
|
- 로고 미리보기·로고 파일 선택·사이트 URL·저작권 문구 렌더링 책임을 설정 화면에서 하위 컴포넌트로 이동.
|
||||||
|
- 설정 화면은 사이트 정보 편집 상태·저장 요청·로고 업로드 처리만 담당하도록 정리.
|
||||||
|
|
||||||
## v1.11.27
|
## v1.11.27
|
||||||
|
|
||||||
- 관리자 설정의 블로그 제목·설명 카드를 `AdminTitleDescriptionSettingsCard` 컴포넌트로 분리.
|
- 관리자 설정의 블로그 제목·설명 카드를 `AdminTitleDescriptionSettingsCard` 컴포넌트로 분리.
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "sori.studio",
|
"name": "sori.studio",
|
||||||
"version": "1.11.27",
|
"version": "1.11.28",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "sori.studio",
|
"name": "sori.studio",
|
||||||
"version": "1.11.27",
|
"version": "1.11.28",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxtjs/tailwindcss": "^6.14.0",
|
"@nuxtjs/tailwindcss": "^6.14.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sori.studio",
|
"name": "sori.studio",
|
||||||
"version": "1.11.27",
|
"version": "1.11.28",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"imports": {
|
"imports": {
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ const postExportMaxFileSizeMb = ref(500)
|
|||||||
const postImportExportPanel = ref('')
|
const postImportExportPanel = ref('')
|
||||||
const errorMessage = ref('')
|
const errorMessage = ref('')
|
||||||
const { toast, showToast } = useAdminToast()
|
const { toast, showToast } = useAdminToast()
|
||||||
const logoInputRef = ref(null)
|
|
||||||
const homeCoverInputRef = ref(null)
|
const homeCoverInputRef = ref(null)
|
||||||
const homeCoverDarkInputRef = ref(null)
|
const homeCoverDarkInputRef = ref(null)
|
||||||
const mainScrollRef = ref(null)
|
const mainScrollRef = ref(null)
|
||||||
@@ -1180,18 +1179,6 @@ const deletePostExportJob = async (job) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 로고 파일 선택창을 연다.
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
const openLogoFilePicker = () => {
|
|
||||||
if (!editMisc.value) {
|
|
||||||
beginEditMisc()
|
|
||||||
}
|
|
||||||
|
|
||||||
logoInputRef.value?.click()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사이트 로고를 업로드한다.
|
* 사이트 로고를 업로드한다.
|
||||||
* @param {Event} event - 파일 선택 이벤트
|
* @param {Event} event - 파일 선택 이벤트
|
||||||
@@ -2205,156 +2192,17 @@ onBeforeUnmount(() => {
|
|||||||
@save="saveTitleDescSection"
|
@save="saveTitleDescSection"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<section
|
<AdminSiteInfoSettingsCard
|
||||||
id="admin-settings-section-misc"
|
:form="form"
|
||||||
class="admin-settings-screen__card rounded-xl border border-[#e6e8eb] bg-white p-6 shadow-[0_1px_2px_rgba(15,23,42,0.04)]"
|
:editing="editMisc"
|
||||||
>
|
:saving="savingMisc"
|
||||||
<div class="flex items-start justify-between gap-4">
|
:uploading-logo="uploadingLogo"
|
||||||
<div class="min-w-0 flex-1">
|
:has-changes="hasMiscChanges"
|
||||||
<h2 class="text-base font-semibold text-[#15171a] md:text-lg">
|
@begin="beginEditMisc"
|
||||||
사이트 정보
|
@cancel="cancelEditMisc"
|
||||||
</h2>
|
@save="saveMiscSection"
|
||||||
<p
|
@upload-logo="uploadLogo"
|
||||||
v-if="!editMisc"
|
/>
|
||||||
class="mr-5 mt-1 text-pretty text-sm leading-relaxed text-[#657080]"
|
|
||||||
>
|
|
||||||
로고, 공개 URL, 푸터 저작권 문구를 관리합니다.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="-mr-1 mt-[-5px] flex shrink-0 items-center justify-start gap-2">
|
|
||||||
<template v-if="!editMisc">
|
|
||||||
<button
|
|
||||||
class="inline-flex h-7 cursor-pointer items-center justify-center rounded px-3 text-sm font-semibold whitespace-nowrap text-[#15171a] transition hover:bg-[#eceff2] hover:text-black"
|
|
||||||
type="button"
|
|
||||||
@click="beginEditMisc"
|
|
||||||
>
|
|
||||||
편집
|
|
||||||
</button>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<button
|
|
||||||
class="inline-flex h-7 cursor-pointer items-center justify-center rounded px-3 text-sm font-semibold whitespace-nowrap text-[#5d6673] transition hover:bg-[#eceff2] hover:text-[#15171a]"
|
|
||||||
type="button"
|
|
||||||
:disabled="savingMisc"
|
|
||||||
@click="cancelEditMisc"
|
|
||||||
>
|
|
||||||
취소
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="inline-flex h-7 cursor-pointer items-center justify-center rounded px-3 text-sm font-semibold whitespace-nowrap text-[#15171a] transition hover:bg-[#eceff2] hover:text-black disabled:opacity-50"
|
|
||||||
type="button"
|
|
||||||
:disabled="savingMisc || !hasMiscChanges"
|
|
||||||
@click="saveMiscSection"
|
|
||||||
>
|
|
||||||
{{ savingMisc ? '저장 중' : '저장' }}
|
|
||||||
</button>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
v-if="!editMisc"
|
|
||||||
class="admin-settings-screen__misc-readonly grid gap-5 pt-5"
|
|
||||||
>
|
|
||||||
<div class="flex flex-col gap-5 md:flex-row md:items-start">
|
|
||||||
<div
|
|
||||||
class="admin-settings-screen__logo-preview grid h-16 w-16 shrink-0 place-items-center overflow-hidden rounded-2xl bg-[#f7f8fa]"
|
|
||||||
:class="form.logoUrl ? 'border border-[#e6e8eb]' : 'border border-dashed border-[#cfd6df]'"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
v-if="form.logoUrl"
|
|
||||||
class="h-full w-full object-cover"
|
|
||||||
:src="form.logoUrl"
|
|
||||||
alt="사이트 로고"
|
|
||||||
>
|
|
||||||
<span v-else class="text-sm font-semibold text-[#8b95a1]">
|
|
||||||
미등록
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="admin-settings-screen__readonly-list grid min-w-0 flex-1 gap-4 text-sm">
|
|
||||||
<div class="admin-settings-screen__readonly-row grid gap-1 md:grid-cols-[7.5rem_minmax(0,1fr)] md:items-center md:gap-5">
|
|
||||||
<h3 class="text-sm font-normal text-[#3f4650]">
|
|
||||||
사이트 URL
|
|
||||||
</h3>
|
|
||||||
<p class="min-w-0 break-all text-sm font-normal leading-relaxed text-[#15171a]">
|
|
||||||
{{ form.siteUrl || '—' }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="admin-settings-screen__readonly-row grid gap-1 md:grid-cols-[7.5rem_minmax(0,1fr)] md:items-center md:gap-5">
|
|
||||||
<h3 class="text-sm font-normal text-[#3f4650]">
|
|
||||||
저작권 문구
|
|
||||||
</h3>
|
|
||||||
<p class="min-w-0 whitespace-pre-wrap text-sm font-normal leading-relaxed text-[#15171a]">
|
|
||||||
{{ form.copyrightText || '—' }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else class="admin-settings-screen__card-body grid gap-6">
|
|
||||||
<div class="flex flex-col gap-5 md:flex-row md:items-center md:justify-between">
|
|
||||||
<div class="flex items-center gap-4">
|
|
||||||
<div class="grid h-20 w-20 shrink-0 place-items-center overflow-hidden rounded-2xl border border-[#e6e8eb] bg-[#f7f8fa]">
|
|
||||||
<img
|
|
||||||
v-if="form.logoUrl"
|
|
||||||
class="h-full w-full object-cover"
|
|
||||||
:src="form.logoUrl"
|
|
||||||
alt="사이트 로고"
|
|
||||||
>
|
|
||||||
<span v-else class="text-2xl font-semibold text-[#9aa3ad]">
|
|
||||||
{{ form.logoText || '井' }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h3 class="text-base font-semibold text-[#15171a]">
|
|
||||||
로고
|
|
||||||
</h3>
|
|
||||||
<p class="mt-1 max-w-md text-sm leading-relaxed text-[#657080]">
|
|
||||||
1:1 비율 이미지로 등록합니다. 같은 이미지가 공개 로고와 파비콘으로 함께 사용됩니다.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button
|
|
||||||
class="h-10 shrink-0 rounded-md border border-[#dce0e5] bg-white px-4 text-sm font-semibold text-[#15171a] transition-colors hover:bg-[#f3f5f7] disabled:opacity-50"
|
|
||||||
type="button"
|
|
||||||
:disabled="uploadingLogo"
|
|
||||||
@click="openLogoFilePicker"
|
|
||||||
>
|
|
||||||
{{ uploadingLogo ? '업로드 중' : form.logoUrl ? '로고 변경' : '로고 등록' }}
|
|
||||||
</button>
|
|
||||||
<input
|
|
||||||
ref="logoInputRef"
|
|
||||||
class="hidden"
|
|
||||||
type="file"
|
|
||||||
accept="image/jpeg,image/png,image/webp"
|
|
||||||
:disabled="uploadingLogo"
|
|
||||||
@change="uploadLogo"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<label class="admin-settings-screen__field grid gap-2 text-sm">
|
|
||||||
<span class="font-medium text-[#3f4650]">사이트 URL</span>
|
|
||||||
<input
|
|
||||||
v-model="form.siteUrl"
|
|
||||||
class="rounded-md border border-[#dce0e5] bg-white px-3 py-2 text-[#15171a] outline-none focus:border-[#15171a] focus:ring-1 focus:ring-[#15171a]"
|
|
||||||
type="url"
|
|
||||||
required
|
|
||||||
>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label class="admin-settings-screen__field grid gap-2 text-sm">
|
|
||||||
<span class="font-medium text-[#3f4650]">저작권 문구</span>
|
|
||||||
<input
|
|
||||||
v-model="form.copyrightText"
|
|
||||||
class="rounded-md border border-[#dce0e5] bg-white px-3 py-2 text-[#15171a] outline-none focus:border-[#15171a] focus:ring-1 focus:ring-[#15171a]"
|
|
||||||
type="text"
|
|
||||||
required
|
|
||||||
>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section
|
<section
|
||||||
id="admin-settings-section-social"
|
id="admin-settings-section-social"
|
||||||
|
|||||||
Reference in New Issue
Block a user