mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
minor settings fixes
This commit is contained in:
@@ -76,7 +76,7 @@ To build from source instead of pulling the image, clone the repo and run `docke
|
||||
| `AUTO_CREATE_DEFAULT` | When `true`, creates a "My Vault" vault on startup if no vaults exist. Useful for fresh installs. | `false` |
|
||||
| `PUID` | User ID for file ownership | `1000` |
|
||||
| `PGID` | Group ID for file ownership | `1000` |
|
||||
| `WRITE_COALESCE_MS` | Debounce window (ms) for rapid writes. Useful for slow filesystems (rclone, NFS, SMB). Set to `0` to disable. | `5000` |
|
||||
| `WRITE_COALESCE_MS` | Debounce window (ms) for rapid writes. On slow filesystems (rclone, NFS, SMB), set an appropriate duration. | `0` |
|
||||
| `WS_ORIGINS` | Comma-separated allowlist of `Origin` headers accepted on the WebSocket endpoint. When unset, any origin is accepted. | unset |
|
||||
|
||||
Demo mode adds its own set of env vars (per-session vaults, auto-cleanup, proxy allowlist, login blocking). See [`examples/demo/`](examples/demo/) if you want to run a public demo deployment.
|
||||
|
||||
@@ -10,7 +10,7 @@ const DEFAULTS = {
|
||||
contentCacheBytes: 50 * 1024 * 1024,
|
||||
inputCacheBytes: 200 * 1024 * 1024,
|
||||
inputCacheTtlMs: 5 * 60 * 1000,
|
||||
writeCoalesceMs: 5000,
|
||||
writeCoalesceMs: 0,
|
||||
maxBodyBytes: 50 * 1024 * 1024,
|
||||
// "any" reaches any public host, "allowlist" restricts to proxyAllowlist, "disabled" blocks all proxying.
|
||||
proxyMode: "any",
|
||||
|
||||
@@ -101,10 +101,6 @@ const STATUS_DOT_CLASSES = {
|
||||
closed: "ignis-status-disconnected",
|
||||
};
|
||||
|
||||
// Obsidian's grouped-settings container. The .setting-group > .setting-items
|
||||
// structure renders its child settings inside one shared box, with an optional
|
||||
// heading as a sibling above the box. The shipped stylesheet supplies the
|
||||
// styling from theme variables, so the rows need no custom CSS.
|
||||
function createSettingGroup(containerEl, heading) {
|
||||
const group = containerEl.createDiv("setting-group");
|
||||
|
||||
@@ -251,19 +247,24 @@ async function saveSetting(partial) {
|
||||
}
|
||||
|
||||
function numberField(containerEl, { name, desc, value, key, toStored }) {
|
||||
let committed = value;
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName(name)
|
||||
.setDesc(desc)
|
||||
.addText((text) => {
|
||||
text.setValue(String(value));
|
||||
|
||||
// Commit on blur or Enter, the way a native number setting behaves.
|
||||
// Commit only on change.
|
||||
const commit = () => {
|
||||
const n = parseInt(text.getValue(), 10);
|
||||
|
||||
if (Number.isInteger(n) && n >= 0) {
|
||||
saveSetting({ [key]: toStored(n) });
|
||||
if (!Number.isInteger(n) || n < 0 || n === committed) {
|
||||
return;
|
||||
}
|
||||
|
||||
committed = n;
|
||||
saveSetting({ [key]: toStored(n) });
|
||||
};
|
||||
|
||||
text.inputEl.addEventListener("blur", commit);
|
||||
@@ -296,7 +297,12 @@ function proxyAccessField(parent, current, app) {
|
||||
emptyNote: "No hosts yet.",
|
||||
recommended: {
|
||||
note: "Restricting the proxy stops Obsidian's plugin and theme browser and updates from working unless their hosts are allowed.",
|
||||
hosts: ["releases.obsidian.md", "github.com", "raw.githubusercontent.com"],
|
||||
hosts: [
|
||||
"releases.obsidian.md",
|
||||
"github.com",
|
||||
"api.github.com",
|
||||
"raw.githubusercontent.com",
|
||||
],
|
||||
buttonText: "Add recommended hosts",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user