@rightkit/social-ui 0.0.0-stage → 0.1.0
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/CHANGELOG.md +5 -0
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +21 -0
- package/README.md +40 -2
- package/dist/appName.d.ts +2 -0
- package/dist/appName.js +8 -0
- package/dist/components/ScopeSelect.d.ts +7 -0
- package/dist/components/ScopeSelect.js +6 -0
- package/dist/components/Shared.d.ts +34 -0
- package/dist/components/Shared.js +55 -0
- package/dist/data/derive.d.ts +21 -0
- package/dist/data/derive.js +47 -0
- package/dist/data/draftRules.d.ts +10 -0
- package/dist/data/draftRules.js +20 -0
- package/dist/data/engine/engineDataSource.d.ts +194 -0
- package/dist/data/engine/engineDataSource.js +836 -0
- package/dist/data/engine/errors.d.ts +13 -0
- package/dist/data/engine/errors.js +21 -0
- package/dist/data/engine/mapping.d.ts +172 -0
- package/dist/data/engine/mapping.js +1487 -0
- package/dist/data/engine/protocol.d.ts +910 -0
- package/dist/data/engine/protocol.js +67 -0
- package/dist/data/index.d.ts +18 -0
- package/dist/data/index.js +23 -0
- package/dist/data/mock/devSource.d.ts +7 -0
- package/dist/data/mock/devSource.js +10 -0
- package/dist/data/mock/fixtures-analytics.d.ts +7 -0
- package/dist/data/mock/fixtures-analytics.js +123 -0
- package/dist/data/mock/fixtures-briefs.d.ts +4 -0
- package/dist/data/mock/fixtures-briefs.js +230 -0
- package/dist/data/mock/fixtures-content.d.ts +4 -0
- package/dist/data/mock/fixtures-content.js +89 -0
- package/dist/data/mock/fixtures-digests.d.ts +3 -0
- package/dist/data/mock/fixtures-digests.js +40 -0
- package/dist/data/mock/fixtures-drafts.d.ts +2 -0
- package/dist/data/mock/fixtures-drafts.js +74 -0
- package/dist/data/mock/fixtures-gate.d.ts +3 -0
- package/dist/data/mock/fixtures-gate.js +49 -0
- package/dist/data/mock/fixtures-hooks.d.ts +2 -0
- package/dist/data/mock/fixtures-hooks.js +103 -0
- package/dist/data/mock/fixtures-inbox.d.ts +11 -0
- package/dist/data/mock/fixtures-inbox.js +213 -0
- package/dist/data/mock/fixtures-links.d.ts +5 -0
- package/dist/data/mock/fixtures-links.js +89 -0
- package/dist/data/mock/fixtures-memory.d.ts +3 -0
- package/dist/data/mock/fixtures-memory.js +148 -0
- package/dist/data/mock/fixtures-ops.d.ts +15 -0
- package/dist/data/mock/fixtures-ops.js +403 -0
- package/dist/data/mock/fixtures-optimise.d.ts +18 -0
- package/dist/data/mock/fixtures-optimise.js +221 -0
- package/dist/data/mock/fixtures-pacing.d.ts +5 -0
- package/dist/data/mock/fixtures-pacing.js +285 -0
- package/dist/data/mock/fixtures-publish.d.ts +2 -0
- package/dist/data/mock/fixtures-publish.js +129 -0
- package/dist/data/mock/fixtures-store.d.ts +10 -0
- package/dist/data/mock/fixtures-store.js +13 -0
- package/dist/data/mock/fixtures-variants.d.ts +5 -0
- package/dist/data/mock/fixtures-variants.js +138 -0
- package/dist/data/mock/fixtures.d.ts +6 -0
- package/dist/data/mock/fixtures.js +420 -0
- package/dist/data/mock/mockDataSource.d.ts +98 -0
- package/dist/data/mock/mockDataSource.js +903 -0
- package/dist/data/money.d.ts +14 -0
- package/dist/data/money.js +36 -0
- package/dist/data/platforms.d.ts +12 -0
- package/dist/data/platforms.js +26 -0
- package/dist/data/source.d.ts +196 -0
- package/dist/data/source.js +1 -0
- package/dist/data/time.d.ts +23 -0
- package/dist/data/time.js +86 -0
- package/dist/data/types.d.ts +1092 -0
- package/dist/data/types.js +3 -0
- package/dist/env.d.ts +59 -0
- package/dist/hooks/useAsync.d.ts +19 -0
- package/dist/hooks/useAsync.js +25 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.js +58 -0
- package/dist/lib/host.d.ts +21 -0
- package/dist/lib/host.js +32 -0
- package/dist/lib/shell.d.ts +156 -0
- package/dist/lib/shell.js +16 -0
- package/dist/screens/AccountsScreen.d.ts +8 -0
- package/dist/screens/AccountsScreen.js +100 -0
- package/dist/screens/AnalyticsScreen.d.ts +7 -0
- package/dist/screens/AnalyticsScreen.js +64 -0
- package/dist/screens/ApprovalsScreen.d.ts +10 -0
- package/dist/screens/ApprovalsScreen.js +144 -0
- package/dist/screens/BriefsScreen.d.ts +7 -0
- package/dist/screens/BriefsScreen.js +83 -0
- package/dist/screens/CalendarScreen.d.ts +10 -0
- package/dist/screens/CalendarScreen.js +143 -0
- package/dist/screens/CampaignsScreen.d.ts +7 -0
- package/dist/screens/CampaignsScreen.js +52 -0
- package/dist/screens/ChannelMemoryScreen.d.ts +7 -0
- package/dist/screens/ChannelMemoryScreen.js +109 -0
- package/dist/screens/ContentScreen.d.ts +7 -0
- package/dist/screens/ContentScreen.js +64 -0
- package/dist/screens/DigestsScreen.d.ts +7 -0
- package/dist/screens/DigestsScreen.js +53 -0
- package/dist/screens/DraftsScreen.d.ts +10 -0
- package/dist/screens/DraftsScreen.js +108 -0
- package/dist/screens/FailuresScreen.d.ts +8 -0
- package/dist/screens/FailuresScreen.js +111 -0
- package/dist/screens/HookTestsScreen.d.ts +7 -0
- package/dist/screens/HookTestsScreen.js +54 -0
- package/dist/screens/InboxScreen.d.ts +12 -0
- package/dist/screens/InboxScreen.js +76 -0
- package/dist/screens/LinksScreen.d.ts +7 -0
- package/dist/screens/LinksScreen.js +52 -0
- package/dist/screens/PacingScreen.d.ts +7 -0
- package/dist/screens/PacingScreen.js +88 -0
- package/dist/screens/PublishJobsScreen.d.ts +7 -0
- package/dist/screens/PublishJobsScreen.js +66 -0
- package/dist/screens/SuggestionsScreen.d.ts +8 -0
- package/dist/screens/SuggestionsScreen.js +94 -0
- package/dist/screens/TextGateScreen.d.ts +7 -0
- package/dist/screens/TextGateScreen.js +111 -0
- package/dist/screens/ThreadsScreen.d.ts +8 -0
- package/dist/screens/ThreadsScreen.js +113 -0
- package/dist/screens/TypedBriefsScreen.d.ts +7 -0
- package/dist/screens/TypedBriefsScreen.js +75 -0
- package/dist/screens/labels.d.ts +121 -0
- package/dist/screens/labels.js +272 -0
- package/package.json +56 -3
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module "*.css";
|
|
4
|
+
declare module "*.svg" {
|
|
5
|
+
const src: string;
|
|
6
|
+
export default src;
|
|
7
|
+
}
|
|
8
|
+
declare module "*.png" {
|
|
9
|
+
const src: string;
|
|
10
|
+
export default src;
|
|
11
|
+
}
|
|
12
|
+
declare module "*.txt?raw" {
|
|
13
|
+
const text: string;
|
|
14
|
+
export default text;
|
|
15
|
+
}
|
|
16
|
+
declare module "*.tsv?raw" {
|
|
17
|
+
const text: string;
|
|
18
|
+
export default text;
|
|
19
|
+
}
|
|
20
|
+
declare module "*?url" {
|
|
21
|
+
const src: string;
|
|
22
|
+
export default src;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Build-time switches a host may define (Vite `define`); every read is typeof-guarded.
|
|
26
|
+
declare const __RIGHTKIT_QA__: boolean | undefined;
|
|
27
|
+
declare const __RIGHTKIT_DEMO__: boolean | undefined;
|
|
28
|
+
declare const __RIGHTKIT_MOCK__: boolean | undefined;
|
|
29
|
+
declare const __APP_VERSION__: string | undefined;
|
|
30
|
+
|
|
31
|
+
interface Window {
|
|
32
|
+
/** UI QA only: the data source a QA shell selects. */
|
|
33
|
+
__RIGHTKIT_QA_DATA_SOURCE__?: "engine";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare module "@rightkit-host/legal/legal-manifest.json" {
|
|
37
|
+
const manifest: {
|
|
38
|
+
documents: Array<{ id: string; role: string; title: string; publicUrl: string; version?: string; sha256?: string; [key: string]: unknown }>;
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
};
|
|
41
|
+
export default manifest;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare module "@rightkit-host/legal/legal-manifest.json?raw" {
|
|
45
|
+
const text: string;
|
|
46
|
+
export default text;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare module "@rightkit-host/src/generated/legal-contract.json" {
|
|
50
|
+
const contract: { acceptanceVersion: string; materialSha256: string; [key: string]: unknown };
|
|
51
|
+
export default contract;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare module "virtual:rightkit-legal" {
|
|
55
|
+
export const LEGAL_DOCUMENTS: readonly { title: string; content: string }[];
|
|
56
|
+
export const LEGAL_VERSION: string;
|
|
57
|
+
export const LEGAL_DOCUMENTS_HASH: string;
|
|
58
|
+
export const LEGAL_RECEIPT_DOCUMENTS: readonly { id: string; role: string; version: string; sha256: string; treatment: string; material: boolean }[];
|
|
59
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type AsyncState<T> = {
|
|
2
|
+
status: "loading";
|
|
3
|
+
} | {
|
|
4
|
+
status: "ready";
|
|
5
|
+
value: T;
|
|
6
|
+
} | {
|
|
7
|
+
status: "error";
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Runs `load` whenever `deps` change or `reload` is called. Stale responses are dropped so a
|
|
12
|
+
* slow earlier read cannot overwrite a newer one.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useAsync<T>(load: () => Promise<T>, deps: readonly unknown[]): {
|
|
15
|
+
state: AsyncState<T>;
|
|
16
|
+
reload: () => void;
|
|
17
|
+
/** Current value, or the last good value while a reload runs. Null before the first success. */
|
|
18
|
+
value: T | null;
|
|
19
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Runs `load` whenever `deps` change or `reload` is called. Stale responses are dropped so a
|
|
4
|
+
* slow earlier read cannot overwrite a newer one.
|
|
5
|
+
*/
|
|
6
|
+
export function useAsync(load, deps) {
|
|
7
|
+
const [state, setState] = useState({ status: "loading" });
|
|
8
|
+
const [tick, setTick] = useState(0);
|
|
9
|
+
const lastGood = useRef(null);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (state.status === "ready")
|
|
12
|
+
lastGood.current = state.value;
|
|
13
|
+
}, [state]);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
let live = true;
|
|
16
|
+
setState({ status: "loading" });
|
|
17
|
+
load().then((value) => live && setState({ status: "ready", value }), (error) => live && setState({ status: "error", message: error instanceof Error ? error.message : "Unknown error" }));
|
|
18
|
+
return () => {
|
|
19
|
+
live = false;
|
|
20
|
+
};
|
|
21
|
+
// The caller owns the dependency list; `load` is re-created on every render by design.
|
|
22
|
+
}, [...deps, tick]);
|
|
23
|
+
const reload = useCallback(() => setTick((t) => t + 1), []);
|
|
24
|
+
return { state, reload, value: state.status === "ready" ? state.value : lastGood.current };
|
|
25
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export * from "./appName.js";
|
|
2
|
+
export * from "./components/ScopeSelect.js";
|
|
3
|
+
export * from "./components/Shared.js";
|
|
4
|
+
export * from "./data/derive.js";
|
|
5
|
+
export * from "./data/draftRules.js";
|
|
6
|
+
export * from "./data/engine/engineDataSource.js";
|
|
7
|
+
export * from "./data/engine/errors.js";
|
|
8
|
+
export * from "./data/engine/mapping.js";
|
|
9
|
+
export * from "./data/engine/protocol.js";
|
|
10
|
+
export * from "./data/mock/devSource.js";
|
|
11
|
+
export * from "./data/mock/fixtures-analytics.js";
|
|
12
|
+
export * from "./data/mock/fixtures-briefs.js";
|
|
13
|
+
export * from "./data/mock/fixtures-content.js";
|
|
14
|
+
export * from "./data/mock/fixtures-digests.js";
|
|
15
|
+
export * from "./data/mock/fixtures-drafts.js";
|
|
16
|
+
export * from "./data/mock/fixtures-gate.js";
|
|
17
|
+
export * from "./data/mock/fixtures-hooks.js";
|
|
18
|
+
export * from "./data/mock/fixtures-inbox.js";
|
|
19
|
+
export * from "./data/mock/fixtures-links.js";
|
|
20
|
+
export * from "./data/mock/fixtures-memory.js";
|
|
21
|
+
export * from "./data/mock/fixtures-ops.js";
|
|
22
|
+
export * from "./data/mock/fixtures-optimise.js";
|
|
23
|
+
export * from "./data/mock/fixtures-pacing.js";
|
|
24
|
+
export * from "./data/mock/fixtures-publish.js";
|
|
25
|
+
export * from "./data/mock/fixtures-store.js";
|
|
26
|
+
export * from "./data/mock/fixtures-variants.js";
|
|
27
|
+
export * from "./data/mock/fixtures.js";
|
|
28
|
+
export * from "./data/mock/mockDataSource.js";
|
|
29
|
+
export * from "./data/money.js";
|
|
30
|
+
export * from "./data/platforms.js";
|
|
31
|
+
export * from "./data/time.js";
|
|
32
|
+
export * from "./data/types.js";
|
|
33
|
+
export * from "./hooks/useAsync.js";
|
|
34
|
+
export * from "./lib/host.js";
|
|
35
|
+
export * from "./lib/shell.js";
|
|
36
|
+
export * from "./screens/AccountsScreen.js";
|
|
37
|
+
export * from "./screens/AnalyticsScreen.js";
|
|
38
|
+
export * from "./screens/ApprovalsScreen.js";
|
|
39
|
+
export * from "./screens/BriefsScreen.js";
|
|
40
|
+
export * from "./screens/CalendarScreen.js";
|
|
41
|
+
export * from "./screens/CampaignsScreen.js";
|
|
42
|
+
export * from "./screens/ChannelMemoryScreen.js";
|
|
43
|
+
export * from "./screens/ContentScreen.js";
|
|
44
|
+
export * from "./screens/DigestsScreen.js";
|
|
45
|
+
export * from "./screens/DraftsScreen.js";
|
|
46
|
+
export * from "./screens/FailuresScreen.js";
|
|
47
|
+
export * from "./screens/HookTestsScreen.js";
|
|
48
|
+
export * from "./screens/InboxScreen.js";
|
|
49
|
+
export * from "./screens/LinksScreen.js";
|
|
50
|
+
export * from "./screens/PacingScreen.js";
|
|
51
|
+
export * from "./screens/PublishJobsScreen.js";
|
|
52
|
+
export * from "./screens/SuggestionsScreen.js";
|
|
53
|
+
export * from "./screens/TextGateScreen.js";
|
|
54
|
+
export * from "./screens/ThreadsScreen.js";
|
|
55
|
+
export * from "./screens/TypedBriefsScreen.js";
|
|
56
|
+
export * from "./screens/labels.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Generated entry: every module whose exports do not collide with an earlier one.
|
|
2
|
+
// Every module is also importable directly by subpath, e.g. `<package>/lib/foo`.
|
|
3
|
+
export * from "./appName.js";
|
|
4
|
+
export * from "./components/ScopeSelect.js";
|
|
5
|
+
export * from "./components/Shared.js";
|
|
6
|
+
export * from "./data/derive.js";
|
|
7
|
+
export * from "./data/draftRules.js";
|
|
8
|
+
export * from "./data/engine/engineDataSource.js";
|
|
9
|
+
export * from "./data/engine/errors.js";
|
|
10
|
+
export * from "./data/engine/mapping.js";
|
|
11
|
+
export * from "./data/engine/protocol.js";
|
|
12
|
+
export * from "./data/mock/devSource.js";
|
|
13
|
+
export * from "./data/mock/fixtures-analytics.js";
|
|
14
|
+
export * from "./data/mock/fixtures-briefs.js";
|
|
15
|
+
export * from "./data/mock/fixtures-content.js";
|
|
16
|
+
export * from "./data/mock/fixtures-digests.js";
|
|
17
|
+
export * from "./data/mock/fixtures-drafts.js";
|
|
18
|
+
export * from "./data/mock/fixtures-gate.js";
|
|
19
|
+
export * from "./data/mock/fixtures-hooks.js";
|
|
20
|
+
export * from "./data/mock/fixtures-inbox.js";
|
|
21
|
+
export * from "./data/mock/fixtures-links.js";
|
|
22
|
+
export * from "./data/mock/fixtures-memory.js";
|
|
23
|
+
export * from "./data/mock/fixtures-ops.js";
|
|
24
|
+
export * from "./data/mock/fixtures-optimise.js";
|
|
25
|
+
export * from "./data/mock/fixtures-pacing.js";
|
|
26
|
+
export * from "./data/mock/fixtures-publish.js";
|
|
27
|
+
export * from "./data/mock/fixtures-store.js";
|
|
28
|
+
export * from "./data/mock/fixtures-variants.js";
|
|
29
|
+
export * from "./data/mock/fixtures.js";
|
|
30
|
+
export * from "./data/mock/mockDataSource.js";
|
|
31
|
+
export * from "./data/money.js";
|
|
32
|
+
export * from "./data/platforms.js";
|
|
33
|
+
export * from "./data/time.js";
|
|
34
|
+
export * from "./data/types.js";
|
|
35
|
+
export * from "./hooks/useAsync.js";
|
|
36
|
+
export * from "./lib/host.js";
|
|
37
|
+
export * from "./lib/shell.js";
|
|
38
|
+
export * from "./screens/AccountsScreen.js";
|
|
39
|
+
export * from "./screens/AnalyticsScreen.js";
|
|
40
|
+
export * from "./screens/ApprovalsScreen.js";
|
|
41
|
+
export * from "./screens/BriefsScreen.js";
|
|
42
|
+
export * from "./screens/CalendarScreen.js";
|
|
43
|
+
export * from "./screens/CampaignsScreen.js";
|
|
44
|
+
export * from "./screens/ChannelMemoryScreen.js";
|
|
45
|
+
export * from "./screens/ContentScreen.js";
|
|
46
|
+
export * from "./screens/DigestsScreen.js";
|
|
47
|
+
export * from "./screens/DraftsScreen.js";
|
|
48
|
+
export * from "./screens/FailuresScreen.js";
|
|
49
|
+
export * from "./screens/HookTestsScreen.js";
|
|
50
|
+
export * from "./screens/InboxScreen.js";
|
|
51
|
+
export * from "./screens/LinksScreen.js";
|
|
52
|
+
export * from "./screens/PacingScreen.js";
|
|
53
|
+
export * from "./screens/PublishJobsScreen.js";
|
|
54
|
+
export * from "./screens/SuggestionsScreen.js";
|
|
55
|
+
export * from "./screens/TextGateScreen.js";
|
|
56
|
+
export * from "./screens/ThreadsScreen.js";
|
|
57
|
+
export * from "./screens/TypedBriefsScreen.js";
|
|
58
|
+
export * from "./screens/labels.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { isTauri } from "@rightkit/platform-ui";
|
|
2
|
+
import { type EngineCallError } from "@rightkit/tauri-shell";
|
|
3
|
+
export { isTauri };
|
|
4
|
+
export declare function invoke<T>(command: string, args?: Record<string, unknown>): Promise<T>;
|
|
5
|
+
/**
|
|
6
|
+
* The typed rejection `engine.callTagged` returns (`@rightkit/tauri-shell` 0.1.2 `EngineCallError`): `origin` is
|
|
7
|
+
* `supervisor` when the call was refused before the engine ran, `engine` for the engine's own reply.
|
|
8
|
+
*/
|
|
9
|
+
export type { EngineCallError };
|
|
10
|
+
export type EngineCallResult<T> = {
|
|
11
|
+
ok: true;
|
|
12
|
+
value: T;
|
|
13
|
+
} | {
|
|
14
|
+
ok: false;
|
|
15
|
+
error: EngineCallError;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* One engine method through the shell (`shell.engine.callTagged`, the owner's typed wrapper). Never throws: a refused
|
|
19
|
+
* method, an engine error or a missing shell all come back as `{ ok: false, error }`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function engineCall<T>(method: string, params: Record<string, unknown>): Promise<EngineCallResult<T>>;
|
package/dist/lib/host.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Single IPC seam to the Tauri shell. There is no browser stand-in: UI behaviour is verified
|
|
2
|
+
// against the real app, never against an in-page mock.
|
|
3
|
+
import { invoke as tauriInvoke } from "@tauri-apps/api/core";
|
|
4
|
+
import { isTauri } from "@rightkit/platform-ui";
|
|
5
|
+
import { asShellError } from "@rightkit/tauri-shell";
|
|
6
|
+
import { shell } from "./shell.js";
|
|
7
|
+
export { isTauri };
|
|
8
|
+
export async function invoke(command, args) {
|
|
9
|
+
if (!isTauri())
|
|
10
|
+
throw new Error(`"${command}" needs the Tauri shell; run \`pnpm tauri:dev\``);
|
|
11
|
+
return tauriInvoke(command, args);
|
|
12
|
+
}
|
|
13
|
+
/** Per-call tag; the shell echoes it on every engine event of that call. */
|
|
14
|
+
let tagCounter = 0;
|
|
15
|
+
/**
|
|
16
|
+
* One engine method through the shell (`shell.engine.callTagged`, the owner's typed wrapper). Never throws: a refused
|
|
17
|
+
* method, an engine error or a missing shell all come back as `{ ok: false, error }`.
|
|
18
|
+
*/
|
|
19
|
+
export async function engineCall(method, params) {
|
|
20
|
+
tagCounter += 1;
|
|
21
|
+
try {
|
|
22
|
+
const value = await shell.engine.callTagged(method, params, `postright-ui-${tagCounter}`);
|
|
23
|
+
return { ok: true, value };
|
|
24
|
+
}
|
|
25
|
+
catch (raw) {
|
|
26
|
+
const e = asShellError(raw);
|
|
27
|
+
return {
|
|
28
|
+
ok: false,
|
|
29
|
+
error: { code: e.code, message: e.message, origin: e.origin === "engine" ? "engine" : "supervisor", ...(e.details !== undefined ? { details: e.details } : {}) },
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/** The native shell bridge (window controls, external links, menu actions, native theme). */
|
|
2
|
+
export declare const shell: {
|
|
3
|
+
ready: () => Promise<{
|
|
4
|
+
background: boolean;
|
|
5
|
+
appId: string;
|
|
6
|
+
appName: string;
|
|
7
|
+
engine: {
|
|
8
|
+
state: 'starting' | 'ready' | 'error';
|
|
9
|
+
hello?: unknown;
|
|
10
|
+
code?: string;
|
|
11
|
+
message?: string;
|
|
12
|
+
} | null;
|
|
13
|
+
}>;
|
|
14
|
+
status: () => Promise<import("@rightkit/tauri-shell").ShellStatus>;
|
|
15
|
+
capabilities: () => Promise<import("@rightkit/tauri-shell").ShellCapabilities>;
|
|
16
|
+
quit: (quitOptions?: import("@rightkit/tauri-shell").QuitOptions) => Promise<import("@rightkit/tauri-shell").QuitReport>;
|
|
17
|
+
onQuitRequested: (handler: import("@rightkit/tauri-shell").QuitHandler) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
18
|
+
openExternal: (url: string) => Promise<void>;
|
|
19
|
+
window: {
|
|
20
|
+
do: (action: import("@rightkit/tauri-shell").WindowAction) => Promise<void>;
|
|
21
|
+
minimize: () => Promise<void>;
|
|
22
|
+
toggleMaximize: () => Promise<void>;
|
|
23
|
+
close: () => Promise<void>;
|
|
24
|
+
startDrag: () => Promise<void>;
|
|
25
|
+
open: (spec: import("@rightkit/tauri-shell").WindowSpec) => Promise<string>;
|
|
26
|
+
trafficLights: (dx: number, dy: number) => Promise<void>;
|
|
27
|
+
};
|
|
28
|
+
menu: {
|
|
29
|
+
setEnabled: (id: string, enabled: boolean) => Promise<void>;
|
|
30
|
+
setChecked: (id: string, checked: boolean) => Promise<void>;
|
|
31
|
+
setState: (updates: import("@rightkit/tauri-shell").MenuItemState[]) => Promise<void>;
|
|
32
|
+
onClick: (h: (id: string) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
33
|
+
};
|
|
34
|
+
tray: {
|
|
35
|
+
update: (update: import("@rightkit/tauri-shell").TrayUpdate) => Promise<void>;
|
|
36
|
+
onEvent: (h: (e: {
|
|
37
|
+
kind: 'menu';
|
|
38
|
+
id: string;
|
|
39
|
+
} | {
|
|
40
|
+
kind: 'click';
|
|
41
|
+
}) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
42
|
+
onCustom: (name: string, h: (payload: unknown) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
43
|
+
};
|
|
44
|
+
deepLinks: {
|
|
45
|
+
on: (h: (link: import("@rightkit/tauri-shell").DeepLink) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
46
|
+
};
|
|
47
|
+
onSecondInstance: (h: (e: {
|
|
48
|
+
argv: string[];
|
|
49
|
+
cwd: string;
|
|
50
|
+
}) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
51
|
+
onStall: (h: (e: {
|
|
52
|
+
stalledMs: number;
|
|
53
|
+
thresholdMs: number;
|
|
54
|
+
}) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
55
|
+
autostart: {
|
|
56
|
+
get: () => Promise<import("@rightkit/tauri-shell").AutostartStatus>;
|
|
57
|
+
set: (enabled: boolean) => Promise<import("@rightkit/tauri-shell").AutostartStatus>;
|
|
58
|
+
openLoginItemsSettings: () => Promise<void>;
|
|
59
|
+
};
|
|
60
|
+
clipboard: {
|
|
61
|
+
read: (board?: string) => Promise<import("@rightkit/tauri-shell").ClipboardContent>;
|
|
62
|
+
write: (c: import("@rightkit/tauri-shell").ClipboardContent) => Promise<void>;
|
|
63
|
+
item: () => Promise<import("@rightkit/tauri-shell").ClipboardItem>;
|
|
64
|
+
};
|
|
65
|
+
notifications: {
|
|
66
|
+
post: (request: import("@rightkit/tauri-shell").NotificationRequest) => Promise<import("@rightkit/tauri-shell").NotifyOutcome>;
|
|
67
|
+
status: () => Promise<import("@rightkit/tauri-shell").NotifyStatus>;
|
|
68
|
+
clear: (ids?: string[]) => Promise<void>;
|
|
69
|
+
setBadge: (count: number) => Promise<number>;
|
|
70
|
+
};
|
|
71
|
+
presence: {
|
|
72
|
+
state: () => Promise<import("@rightkit/tauri-shell").PresenceState>;
|
|
73
|
+
setDnd: (enabled: boolean) => Promise<import("@rightkit/tauri-shell").PresenceState>;
|
|
74
|
+
setAuto: (prefs: import("@rightkit/tauri-shell").AutoPrefs) => Promise<import("@rightkit/tauri-shell").PresenceState>;
|
|
75
|
+
probe: () => Promise<{
|
|
76
|
+
environment: import("@rightkit/tauri-shell").Environment;
|
|
77
|
+
windows: number;
|
|
78
|
+
supported: boolean;
|
|
79
|
+
}>;
|
|
80
|
+
evaluate: (monitor: import("@rightkit/tauri-shell").Rect, windows: import("@rightkit/tauri-shell").WindowObservation[], apply?: boolean) => Promise<{
|
|
81
|
+
environment: import("@rightkit/tauri-shell").Environment;
|
|
82
|
+
state: import("@rightkit/tauri-shell").PresenceState;
|
|
83
|
+
}>;
|
|
84
|
+
onChange: (h: (s: import("@rightkit/tauri-shell").PresenceState) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
85
|
+
};
|
|
86
|
+
idle: {
|
|
87
|
+
status: () => Promise<import("@rightkit/tauri-shell").IdleStatus>;
|
|
88
|
+
note: (hidden: boolean) => Promise<void>;
|
|
89
|
+
onChange: (h: (e: {
|
|
90
|
+
state: 'hidden' | 'visible' | 'suspended' | 'resumed';
|
|
91
|
+
}) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
92
|
+
};
|
|
93
|
+
paths: {
|
|
94
|
+
require: (path: string, write?: boolean) => Promise<string>;
|
|
95
|
+
revoke: (path: string) => Promise<void>;
|
|
96
|
+
grantRecent: (id: string) => Promise<string>;
|
|
97
|
+
regrantSaved: (path: string) => Promise<string>;
|
|
98
|
+
streamUrl: (path: string) => Promise<{
|
|
99
|
+
id: string;
|
|
100
|
+
url: string;
|
|
101
|
+
}>;
|
|
102
|
+
};
|
|
103
|
+
openPaths: {
|
|
104
|
+
ready: () => Promise<string[]>;
|
|
105
|
+
onOpen: (h: (e: {
|
|
106
|
+
paths: string[];
|
|
107
|
+
}) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
108
|
+
};
|
|
109
|
+
associations: {
|
|
110
|
+
status: (groups?: string[]) => Promise<import("@rightkit/tauri-shell").AssociationStatus>;
|
|
111
|
+
set: (groups?: string[], timeoutMs?: number) => Promise<import("@rightkit/tauri-shell").AssociationSetResult>;
|
|
112
|
+
openDefaultApps: () => Promise<void>;
|
|
113
|
+
};
|
|
114
|
+
print: (ui?: import("@rightkit/tauri-shell").PrintUi) => Promise<void>;
|
|
115
|
+
onPrintError: (h: (message: string) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
116
|
+
recovery: {
|
|
117
|
+
save: (snapshot: unknown) => Promise<void>;
|
|
118
|
+
load: <T = unknown>() => Promise<T | null>;
|
|
119
|
+
clear: () => Promise<void>;
|
|
120
|
+
};
|
|
121
|
+
site: {
|
|
122
|
+
grant: (document: string) => Promise<import("@rightkit/tauri-shell").SiteGrant>;
|
|
123
|
+
revoke: (token: string) => Promise<void>;
|
|
124
|
+
};
|
|
125
|
+
surface: {
|
|
126
|
+
set: (surface: string) => Promise<import("@rightkit/tauri-shell").SurfaceReport>;
|
|
127
|
+
};
|
|
128
|
+
preview: {
|
|
129
|
+
register: (kind: string, html: string) => Promise<import("@rightkit/tauri-shell").PreviewHandle>;
|
|
130
|
+
revoke: (token: string) => Promise<void>;
|
|
131
|
+
revokeAll: () => Promise<void>;
|
|
132
|
+
};
|
|
133
|
+
legal: {
|
|
134
|
+
read: () => Promise<import("@rightkit/tauri-shell").LegalReceiptRecord | null>;
|
|
135
|
+
create: (request: import("@rightkit/tauri-shell").LegalReceiptCreateRequest) => Promise<import("@rightkit/tauri-shell").LegalReceiptRecord>;
|
|
136
|
+
reset: () => Promise<void>;
|
|
137
|
+
};
|
|
138
|
+
update: {
|
|
139
|
+
check: () => Promise<import("@rightkit/tauri-shell").UpdateHostCheck>;
|
|
140
|
+
status: () => Promise<import("@rightkit/tauri-shell").UpdateHostStatus>;
|
|
141
|
+
download: (handleId: string) => Promise<import("@rightkit/tauri-shell").UpdateHostDownload>;
|
|
142
|
+
install: (handleId: string) => Promise<import("@rightkit/tauri-shell").UpdateHostInstall>;
|
|
143
|
+
cancel: (handleId: string) => Promise<{
|
|
144
|
+
cancelled: boolean;
|
|
145
|
+
}>;
|
|
146
|
+
onProgress: (h: (p: import("@rightkit/tauri-shell").UpdateHostProgress) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
147
|
+
};
|
|
148
|
+
engine: {
|
|
149
|
+
call: <T = unknown>(method: string, params?: unknown) => Promise<T>;
|
|
150
|
+
callTagged: <T = unknown>(method: string, params?: unknown, tag?: string) => Promise<T>;
|
|
151
|
+
status: () => Promise<import("@rightkit/tauri-shell").EngineStatus | null>;
|
|
152
|
+
onEvent: (h: (e: import("@rightkit/tauri-shell").EngineEvent) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
|
|
153
|
+
};
|
|
154
|
+
bridge: () => import("@rightkit/tauri-shell").ShellBridge;
|
|
155
|
+
};
|
|
156
|
+
export declare const shellBridge: import("@rightkit/tauri-shell").ShellBridge;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createShell } from "@rightkit/tauri-shell";
|
|
2
|
+
/** Created on first use (outside a Tauri webview createShell throws, so importing this package must not call it). */
|
|
3
|
+
function lazy(make) {
|
|
4
|
+
let value = null;
|
|
5
|
+
const get = () => (value ??= make());
|
|
6
|
+
return new Proxy({}, {
|
|
7
|
+
get: (_t, key) => {
|
|
8
|
+
const v = Reflect.get(get(), key);
|
|
9
|
+
return typeof v === "function" ? v.bind(get()) : v;
|
|
10
|
+
},
|
|
11
|
+
has: (_t, key) => key in get(),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
/** The native shell bridge (window controls, external links, menu actions, native theme). */
|
|
15
|
+
export const shell = lazy(() => createShell());
|
|
16
|
+
export const shellBridge = lazy(() => shell.bridge());
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from "react";
|
|
3
|
+
import { Button, ConfirmDialog, EmptyState, Notice, PageShell, SkeletonRows, Toggle } from "@rightkit/react-shell/react";
|
|
4
|
+
import { AccountChip, LoadError, MockBanner } from "../components/Shared.js";
|
|
5
|
+
import { useAsync } from "../hooks/useAsync.js";
|
|
6
|
+
import { SOCIAL_PLATFORMS, accountOrdinals, dayLabel, instantLabel, } from "../data/index.js";
|
|
7
|
+
import { ENTITLEMENT_LABEL, PLATFORM_LABEL, cooldownText, platformName, tokenText } from "./labels.js";
|
|
8
|
+
import { hostAppName } from "../appName.js";
|
|
9
|
+
const SOURCE_LABEL = {
|
|
10
|
+
numeric_retry_after: "numeric Retry-After header",
|
|
11
|
+
dated_retry_after: "dated Retry-After header",
|
|
12
|
+
};
|
|
13
|
+
/** Accounts grouped by venture, then platform in the engine's platform order. Order inside a group is the daemon's list order. */
|
|
14
|
+
function groupAccounts(accounts) {
|
|
15
|
+
const ventures = new Map();
|
|
16
|
+
for (const account of accounts) {
|
|
17
|
+
const venture = ventures.get(account.venture.id) ?? { name: account.venture.name, platforms: new Map() };
|
|
18
|
+
const list = venture.platforms.get(account.platform) ?? [];
|
|
19
|
+
list.push(account);
|
|
20
|
+
venture.platforms.set(account.platform, list);
|
|
21
|
+
ventures.set(account.venture.id, venture);
|
|
22
|
+
}
|
|
23
|
+
return [...ventures.entries()].map(([id, v]) => ({
|
|
24
|
+
id,
|
|
25
|
+
name: v.name,
|
|
26
|
+
platforms: SOCIAL_PLATFORMS.filter((p) => v.platforms.has(p)).map((p) => ({
|
|
27
|
+
platform: p,
|
|
28
|
+
accounts: v.platforms.get(p) ?? [],
|
|
29
|
+
})),
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
/** Accounts whose platform or state this app does not show yet. Their readiness is not shown. */
|
|
33
|
+
function UnmappedAccounts({ rows }) {
|
|
34
|
+
return (_jsxs("section", { className: "op-venture", "aria-labelledby": "unmapped-accounts-title", children: [_jsx("h2", { id: "unmapped-accounts-title", className: "op-venture__title", children: "Accounts this app does not show yet" }), _jsx("p", { className: "op-hint", children: "The engine stores these accounts. Their readiness is not shown until this app knows their platform and state." }), _jsx("div", { className: "op-accounts", children: rows.map((row, index) => (_jsxs("article", { className: "op-card op-account", "aria-labelledby": `unmapped-${index}`, children: [_jsxs("h3", { id: `unmapped-${index}`, className: "op-account__title", children: ["Account on ", platformName(row.platform)] }), _jsxs("p", { children: ["Account id: ", _jsx("span", { className: "op-mono", children: row.id })] }), _jsxs("p", { children: ["Reason: ", row.reason] })] }, row.id))) })] }));
|
|
35
|
+
}
|
|
36
|
+
export function AccountsScreen({ source, rev, onChanged }) {
|
|
37
|
+
const { state, reload } = useAsync(async () => ({
|
|
38
|
+
accounts: await source.listAccounts(),
|
|
39
|
+
unmapped: source.unmappedAccounts?.() ?? [],
|
|
40
|
+
}), [source, rev]);
|
|
41
|
+
const [pendingId, setPendingId] = useState(null);
|
|
42
|
+
const [notice, setNotice] = useState(null);
|
|
43
|
+
const [disconnecting, setDisconnecting] = useState(null);
|
|
44
|
+
const now = source.nowUtc();
|
|
45
|
+
const loaded = state.status === "ready" ? state.value : null;
|
|
46
|
+
const ordinals = useMemo(() => accountOrdinals(loaded?.accounts ?? []), [loaded]);
|
|
47
|
+
async function setPaused(account, paused, label) {
|
|
48
|
+
setPendingId(account.id);
|
|
49
|
+
const result = paused
|
|
50
|
+
? await source.pauseAccount(account.id, "Paused from desktop")
|
|
51
|
+
: await source.resumeAccount(account.id);
|
|
52
|
+
setPendingId(null);
|
|
53
|
+
setNotice(result.ok
|
|
54
|
+
? {
|
|
55
|
+
tone: "ok",
|
|
56
|
+
text: paused ? `Publishing paused for ${label}. Its scheduled posts will not publish.` : `Publishing resumed for ${label}.`,
|
|
57
|
+
}
|
|
58
|
+
: { tone: "bad", text: result.error.message });
|
|
59
|
+
onChanged();
|
|
60
|
+
}
|
|
61
|
+
async function disconnect(account, label) {
|
|
62
|
+
setDisconnecting(null);
|
|
63
|
+
setPendingId(account.id);
|
|
64
|
+
const result = await source.disconnectAccount(account.id);
|
|
65
|
+
setPendingId(null);
|
|
66
|
+
if (!result.ok) {
|
|
67
|
+
setNotice({ tone: "bad", text: result.error.message });
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
const { cancelledJobs, keptJobs } = result.value;
|
|
71
|
+
const cancelled = cancelledJobs === 1 ? "1 queued or waiting post was cancelled." : `${cancelledJobs} queued or waiting posts were cancelled.`;
|
|
72
|
+
const kept = keptJobs === 0
|
|
73
|
+
? ""
|
|
74
|
+
: ` ${keptJobs} post${keptJobs === 1 ? " may" : "s may"} already be on the platform and ${keptJobs === 1 ? "was" : "were"} left for the daemon to check.`;
|
|
75
|
+
setNotice({
|
|
76
|
+
tone: "ok",
|
|
77
|
+
text: `Disconnected ${label}. ${cancelled}${kept} The data ${hostAppName()} holds is not deleted; see the data deletion page to request that.`,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
onChanged();
|
|
81
|
+
}
|
|
82
|
+
return (_jsxs(PageShell, { title: "Accounts", subtitle: "Readiness for each connected account. Token, entitlement and cooldown are shown separately and never merged.", children: [source.kind === "mock" ? _jsx(MockBanner, {}) : null, _jsx("div", { "aria-live": "polite", children: notice ? (_jsx(Notice, { tone: notice.tone, className: "op-notice", children: notice.text })) : null }), state.status === "error" ? (_jsx(LoadError, { message: "Could not read accounts from the daemon.", onRetry: reload })) : loaded === null ? (_jsx(SkeletonRows, { label: "Loading accounts", rows: 3 })) : loaded.accounts.length === 0 && loaded.unmapped.length === 0 ? (_jsx(EmptyState, { title: "No accounts connected", children: _jsx("p", { children: "Connect an account to start publishing. Connection runs through the provider sign-in in the browser." }) })) : (_jsxs(_Fragment, { children: [groupAccounts(loaded.accounts).map((venture) => {
|
|
83
|
+
return (_jsxs("section", { className: "op-venture", "aria-labelledby": `venture-${venture.id}`, children: [_jsx("h2", { id: `venture-${venture.id}`, className: "op-venture__title", children: venture.name }), venture.platforms.map((group) => (_jsxs("section", { className: "op-platform", "aria-labelledby": `platform-${venture.id}-${group.platform}`, children: [_jsx("h3", { id: `platform-${venture.id}-${group.platform}`, className: "op-platform__title", children: PLATFORM_LABEL[group.platform] }), _jsx("div", { className: "op-accounts", children: group.accounts.map((account) => {
|
|
84
|
+
const ordinal = ordinals.get(account.id);
|
|
85
|
+
const token = tokenText(account.readiness.token, now);
|
|
86
|
+
const ent = ENTITLEMENT_LABEL[account.readiness.entitlement];
|
|
87
|
+
const paused = account.readiness.paused;
|
|
88
|
+
const until = account.readiness.quotaCooldownUntil;
|
|
89
|
+
const label = `${ordinal?.label ?? "Account"} (${account.handle}, ${PLATFORM_LABEL[account.platform]})`;
|
|
90
|
+
const needsReconnect = account.readiness.token.status !== "valid";
|
|
91
|
+
return (_jsxs("article", { className: `op-card op-account op-band-${account.band}`, "aria-labelledby": `acc-${account.id}`, children: [_jsx("h4", { id: `acc-${account.id}`, className: "op-account__title", children: _jsx(AccountChip, { account: account, ordinal: ordinal, detail: true }) }), _jsxs("dl", { className: "op-dl", children: [_jsx("dt", { children: "Token" }), _jsxs("dd", { children: [_jsx("span", { className: "op-mark", children: token.mark }), " ", token.text] }), _jsx("dt", { children: "Re-authorisation" }), _jsx("dd", { children: account.readiness.reauthNeededBy
|
|
92
|
+
? `Needed by ${dayLabel(account.readiness.reauthNeededBy)}. This platform issues no refresh, so the token cannot renew itself.`
|
|
93
|
+
: "Not needed now" }), _jsx("dt", { children: "Entitlement" }), _jsxs("dd", { children: [_jsxs("strong", { children: [ent.text, "."] }), " ", ent.hint] }), _jsx("dt", { children: "Quota cooldown" }), _jsxs("dd", { children: [cooldownText(until, now), until && cooldownText(until, now) !== "Cooldown has ended" ? (_jsxs(_Fragment, { children: [" ", "until ", instantLabel(until, account.timeZone), ". Source: ", SOURCE_LABEL[account.readiness.quotaCooldownSource ?? "numeric_retry_after"], "."] })) : null] }), _jsx("dt", { children: "Publishing" }), _jsx("dd", { children: paused
|
|
94
|
+
? `Paused by ${paused.by} at ${instantLabel(paused.atUtc, account.timeZone)}. Reason: ${paused.reason}.`
|
|
95
|
+
: "Running" })] }), _jsxs("div", { className: "op-account__actions", children: [_jsxs("div", { className: "op-pause", children: [_jsx(Toggle, { checked: paused !== null, disabled: pendingId !== null, label: `Pause publishing for ${account.displayName}, ${label}`, onChange: (next) => setPaused(account, next, label) }), _jsxs("p", { className: "op-pause__text", children: [_jsxs("strong", { children: ["Pause publishing for ", account.displayName] }), _jsx("br", {}), paused
|
|
96
|
+
? "Paused. Its scheduled posts will not publish until you resume."
|
|
97
|
+
: "Running. Its scheduled posts publish at their time."] })] }), account.readiness.token.status !== "revoked" ? (_jsxs(_Fragment, { children: [_jsxs(Button, { variant: "secondary", size: "sm", disabled: pendingId !== null, onClick: () => setDisconnecting({ account, label }), children: ["Disconnect ", PLATFORM_LABEL[account.platform]] }), _jsx("p", { className: "op-hint", children: "Ends the connection and cancels this account's queued and waiting posts. It does not delete data." })] })) : (_jsx("p", { className: "op-hint", children: "Disconnected. Posts for this account are not published until it is connected again." })), needsReconnect ? (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "secondary", size: "sm", disabled: true, children: "Reconnect" }), _jsx("p", { className: "op-hint", children: "Reconnect opens the provider sign-in. It is not available in mock data." })] })) : null] })] }, account.id));
|
|
98
|
+
}) })] }, group.platform)))] }, venture.id));
|
|
99
|
+
}), loaded.unmapped.length > 0 ? _jsx(UnmappedAccounts, { rows: loaded.unmapped }) : null] })), disconnecting ? (_jsx(ConfirmDialog, { title: `Disconnect ${disconnecting.account.displayName} on ${PLATFORM_LABEL[disconnecting.account.platform]}?`, description: _jsxs(_Fragment, { children: [_jsxs("span", { className: "op-dialog-line", children: ["Account: ", disconnecting.label, "."] }), _jsxs("span", { className: "op-dialog-line", children: [hostAppName(), " stops using this account. Its queued and waiting posts are cancelled and will not publish."] }), _jsxs("span", { className: "op-dialog-line", children: ["Posts already on the platform stay there, and the data ", hostAppName(), " holds is kept until you request deletion."] })] }), confirmLabel: `Disconnect ${disconnecting.account.handle}`, cancelLabel: "Cancel", onConfirm: () => disconnect(disconnecting.account, disconnecting.label), onCancel: () => setDisconnecting(null) })) : null] }));
|
|
100
|
+
}
|