Drop custom auth dialog; rely on browser Basic Auth handling

Remove ImportDialog and all manual credential management. The browser
handles 401 challenges natively for same-origin fetch requests — it
shows its own credential prompt, retries, and caches the result for
the session. No JS-level auth code is needed.

- api.js: remove authHeader() and all credentials parameters
- store.js: remove credentials field
- ImportDialog.js: deleted
- AppShell.js: remove showImport/openImport/onMounted dialog machinery;
  pass importOnLoad through to PaneCP
- PaneCP.js: inline doImport() (was in ImportDialog); auto-triggers on
  mount when importOnLoad is true; shows inline import error on failure
- StatusPoller.js: remove credentials arg from fetchStatus()
- style.css: remove .se-import-dialog and .se-overlay blocks
This commit is contained in:
c0dev0id
2026-06-30 09:32:44 +02:00
parent 86b14dfaa3
commit 67c75781d8
7 changed files with 45 additions and 164 deletions

View File

@@ -1,8 +1,7 @@
import { h, ref, computed, onMounted, watch } from 'vue';
import { h, ref, computed, watch } from 'vue';
import { PaneCP } from './PaneCP.js';
import { PaneFO } from './PaneFO.js';
import { PaneSubObjects } from './PaneSubObjects.js';
import { ImportDialog } from './ImportDialog.js';
import { getKindGroups, KIND_LABEL } from '../subobject-kinds.js';
const FIXED_PANES = [
@@ -14,7 +13,6 @@ export const AppShell = {
props: ['store', 'importOnLoad'],
setup(props) {
const activePane = ref('cp');
const showImport = ref(false);
function focusedNode() {
const fp = props.store.focusPath;
@@ -35,14 +33,6 @@ export const AppShell = {
if (!ps.some(p => p.id === activePane.value)) activePane.value = 'fo';
});
function openImport() {
if (!props.store.isDirty) showImport.value = true;
}
onMounted(() => {
if (props.importOnLoad && !props.store.isDirty) showImport.value = true;
});
return () => {
const store = props.store;
const ap = activePane.value;
@@ -54,7 +44,11 @@ export const AppShell = {
return h('div', { class: 'se-shell' }, [
h('div', { class: 'se-pane-area' }, [
h('div', { class: ['se-pane', ap === 'cp' ? 'active' : null] },
h(PaneCP, { store, onImportClick: openImport, onFocusFO: () => { activePane.value = 'fo'; } })),
h(PaneCP, {
store,
importOnLoad: props.importOnLoad,
onFocusFO: () => { activePane.value = 'fo'; },
})),
h('div', { class: ['se-pane', ap === 'fo' ? 'active' : null] },
h(PaneFO, { store })),
...subPaneNodes,
@@ -72,10 +66,6 @@ export const AppShell = {
store.errorMessage
? h('div', { class: 'se-error', style: 'margin:0' }, store.errorMessage)
: null,
showImport.value
? h(ImportDialog, { store, onClose: () => { showImport.value = false; } })
: null,
]);
};
},