diff --git a/public/locales/ja/dashboard.json b/public/locales/ja/dashboard.json index e33daacd..ca52b0ab 100644 --- a/public/locales/ja/dashboard.json +++ b/public/locales/ja/dashboard.json @@ -87,6 +87,7 @@ "Description": "説明", "Integrate Google Analytics": "Google Analytics と紐付けします。Measurement ID の検索方法については、<2>こちらの文章をご覧ください。", "Integrate Umami Cloud Analytics": "Umami Cloud Analytics と紐付けします。Website ID の検索方法については、<2>こちらの文章をご覧ください。", + "Integrate Umami Cloud Analytics (set url)": "空欄にして、<2>公式サービスを使用してください。", "Save": "保存", "Tips": "ヒント", "social tips": { diff --git a/public/locales/zh-TW/dashboard.json b/public/locales/zh-TW/dashboard.json index 514b3dc3..dea94af0 100644 --- a/public/locales/zh-TW/dashboard.json +++ b/public/locales/zh-TW/dashboard.json @@ -92,6 +92,7 @@ "Description": "自我介紹", "Integrate Google Analytics": "將 Google Analytics 整合至你的網站中。請按照<2>這裡的說明查找你的 Measurement ID。", "Integrate Umami Cloud Analytics": "將 Umami Cloud Analytics 整合至你的網站中。請按照<2>這裡的說明查找你的 Website ID。", + "Integrate Umami Cloud Analytics (set url)": "留空以使用<2>官方服務。", "Save": "儲存", "Tips": "提示", "social tips": { diff --git a/public/locales/zh/dashboard.json b/public/locales/zh/dashboard.json index be107594..5b711957 100644 --- a/public/locales/zh/dashboard.json +++ b/public/locales/zh/dashboard.json @@ -93,6 +93,7 @@ "Description": "描述", "Integrate Google Analytics": "将 Google Analytics 集成到你的站点中。你可以按照<2>这里的说明查找你的 Measurement ID。", "Integrate Umami Cloud Analytics": "将 Umami Cloud Analytics 集成到你的站点中。你可以按照<2>这里的说明查找你的 Website ID。", + "Integrate Umami Cloud Analytics (set url)": "留空以使用<2>官方服务。", "Save": "保存", "Tips": "提示", "social tips": { diff --git a/src/app/dashboard/[subdomain]/settings/general/page.tsx b/src/app/dashboard/[subdomain]/settings/general/page.tsx index e59ddcba..a78bc0c7 100644 --- a/src/app/dashboard/[subdomain]/settings/general/page.tsx +++ b/src/app/dashboard/[subdomain]/settings/general/page.tsx @@ -30,6 +30,7 @@ export default function SiteSettingsGeneralPage() { description: "", ga: "", ua: "", + uh: "", } as { icon: string banner?: { @@ -40,6 +41,7 @@ export default function SiteSettingsGeneralPage() { description: string ga: string ua: string + uh: string }, }) @@ -52,6 +54,7 @@ export default function SiteSettingsGeneralPage() { description: values.description, ga: values.ga, ua: values.ua, + uh: values.uh, }) }) @@ -94,6 +97,8 @@ export default function SiteSettingsGeneralPage() { form.setValue("ga", site.data.metadata?.content?.ga || "") !form.getValues("ua") && form.setValue("ua", site.data.metadata?.content?.ua || "") + !form.getValues("uh") && + form.setValue("uh", site.data.metadata?.content?.uh || "") } }, [site.data, form]) @@ -206,9 +211,31 @@ export default function SiteSettingsGeneralPage() {
+ + Leave blank to use{" "} + + the official service + + . + +

+ } + /> +
diff --git a/src/lib/expand-unit.ts b/src/lib/expand-unit.ts index 1e8eb3fc..5ca077bf 100644 --- a/src/lib/expand-unit.ts +++ b/src/lib/expand-unit.ts @@ -110,6 +110,10 @@ export const expandCrossbellCharacter = (site: CharacterEntity) => { (expandedCharacter.metadata?.content?.attributes?.find( (a: any) => a.trait_type === "xlog_ua", )?.value as string) || "" + expandedCharacter.metadata.content.uh = + (expandedCharacter.metadata?.content?.attributes?.find( + (a: any) => a.trait_type === "xlog_uh", + )?.value as string) || "" expandedCharacter.metadata.content.custom_domain = (expandedCharacter.metadata?.content?.attributes?.find( (a: any) => a.trait_type === "xlog_custom_domain", diff --git a/src/lib/i18n/locales/ja/dashboard.json b/src/lib/i18n/locales/ja/dashboard.json index e33daacd..ca52b0ab 100644 --- a/src/lib/i18n/locales/ja/dashboard.json +++ b/src/lib/i18n/locales/ja/dashboard.json @@ -87,6 +87,7 @@ "Description": "説明", "Integrate Google Analytics": "Google Analytics と紐付けします。Measurement ID の検索方法については、<2>こちらの文章をご覧ください。", "Integrate Umami Cloud Analytics": "Umami Cloud Analytics と紐付けします。Website ID の検索方法については、<2>こちらの文章をご覧ください。", + "Integrate Umami Cloud Analytics (set url)": "空欄にして、<2>公式サービスを使用してください。", "Save": "保存", "Tips": "ヒント", "social tips": { diff --git a/src/lib/i18n/locales/zh-TW/dashboard.json b/src/lib/i18n/locales/zh-TW/dashboard.json index 514b3dc3..dea94af0 100644 --- a/src/lib/i18n/locales/zh-TW/dashboard.json +++ b/src/lib/i18n/locales/zh-TW/dashboard.json @@ -92,6 +92,7 @@ "Description": "自我介紹", "Integrate Google Analytics": "將 Google Analytics 整合至你的網站中。請按照<2>這裡的說明查找你的 Measurement ID。", "Integrate Umami Cloud Analytics": "將 Umami Cloud Analytics 整合至你的網站中。請按照<2>這裡的說明查找你的 Website ID。", + "Integrate Umami Cloud Analytics (set url)": "留空以使用<2>官方服務。", "Save": "儲存", "Tips": "提示", "social tips": { diff --git a/src/lib/i18n/locales/zh/dashboard.json b/src/lib/i18n/locales/zh/dashboard.json index be107594..5b711957 100644 --- a/src/lib/i18n/locales/zh/dashboard.json +++ b/src/lib/i18n/locales/zh/dashboard.json @@ -93,6 +93,7 @@ "Description": "描述", "Integrate Google Analytics": "将 Google Analytics 集成到你的站点中。你可以按照<2>这里的说明查找你的 Measurement ID。", "Integrate Umami Cloud Analytics": "将 Umami Cloud Analytics 集成到你的站点中。你可以按照<2>这里的说明查找你的 Website ID。", + "Integrate Umami Cloud Analytics (set url)": "留空以使用<2>官方服务。", "Save": "保存", "Tips": "提示", "social tips": { diff --git a/src/lib/types.ts b/src/lib/types.ts index 6a6104f8..544eb9cb 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -102,6 +102,7 @@ export type ExpandedCharacter = CharacterEntity & { css?: string ga?: string ua?: string + uh?: string custom_domain?: string } } diff --git a/src/models/site.model.ts b/src/models/site.model.ts index 3d112190..e062e8c2 100644 --- a/src/models/site.model.ts +++ b/src/models/site.model.ts @@ -107,6 +107,7 @@ export async function updateSite( css?: string ga?: string ua?: string + uh?: string custom_domain?: string banner?: { address: string @@ -143,6 +144,7 @@ export async function updateSite( payload.css !== undefined || payload.ga !== undefined || payload.ua !== undefined || + payload.uh !== undefined || payload.custom_domain !== undefined) && { attributes: [ ...(payload.navigation !== undefined @@ -177,6 +179,14 @@ export async function updateSite( }, ] : []), + ...(payload.uh !== undefined + ? [ + { + trait_type: "xlog_uh", + value: payload.uh, + }, + ] + : []), ...(payload.custom_domain !== undefined ? [ {