@deepseek-ai/dsh-client-ui-settings-account 0.1.7-alpha.1 → 0.1.7-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/lib/client.js +49 -23
- package/lib/index.js +1 -1
- package/lib/types/client/AccountMenu.d.ts +1 -1
- package/lib/types/client/AccountOnboarding.d.ts +1 -1
- package/lib/types/client/AccountSection.d.ts +6 -3
- package/lib/types/client/SignInDialog.d.ts +3 -1
- package/lib/types/client/authorize-url.d.ts +10 -0
- package/lib/types/client/contact-url.d.ts +1 -3
- package/lib/types/client/locales.d.ts +1 -1
- package/package.json +17 -15
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/client/ui-settings-account/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: be38bcd68ab7affe4aa840499ef79009ba25b779
|
|
6
|
+
README.zh.md: 9429d21cbd988a538c18320acbbfcb65dd6acfc0
|
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Balances use Platform Web currency formatting: two decimal places and digit grou
|
|
|
30
30
|
|
|
31
31
|
Desktop usage and top-up actions open an isolated native Platform view below a 48px return bar. Back destroys the view and preserves the Account settings page. Loading failures retain the return action and show a centered localized error with Retry. Retry reloads the same destination; renderer commands never receive the account token.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
The account menu's Feedback entry opens the Feishu questionnaire in the system browser. It supplies the available build version, UI locale and physical screen resolution as prefill_* parameters, with hide_*=1 for every context field; the account UID, tokens and contact details are excluded. Configure contactFormUrl on the ui-settings-account plugin to select another HTTPS form. contactSource defaults to empty until the questionnaire supports a Harness source option; OS and device fields remain unfilled, matching the Web implementation.
|
|
34
34
|
|
|
35
35
|
The sidebar account menu uses the shared Menu surface, backdrop blur, spacing, and row typography; feature styles only size its launcher.
|
|
36
36
|
|
|
@@ -46,7 +46,7 @@ The Account section appears first in Settings only while signed in; it is hidden
|
|
|
46
46
|
|
|
47
47
|
The [credentials subsystem](../../../docs/subsystems/credentials.md) owns storage APIs; the [architecture](../../../docs/architecture.md) explains application composition.
|
|
48
48
|
|
|
49
|
-
Account login uses a dismissible dialog before the model onboarding credential editor. The dialog uses a compact, right-aligned action row with the primary action last. The sidebar displays the profile name, falling back to the server-masked phone number or email when the name is absent; it stays blank while the profile is loading. Dialog copy and the sidebar account label are not text-selectable; the copy-link button remains available and restores its label two seconds after each successful copy. Clipboard failures show Copy failed on the link for two seconds without interrupting sign-in. Waiting shows a copyable authorization link and a loading indicator; timeout and failure require an explicit retry. Sign-in failures render in that dialog; the launcher's inline failure line reports only a failed sign-out. Closing a waiting dialog cancels its Host attempt. The sidebar can reopen the same API-key editor through the settings coordinator.
|
|
49
|
+
Account login uses a dismissible dialog before the model onboarding credential editor. The dialog uses a compact, right-aligned action row with the primary action last. The sidebar displays the profile name, falling back to the server-masked phone number or email when the name is absent; it stays blank while the profile is loading. Dialog copy and the sidebar account label are not text-selectable; the copy-link button remains available and restores its label two seconds after each successful copy. Clipboard failures show Copy failed on the link for two seconds without interrupting sign-in. Waiting shows a copyable authorization link and a loading indicator; timeout and failure require an explicit retry. The dialog's Copy sign-in link and the Settings Open link append the resolved Desktop palette as `theme=light` or `theme=dark` from the live theme snapshot, so both routes reach the Platform page in the current application theme without changing the theme preference Platform has saved. Sign-in failures render in that dialog; the launcher's inline failure line reports only a failed sign-out. Closing a waiting dialog cancels its Host attempt. The sidebar can reopen the same API-key editor through the settings coordinator.
|
|
50
50
|
|
|
51
51
|
A terminal account-state stream failure appears in the sign-in dialog or Account settings. Plugin unload suppresses late failure reports.
|
|
52
52
|
|
package/README.zh.md
CHANGED
|
@@ -30,7 +30,7 @@ Desktop 设置中的账号页面显示 DeepSeek 登录状态,并提供浏览
|
|
|
30
30
|
|
|
31
31
|
Desktop 的用量和充值操作在 48px 返回栏下方打开隔离的原生 Platform 视图。返回操作销毁视图并保留 Account 设置页。加载失败时保留返回操作,居中显示本地化错误提示和“重试”按钮。重试重新加载同一目标页面;渲染进程命令不接收账号 token。
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
账号菜单的“意见反馈”入口在系统浏览器中打开飞书问卷。链接通过 prefill_* 参数填写已有的构建版本、界面语言和屏幕物理分辨率,并为所有上下文字段设置 hide_*=1;不传账号 UID、token 或联系方式。可在 ui-settings-account 插件配置 contactFormUrl,切换到另一个 HTTPS 问卷。问卷支持 Harness 来源选项前,contactSource 默认为空;OS 和设备字段沿用 Web 实现,保持未填写。
|
|
34
34
|
|
|
35
35
|
侧边栏账号菜单使用公共 Menu 的表面、背景模糊、间距和菜单项排版;功能样式仅设置入口布局。
|
|
36
36
|
|
|
@@ -46,7 +46,7 @@ Desktop 的用量和充值操作在 48px 返回栏下方打开隔离的原生 Pl
|
|
|
46
46
|
|
|
47
47
|
[凭证子系统](../../../docs/subsystems/credentials.zh.md)定义存储接口;[架构](../../../docs/architecture.zh.md)说明应用组合。
|
|
48
48
|
|
|
49
|
-
账号登录在模型引导的凭证编辑器之前显示可关闭的弹窗。弹窗底部采用紧凑的右对齐横排操作,主操作位于末尾。侧边栏优先显示昵称,缺少昵称时显示服务端返回的脱敏手机号或邮箱;资料加载期间保持留空。
|
|
49
|
+
账号登录在模型引导的凭证编辑器之前显示可关闭的弹窗。弹窗底部采用紧凑的右对齐横排操作,主操作位于末尾。侧边栏优先显示昵称,缺少昵称时显示服务端返回的脱敏手机号或邮箱;资料加载期间保持留空。 弹窗文字和侧边栏账号状态文字不可选中,复制登录链接按钮始终可用,并在每次复制成功两秒后恢复原文案。剪贴板失败时,链接原位显示“复制失败”两秒,不中断登录。等待状态提供可复制的授权链接和加载图标;超时和失败均须用户手动重试。弹窗的“复制登录链接”和设置页的“打开”链接会从当前主题快照读取 Desktop 生效配色,追加 `theme=light` 或 `theme=dark`,使两条路径都以当前应用主题打开 Platform 页面,且不改变 Platform 已保存的主题偏好。登录失败在该弹窗内呈现;侧边栏入口的内联失败提示仅用于退出登录失败。关闭等待弹窗会取消对应 Host 登录流程。侧边栏通过设置协调器重新打开同一个 API Key 编辑器。
|
|
50
50
|
|
|
51
51
|
账户状态流的终止错误会显示在登录对话框或账户设置中。插件卸载后不再报告延迟到达的错误。
|
|
52
52
|
|
package/lib/client.js
CHANGED
|
@@ -903,7 +903,7 @@ window.__ModuleLoader__.load({
|
|
|
903
903
|
/** Public questionnaire deployment options shared by Host and Client. */
|
|
904
904
|
/** Validate public questionnaire options. */
|
|
905
905
|
const Config = Schema.object({
|
|
906
|
-
contactFormUrl: Schema.string().pattern(/^https:\/\/[^/\s]+\//).default("https://trtgsjkv6r.feishu.cn/share/base/form/
|
|
906
|
+
contactFormUrl: Schema.string().pattern(/^https:\/\/[^/\s]+\//).default("https://trtgsjkv6r.feishu.cn/share/base/form/shrcnlCoGElW7MQznGy9r3YYXcg"),
|
|
907
907
|
contactSource: Schema.string().default("")
|
|
908
908
|
});
|
|
909
909
|
//#endregion
|
|
@@ -911,7 +911,7 @@ window.__ModuleLoader__.load({
|
|
|
911
911
|
/**
|
|
912
912
|
* Build an external questionnaire URL without authentication credentials.
|
|
913
913
|
* @param config - questionnaire destination and supported source option.
|
|
914
|
-
* @param context - currently available
|
|
914
|
+
* @param context - currently available build and browser environment.
|
|
915
915
|
* @returns questionnaire URL with hidden, optionally prefilled context fields.
|
|
916
916
|
*/
|
|
917
917
|
function contactUrl(config, context) {
|
|
@@ -920,7 +920,6 @@ window.__ModuleLoader__.load({
|
|
|
920
920
|
const width = Math.round(context.width * ratio);
|
|
921
921
|
const height = Math.round(context.height * ratio);
|
|
922
922
|
const fields = {
|
|
923
|
-
uid: context.uid,
|
|
924
923
|
source: config.contactSource,
|
|
925
924
|
app_version: context.version,
|
|
926
925
|
os_version: void 0,
|
|
@@ -934,6 +933,23 @@ window.__ModuleLoader__.load({
|
|
|
934
933
|
url.searchParams.delete(`prefill_${name}`);
|
|
935
934
|
if (value) url.searchParams.set(`prefill_${name}`, value);
|
|
936
935
|
}
|
|
936
|
+
url.searchParams.delete("prefill_uid");
|
|
937
|
+
url.searchParams.delete("hide_uid");
|
|
938
|
+
return url.href;
|
|
939
|
+
}
|
|
940
|
+
//#endregion
|
|
941
|
+
//#region lib/types/client/authorize-url.js
|
|
942
|
+
/** Platform authorization links that carry the Desktop palette into the login page. */
|
|
943
|
+
/**
|
|
944
|
+
* Add the resolved Desktop palette to a Platform authorization link without
|
|
945
|
+
* dropping any parameter the Host already put on it.
|
|
946
|
+
* @param authorizeUrl - authorization URL of the current account attempt.
|
|
947
|
+
* @param colorScheme - resolved scheme of the active Desktop theme.
|
|
948
|
+
* @returns the authorization URL carrying `theme=light` or `theme=dark`.
|
|
949
|
+
*/
|
|
950
|
+
function authorizeUrlWithTheme(authorizeUrl, colorScheme) {
|
|
951
|
+
const url = new URL(authorizeUrl);
|
|
952
|
+
url.searchParams.set("theme", colorScheme);
|
|
937
953
|
return url.href;
|
|
938
954
|
}
|
|
939
955
|
//#endregion
|
|
@@ -965,7 +981,7 @@ window.__ModuleLoader__.load({
|
|
|
965
981
|
//#region lib/types/client/SignInDialog.js
|
|
966
982
|
/** Account authorization dialog; errors allow retry after cancelling any active attempt. */
|
|
967
983
|
/** @param props - safe account state, localized copy, and user actions. @returns login dialog. */
|
|
968
|
-
function SignInDialog({ account, start, cancel, close, useApiKey, t }) {
|
|
984
|
+
function SignInDialog({ account, colorScheme, start, cancel, close, useApiKey, t }) {
|
|
969
985
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
970
986
|
const [failed, setFailed] = (0, react.useState)(false);
|
|
971
987
|
const [copyResult, setCopyResult] = (0, react.useState)(null);
|
|
@@ -1017,7 +1033,7 @@ window.__ModuleLoader__.load({
|
|
|
1017
1033
|
};
|
|
1018
1034
|
const copyLink = async (authorizeUrl) => {
|
|
1019
1035
|
try {
|
|
1020
|
-
await navigator.clipboard.writeText(authorizeUrl);
|
|
1036
|
+
await navigator.clipboard.writeText(authorizeUrlWithTheme(authorizeUrl, colorScheme));
|
|
1021
1037
|
setCopyResult({ messageKey: "copiedLink" });
|
|
1022
1038
|
} catch {
|
|
1023
1039
|
setCopyResult({ messageKey: "copyFailed" });
|
|
@@ -1088,8 +1104,9 @@ window.__ModuleLoader__.load({
|
|
|
1088
1104
|
//#region lib/types/client/AccountOnboarding.js
|
|
1089
1105
|
/** Account choice inside the model credential onboarding step. */
|
|
1090
1106
|
/** @param props - onboarding completion, account state and actions. @returns account dialog while signed out. */
|
|
1091
|
-
function AccountOnboarding({ complete, useApiKey, useAccount, setOnboarding, showLogin, start, cancel, t }) {
|
|
1107
|
+
function AccountOnboarding({ complete, useApiKey, useAccount, useTheme, setOnboarding, showLogin, start, cancel, t }) {
|
|
1092
1108
|
const account = useAccount((value) => value);
|
|
1109
|
+
const colorScheme = useTheme((snapshot) => snapshot.active.colorScheme);
|
|
1093
1110
|
(0, react.useEffect)(() => {
|
|
1094
1111
|
setOnboarding(true);
|
|
1095
1112
|
return () => {
|
|
@@ -1102,6 +1119,7 @@ window.__ModuleLoader__.load({
|
|
|
1102
1119
|
if (!account.view || account.view.status === "credential-stored") return null;
|
|
1103
1120
|
return (0, react_jsx_runtime.jsx)(SignInDialog, {
|
|
1104
1121
|
account,
|
|
1122
|
+
colorScheme,
|
|
1105
1123
|
start,
|
|
1106
1124
|
cancel,
|
|
1107
1125
|
t,
|
|
@@ -1206,8 +1224,9 @@ window.__ModuleLoader__.load({
|
|
|
1206
1224
|
* @param props - sidebar geometry, settings navigation and account operations.
|
|
1207
1225
|
* @returns account menu launcher.
|
|
1208
1226
|
*/
|
|
1209
|
-
function AccountMenu({ wide, openSettings, openOnboarding, useAccount, signOut, contactUs, showLogin, start, cancel, t }) {
|
|
1227
|
+
function AccountMenu({ wide, openSettings, openOnboarding, useAccount, useTheme, signOut, contactUs, showLogin, start, cancel, t }) {
|
|
1210
1228
|
const account = useAccount((state) => state);
|
|
1229
|
+
const colorScheme = useTheme((snapshot) => snapshot.active.colorScheme);
|
|
1211
1230
|
const signedIn = account.view?.status === "credential-stored";
|
|
1212
1231
|
const profile = account.details?.profile;
|
|
1213
1232
|
const label = profile === void 0 ? null : profile.status === "ready" ? profile.value.name ?? profile.value.contact ?? t("signedIn") : t("signedIn");
|
|
@@ -1295,6 +1314,7 @@ window.__ModuleLoader__.load({
|
|
|
1295
1314
|
}),
|
|
1296
1315
|
account.loginVisible && !account.onboarding && (0, react_jsx_runtime.jsx)(SignInDialog, {
|
|
1297
1316
|
account,
|
|
1317
|
+
colorScheme,
|
|
1298
1318
|
start,
|
|
1299
1319
|
cancel,
|
|
1300
1320
|
t,
|
|
@@ -1902,8 +1922,9 @@ window.__ModuleLoader__.load({
|
|
|
1902
1922
|
//#region lib/types/client/AccountSection.js
|
|
1903
1923
|
/** Account settings renders safe Host state and explicit login actions. */
|
|
1904
1924
|
/** @param props - localized actions and account subscription. @returns account settings UI. */
|
|
1905
|
-
function AccountSection({ t, useAccount, start, cancel, refresh, platform }) {
|
|
1925
|
+
function AccountSection({ t, useAccount, useTheme, start, cancel, refresh, platform }) {
|
|
1906
1926
|
const { view: state, details, failed: streamFailed } = useAccount((value) => value);
|
|
1927
|
+
const colorScheme = useTheme((snapshot) => snapshot.active.colorScheme);
|
|
1907
1928
|
const [platformPage, setPlatformPage] = (0, react.useState)();
|
|
1908
1929
|
const [failed, setFailed] = (0, react.useState)(false);
|
|
1909
1930
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
@@ -2007,7 +2028,7 @@ window.__ModuleLoader__.load({
|
|
|
2007
2028
|
className: AccountSection_module_css_default.actions,
|
|
2008
2029
|
children: [attempt.authorizeUrl && (0, react_jsx_runtime.jsx)("a", {
|
|
2009
2030
|
className: AccountSection_module_css_default.linkButton,
|
|
2010
|
-
href: attempt.authorizeUrl,
|
|
2031
|
+
href: authorizeUrlWithTheme(attempt.authorizeUrl, colorScheme),
|
|
2011
2032
|
target: "_blank",
|
|
2012
2033
|
rel: "noreferrer",
|
|
2013
2034
|
children: t("open")
|
|
@@ -2106,7 +2127,7 @@ window.__ModuleLoader__.load({
|
|
|
2106
2127
|
loading: "Loading…",
|
|
2107
2128
|
backToHarness: "Back to DeepSeek Harness",
|
|
2108
2129
|
settings: "Settings",
|
|
2109
|
-
contactUs: "
|
|
2130
|
+
contactUs: "Feedback",
|
|
2110
2131
|
menu: "Account menu",
|
|
2111
2132
|
nav: "Account",
|
|
2112
2133
|
signedIn: "Signed in to DeepSeek",
|
|
@@ -2154,7 +2175,7 @@ window.__ModuleLoader__.load({
|
|
|
2154
2175
|
loading: "加载中…",
|
|
2155
2176
|
backToHarness: "返回 DeepSeek Harness",
|
|
2156
2177
|
settings: "设置",
|
|
2157
|
-
contactUs: "
|
|
2178
|
+
contactUs: "意见反馈",
|
|
2158
2179
|
menu: "账号菜单",
|
|
2159
2180
|
nav: "账号与余额",
|
|
2160
2181
|
signedIn: "已登录 DeepSeek",
|
|
@@ -2188,7 +2209,8 @@ window.__ModuleLoader__.load({
|
|
|
2188
2209
|
"slots",
|
|
2189
2210
|
"locale",
|
|
2190
2211
|
"remote",
|
|
2191
|
-
"remote.account"
|
|
2212
|
+
"remote.account",
|
|
2213
|
+
"theme"
|
|
2192
2214
|
];
|
|
2193
2215
|
/** Register account UI only in the Desktop renderer. @param ctx - client plugin context. */
|
|
2194
2216
|
function apply(ctx) {
|
|
@@ -2283,10 +2305,8 @@ window.__ModuleLoader__.load({
|
|
|
2283
2305
|
...nativePlatform === void 0 ? {} : { platform: nativePlatform },
|
|
2284
2306
|
refresh,
|
|
2285
2307
|
contactUs() {
|
|
2286
|
-
const profile = snapshot.details?.profile;
|
|
2287
2308
|
const url = contactUrl(config, {
|
|
2288
|
-
|
|
2289
|
-
version: "0.1.7-alpha.1",
|
|
2309
|
+
version: "0.1.7-alpha.2",
|
|
2290
2310
|
locale: ctx.locale.getSnapshot().active === "zh" ? "zh-CN" : "en",
|
|
2291
2311
|
width: window.screen.width,
|
|
2292
2312
|
height: window.screen.height,
|
|
@@ -2306,15 +2326,21 @@ window.__ModuleLoader__.load({
|
|
|
2306
2326
|
onboarding: active
|
|
2307
2327
|
});
|
|
2308
2328
|
},
|
|
2309
|
-
hooks: {
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2329
|
+
hooks: {
|
|
2330
|
+
account: {
|
|
2331
|
+
getSnapshot: () => snapshot,
|
|
2332
|
+
subscribe: (listener) => {
|
|
2333
|
+
listeners.add(listener);
|
|
2334
|
+
return () => {
|
|
2335
|
+
listeners.delete(listener);
|
|
2336
|
+
};
|
|
2337
|
+
}
|
|
2338
|
+
},
|
|
2339
|
+
theme: {
|
|
2340
|
+
getSnapshot: () => ctx.theme.getTheme(),
|
|
2341
|
+
subscribe: (listener) => ctx.on("theme/change", listener)
|
|
2316
2342
|
}
|
|
2317
|
-
}
|
|
2343
|
+
},
|
|
2318
2344
|
async start() {
|
|
2319
2345
|
publish({
|
|
2320
2346
|
...snapshot,
|
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import z from "@deepseek-ai/schemastery";
|
|
|
3
3
|
/** Public questionnaire deployment options shared by Host and Client. */
|
|
4
4
|
/** Validate public questionnaire options. */
|
|
5
5
|
const Config = z.object({
|
|
6
|
-
contactFormUrl: z.string().pattern(/^https:\/\/[^/\s]+\//).default("https://trtgsjkv6r.feishu.cn/share/base/form/
|
|
6
|
+
contactFormUrl: z.string().pattern(/^https:\/\/[^/\s]+\//).default("https://trtgsjkv6r.feishu.cn/share/base/form/shrcnlCoGElW7MQznGy9r3YYXcg"),
|
|
7
7
|
contactSource: z.string().default("")
|
|
8
8
|
});
|
|
9
9
|
/** Bootstrap key containing no account credentials. */
|
|
@@ -6,5 +6,5 @@ export type AccountMenuProps = PropsRuntime<'settings.launcher'> & PropsLocale<'
|
|
|
6
6
|
* @param props - sidebar geometry, settings navigation and account operations.
|
|
7
7
|
* @returns account menu launcher.
|
|
8
8
|
*/
|
|
9
|
-
export declare function AccountMenu({ wide, openSettings, openOnboarding, useAccount, signOut, contactUs, showLogin, start, cancel, t, }: AccountMenuProps): import("react").JSX.Element;
|
|
9
|
+
export declare function AccountMenu({ wide, openSettings, openOnboarding, useAccount, useTheme, signOut, contactUs, showLogin, start, cancel, t, }: AccountMenuProps): import("react").JSX.Element;
|
|
10
10
|
//# sourceMappingURL=AccountMenu.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
2
|
import type { AccountSectionInjected } from './AccountSection.tsx';
|
|
3
3
|
/** @param props - onboarding completion, account state and actions. @returns account dialog while signed out. */
|
|
4
|
-
export declare function AccountOnboarding({ complete, useApiKey, useAccount, setOnboarding, showLogin, start, cancel, t }: PropsRuntime<'settings.models.sign-in'> & PropsLocale<'settings.account'> & InjectFace<AccountSectionInjected>): import("react").JSX.Element | null;
|
|
4
|
+
export declare function AccountOnboarding({ complete, useApiKey, useAccount, useTheme, setOnboarding, showLogin, start, cancel, t }: PropsRuntime<'settings.models.sign-in'> & PropsLocale<'settings.account'> & InjectFace<AccountSectionInjected>): import("react").JSX.Element | null;
|
|
5
5
|
//# sourceMappingURL=AccountOnboarding.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AccountDetails, AccountView, SignInAttemptId } from '@deepseek-ai/dsh-deepseek-account/types';
|
|
2
2
|
import type { PropsRuntime, PropsLocale, InjectFace, HostObservable } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { ThemeSnapshot } from '@deepseek-ai/dsh-client-ui-theme/client';
|
|
3
4
|
import { type PlatformBridge } from './PlatformOverlay.tsx';
|
|
4
5
|
/** Safe account snapshot shared by the settings page and launcher. */
|
|
5
6
|
export interface AccountSnapshot {
|
|
@@ -20,13 +21,15 @@ export interface AccountSnapshot {
|
|
|
20
21
|
export interface AccountSectionInjected {
|
|
21
22
|
/** Desktop-only commands; absent in ordinary browsers. */
|
|
22
23
|
platform?: PlatformBridge;
|
|
23
|
-
/**
|
|
24
|
+
/** Account stream owned by the Host and theme snapshots published by the renderer, observed through framework hooks. */
|
|
24
25
|
hooks: {
|
|
25
26
|
account: HostObservable<AccountSnapshot>;
|
|
27
|
+
/** Palette the Platform login pages follow. */
|
|
28
|
+
theme: HostObservable<ThemeSnapshot>;
|
|
26
29
|
};
|
|
27
30
|
/** @returns after account details are refreshed; concurrent refreshes share a request. */
|
|
28
31
|
refresh: () => Promise<void>;
|
|
29
|
-
/** Open the external support questionnaire with the current
|
|
32
|
+
/** Open the external support questionnaire with the current build and browser environment. */
|
|
30
33
|
contactUs: () => void;
|
|
31
34
|
/** Open or dismiss the login dialog. */
|
|
32
35
|
showLogin: (visible: boolean) => void;
|
|
@@ -42,5 +45,5 @@ export interface AccountSectionInjected {
|
|
|
42
45
|
/** Composed account section props. */
|
|
43
46
|
export type AccountSectionProps = PropsRuntime<'settings.section'> & PropsLocale<'settings.account'> & InjectFace<AccountSectionInjected>;
|
|
44
47
|
/** @param props - localized actions and account subscription. @returns account settings UI. */
|
|
45
|
-
export declare function AccountSection({ t, useAccount, start, cancel, refresh, platform }: AccountSectionProps): import("react").JSX.Element;
|
|
48
|
+
export declare function AccountSection({ t, useAccount, useTheme, start, cancel, refresh, platform }: AccountSectionProps): import("react").JSX.Element;
|
|
46
49
|
//# sourceMappingURL=AccountSection.d.ts.map
|
|
@@ -2,8 +2,10 @@ import type { AccountSnapshot } from './AccountSection.tsx';
|
|
|
2
2
|
import type { SignInAttemptId } from '@deepseek-ai/dsh-deepseek-account/types';
|
|
3
3
|
import type { AccountKey } from './locales.ts';
|
|
4
4
|
/** @param props - safe account state, localized copy, and user actions. @returns login dialog. */
|
|
5
|
-
export declare function SignInDialog({ account, start, cancel, close, useApiKey, t }: {
|
|
5
|
+
export declare function SignInDialog({ account, colorScheme, start, cancel, close, useApiKey, t }: {
|
|
6
6
|
account: AccountSnapshot;
|
|
7
|
+
/** Resolved scheme of the active Desktop theme; the copied link carries it. */
|
|
8
|
+
colorScheme: 'light' | 'dark';
|
|
7
9
|
start: () => Promise<void>;
|
|
8
10
|
cancel: (id: SignInAttemptId) => Promise<void>;
|
|
9
11
|
close: () => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Platform authorization links that carry the Desktop palette into the login page. */
|
|
2
|
+
/**
|
|
3
|
+
* Add the resolved Desktop palette to a Platform authorization link without
|
|
4
|
+
* dropping any parameter the Host already put on it.
|
|
5
|
+
* @param authorizeUrl - authorization URL of the current account attempt.
|
|
6
|
+
* @param colorScheme - resolved scheme of the active Desktop theme.
|
|
7
|
+
* @returns the authorization URL carrying `theme=light` or `theme=dark`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function authorizeUrlWithTheme(authorizeUrl: string, colorScheme: 'light' | 'dark'): string;
|
|
10
|
+
//# sourceMappingURL=authorize-url.d.ts.map
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
/** Feishu questionnaire context follows the Platform Web ticket fields. */
|
|
2
2
|
import type { Config } from '../contact-config.ts';
|
|
3
|
-
import type { AccountProfile } from '@deepseek-ai/dsh-deepseek-account/types';
|
|
4
3
|
/**
|
|
5
4
|
* Build an external questionnaire URL without authentication credentials.
|
|
6
5
|
* @param config - questionnaire destination and supported source option.
|
|
7
|
-
* @param context - currently available
|
|
6
|
+
* @param context - currently available build and browser environment.
|
|
8
7
|
* @returns questionnaire URL with hidden, optionally prefilled context fields.
|
|
9
8
|
*/
|
|
10
9
|
export declare function contactUrl(config: Config, context: {
|
|
11
|
-
uid: AccountProfile['id'];
|
|
12
10
|
version: string | undefined;
|
|
13
11
|
locale: string;
|
|
14
12
|
width: number;
|
|
@@ -19,7 +19,7 @@ export declare const en: {
|
|
|
19
19
|
readonly loading: "Loading…";
|
|
20
20
|
readonly backToHarness: "Back to DeepSeek Harness";
|
|
21
21
|
readonly settings: "Settings";
|
|
22
|
-
readonly contactUs: "
|
|
22
|
+
readonly contactUs: "Feedback";
|
|
23
23
|
readonly menu: "Account menu";
|
|
24
24
|
readonly nav: "Account";
|
|
25
25
|
readonly signedIn: "Signed in to DeepSeek";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-ui-settings-account",
|
|
3
3
|
"description": "Manage DeepSeek login and open Platform billing pages",
|
|
4
|
-
"version": "0.1.7-alpha.
|
|
4
|
+
"version": "0.1.7-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -30,14 +30,15 @@
|
|
|
30
30
|
"inject": [
|
|
31
31
|
"@deepseek-ai/dsh-api-remotes",
|
|
32
32
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
33
|
-
"@deepseek-ai/dsh-client-locale"
|
|
33
|
+
"@deepseek-ai/dsh-client-locale",
|
|
34
|
+
"@deepseek-ai/dsh-client-ui-theme"
|
|
34
35
|
],
|
|
35
36
|
"platform": "web"
|
|
36
37
|
}
|
|
37
38
|
},
|
|
38
39
|
"license": "MIT",
|
|
39
40
|
"peerDependencies": {
|
|
40
|
-
"@deepseek-ai/cordis": "
|
|
41
|
+
"@deepseek-ai/cordis": "~4.0.4"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
44
|
"@testing-library/react": "^16.1.0",
|
|
@@ -47,17 +48,18 @@
|
|
|
47
48
|
"react-dom": "^18.2.0",
|
|
48
49
|
"@types/react-dom": "~18.3.0",
|
|
49
50
|
"big.js": "^7.0.1",
|
|
50
|
-
"@deepseek-ai/cordis": "
|
|
51
|
-
"@deepseek-ai/dsh-api-remotes": "
|
|
52
|
-
"@deepseek-ai/dsh-client-
|
|
53
|
-
"@deepseek-ai/dsh-client-
|
|
54
|
-
"@deepseek-ai/dsh-client-ui-primitives": "
|
|
55
|
-
"@deepseek-ai/dsh-client-ui-
|
|
56
|
-
"@deepseek-ai/dsh-client-ui-
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-
|
|
60
|
-
"@deepseek-ai/dsh-host-webserver": "
|
|
51
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
52
|
+
"@deepseek-ai/dsh-api-remotes": "0.1.7-alpha.2",
|
|
53
|
+
"@deepseek-ai/dsh-client-test-runtime": "0.1.7-alpha.2",
|
|
54
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.7-alpha.2",
|
|
55
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-alpha.2",
|
|
56
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-alpha.2",
|
|
57
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.7-alpha.2",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-theme": "0.1.7-alpha.2",
|
|
59
|
+
"@deepseek-ai/dsh-deepseek-account": "0.1.7-alpha.2",
|
|
60
|
+
"@deepseek-ai/dsh-client-ui-settings-models": "0.1.7-alpha.2",
|
|
61
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.7-alpha.2",
|
|
62
|
+
"@deepseek-ai/dsh-client-locale": "0.1.7-alpha.2"
|
|
61
63
|
},
|
|
62
64
|
"files": [
|
|
63
65
|
"lib/index.js",
|
|
@@ -65,7 +67,7 @@
|
|
|
65
67
|
"lib/types/**/*.d.ts"
|
|
66
68
|
],
|
|
67
69
|
"dependencies": {
|
|
68
|
-
"@deepseek-ai/schemastery": "
|
|
70
|
+
"@deepseek-ai/schemastery": "~3.18.4"
|
|
69
71
|
},
|
|
70
72
|
"scripts": {
|
|
71
73
|
"bundle": "tsdown",
|