diff --git a/web/app/(commonLayout)/apps/NewAppDialog.tsx b/web/app/(commonLayout)/apps/NewAppDialog.tsx index 8c0e518579..a4b97686f4 100644 --- a/web/app/(commonLayout)/apps/NewAppDialog.tsx +++ b/web/app/(commonLayout)/apps/NewAppDialog.tsx @@ -52,7 +52,7 @@ const NewAppDialog = ({ show, onSuccess, onClose }: NewAppDialogProps) => { mutateTemplates() setIsWithTemplate(false) } - }, [show]) + }, [mutateTemplates, show]) const isCreatingRef = useRef(false) const onCreate: MouseEventHandler = useCallback(async () => { @@ -97,7 +97,6 @@ const NewAppDialog = ({ show, onSuccess, onClose }: NewAppDialogProps) => { return <> {showEmojiPicker && { - console.log(icon, icon_background) setEmoji({ icon, icon_background }) setShowEmojiPicker(false) }} diff --git a/web/app/components/app/overview/customize/index.tsx b/web/app/components/app/overview/customize/index.tsx index 0612c952c9..a24a5d5222 100644 --- a/web/app/components/app/overview/customize/index.tsx +++ b/web/app/components/app/overview/customize/index.tsx @@ -1,10 +1,10 @@ 'use client' import type { FC } from 'react' import React from 'react' -import { AppMode } from '@/types/app' import { ArrowTopRightOnSquareIcon } from '@heroicons/react/24/outline' import { useTranslation } from 'react-i18next' import { useContext } from 'use-context-selector' +import type { AppMode } from '@/types/app' import I18n from '@/context/i18n' import Button from '@/app/components/base/button' import Modal from '@/app/components/base/modal' @@ -23,8 +23,6 @@ const StepNum: FC<{ children: React.ReactNode }> = ({ children }) => {children} - - const GithubIcon = ({ className }: { className: string }) => { return ( @@ -73,7 +71,7 @@ const CustomizeModal: FC = ({
{t(`${prefixCustomize}.way1.step2Tip`)}
             export const APP_ID = '{appId}'
- export const API_KEY = {`''`} + export const API_KEY = {'\'\''}
diff --git a/web/app/components/app/overview/settings/index.tsx b/web/app/components/app/overview/settings/index.tsx index 19e76041af..155aef8006 100644 --- a/web/app/components/app/overview/settings/index.tsx +++ b/web/app/components/app/overview/settings/index.tsx @@ -7,11 +7,11 @@ import { Trans, useTranslation } from 'react-i18next' import s from './style.module.css' import Modal from '@/app/components/base/modal' import Button from '@/app/components/base/button' -import Switch from '@/app/components/base/switch' import AppIcon from '@/app/components/base/app-icon' import { SimpleSelect } from '@/app/components/base/select' import type { AppDetailResponse } from '@/models/app' import type { Language } from '@/types/app' +import EmojiPicker from '@/app/components/base/emoji-picker' export type ISettingsModalProps = { appInfo: AppDetailResponse @@ -42,11 +42,14 @@ const SettingsModal: FC = ({ onSave, }) => { const [isShowMore, setIsShowMore] = useState(false) - const { title, description, copyright, privacy_policy, default_language } = appInfo.site + const { title, description, copyright, privacy_policy, default_language, icon, icon_background } = appInfo.site const [inputInfo, setInputInfo] = useState({ title, desc: description, copyright, privacyPolicy: privacy_policy }) const [language, setLanguage] = useState(default_language) const [saveLoading, setSaveLoading] = useState(false) const { t } = useTranslation() + // Emoji Picker + const [showEmojiPicker, setShowEmojiPicker] = useState(false) + const [emoji, setEmoji] = useState({ icon, icon_background }) const onHide = () => { onClose() @@ -64,6 +67,8 @@ const SettingsModal: FC = ({ prompt_public: false, copyright: inputInfo.copyright, privacy_policy: inputInfo.privacyPolicy, + icon: emoji.icon, + icon_background: emoji.icon_background, } await onSave(params) setSaveLoading(false) @@ -77,69 +82,88 @@ const SettingsModal: FC = ({ } return ( - -
{t(`${prefixSettings}.webName`)}
-
- - -
-
{t(`${prefixSettings}.webDesc`)}
-

{t(`${prefixSettings}.webDescTip`)}

-