From 0eceea9f01b5e683800058b3bae877d8e1be2f5f Mon Sep 17 00:00:00 2001 From: klmhyeonwoo Date: Tue, 24 Sep 2024 21:17:32 +0900 Subject: [PATCH 01/15] fix: #410 Modify Nickname Placeholder --- apps/web/src/app/login/SetNicknamePage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/app/login/SetNicknamePage.tsx b/apps/web/src/app/login/SetNicknamePage.tsx index 6707ba59..11cedf41 100644 --- a/apps/web/src/app/login/SetNicknamePage.tsx +++ b/apps/web/src/app/login/SetNicknamePage.tsx @@ -33,7 +33,7 @@ export function SetNickNamePage() { 닉네임을 설정해주세요! - + From b5dd5dc36d2e33eed74a61538d757dd2fae4c08e Mon Sep 17 00:00:00 2001 From: klmhyeonwoo Date: Tue, 24 Sep 2024 21:53:45 +0900 Subject: [PATCH 02/15] fix: #409 Add Prevent External(Inapp) Browser Logic --- apps/web/src/helper/preventExternalBrowser.ts | 17 +++++++++++++++++ apps/web/src/layout/GlobalLayout.tsx | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 apps/web/src/helper/preventExternalBrowser.ts diff --git a/apps/web/src/helper/preventExternalBrowser.ts b/apps/web/src/helper/preventExternalBrowser.ts new file mode 100644 index 00000000..3433c411 --- /dev/null +++ b/apps/web/src/helper/preventExternalBrowser.ts @@ -0,0 +1,17 @@ +export function PreventExternalBrowser() { + const agent = navigator.userAgent; + const URL = document.URL; + alert("agent"); + + // NOTE: 카카오톡 인앱 브라우저 방지 + if (agent.includes("KAKAO")) { + window.open(`kakaotalk://web/openExternal?url=${encodeURIComponent(URL)}`); + } else if (agent.includes("Instagram")) { + /** + * NOTE: 현재는 해당 인스타그램 인앱 탈출 코드가 작동하지 않는 것 같음 + * 추후 카카오톡처럼 인스타그램 인앱 방지 분석 후 코드 추가 예정 + */ + } + + return null; +} diff --git a/apps/web/src/layout/GlobalLayout.tsx b/apps/web/src/layout/GlobalLayout.tsx index 6f53e5da..39464e6a 100644 --- a/apps/web/src/layout/GlobalLayout.tsx +++ b/apps/web/src/layout/GlobalLayout.tsx @@ -4,6 +4,7 @@ import { useEffect } from "react"; import { Outlet } from "react-router-dom"; import { Modal } from "@/component/common/Modal"; +import { PreventExternalBrowser } from "@/helper/preventExternalBrowser.ts"; import { useBridge } from "@/lib/provider/bridge-provider"; const siteId = import.meta.env.VITE_HOTJAR_KEY as number; @@ -36,6 +37,7 @@ export default function GlobalLayout() { `} > + ); From db11cc9a1d00e4bc8443085a3bc47f2d12e2f49a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=86=E1=85=B5=E1=86=AB=E1=84=92?= =?UTF-8?q?=E1=85=B4?= Date: Wed, 30 Oct 2024 01:59:31 +0900 Subject: [PATCH 03/15] =?UTF-8?q?fix:=20#349=20firefox=20textarea=20height?= =?UTF-8?q?=20=EB=84=98=EC=B9=A0=20=EB=95=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/component/common/input/TextArea.tsx | 1 + apps/web/src/style/global.css | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/web/src/component/common/input/TextArea.tsx b/apps/web/src/component/common/input/TextArea.tsx index 541a0d1e..206d14e2 100644 --- a/apps/web/src/component/common/input/TextArea.tsx +++ b/apps/web/src/component/common/input/TextArea.tsx @@ -46,6 +46,7 @@ export const TextArea = forwardRef(function id={id || textareaContext?.id} css={css` flex-grow: 1; + overflow: auto; ::placeholder { color: ${DESIGN_TOKEN_COLOR["gray500"]}; ${DESIGN_TOKEN_TEXT["body15Medium"]} diff --git a/apps/web/src/style/global.css b/apps/web/src/style/global.css index 711fafbb..f9660061 100644 --- a/apps/web/src/style/global.css +++ b/apps/web/src/style/global.css @@ -69,6 +69,7 @@ textarea { height: 1rem; background-color: transparent; display: none; + scrollbar-width: none; /* for firefox */ } ::-webkit-scrollbar-thumb { From e83ec521f74b82ed2b08e00d5dc3ed6370441822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=86=E1=85=B5=E1=86=AB=E1=84=92?= =?UTF-8?q?=E1=85=B4?= Date: Fri, 1 Nov 2024 02:27:35 +0900 Subject: [PATCH 04/15] =?UTF-8?q?feat:=20#416=20=EC=B1=84=EB=84=90?= =?UTF-8?q?=ED=86=A1=20=EC=97=B0=EB=8F=99,=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=97=90=EB=A7=8C=20=EB=9C=A8=EB=8F=84?= =?UTF-8?q?=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/layout/GlobalLayout.tsx | 13 +- apps/web/src/lib/channel-talk/service.ts | 200 +++++++++++++++++++++++ apps/web/src/router/index.tsx | 7 +- 3 files changed, 218 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/lib/channel-talk/service.ts diff --git a/apps/web/src/layout/GlobalLayout.tsx b/apps/web/src/layout/GlobalLayout.tsx index 39464e6a..049faec9 100644 --- a/apps/web/src/layout/GlobalLayout.tsx +++ b/apps/web/src/layout/GlobalLayout.tsx @@ -1,10 +1,12 @@ import { css } from "@emotion/react"; import Hotjar from "@hotjar/browser"; +import { PATHS } from "@layer/shared"; import { useEffect } from "react"; -import { Outlet } from "react-router-dom"; +import { Outlet, useLocation } from "react-router-dom"; import { Modal } from "@/component/common/Modal"; import { PreventExternalBrowser } from "@/helper/preventExternalBrowser.ts"; +import ChannelService from "@/lib/channel-talk/service"; import { useBridge } from "@/lib/provider/bridge-provider"; const siteId = import.meta.env.VITE_HOTJAR_KEY as number; @@ -12,11 +14,20 @@ const hotjarVersion = import.meta.env.VITE_HOTJAR_VERSION as number; export default function GlobalLayout() { const { safeAreaHeight } = useBridge(); + const location = useLocation(); useEffect(() => { Hotjar.init(siteId, hotjarVersion); }, []); + useEffect(() => { + if (location.pathname !== PATHS.myInfo()) { + ChannelService.hideChannelButton(); + } else { + ChannelService.showChannelButton(); + } + }, [location]); + return (
void; + q?: [methodName: string, ...args: any[]][]; + (...args: any): void; +} + +interface BootOption { + appearance?: string; + customLauncherSelector?: string; + hideChannelButtonOnBoot?: boolean; + hidePopup?: boolean; + language?: string; + memberHash?: string; + memberId?: string; + pluginKey: string; + profile?: Profile; + trackDefaultEvent?: boolean; + trackUtmSource?: boolean; + unsubscribe?: boolean; + unsubscribeEmail?: boolean; + unsubscribeTexting?: boolean; + zIndex?: number; +} + +interface Callback { + (error: Error | null, user: CallbackUser | null): void; +} + +interface CallbackUser { + alert: number; + avatarUrl: string; + id: string; + language: string; + memberId: string; + name?: string; + profile?: Profile | null; + tags?: string[] | null; + unsubscribeEmail: boolean; + unsubscribeTexting: boolean; +} + +interface UpdateUserInfo { + language?: string; + profile?: Profile | null; + profileOnce?: Profile; + tags?: string[] | null; + unsubscribeEmail?: boolean; + unsubscribeTexting?: boolean; +} + +interface Profile { + [key: string]: string | number | boolean | null | undefined; +} + +interface FollowUpProfile { + name?: string | null; + mobileNumber?: string | null; + email?: string | null; +} + +interface EventProperty { + [key: string]: string | number | boolean | null | undefined; +} + +type Appearance = "light" | "dark" | "system" | null; + +class ChannelService { + loadScript() { + (function () { + const w = window; + if (w.ChannelIO) { + return w.console.error("ChannelIO script included twice."); + } + const ch: IChannelIO = function () { + // eslint-disable-next-line prefer-rest-params + ch.c?.(arguments); + }; + ch.q = []; + ch.c = function (args) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + ch.q?.push(args); + }; + w.ChannelIO = ch; + function l() { + if (w.ChannelIOInitialized) { + return; + } + w.ChannelIOInitialized = true; + const s = document.createElement("script"); + s.type = "text/javascript"; + s.async = true; + s.src = "https://cdn.channel.io/plugin/ch-plugin-web.js"; + const x = document.getElementsByTagName("script")[0]; + if (x.parentNode) { + x.parentNode.insertBefore(s, x); + } + } + if (document.readyState === "complete") { + l(); + } else { + w.addEventListener("DOMContentLoaded", l); + w.addEventListener("load", l); + } + })(); + } + + boot(option: BootOption, callback?: Callback) { + window.ChannelIO?.("boot", option, callback); + } + + shutdown() { + window.ChannelIO?.("shutdown"); + } + + showMessenger() { + window.ChannelIO?.("showMessenger"); + } + + hideMessenger() { + window.ChannelIO?.("hideMessenger"); + } + + openChat(chatId?: string | number, message?: string) { + window.ChannelIO?.("openChat", chatId, message); + } + + track(eventName: string, eventProperty?: EventProperty) { + window.ChannelIO?.("track", eventName, eventProperty); + } + + onShowMessenger(callback: () => void) { + window.ChannelIO?.("onShowMessenger", callback); + } + + onHideMessenger(callback: () => void) { + window.ChannelIO?.("onHideMessenger", callback); + } + + onBadgeChanged(callback: (unread: number, alert: number) => void) { + window.ChannelIO?.("onBadgeChanged", callback); + } + + onChatCreated(callback: () => void) { + window.ChannelIO?.("onChatCreated", callback); + } + + onFollowUpChanged(callback: (profile: FollowUpProfile) => void) { + window.ChannelIO?.("onFollowUpChanged", callback); + } + + onUrlClicked(callback: (url: string) => void) { + window.ChannelIO?.("onUrlClicked", callback); + } + + clearCallbacks() { + window.ChannelIO?.("clearCallbacks"); + } + + updateUser(userInfo: UpdateUserInfo, callback?: Callback) { + window.ChannelIO?.("updateUser", userInfo, callback); + } + + addTags(tags: string[], callback?: Callback) { + window.ChannelIO?.("addTags", tags, callback); + } + + removeTags(tags: string[], callback?: Callback) { + window.ChannelIO?.("removeTags", tags, callback); + } + + setPage(page: string) { + window.ChannelIO?.("setPage", page); + } + + resetPage() { + window.ChannelIO?.("resetPage"); + } + + showChannelButton() { + window.ChannelIO?.("showChannelButton"); + } + + hideChannelButton() { + window.ChannelIO?.("hideChannelButton"); + } + + setAppearance(appearance: Appearance) { + window.ChannelIO?.("setAppearance", appearance); + } +} + +export default new ChannelService(); diff --git a/apps/web/src/router/index.tsx b/apps/web/src/router/index.tsx index d655ce73..f0062b80 100644 --- a/apps/web/src/router/index.tsx +++ b/apps/web/src/router/index.tsx @@ -22,6 +22,7 @@ import { SetNickNamePage } from "@/app/login/SetNicknamePage"; import { RetrospectAnalysisPage } from "@/app/retrospect/analysis/RetrospectAnalysisPage"; import { TemplateListPage } from "@/app/retrospect/template/list/TemplateListPage"; import { RecommendDonePage } from "@/app/retrospect/template/recommend/RecommendDonePage"; +import { RecommendSearch } from "@/app/retrospect/template/recommend/RecommendSearch"; import { RecommendTemplatePage } from "@/app/retrospect/template/recommend/RecommendTemplatePage"; import { RetrospectCreate } from "@/app/retrospectCreate/RetrospectCreate"; import { RetrospectCreateComplete } from "@/app/retrospectCreate/RetrospectCreateComplete"; @@ -40,7 +41,7 @@ import { RetrospectWritePage } from "@/app/write/RetrospectWritePage.tsx"; import GlobalLayout from "@/layout/GlobalLayout.tsx"; import { HomeLayout } from "@/layout/HomeLayout"; import { RequireLoginLayout } from "@/layout/RequireLoginLayout"; -import { RecommendSearch } from "@/app/retrospect/template/recommend/RecommendSearch"; +import ChannelService from "@/lib/channel-talk/service"; type RouteChildren = { auth: boolean; @@ -256,5 +257,9 @@ const router = createBrowserRouter([ ]); export const Routers = () => { + ChannelService.loadScript(); + ChannelService.boot({ + pluginKey: import.meta.env.VITE_CHANNELTALK_PLUGIN_KEY, + }); return ; }; From 944badcf27d4cde21d7a6a2d6629e52903228ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=86=E1=85=B5=E1=86=AB=E1=84=92?= =?UTF-8?q?=E1=85=B4?= Date: Fri, 1 Nov 2024 02:42:16 +0900 Subject: [PATCH 05/15] =?UTF-8?q?fix:=20#416=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=ED=95=98=EC=9C=84=20=EB=AA=A8=EB=93=A0=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=20=EC=B1=84=EB=84=90?= =?UTF-8?q?=ED=86=A1=20=EB=B2=84=ED=8A=BC=20=EB=85=B8=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/layout/GlobalLayout.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/layout/GlobalLayout.tsx b/apps/web/src/layout/GlobalLayout.tsx index 049faec9..9d80a25c 100644 --- a/apps/web/src/layout/GlobalLayout.tsx +++ b/apps/web/src/layout/GlobalLayout.tsx @@ -21,10 +21,10 @@ export default function GlobalLayout() { }, []); useEffect(() => { - if (location.pathname !== PATHS.myInfo()) { - ChannelService.hideChannelButton(); - } else { + if (location.pathname.startsWith(PATHS.myInfo())) { ChannelService.showChannelButton(); + } else { + ChannelService.hideChannelButton(); } }, [location]); From b4cf4a22ad88e1a41cf7b08821dbdd952b7a9533 Mon Sep 17 00:00:00 2001 From: klmhyeonwoo Date: Sun, 3 Nov 2024 21:04:09 +0900 Subject: [PATCH 06/15] =?UTF-8?q?fix:=20#409=20=EC=9B=B9=20=ED=99=98?= =?UTF-8?q?=EA=B2=BD=EC=97=90=EC=84=9C=20=EC=B9=B4=EC=B9=B4=EC=98=A4=20?= =?UTF-8?q?=EB=B8=8C=EB=9D=BC=EC=9A=B0=EC=A0=80=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=EC=8B=9C,=20=EC=86=8C=EC=85=9C=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EC=A0=95=EC=B1=85=20=EC=9A=B0=ED=9A=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/app.tsx | 1 - apps/web/src/helper/preventExternalBrowser.ts | 17 ----------------- .../web/src/helper/preventExternalBrowser.tsx | 19 +++++++++++++++++++ apps/web/src/layout/GlobalLayout.tsx | 7 ++++--- 4 files changed, 23 insertions(+), 21 deletions(-) delete mode 100644 apps/web/src/helper/preventExternalBrowser.ts create mode 100644 apps/web/src/helper/preventExternalBrowser.tsx diff --git a/apps/web/src/app.tsx b/apps/web/src/app.tsx index f5d11c13..4f40aa68 100644 --- a/apps/web/src/app.tsx +++ b/apps/web/src/app.tsx @@ -20,7 +20,6 @@ ReactDOM.createRoot(document.getElementById("root")!).render( }> {/* */} {/* */} - diff --git a/apps/web/src/helper/preventExternalBrowser.ts b/apps/web/src/helper/preventExternalBrowser.ts deleted file mode 100644 index 3433c411..00000000 --- a/apps/web/src/helper/preventExternalBrowser.ts +++ /dev/null @@ -1,17 +0,0 @@ -export function PreventExternalBrowser() { - const agent = navigator.userAgent; - const URL = document.URL; - alert("agent"); - - // NOTE: 카카오톡 인앱 브라우저 방지 - if (agent.includes("KAKAO")) { - window.open(`kakaotalk://web/openExternal?url=${encodeURIComponent(URL)}`); - } else if (agent.includes("Instagram")) { - /** - * NOTE: 현재는 해당 인스타그램 인앱 탈출 코드가 작동하지 않는 것 같음 - * 추후 카카오톡처럼 인스타그램 인앱 방지 분석 후 코드 추가 예정 - */ - } - - return null; -} diff --git a/apps/web/src/helper/preventExternalBrowser.tsx b/apps/web/src/helper/preventExternalBrowser.tsx new file mode 100644 index 00000000..1dfe24d4 --- /dev/null +++ b/apps/web/src/helper/preventExternalBrowser.tsx @@ -0,0 +1,19 @@ +import { Fragment, PropsWithChildren } from "react"; + +export function PreventExternalBrowser({ children }: PropsWithChildren) { + const agent = navigator.userAgent; + const URL = document.URL; + const isKakao = agent.includes("KAKAO"); + const isInstagram = agent.includes("Instagram"); + + if (isKakao) { + return 시스템 브라우저를 이용해주세요 ; + window.open(`kakaotalk://web/openExternal?url=${encodeURIComponent(URL)}`); + } else if (isInstagram) { + /** + * NOTE: 현재는 해당 인스타그램 인앱 탈출 코드가 작동하지 않는 것 같음 + * 추후 카카오톡처럼 인스타그램 인앱 방지 분석 후 코드 추가 예정 + */ + } + return {children} ; +} diff --git a/apps/web/src/layout/GlobalLayout.tsx b/apps/web/src/layout/GlobalLayout.tsx index 9d80a25c..2faf45f6 100644 --- a/apps/web/src/layout/GlobalLayout.tsx +++ b/apps/web/src/layout/GlobalLayout.tsx @@ -5,7 +5,7 @@ import { useEffect } from "react"; import { Outlet, useLocation } from "react-router-dom"; import { Modal } from "@/component/common/Modal"; -import { PreventExternalBrowser } from "@/helper/preventExternalBrowser.ts"; +import { PreventExternalBrowser } from "@/helper/preventExternalBrowser.tsx"; import ChannelService from "@/lib/channel-talk/service"; import { useBridge } from "@/lib/provider/bridge-provider"; @@ -48,8 +48,9 @@ export default function GlobalLayout() { `} > - - + + +
); } From 0487e44a031d3840026f17d84956577b9cc8e441 Mon Sep 17 00:00:00 2001 From: klmhyeonwoo Date: Sun, 3 Nov 2024 21:05:23 +0900 Subject: [PATCH 07/15] =?UTF-8?q?fix:=20#409=20=EC=9E=98=EB=AA=BB=EB=90=9C?= =?UTF-8?q?=20=EC=BD=94=EB=93=9C=20=EC=88=9C=EC=84=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/helper/preventExternalBrowser.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/helper/preventExternalBrowser.tsx b/apps/web/src/helper/preventExternalBrowser.tsx index 1dfe24d4..b712340b 100644 --- a/apps/web/src/helper/preventExternalBrowser.tsx +++ b/apps/web/src/helper/preventExternalBrowser.tsx @@ -7,8 +7,8 @@ export function PreventExternalBrowser({ children }: PropsWithChildren) { const isInstagram = agent.includes("Instagram"); if (isKakao) { - return 시스템 브라우저를 이용해주세요 ; window.open(`kakaotalk://web/openExternal?url=${encodeURIComponent(URL)}`); + return 시스템 브라우저를 이용해주세요 ; } else if (isInstagram) { /** * NOTE: 현재는 해당 인스타그램 인앱 탈출 코드가 작동하지 않는 것 같음 From 4b4c4209ae899aecebf742aa5cd60f79114f689e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=86=E1=85=B5=E1=86=AB=E1=84=92?= =?UTF-8?q?=E1=85=B4?= Date: Fri, 8 Nov 2024 23:51:56 +0900 Subject: [PATCH 08/15] =?UTF-8?q?chore:=20#420=20=EA=B3=B5=EC=A7=80=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EB=82=B4=EB=B6=80?= =?UTF-8?q?=EB=A1=9C=20=EB=B0=94=ED=85=80=EC=8B=9C=ED=8A=B8=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/announcement/Announcement.tsx | 69 +++++++++++++++++++ .../common/announcement/Announcement.tsx | 48 ------------- 2 files changed, 69 insertions(+), 48 deletions(-) create mode 100644 apps/web/src/component/announcement/Announcement.tsx delete mode 100644 apps/web/src/component/common/announcement/Announcement.tsx diff --git a/apps/web/src/component/announcement/Announcement.tsx b/apps/web/src/component/announcement/Announcement.tsx new file mode 100644 index 00000000..b7103833 --- /dev/null +++ b/apps/web/src/component/announcement/Announcement.tsx @@ -0,0 +1,69 @@ +import { css } from "@emotion/react"; +import Cookies from "js-cookie"; + +import { BottomSheet } from "@/component/BottomSheet"; +import { ButtonProvider } from "@/component/common/button"; +import { Icon } from "@/component/common/Icon"; +import { Typography } from "@/component/common/typography"; + +type AnnouncementProps = { title: string; content: React.ReactNode; onConfirm: () => void; sheetId: string }; + +export function Announcement({ title, content, onConfirm, sheetId }: AnnouncementProps) { + const SHOW_ANNOUNCEMENT_KEY = "announcement-checked"; + + const hideAnnouncement = Cookies.get(SHOW_ANNOUNCEMENT_KEY); + + if (hideAnnouncement) return; + + return ( + +
+ + + {title} + +
+
+ {content} +
+ + { + Cookies.set(SHOW_ANNOUNCEMENT_KEY, new Date().toISOString(), { expires: 1 }); + onConfirm(); + }} + > + 확인 + + + } + /> + ); +} diff --git a/apps/web/src/component/common/announcement/Announcement.tsx b/apps/web/src/component/common/announcement/Announcement.tsx deleted file mode 100644 index 3e1f87e0..00000000 --- a/apps/web/src/component/common/announcement/Announcement.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { css } from "@emotion/react"; - -import { ButtonProvider } from "@/component/common/button"; -import { Icon } from "@/component/common/Icon"; -import { Typography } from "@/component/common/typography"; - -type AnnouncementProps = { title: string; content: React.ReactNode; onConfirm: () => void }; - -export function Announcement({ title, content, onConfirm }: AnnouncementProps) { - return ( -
-
- - - {title} - -
-
- {content} -
- - 확인 -
- ); -} From 6a325668562fcec6046fd43dbf57bbb951353d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=86=E1=85=B5=E1=86=AB=E1=84=92?= =?UTF-8?q?=E1=85=B4?= Date: Fri, 8 Nov 2024 23:52:15 +0900 Subject: [PATCH 09/15] =?UTF-8?q?chore:=20#420=201109=20=EA=B3=B5=EC=A7=80?= =?UTF-8?q?=20(=EC=9D=B8=ED=94=84=EB=9D=BC=20=EC=9D=B4=EC=A0=84)=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/layout/GlobalLayout.tsx | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/apps/web/src/layout/GlobalLayout.tsx b/apps/web/src/layout/GlobalLayout.tsx index 2faf45f6..801ffb5e 100644 --- a/apps/web/src/layout/GlobalLayout.tsx +++ b/apps/web/src/layout/GlobalLayout.tsx @@ -4,20 +4,26 @@ import { PATHS } from "@layer/shared"; import { useEffect } from "react"; import { Outlet, useLocation } from "react-router-dom"; +import { Announcement } from "@/component/announcement/Announcement"; import { Modal } from "@/component/common/Modal"; +import { Typography } from "@/component/common/typography"; import { PreventExternalBrowser } from "@/helper/preventExternalBrowser.tsx"; +import { useBottomSheet } from "@/hooks/useBottomSheet"; import ChannelService from "@/lib/channel-talk/service"; import { useBridge } from "@/lib/provider/bridge-provider"; const siteId = import.meta.env.VITE_HOTJAR_KEY as number; const hotjarVersion = import.meta.env.VITE_HOTJAR_VERSION as number; +const SHEET_ID = "announcement"; export default function GlobalLayout() { const { safeAreaHeight } = useBridge(); const location = useLocation(); + const { openBottomSheet, closeBottomSheet } = useBottomSheet(); useEffect(() => { Hotjar.init(siteId, hotjarVersion); + openBottomSheet({ id: SHEET_ID }); }, []); useEffect(() => { @@ -47,6 +53,44 @@ export default function GlobalLayout() { ${safeAreaHeight && { height: `calc(100dvh-${safeAreaHeight * 2}px)` }} `} > + + {`안녕하세요, 레이어 서비스입니다. +항상 저희 서비스를 이용해 주셔서 감사드립니다. + +서비스 품질 향상을 위한 인프라 이전을 진행하고자 하오니 잠시 양해를 부탁드립니다. +작업 진행 시간 동안 서비스가 접속이 되지 않거나 느려지는 현상이 있을 수 있으니 이용에 참고하시기 바랍니다. + +1. 점검 시간 + + 2024년 11월 10일(일) 13:00 ~ 22:00 + ※ 모든 시간은 한국시간 기준입니다. + ※ 작업 진행상황에 따라 일정은 변경될 수 있습니다. + +2. 대상 서비스 + + 레이어 서비스 + +해당 기간동안 궁금하신 점은 gentlemonster77@likelion.org 로 문의를 주시면 빠르게 확인 후 순차적으로 답변 드리겠습니다. + +이용에 불편을 드려 죄송합니다. +보다 안정적인 서비스를 제공하기 위해 노력하는 레이어가 되겠습니다. + +감사합니다.`} + + } + /> From 3aef83ca8b5503b7f6b49856243d550bd1a02ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=86=E1=85=B5=E1=86=AB=E1=84=92?= =?UTF-8?q?=E1=85=B4?= Date: Sat, 9 Nov 2024 00:07:37 +0900 Subject: [PATCH 10/15] =?UTF-8?q?chore:=20#420=20=EC=9D=B4=EB=A9=94?= =?UTF-8?q?=EC=9D=BC=20=EB=B3=B5=EC=82=AC=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/layout/GlobalLayout.tsx | 54 ++++++++++++++++++++++------ apps/web/src/style/global.css | 4 +++ 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/apps/web/src/layout/GlobalLayout.tsx b/apps/web/src/layout/GlobalLayout.tsx index 801ffb5e..41e1c716 100644 --- a/apps/web/src/layout/GlobalLayout.tsx +++ b/apps/web/src/layout/GlobalLayout.tsx @@ -9,6 +9,7 @@ import { Modal } from "@/component/common/Modal"; import { Typography } from "@/component/common/typography"; import { PreventExternalBrowser } from "@/helper/preventExternalBrowser.tsx"; import { useBottomSheet } from "@/hooks/useBottomSheet"; +import { useToast } from "@/hooks/useToast"; import ChannelService from "@/lib/channel-talk/service"; import { useBridge } from "@/lib/provider/bridge-provider"; @@ -20,6 +21,7 @@ export default function GlobalLayout() { const { safeAreaHeight } = useBridge(); const location = useLocation(); const { openBottomSheet, closeBottomSheet } = useBottomSheet(); + const { toast } = useToast(); useEffect(() => { Hotjar.init(siteId, hotjarVersion); @@ -58,15 +60,16 @@ export default function GlobalLayout() { onConfirm={closeBottomSheet} title="인프라 이전 안내" content={ - - {`안녕하세요, 레이어 서비스입니다. + <> + + {`안녕하세요, 레이어 서비스입니다. 항상 저희 서비스를 이용해 주셔서 감사드립니다. 서비스 품질 향상을 위한 인프라 이전을 진행하고자 하오니 잠시 양해를 부탁드립니다. @@ -82,13 +85,42 @@ export default function GlobalLayout() { 레이어 서비스 -해당 기간동안 궁금하신 점은 gentlemonster77@likelion.org 로 문의를 주시면 빠르게 확인 후 순차적으로 답변 드리겠습니다. +해당 기간동안 궁금하신 점은`} + + { + try { + await navigator.clipboard.writeText("gentlemonster77@likelion.org"); + toast.success("이메일이 클립보드에 복사되었습니다"); + } catch (e) { + toast.success("다시 시도해주세요"); + } + }} + > + gentlemonster77@likelion.org + + + {`로 문의를 주시면 빠르게 확인 후 순차적으로 답변 드리겠습니다. 이용에 불편을 드려 죄송합니다. 보다 안정적인 서비스를 제공하기 위해 노력하는 레이어가 되겠습니다. 감사합니다.`} - + + } /> diff --git a/apps/web/src/style/global.css b/apps/web/src/style/global.css index f9660061..d07c5bb4 100644 --- a/apps/web/src/style/global.css +++ b/apps/web/src/style/global.css @@ -63,6 +63,10 @@ textarea { resize: none; } +p { + margin: 0; +} + ::-webkit-scrollbar { border: none; width: 1rem; From b40731c970208a31f6cd6489f53f36b8f01b400e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=86=E1=85=B5=E1=86=AB=E1=84=92?= =?UTF-8?q?=E1=85=B4?= Date: Sat, 9 Nov 2024 10:33:54 +0900 Subject: [PATCH 11/15] =?UTF-8?q?chore:=20#420=20=EC=9D=B4=EB=A9=94?= =?UTF-8?q?=EC=9D=BC=20->=20=EC=B1=84=EB=84=90=ED=86=A1=EC=9C=BC=EB=A1=9C?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/layout/GlobalLayout.tsx | 37 +++++++++++----------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/apps/web/src/layout/GlobalLayout.tsx b/apps/web/src/layout/GlobalLayout.tsx index 41e1c716..db5824a3 100644 --- a/apps/web/src/layout/GlobalLayout.tsx +++ b/apps/web/src/layout/GlobalLayout.tsx @@ -62,7 +62,6 @@ export default function GlobalLayout() { content={ <> + 2024년 11월 10일(일) 13:00 ~ 22:00 + + {` ※ 모든 시간은 한국시간 기준입니다. ※ 작업 진행상황에 따라 일정은 변경될 수 있습니다. @@ -85,35 +94,17 @@ export default function GlobalLayout() { 레이어 서비스 -해당 기간동안 궁금하신 점은`} - - { - try { - await navigator.clipboard.writeText("gentlemonster77@likelion.org"); - toast.success("이메일이 클립보드에 복사되었습니다"); - } catch (e) { - toast.success("다시 시도해주세요"); - } - }} - > - gentlemonster77@likelion.org +해당 기간동안 궁금하신 점은 `} + 마이페이지 하단의 문의하기 - {`로 문의를 주시면 빠르게 확인 후 순차적으로 답변 드리겠습니다. + {`를 통해 채팅 남겨주시면 빠르게 확인 후 순차적으로 답변 드리겠습니다. 이용에 불편을 드려 죄송합니다. 보다 안정적인 서비스를 제공하기 위해 노력하는 레이어가 되겠습니다. From 73ca940b6492987897ca0c2d46c4e66ce9d40b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=86=E1=85=B5=E1=86=AB=E1=84=92?= =?UTF-8?q?=E1=85=B4?= Date: Sat, 9 Nov 2024 10:35:55 +0900 Subject: [PATCH 12/15] =?UTF-8?q?chore:=20#420=20=EB=A7=88=EC=9D=B4?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20->=20=EB=82=B4=EC=A0=95=EB=B3=B4?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/layout/GlobalLayout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/layout/GlobalLayout.tsx b/apps/web/src/layout/GlobalLayout.tsx index db5824a3..519d8c99 100644 --- a/apps/web/src/layout/GlobalLayout.tsx +++ b/apps/web/src/layout/GlobalLayout.tsx @@ -96,7 +96,7 @@ export default function GlobalLayout() { 해당 기간동안 궁금하신 점은 `} - 마이페이지 하단의 문의하기 + 내 정보 페이지 하단의 문의하기 Date: Sat, 9 Nov 2024 10:39:41 +0900 Subject: [PATCH 13/15] =?UTF-8?q?chore:=20#420=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/layout/GlobalLayout.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/web/src/layout/GlobalLayout.tsx b/apps/web/src/layout/GlobalLayout.tsx index 519d8c99..f9192497 100644 --- a/apps/web/src/layout/GlobalLayout.tsx +++ b/apps/web/src/layout/GlobalLayout.tsx @@ -9,7 +9,6 @@ import { Modal } from "@/component/common/Modal"; import { Typography } from "@/component/common/typography"; import { PreventExternalBrowser } from "@/helper/preventExternalBrowser.tsx"; import { useBottomSheet } from "@/hooks/useBottomSheet"; -import { useToast } from "@/hooks/useToast"; import ChannelService from "@/lib/channel-talk/service"; import { useBridge } from "@/lib/provider/bridge-provider"; @@ -21,7 +20,6 @@ export default function GlobalLayout() { const { safeAreaHeight } = useBridge(); const location = useLocation(); const { openBottomSheet, closeBottomSheet } = useBottomSheet(); - const { toast } = useToast(); useEffect(() => { Hotjar.init(siteId, hotjarVersion); From ba23bd78fc0e217d160ee2102104482d30ad9e69 Mon Sep 17 00:00:00 2001 From: klmhyeonwoo Date: Sat, 9 Nov 2024 10:46:47 +0900 Subject: [PATCH 14/15] =?UTF-8?q?fix:=20#409=20=EC=B9=B4=EC=B9=B4=EC=98=A4?= =?UTF-8?q?=20=EC=9D=B8=EC=95=B1=20=EB=B8=8C=EB=9D=BC=EC=9A=B0=EC=A0=80?= =?UTF-8?q?=EC=97=90=EC=84=9C=EB=8F=84=20=EC=84=9C=EB=B9=84=EC=8A=A4=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EA=B7=B8=EB=8C=80=EB=A1=9C=20=EB=9D=84?= =?UTF-8?q?=EC=9A=B0=EB=8F=84=EB=A1=9D=20=EC=9E=AC=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/helper/preventExternalBrowser.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/web/src/helper/preventExternalBrowser.tsx b/apps/web/src/helper/preventExternalBrowser.tsx index b712340b..f0a019e6 100644 --- a/apps/web/src/helper/preventExternalBrowser.tsx +++ b/apps/web/src/helper/preventExternalBrowser.tsx @@ -8,7 +8,6 @@ export function PreventExternalBrowser({ children }: PropsWithChildren) { if (isKakao) { window.open(`kakaotalk://web/openExternal?url=${encodeURIComponent(URL)}`); - return 시스템 브라우저를 이용해주세요 ; } else if (isInstagram) { /** * NOTE: 현재는 해당 인스타그램 인앱 탈출 코드가 작동하지 않는 것 같음 From aa286fe2ef3da888090619506c75c8f1634b05b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=86=E1=85=B5=E1=86=AB=E1=84=92?= =?UTF-8?q?=E1=85=B4?= Date: Sat, 9 Nov 2024 11:12:21 +0900 Subject: [PATCH 15/15] =?UTF-8?q?chore:=20#420=20=EC=B1=84=EB=84=90?= =?UTF-8?q?=ED=86=A1=20=EB=AA=A8=EB=93=A0=20=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=EB=A1=9C=20=EC=9E=84=EC=8B=9C=20=EC=9D=B4=EB=8F=99,=20?= =?UTF-8?q?=EB=B0=94=ED=85=80=EC=8B=9C=ED=8A=B8=20z-index=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/component/BottomSheet/BottomSheet.tsx | 2 +- apps/web/src/layout/GlobalLayout.tsx | 25 ++++++++++--------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/apps/web/src/component/BottomSheet/BottomSheet.tsx b/apps/web/src/component/BottomSheet/BottomSheet.tsx index 67c5c32e..78bd667e 100644 --- a/apps/web/src/component/BottomSheet/BottomSheet.tsx +++ b/apps/web/src/component/BottomSheet/BottomSheet.tsx @@ -64,7 +64,7 @@ export function BottomSheet({ id, title, contents, handler = false, quitButton = border-top-right-radius: 1.6rem; box-shadow: 0 4rem 4rem rgba(0, 0, 0, 0.25); transition: transform 200ms ease-out; - z-index: 10001; + z-index: 100000000; padding: 2rem; box-sizing: border-box; background-color: #fff; diff --git a/apps/web/src/layout/GlobalLayout.tsx b/apps/web/src/layout/GlobalLayout.tsx index f9192497..61d65129 100644 --- a/apps/web/src/layout/GlobalLayout.tsx +++ b/apps/web/src/layout/GlobalLayout.tsx @@ -1,15 +1,16 @@ import { css } from "@emotion/react"; import Hotjar from "@hotjar/browser"; -import { PATHS } from "@layer/shared"; +// import { PATHS } from "@layer/shared"; import { useEffect } from "react"; -import { Outlet, useLocation } from "react-router-dom"; +import { Outlet } from "react-router-dom"; +// import { useLocation } from "react-router-dom"; import { Announcement } from "@/component/announcement/Announcement"; import { Modal } from "@/component/common/Modal"; import { Typography } from "@/component/common/typography"; import { PreventExternalBrowser } from "@/helper/preventExternalBrowser.tsx"; import { useBottomSheet } from "@/hooks/useBottomSheet"; -import ChannelService from "@/lib/channel-talk/service"; +// import ChannelService from "@/lib/channel-talk/service"; import { useBridge } from "@/lib/provider/bridge-provider"; const siteId = import.meta.env.VITE_HOTJAR_KEY as number; @@ -18,7 +19,6 @@ const SHEET_ID = "announcement"; export default function GlobalLayout() { const { safeAreaHeight } = useBridge(); - const location = useLocation(); const { openBottomSheet, closeBottomSheet } = useBottomSheet(); useEffect(() => { @@ -26,13 +26,14 @@ export default function GlobalLayout() { openBottomSheet({ id: SHEET_ID }); }, []); - useEffect(() => { - if (location.pathname.startsWith(PATHS.myInfo())) { - ChannelService.showChannelButton(); - } else { - ChannelService.hideChannelButton(); - } - }, [location]); + /* NOTE - 인프라 이전 기간동안 채널톡 모든 페이지 노출 */ + // useEffect(() => { + // if (location.pathname.startsWith(PATHS.myInfo())) { + // ChannelService.showChannelButton(); + // } else { + // ChannelService.hideChannelButton(); + // } + // }, [location]); return (
- 내 정보 페이지 하단의 문의하기 + 페이지 하단의 문의하기