mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
Fix vault manager not showing if no vaults exist
This commit is contained in:
@@ -32,8 +32,11 @@ function discoverVaults() {
|
||||
console.error("[config] Failed to read VAULT_ROOT:", vaultRoot, e.message);
|
||||
}
|
||||
|
||||
// Create a default vault if none exist
|
||||
if (Object.keys(vaults).length === 0) {
|
||||
// Optionally create a default vault if none exist
|
||||
if (
|
||||
Object.keys(vaults).length === 0 &&
|
||||
process.env.AUTO_CREATE_DEFAULT === "true"
|
||||
) {
|
||||
const defaultPath = path.join(vaultRoot, "My Vault");
|
||||
|
||||
try {
|
||||
|
||||
@@ -16,7 +16,7 @@ import * as osShim from "./node/os.js";
|
||||
import * as netShim from "./node/net.js";
|
||||
import * as httpShim from "./node/http.js";
|
||||
import { vaultService } from "../services/vault-service.js";
|
||||
import { showPluginInstallDialog } from "../ui/bootstrap.js";
|
||||
import { showPluginInstallDialog, showVaultManager } from "../ui/bootstrap.js";
|
||||
|
||||
const DEBUG = true;
|
||||
const _accessLog = new Map(); // "module.property" -> count
|
||||
@@ -135,6 +135,9 @@ if (typeof window.Buffer === "undefined") {
|
||||
|
||||
window.close = function () {
|
||||
console.log("[ignis] window.close() blocked");
|
||||
if (!window.__vaultConfig) {
|
||||
showVaultManager();
|
||||
}
|
||||
};
|
||||
|
||||
window.__popupIframe = null;
|
||||
|
||||
1
src/ui/bootstrap.js
vendored
1
src/ui/bootstrap.js
vendored
@@ -1,7 +1,6 @@
|
||||
import { vaultService } from "../services/vault-service.js";
|
||||
|
||||
export function showVaultManager() {
|
||||
if (!document.querySelector(".workspace")) return;
|
||||
if (document.querySelector(".vault-manager-overlay")) return;
|
||||
|
||||
new window.IgnisUI.VaultManager({
|
||||
|
||||
Reference in New Issue
Block a user