No More Collab. Fixes #449
* Fully removes real-time collaboration * URL scheme rewrite
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user