Skip to content

Commit

Permalink
feat: add halo v29 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Nov 7, 2024
1 parent 4afd364 commit e84cdc9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,9 @@ const onHomeChange = (value: string, cfg: HaloConfig) => {
</script>

<template>
<common-blog-setting :api-type="props.apiType" :cfg="haloCfg" @onHomeChange="onHomeChange" />
<common-blog-setting :api-type="props.apiType" :cfg="haloCfg" @onHomeChange="onHomeChange">
<template #header="header">
<el-alert :title="t('setting.platform.halo.v29.only')" type="error" :closable="false" />
</template>
</common-blog-setting>
</template>
27 changes: 19 additions & 8 deletions src/locales/en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,14 +676,21 @@ export default {

"setting.telegraph.username.label": "Author",
"setting.telegraph.password.label": "Uuid",
"setting.telegraph.home.tip": "The primary landing page of the telegra.ph platform typically remains constant at: https://telegra.ph/",
"setting.telegraph.username.tip": "The individual credited as the author, a detail showcased in the article's specifics, is customizable at will, with the default setting being empty.",
"setting.telegraph.password.tip": "The uuid pertinent to the current environment. Please note: 1. Anonymous mode automatically retrieves this detail, requiring no manual input; 2. Logging in as a user necessitates the entry of the Cookie's thp_uuid.",
"setting.telegraph.apiurl.tip": "The designated API endpoint for telegra.ph, routinely established as: https://telegra.ph/",
"setting.telegraph.previewUrl.tip": "The prescribed pattern for previewing telegra.ph articles commonly follows this structure: /[notebook]/[postid]",
"setting.telegraph.accessToken.tip": "This item is unnecessary in anonymous mode. For authenticated sessions, please procure the tph_token from the browser post authorization via the TG client. To ensure the sanctity of your privacy, exercise caution against sharing this token with any third party.",
"setting.telegraph.home.tip":
"The primary landing page of the telegra.ph platform typically remains constant at: https://telegra.ph/",
"setting.telegraph.username.tip":
"The individual credited as the author, a detail showcased in the article's specifics, is customizable at will, with the default setting being empty.",
"setting.telegraph.password.tip":
"The uuid pertinent to the current environment. Please note: 1. Anonymous mode automatically retrieves this detail, requiring no manual input; 2. Logging in as a user necessitates the entry of the Cookie's thp_uuid.",
"setting.telegraph.apiurl.tip":
"The designated API endpoint for telegra.ph, routinely established as: https://telegra.ph/",
"setting.telegraph.previewUrl.tip":
"The prescribed pattern for previewing telegra.ph articles commonly follows this structure: /[notebook]/[postid]",
"setting.telegraph.accessToken.tip":
"This item is unnecessary in anonymous mode. For authenticated sessions, please procure the tph_token from the browser post authorization via the TG client. To ensure the sanctity of your privacy, exercise caution against sharing this token with any third party.",
"setting.telegraph.saveHash.tip": "No need to fill out; automatic retrieval after clicking validation.",
"setting.telegraph.forceReAuth.tip": "After the authorization information takes effect, uncheck this option, and then reauthorize. Note: Old articles may become uneditable as a result.",
"setting.telegraph.forceReAuth.tip":
"After the authorization information takes effect, uncheck this option, and then reauthorize. Note: Old articles may become uneditable as a result.",
"setting.telegraph.login.anonymous": "Anonymous",
"setting.telegraph.login.user": "User",

Expand All @@ -706,7 +713,8 @@ export default {
"publisher.picbed.service": "Image Hosting Service",
"publisher.picbed.none": "Not in use",
"publisher.picbed.picgo": "PicGo Plugin",
"publisher.picbed.picgo.not.install": "PicGo plugin not detected. You may proceed to the plugin store for installation before enabling it.",
"publisher.picbed.picgo.not.install":
"PicGo plugin not detected. You may proceed to the plugin store for installation before enabling it.",
"publisher.picbed.bundled": "Current Platform",
"publisher.picbed.recom1": "Strongly Recommended",
"publisher.picbed.recom2": "Recommended",
Expand All @@ -718,4 +726,7 @@ export default {
"publisher.post.password": "Password Protection",
"publisher.post.password.tip": "Please enter the password for the article; leave blank if not setting one",
"publisher.post.future": "Scheduled Publishing",

"setting.platform.halo.v29.only":
"Note: Due to changes in the API policy in Halo 2.20+, the original method for this platform is no longer usable. Please import and use the new platform 'Halo Web Version'. If you still need to use this platform, please downgrade your server to Halo 2.9.",
}
9 changes: 7 additions & 2 deletions src/locales/zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,10 @@ export default {
"匿名模式无需填写,点击验证之后可自动获取,登录模式请从请从 TG 客户端授权之后跳转的浏览器里面找到 Cookie tph_uuid 填到这里",
"setting.telegraph.apiurl.tip": "telegra.ph的API地址,通常固定是:https://telegra.ph/",
"setting.telegraph.previewUrl.tip": "telegra.ph的文章预览规则,通常是:/[notebook]/[postid]",
"setting.telegraph.accessToken.tip": "匿名模式无需填写,登录模式请从请从 TG 客户端授权之后跳转的浏览器找到 Cookie tph_token 填到这里",
"setting.telegraph.saveHash.tip": "匿名模式无需填写,点击验证之后可自动获取,登录模式请从 TG 客户端授权之后跳转的浏览器里面找到 https://edit.telegra.ph/check 返回的 save_hash 填到这里",
"setting.telegraph.accessToken.tip":
"匿名模式无需填写,登录模式请从请从 TG 客户端授权之后跳转的浏览器找到 Cookie tph_token 填到这里",
"setting.telegraph.saveHash.tip":
"匿名模式无需填写,点击验证之后可自动获取,登录模式请从 TG 客户端授权之后跳转的浏览器里面找到 https://edit.telegra.ph/check 返回的 save_hash 填到这里",
"setting.telegraph.forceReAuth.tip": "授权信息生效之后可勾选此项,然后会重新授权",
"setting.telegraph.login.anonymous": "匿名发布",
"setting.telegraph.login.user": "登录发布",
Expand Down Expand Up @@ -696,4 +698,7 @@ export default {
"publisher.post.password": "密码保护",
"publisher.post.password.tip": "请输入文章密码,留空则不设置",
"publisher.post.future": "定时发布",

"setting.platform.halo.v29.only":
"注意:由于 Halo 2.20+ 修改了 API 策略,此平台原有方式已经无法使用,请导入并使用使用新平台 「Halo网页版」。如仍需使用此平台,请降级服务器到 Halo 2.9。",
}
2 changes: 1 addition & 1 deletion src/platforms/pre.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const pre = {
platformType: PlatformType.Common,
subPlatformType: SubPlatformType.Common_Halo,
platformKey: "common_Halo",
platformName: "Halo",
platformName: "Halo29",
platformIcon: svgIcons.iconIFHalo,
authMode: AuthMode.API,
isEnabled: false,
Expand Down

0 comments on commit e84cdc9

Please sign in to comment.