Pools initialisieren, Pool-Guard raus, Löschschutz bei laufenden Sessions

- pool-guard-Hook aus Projekt-Scaffold und allen bestehenden Projekten entfernt
- neue Pools: settings.json mit aufgeräumten UI-Defaults
  (promptSuggestionEnabled/awaySummaryEnabled aus) + CLAUDE.md
- delete_pool bricht bei laufendem zugeordnetem Projekt ab; Übersicht sperrt
  den Delete-Button und zeigt den Grund per Hover-Pop (WKWebView-tauglich)
- Running-Erkennung zentralisiert (running_projects_using_pool),
  list_pools liefert pro Pool die laufenden Projekte
- Todo-Umschalter im Projekt-Wizard/Settings
- ungenutzte Dependencies ureq/getrandom entfernt
This commit is contained in:
marcus.hinz
2026-07-04 17:21:47 +02:00
parent 42d975874e
commit 20fc8474d2
7 changed files with 381 additions and 454 deletions
+17 -9
View File
@@ -9,6 +9,7 @@ interface Pool {
name: string;
credentialType: string;
projects: string[];
running: string[];
hasCredentials: boolean;
}
@@ -206,9 +207,20 @@ onMounted(refresh);
{{ p.hasCredentials ? $t("pools.changeKey") : $t("pools.insertKey") }}
</button>
</template>
<button class="danger" :disabled="busy" @click="askDelete(p.name)">
{{ $t("pools.delete") }}
</button>
<span class="tip-wrap" :class="{ 'hover-pop': p.running.length }">
<button
class="danger"
:disabled="busy || p.running.length > 0"
@click="askDelete(p.name)"
>
{{ $t("pools.delete") }}
</button>
<span v-if="p.running.length" class="pop pop-right">
<span class="pop-text">
{{ $t("pools.deleteBlockedTooltip", { projects: p.running.join(", ") }) }}
</span>
</span>
</span>
</span>
</td>
</tr>
@@ -239,16 +251,13 @@ onMounted(refresh);
<p v-if="dialog.mode === 'oauth'" class="hint">
{{ $t("pools.oauthHint") }}
</p>
<p v-if="busy && dialog.mode === 'oauth'" class="hint busy">
{{ $t("pools.oauthWaiting") }}
</p>
<div class="actions">
<button type="button" :disabled="busy" @click="closeDialog">
{{ $t("pools.cancel") }}
</button>
<button type="submit" class="primary" :disabled="busy">
{{ dialog.mode === "oauth" ? $t("pools.startLogin") : $t("pools.save") }}
{{ dialog.mode === "oauth" ? $t("pools.createPool") : $t("pools.save") }}
</button>
</div>
</form>
@@ -280,13 +289,12 @@ onMounted(refresh);
: $t("pools.reloginNoEntry")
}}
</p>
<p v-if="busy" class="hint busy">{{ $t("pools.oauthWaiting") }}</p>
<div class="actions">
<button type="button" :disabled="busy" @click="reloginPool = null">
{{ $t("pools.cancel") }}
</button>
<button class="primary" :disabled="busy" @click="confirmRelogin">
{{ $t("pools.startLogin") }}
{{ $t("pools.reset") }}
</button>
</div>
</template>
+32 -7
View File
@@ -110,17 +110,24 @@ interface TerminalSettings {
theme: string;
icon: string | null;
title: string;
todo: boolean;
}
const settings = ref<TerminalSettings | null>(null);
function openSettings(p: Project) {
settings.value = {
name: p.name,
theme: p.terminal.theme ?? "mocha",
icon: p.terminal.icon,
title: p.terminal.title ?? "",
};
async function openSettings(p: Project) {
try {
const todo = await invoke<boolean>("todo_state", { project: p.name });
settings.value = {
name: p.name,
theme: p.terminal.theme ?? "mocha",
icon: p.terminal.icon,
title: p.terminal.title ?? "",
todo,
};
} catch (e) {
error.value = String(e);
}
}
async function pickIcon() {
@@ -142,6 +149,7 @@ async function saveSettings() {
icon: s.icon,
title: title === "" ? null : title,
});
await invoke("set_todo", { project: s.name, enabled: s.todo });
settings.value = null;
await refresh();
} catch (e) {
@@ -156,6 +164,7 @@ interface Wizard {
workDir: string | null;
title: string;
theme: string;
todo: boolean;
}
const wizard = ref<Wizard | null>(null);
@@ -169,6 +178,7 @@ function openWizard() {
workDir: null,
title: "",
theme: "mocha",
todo: false,
};
}
@@ -201,6 +211,7 @@ async function createProject() {
icon: null,
title: title === "" ? null : title,
},
todo: w.todo,
});
wizard.value = null;
await refresh();
@@ -378,6 +389,13 @@ onUnmounted(() => window.clearInterval(timer));
</option>
</select>
</label>
<label class="field">
{{ $t("projects.todo") }}
<span class="checkline">
<input v-model="wizard.todo" type="checkbox" />
{{ $t("projects.todoDesc") }}
</span>
</label>
<p class="hint">{{ $t("projects.wizardHint") }}</p>
<div class="actions">
<button type="button" @click="wizard = null">
@@ -453,6 +471,13 @@ onUnmounted(() => window.clearInterval(timer));
<span v-else class="icon-path">{{ $t("projects.defaultIcon") }}</span>
</span>
</label>
<label class="field">
{{ $t("projects.todo") }}
<span class="checkline">
<input v-model="settings.todo" type="checkbox" />
{{ $t("projects.todoDesc") }}
</span>
</label>
<p class="hint">{{ $t("projects.appliesNextStart") }}</p>
<div class="actions">
<button @click="settings = null">{{ $t("projects.cancel") }}</button>