No More Collab. Fixes #449

* Fully removes real-time collaboration
* URL scheme rewrite
This commit is contained in:
Zef Hemel
2023-07-06 16:47:50 +02:00
committed by GitHub
parent 021bf7e9a4
commit fb75ea1a65
45 changed files with 380 additions and 1356 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ async function actionClickOrActionEnter(
return editor.flashNotification("Empty link, ignoring", "error");
}
if (url.indexOf("://") === -1 && !url.startsWith("mailto:")) {
return editor.openUrl(`/.fs/${decodeURI(url)}`);
return editor.openUrl(decodeURI(url));
} else {
await editor.openUrl(url);
}
+8
View File
@@ -23,6 +23,7 @@ import {
import { applyQuery, removeQueries } from "$sb/lib/query.ts";
import { extractFrontmatter } from "$sb/lib/frontmatter.ts";
import { invokeFunction } from "$sb/silverbullet-syscall/system.ts";
import { isValidPageName } from "$sb/lib/page.ts";
// Key space:
// pl:toPage:pos => pageName
@@ -136,6 +137,13 @@ export async function renamePage(cmdDef: any) {
return;
}
if (!isValidPageName(newName)) {
return editor.flashNotification(
"Invalid page name: page names cannot end with a file extension",
"error",
);
}
console.log("New name", newName);
if (newName.trim() === oldName.trim()) {