Fix vault manager not showing if no vaults exist
This commit is contained in:
parent
5b01a9cdad
commit
f14838044d
3 changed files with 9 additions and 4 deletions
|
|
@ -32,8 +32,11 @@ function discoverVaults() {
|
||||||
console.error("[config] Failed to read VAULT_ROOT:", vaultRoot, e.message);
|
console.error("[config] Failed to read VAULT_ROOT:", vaultRoot, e.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a default vault if none exist
|
// Optionally create a default vault if none exist
|
||||||
if (Object.keys(vaults).length === 0) {
|
if (
|
||||||
|
Object.keys(vaults).length === 0 &&
|
||||||
|
process.env.AUTO_CREATE_DEFAULT === "true"
|
||||||
|
) {
|
||||||
const defaultPath = path.join(vaultRoot, "My Vault");
|
const defaultPath = path.join(vaultRoot, "My Vault");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import * as osShim from "./node/os.js";
|
||||||
import * as netShim from "./node/net.js";
|
import * as netShim from "./node/net.js";
|
||||||
import * as httpShim from "./node/http.js";
|
import * as httpShim from "./node/http.js";
|
||||||
import { vaultService } from "../services/vault-service.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 DEBUG = true;
|
||||||
const _accessLog = new Map(); // "module.property" -> count
|
const _accessLog = new Map(); // "module.property" -> count
|
||||||
|
|
@ -135,6 +135,9 @@ if (typeof window.Buffer === "undefined") {
|
||||||
|
|
||||||
window.close = function () {
|
window.close = function () {
|
||||||
console.log("[ignis] window.close() blocked");
|
console.log("[ignis] window.close() blocked");
|
||||||
|
if (!window.__vaultConfig) {
|
||||||
|
showVaultManager();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
window.__popupIframe = null;
|
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";
|
import { vaultService } from "../services/vault-service.js";
|
||||||
|
|
||||||
export function showVaultManager() {
|
export function showVaultManager() {
|
||||||
if (!document.querySelector(".workspace")) return;
|
|
||||||
if (document.querySelector(".vault-manager-overlay")) return;
|
if (document.querySelector(".vault-manager-overlay")) return;
|
||||||
|
|
||||||
new window.IgnisUI.VaultManager({
|
new window.IgnisUI.VaultManager({
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue