Feat v0.6.3 dead code sweep (#38)
All checks were successful
All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #38.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
/**
|
||||
* Admin > Connections — global extension connection CRUD
|
||||
* v0.38.1: Scoped credential management for extensions
|
||||
*/
|
||||
const { html } = window;
|
||||
const { useState, useEffect, useCallback } = hooks;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Reads globals:
|
||||
* __SECTION__ — active section name (string)
|
||||
* __BASE__ — base path
|
||||
* __CONFIG_SECTIONS__ — v0.38.3: extension config sections (array|null)
|
||||
* __CONFIG_SECTIONS__
|
||||
*
|
||||
* Layout: topbar (back + category tabs) + body (sidebar nav + content area).
|
||||
* All 24+ sections are native Preact components loaded lazily.
|
||||
@@ -34,7 +34,7 @@ const ADMIN_LABELS = {
|
||||
audit: 'Audit',
|
||||
};
|
||||
|
||||
// ── v0.38.3: Extension config sections ──────
|
||||
// ── Extension config sections ──────
|
||||
// Packages declare config_section in their manifest targeting "admin".
|
||||
// We merge them into the appropriate category and section module map.
|
||||
const _configSections = window.__CONFIG_SECTIONS__ || [];
|
||||
@@ -72,7 +72,6 @@ const sectionModules = {
|
||||
audit: () => import(`./audit.js${_v}`),
|
||||
};
|
||||
|
||||
// v0.38.3: Register dynamic section loaders for extension config sections
|
||||
for (const cs of _configSections) {
|
||||
const pkgId = cs.package_id;
|
||||
const component = cs.component || 'js/config.js';
|
||||
|
||||
@@ -46,7 +46,7 @@ export default function PackagesSection() {
|
||||
const [registryPkgs, setRegistryPkgs] = useState([]);
|
||||
const [registryLoading, setRegistryLoading] = useState(false);
|
||||
const [installing, setInstalling] = useState(false);
|
||||
const [permsId, setPermsId] = useState(null); // v0.5.0: permissions drawer
|
||||
const [permsId, setPermsId] = useState(null);
|
||||
const [perms, setPerms] = useState([]);
|
||||
|
||||
const BASE = window.__BASE__ || '';
|
||||
@@ -162,7 +162,7 @@ export default function PackagesSection() {
|
||||
} catch (e) { sw.toast(e.message, 'error'); }
|
||||
}
|
||||
|
||||
// ── Permissions drawer (v0.5.0) ────────────
|
||||
// ── Permissions drawer ────────────
|
||||
async function togglePerms(pkgId) {
|
||||
if (permsId === pkgId) { setPermsId(null); setPerms([]); return; }
|
||||
try {
|
||||
@@ -323,7 +323,7 @@ export default function PackagesSection() {
|
||||
</div>
|
||||
`}
|
||||
|
||||
${/* ── Inline permissions drawer (v0.5.0) ── */``}
|
||||
${/* ── Inline permissions drawer ── */``}
|
||||
${permsId === pkg.id && html`
|
||||
<div style="padding:8px 12px 12px 24px;background:var(--bg-2);border-bottom:1px solid var(--border);">
|
||||
${perms.length === 0
|
||||
|
||||
@@ -36,6 +36,7 @@ export default function SettingsSection() {
|
||||
message_variant: cfg_.message?.variant || 'info',
|
||||
footer_enabled: !!cfg_.footer?.enabled,
|
||||
footer_text: cfg_.footer?.text || '',
|
||||
package_registry_url: cfg_.package_registry?.url || '',
|
||||
});
|
||||
setVault(v);
|
||||
} catch (e) { sw.toast(e.message, 'error'); }
|
||||
@@ -78,6 +79,9 @@ export default function SettingsSection() {
|
||||
text: cfg.footer_text,
|
||||
}});
|
||||
|
||||
// Package Registry
|
||||
await sw.api.admin.settings.update('package_registry', { value: { url: cfg.package_registry_url } });
|
||||
|
||||
sw.toast('Settings saved', 'success');
|
||||
} catch (e) { sw.toast(e.message, 'error'); }
|
||||
finally { setSaving(false); }
|
||||
@@ -166,6 +170,13 @@ export default function SettingsSection() {
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="settings-section"><h3>Package Registry</h3>
|
||||
<div class="form-group"><label>Registry URL</label>
|
||||
<input value=${cfg.package_registry_url} onInput=${e => set('package_registry_url', e.target.value)} placeholder="https://registry.example.com/registry.json" />
|
||||
</div>
|
||||
<span class="text-muted" style="font-size:12px;">URL to a JSON registry index. Enables browsing and one-click install under Packages > Registry.</span>
|
||||
</div>
|
||||
|
||||
<div class="settings-section"><h3>Email</h3>
|
||||
<button class="btn-small" onClick=${testEmail}>Send Test Email</button>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* DocsSurface — builtin documentation viewer (v0.6.2)
|
||||
* DocsSurface — builtin documentation viewer
|
||||
*
|
||||
* Reads globals:
|
||||
* __SECTION__ — active doc slug (e.g. "GETTING-STARTED")
|
||||
@@ -8,7 +8,6 @@
|
||||
* Fetches markdown from GET /api/v1/docs/:name, renders with
|
||||
* a simple markdown-to-HTML converter. Sidebar lists all docs.
|
||||
*
|
||||
* v0.6.2: dark mode fix, topbar navigation, error handling.
|
||||
*/
|
||||
const { html } = window;
|
||||
const { useState, useEffect, useCallback, useMemo } = hooks;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/**
|
||||
* ConnectionsSection — personal extension connection CRUD
|
||||
* v0.38.1: Scoped credential management for extensions
|
||||
*/
|
||||
const { html } = window;
|
||||
const { useState, useEffect, useCallback } = hooks;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Reads globals:
|
||||
* __SECTION__ — active section name (string)
|
||||
* __BASE__ — base path
|
||||
* __CONFIG_SECTIONS__ — v0.38.3: extension config sections (array|null)
|
||||
* __CONFIG_SECTIONS__
|
||||
*
|
||||
* Layout: topbar + left nav + content area (same CSS classes as before).
|
||||
* All sections are native Preact components loaded lazily.
|
||||
@@ -44,7 +44,7 @@ const SECTION_TITLES = {
|
||||
connections: 'Connections', notifications: 'Notifications',
|
||||
};
|
||||
|
||||
// ── v0.38.3: Extension config sections ──────
|
||||
// ── Extension config sections ──────
|
||||
// Packages declare config_section in their manifest. The backend passes
|
||||
// matching entries via __CONFIG_SECTIONS__. We merge them into the nav
|
||||
// and section module map for lazy loading.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/**
|
||||
* Team Admin > Connections — team-scoped extension connection CRUD
|
||||
* v0.38.1: Scoped credential management for extensions
|
||||
*/
|
||||
const { html } = window;
|
||||
const { useState, useEffect, useCallback } = hooks;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Reads globals:
|
||||
* __SECTION__ — active section name (string)
|
||||
* __BASE__ — base path
|
||||
* __CONFIG_SECTIONS__ — v0.38.3: extension config sections (array|null)
|
||||
* __CONFIG_SECTIONS__
|
||||
*
|
||||
* Layout: topbar (back + team name) + sidebar nav + content area.
|
||||
* All 10+ sections are native Preact components loaded lazily.
|
||||
@@ -36,7 +36,7 @@ const sectionModules = {
|
||||
activity: () => import('./activity.js'),
|
||||
};
|
||||
|
||||
// ── v0.38.3: Extension config sections ──────
|
||||
// ── Extension config sections ──────
|
||||
const _configSections = window.__CONFIG_SECTIONS__ || [];
|
||||
const _base = window.__BASE__ || '';
|
||||
for (const cs of _configSections) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/**
|
||||
* Team Admin > Members
|
||||
* v0.3.4: custom team roles support
|
||||
*/
|
||||
const { html } = window;
|
||||
const { useState, useEffect, useCallback } = hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Team Admin > Workflows — v0.37.15 rewrite
|
||||
* Team Admin > Workflows
|
||||
*
|
||||
* Tab layout: Workflows | Assignments | Monitor
|
||||
* - Workflows: CRUD + inline stage editor (E2)
|
||||
@@ -365,7 +365,6 @@ function StageForm({ stage, teams, onSave, onCancel }) {
|
||||
stage?.branch_rules ? (typeof stage.branch_rules === 'string' ? stage.branch_rules : JSON.stringify(stage.branch_rules, null, 2)) : ''
|
||||
);
|
||||
|
||||
// v0.3.4: stage_config fields
|
||||
const sc = stage?.stage_config ? (typeof stage.stage_config === 'string' ? JSON.parse(stage.stage_config || '{}') : stage.stage_config) : {};
|
||||
const [requiredRole, setRequiredRole] = useState(sc.required_role || '');
|
||||
const [valApprovals, setValApprovals] = useState(sc.validation?.required_approvals || '');
|
||||
@@ -664,7 +663,7 @@ function MonitorTab({ teamId }) {
|
||||
`;
|
||||
}
|
||||
|
||||
// ── Signoff Panel (v0.3.4) ──────────────────
|
||||
// ── Signoff Panel ──────────────────
|
||||
|
||||
function SignoffPanel({ instanceId, teamId }) {
|
||||
const [signoffs, setSignoffs] = useState([]);
|
||||
|
||||
Reference in New Issue
Block a user