diff --git a/components/admin/AdminEditorBlockPanel.vue b/components/admin/AdminEditorBlockPanel.vue index b141f7d..47f175c 100644 --- a/components/admin/AdminEditorBlockPanel.vue +++ b/components/admin/AdminEditorBlockPanel.vue @@ -34,7 +34,8 @@ const emit = defineEmits([ 'update-quote-background', 'update-callout-options', 'update-code-options', - 'update-toggle-options' + 'update-toggle-options', + 'update-inline-color' ]) const backgroundLabels = { @@ -50,6 +51,15 @@ const backgroundSwatches = { ...CALLOUT_BACKGROUND_SWATCHES } +const inlineColorSwatches = { + gray: '#6b7280', + blue: '#0055ff', + green: '#16ae68', + yellow: '#a16207', + red: '#e60000', + purple: '#8800ff' +} + const languageOptions = ['', 'javascript', 'html', 'css', 'vue', 'json', 'bash', 'markdown', 'sql'] /** @@ -80,6 +90,13 @@ const getQuoteBackgroundLabel = (background) => QUOTE_BACKGROUND_LABELS[backgrou */ const getQuoteBackgroundSwatch = (background) => QUOTE_BACKGROUND_SWATCHES[background] || QUOTE_BACKGROUND_SWATCHES.gray +/** + * 인라인 색상 스와치를 반환한다. + * @param {string} color - 색상 키 + * @returns {string} CSS 색상 + */ +const getInlineColorSwatch = (color) => inlineColorSwatches[color] || inlineColorSwatches.gray + /** * 블록 종류 라벨 * @returns {string} @@ -93,6 +110,10 @@ const panelTitle = computed(() => { return '갤러리' } + if (props.panel.kind === 'inline-color') { + return '텍스트 색상' + } + if (props.panel.kind === 'embed') { return '임베드' } @@ -129,6 +150,10 @@ const panelMeta = computed(() => { return `${props.panel.images.length}개 이미지` } + if (props.panel.kind === 'inline-color') { + return '선택한 텍스트' + } + if (props.panel.kind === 'embed') { return 'YouTube·X 등 URL' } @@ -198,7 +223,36 @@ const onPanelFocusOut = (event) => {
-