@happyvertical/garrula 0.1.3 → 0.1.4
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/dist/manifest.json
CHANGED
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/garrula",
|
|
6
|
-
"packageVersion": "0.1.
|
|
6
|
+
"packageVersion": "0.1.4",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "8df9e3479b715c8edaf75ed86315b3ec9bc45de197f5d9ae9578d429e88df685",
|
|
11
|
+
"packageJson": "9abf3fdd18e16600e432ce20344e98ba9b6559e69f83c23200862dd5a6990173",
|
|
12
12
|
"agents": "37df674b62c16b50b91bda6e6057f1da0c0e2169b9d13f31ac0cdabb88f0f3f5"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
@@ -15,6 +15,10 @@ const DEFAULT_PANEL = "queue";
|
|
|
15
15
|
interface Props extends AgentAdminRootProps {
|
|
16
16
|
tenant?: AdminTenant;
|
|
17
17
|
permissions?: AdminPermissions;
|
|
18
|
+
/** Where the host mounts its `connect/<platform>` routes (default `/settings/social`). */
|
|
19
|
+
socialSettingsBasePath?: string;
|
|
20
|
+
/** Platforms the host can connect; others get no connect button. Default: all. */
|
|
21
|
+
connectPlatforms?: string[];
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
let {
|
|
@@ -24,6 +28,8 @@ let {
|
|
|
24
28
|
readonly = false,
|
|
25
29
|
tenant,
|
|
26
30
|
permissions,
|
|
31
|
+
socialSettingsBasePath,
|
|
32
|
+
connectPlatforms,
|
|
27
33
|
}: Props = $props();
|
|
28
34
|
|
|
29
35
|
// Panels read tenant and permissions from this context, so they follow the props.
|
|
@@ -57,7 +63,7 @@ const tabs = navItems.map((item) => ({ id: item.id, label: item.label }));
|
|
|
57
63
|
<div class="admin-root" data-tenant={tenant?.id}>
|
|
58
64
|
<Tabs {tabs} active={resolvedPanel} aria-label="Social media sections" onchange={(id) => onNavigate?.(id)}>
|
|
59
65
|
{#key `${tenant?.id ?? ""}:${resolvedPanel}`}
|
|
60
|
-
<CurrentPanel apiClient={client} {readonly} />
|
|
66
|
+
<CurrentPanel apiClient={client} {readonly} {socialSettingsBasePath} {connectPlatforms} />
|
|
61
67
|
{/key}
|
|
62
68
|
</Tabs>
|
|
63
69
|
</div>
|
|
@@ -3,6 +3,10 @@ import type { AdminPermissions, AdminTenant } from "../types.js";
|
|
|
3
3
|
interface Props extends AgentAdminRootProps {
|
|
4
4
|
tenant?: AdminTenant;
|
|
5
5
|
permissions?: AdminPermissions;
|
|
6
|
+
/** Where the host mounts its `connect/<platform>` routes (default `/settings/social`). */
|
|
7
|
+
socialSettingsBasePath?: string;
|
|
8
|
+
/** Platforms the host can connect; others get no connect button. Default: all. */
|
|
9
|
+
connectPlatforms?: string[];
|
|
6
10
|
}
|
|
7
11
|
declare const AdminRoot: import("svelte").Component<Props, {}, "">;
|
|
8
12
|
type AdminRoot = ReturnType<typeof AdminRoot>;
|
|
@@ -16,8 +16,17 @@ let {
|
|
|
16
16
|
tenant,
|
|
17
17
|
permissions,
|
|
18
18
|
socialSettingsBasePath = "/settings/social",
|
|
19
|
+
connectPlatforms,
|
|
19
20
|
}: SettingsPanelProps = $props();
|
|
20
21
|
|
|
22
|
+
const connectHrefs = $derived(
|
|
23
|
+
Object.fromEntries(
|
|
24
|
+
["youtube", "facebook", "threads", "x"]
|
|
25
|
+
.filter((platform) => !connectPlatforms || connectPlatforms.includes(platform))
|
|
26
|
+
.map((platform) => [platform, `${socialSettingsBasePath}/connect/${platform}`]),
|
|
27
|
+
),
|
|
28
|
+
);
|
|
29
|
+
|
|
21
30
|
const context = getGarrulaAdminContext();
|
|
22
31
|
const access = $derived(resolveAccess({ tenant, permissions, readonly }, context));
|
|
23
32
|
const canConfigure = $derived(access.can("configure"));
|
|
@@ -165,12 +174,7 @@ onMount(load);
|
|
|
165
174
|
{accounts}
|
|
166
175
|
{loading}
|
|
167
176
|
readonly={!canConfigure}
|
|
168
|
-
connectHrefs
|
|
169
|
-
youtube: `${socialSettingsBasePath}/connect/youtube`,
|
|
170
|
-
facebook: `${socialSettingsBasePath}/connect/facebook`,
|
|
171
|
-
threads: `${socialSettingsBasePath}/connect/threads`,
|
|
172
|
-
x: `${socialSettingsBasePath}/connect/x`,
|
|
173
|
-
}}
|
|
177
|
+
{connectHrefs}
|
|
174
178
|
onRefresh={load}
|
|
175
179
|
onTest={testAccount}
|
|
176
180
|
onDeactivate={deactivateAccount}
|
package/dist/ui/types.d.ts
CHANGED
|
@@ -77,6 +77,8 @@ export type SourcesPanelProps = AdminPanelBaseProps;
|
|
|
77
77
|
export type ActivitySpendPanelProps = AdminPanelBaseProps;
|
|
78
78
|
export interface SettingsPanelProps extends AdminPanelBaseProps {
|
|
79
79
|
socialSettingsBasePath?: string;
|
|
80
|
+
/** Platforms the host mounts connect routes for; others get no connect button. Default: all. */
|
|
81
|
+
connectPlatforms?: string[];
|
|
80
82
|
}
|
|
81
83
|
/**
|
|
82
84
|
* Builds a client from the social REST routes at `baseUrl` (accounts, posts,
|