From 6763d353c3537b44fba4bb37d15385adc63f2b95 Mon Sep 17 00:00:00 2001 From: clkim Date: Thu, 30 Oct 2025 19:56:02 +0900 Subject: [PATCH 1/6] =?UTF-8?q?feat.=20sns=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=A0=9C=EC=9E=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.vue | 6 ++- layers/components/atoms/Button/Sns.vue | 9 +++-- layers/components/blocks/modal/Toast.vue | 50 ++++++++++++++++++++++++ layers/stores/useModalStore.ts | 19 +++++++++ 4 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 layers/components/blocks/modal/Toast.vue diff --git a/app/app.vue b/app/app.vue index 7e3e42c..f1ddb8d 100644 --- a/app/app.vue +++ b/app/app.vue @@ -15,7 +15,7 @@ const scrollStore = useScrollStore() const { setGameData } = gameDataStore const { gameData } = storeToRefs(gameDataStore) -const { youtube, confirm, alert, handleResetYoutube } = modalStore +const { youtube, confirm, alert, toast, handleResetYoutube } = modalStore const metaData = ref(null) @@ -174,6 +174,10 @@ onBeforeUnmount(() => { :modal-name="alert.storeModalName" @confirm-button-event="alert.storeConfirmButtonEvent" /> + diff --git a/layers/components/atoms/Button/Sns.vue b/layers/components/atoms/Button/Sns.vue index 5ec4a1b..ca3194f 100644 --- a/layers/components/atoms/Button/Sns.vue +++ b/layers/components/atoms/Button/Sns.vue @@ -3,6 +3,9 @@ const showSnsList = ref(false) const isForceClosed = ref(false) const { gameData } = useGameDataStore() +const modalStore = useModalStore() + +const { handleOpenToast } = modalStore const snsBackgroundColor = computed(() => { const colorData = gameData?.comm_sns_bg_color_json?.display @@ -42,9 +45,9 @@ const handleCopy = async () => { try { const url = window.location.href await navigator.clipboard.writeText(url) - console.log('✅ 복사 성공:', url) - } catch (err) { - console.error('❌ 복사 실패:', err) + handleOpenToast('복사 성공') + } catch (error) { + console.error('복사 실패:', error) } } diff --git a/layers/components/blocks/modal/Toast.vue b/layers/components/blocks/modal/Toast.vue new file mode 100644 index 0000000..5ea708e --- /dev/null +++ b/layers/components/blocks/modal/Toast.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/layers/stores/useModalStore.ts b/layers/stores/useModalStore.ts index ac8e6ca..ae98e32 100644 --- a/layers/stores/useModalStore.ts +++ b/layers/stores/useModalStore.ts @@ -95,13 +95,32 @@ export const useModalStore = defineStore('modalStore', () => { scrollStore.controlScrollLock(false) } + // toast ------------------ + const toast = { + storeIsOpen: ref(false), + storeContentText: ref(''), + } + + const handleOpenToast = (contentText: string) => { + toast.storeIsOpen.value = true + toast.storeContentText.value = contentText + } + + const handleCloseToast = () => { + toast.storeIsOpen.value = false + toast.storeContentText.value = '' + } + return { alert, confirm, youtube, + toast, handleOpenAlert, handleOpenConfirm, handleOpenYoutube, handleResetYoutube, + handleOpenToast, + handleCloseToast, } }) From d07ec96b34e16f3860a0ed0942650871ee6d1f34 Mon Sep 17 00:00:00 2001 From: clkim Date: Thu, 30 Oct 2025 20:20:38 +0900 Subject: [PATCH 2/6] =?UTF-8?q?fix.=20=EA=B8=B0=EB=B3=B8=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.vue | 21 +++------------------ layers/components/atoms/Button/index.vue | 11 ++++++++--- layers/types/api/gameData.ts | 6 +----- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/app/app.vue b/app/app.vue index f1ddb8d..3c43621 100644 --- a/app/app.vue +++ b/app/app.vue @@ -37,31 +37,16 @@ const setupAllMetaData = (data: GameDataValue) => { { rel: 'icon', type: 'image/x-icon', - sizes: '16x16', - href: faviconPath['16_16'], - }, - { - rel: 'icon', - type: 'image/x-icon', - sizes: '32x32', - href: faviconPath['32_32'], - }, - { - rel: 'icon', - type: 'image/png', - sizes: '72x72', - href: faviconPath['72_72'], + href: getResolvedHost(faviconPath[0]), }, { rel: 'apple-touch-icon', - sizes: '180x180', - href: faviconPath['180_180'], + href: getResolvedHost(faviconPath[1]), }, { rel: 'icon', type: 'image/png', - sizes: '192x192', - href: faviconPath['192_192'], + href: getResolvedHost(faviconPath[2]), }, ] diff --git a/layers/components/atoms/Button/index.vue b/layers/components/atoms/Button/index.vue index 7340858..30356c5 100644 --- a/layers/components/atoms/Button/index.vue +++ b/layers/components/atoms/Button/index.vue @@ -15,6 +15,7 @@ interface props { const props = withDefaults(defineProps(), { type: 'action', buttonSize: 'size-small md:size-large', + target: '_blank', backgroundColor: 'var(--primary)', textColor: 'var(--alternative-02)', disabled: false, @@ -22,9 +23,9 @@ const props = withDefaults(defineProps(), { const componentTag = computed((): string => { switch (props.type) { - case 'link': - case 'download': case 'external': + case 'download': + case 'link': return 'a' case 'internal': return 'AtomsLocaleLink' @@ -35,7 +36,11 @@ const componentTag = computed((): string => { const componentProps = computed(() => { const baseProps = { disabled: props.disabled } - if (props.type === 'external') { + if ( + props.type === 'external' || + props.type === 'download' || + props.type === 'link' + ) { return { ...baseProps, href: props.href, diff --git a/layers/types/api/gameData.ts b/layers/types/api/gameData.ts index 56c7cc8..9bf3831 100644 --- a/layers/types/api/gameData.ts +++ b/layers/types/api/gameData.ts @@ -70,11 +70,7 @@ export interface GameDataGameFont { // 파비콘 경로 타입 export interface GameDataFavicon { - '16_16': string - '32_32': string - '72_72': string - '180_180': string - '192_192': string + [index: number]: string } // 메타 태그 타입 From 82295502202b59ac4b50bac824a4c05afe401818 Mon Sep 17 00:00:00 2001 From: clkim Date: Thu, 30 Oct 2025 21:32:17 +0900 Subject: [PATCH 3/6] =?UTF-8?q?feat.=20getResolvedHost=20=ED=95=A8?= =?UTF-8?q?=EC=88=98=20=EC=B6=94=EA=B0=80,=20img=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layers/components/atoms/Button/Launcher.vue | 5 +-- layers/components/atoms/Button/Sns.vue | 4 +- layers/components/atoms/Img.vue | 37 +++++++++++-------- layers/components/atoms/ResourcesImg.vue | 41 +++++++++++++++++++++ layers/templates/GrContents01/index.vue | 2 +- layers/utils/styleUtil.ts | 20 ++++++++-- 6 files changed, 84 insertions(+), 25 deletions(-) create mode 100644 layers/components/atoms/ResourcesImg.vue diff --git a/layers/components/atoms/Button/Launcher.vue b/layers/components/atoms/Button/Launcher.vue index 8918489..16d9ece 100644 --- a/layers/components/atoms/Button/Launcher.vue +++ b/layers/components/atoms/Button/Launcher.vue @@ -49,9 +49,6 @@ const componentTag = computed(() => { const isDuplication = computed(() => props.type === 'duplication') const isSingle = computed(() => props.type === 'single') const platformIcon = computed(() => PLATFORM_ICON_MAP[props.platform]) -const duplicationImage = computed(() => - isDuplication.value ? DUP_IMAGE_MAP[props.platform] : '' -) const inlineStyle = computed(() => { const style: CSSProperties = {} @@ -63,7 +60,7 @@ const inlineStyle = computed(() => { style.color = props.textColor } if (props.type === 'duplication') { - style.backgroundImage = `url(${duplicationImage.value})` + style.backgroundImage = `url(${getImageHost(DUP_IMAGE_MAP[props.platform])})` } return style }) diff --git a/layers/components/atoms/Button/Sns.vue b/layers/components/atoms/Button/Sns.vue index ca3194f..0ef8347 100644 --- a/layers/components/atoms/Button/Sns.vue +++ b/layers/components/atoms/Button/Sns.vue @@ -77,7 +77,7 @@ const handleCopy = async () => { target="_blank" class="sns-item" :style="{ - backgroundImage: `url(/images/common/ic-v2-logo-${key}-fill.svg)`, + backgroundImage: `url(${getImageHost(`/images/common/ic-v2-logo-${key}-fill.svg`)})`, }" > {{ key }} @@ -87,7 +87,7 @@ const handleCopy = async () => { type="button" class="sns-item" :style="{ - backgroundImage: `url(/images/common/ic-v2-community-link-line.svg)`, + backgroundImage: `url(${getImageHost('/images/common/ic-v2-community-link-line.svg')})`, }" @click="handleCopy" > diff --git a/layers/components/atoms/Img.vue b/layers/components/atoms/Img.vue index 8ec9a47..2343cea 100644 --- a/layers/components/atoms/Img.vue +++ b/layers/components/atoms/Img.vue @@ -1,38 +1,45 @@