Add links to database records
CI / go (Server) (push) Failing after 20m11s
CI / mobile (push) Failing after 7m33s
CI / go (Web-App) (push) Canceled after 4s
CI / docker (push) Successful in 49m7s
Docs / build (push) Successful in 12m55s
Docs / deploy (push) Skipped
CI / frontend (push) Failing after 8m8s
CI / desktop (ubuntu-latest) (push) Successful in 1h41m4s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / go (Server) (push) Failing after 20m11s
CI / mobile (push) Failing after 7m33s
CI / go (Web-App) (push) Canceled after 4s
CI / docker (push) Successful in 49m7s
Docs / build (push) Successful in 12m55s
Docs / deploy (push) Skipped
CI / frontend (push) Failing after 8m8s
CI / desktop (ubuntu-latest) (push) Successful in 1h41m4s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
A record can be linked like a block: the page's address plus "#r-<database>-<record>". Opening the link loads the page, scrolls to the database and opens the record beside it; a link to a deleted record just shows the page. Records stay part of their page, so the link needs nothing beyond the page's own access. "Copy link to record" is in the record's panel header and in the row's right-click menu, which readers now get too (Open and Copy link only). The page view opens record links the way it scrolls to block links, retrying while the shared document loads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f7b7022958
commit
db6f2caa4a
16 files changed
+181
-37
No files matched your search
@@ -749,6 +749,7 @@
|
||||
"noDate": "Ohne Datum ({n})",
|
||||
"noGroupColumn": "Füge eine Auswahl-, Kontrollkästchen- oder Personeneigenschaft hinzu, um Karten in Spalten zu ordnen.",
|
||||
"openRow": "Öffnen",
|
||||
"copyLink": "Link zum Eintrag kopieren",
|
||||
"deleteRow": "Eintrag löschen",
|
||||
"duplicateRow": "Eintrag duplizieren",
|
||||
"insertAbove": "Darüber einfügen",
|
||||
|
||||
@@ -749,6 +749,7 @@
|
||||
"noDate": "No date ({n})",
|
||||
"noGroupColumn": "Add a select, checkbox or member property to sort cards into columns.",
|
||||
"openRow": "Open",
|
||||
"copyLink": "Copy link to record",
|
||||
"deleteRow": "Delete record",
|
||||
"duplicateRow": "Duplicate record",
|
||||
"insertAbove": "Insert above",
|
||||
|
||||
@@ -749,6 +749,7 @@
|
||||
"noDate": "Sin fecha ({n})",
|
||||
"noGroupColumn": "Añade una propiedad de selección, casilla o miembro para ordenar las tarjetas en columnas.",
|
||||
"openRow": "Abrir",
|
||||
"copyLink": "Copiar enlace al registro",
|
||||
"deleteRow": "Eliminar registro",
|
||||
"duplicateRow": "Duplicar registro",
|
||||
"insertAbove": "Insertar encima",
|
||||
|
||||
@@ -749,6 +749,7 @@
|
||||
"noDate": "Sans date ({n})",
|
||||
"noGroupColumn": "Ajoutez une propriété de sélection, de case à cocher ou de membre pour ranger les cartes en colonnes.",
|
||||
"openRow": "Ouvrir",
|
||||
"copyLink": "Copier le lien vers l’élément",
|
||||
"deleteRow": "Supprimer l’élément",
|
||||
"duplicateRow": "Dupliquer l’élément",
|
||||
"insertAbove": "Insérer au-dessus",
|
||||
|
||||
@@ -749,6 +749,7 @@
|
||||
"noDate": "Bez daty ({n})",
|
||||
"noGroupColumn": "Dodaj właściwość wyboru, pola wyboru lub osoby, aby układać karty w kolumny.",
|
||||
"openRow": "Otwórz",
|
||||
"copyLink": "Kopiuj link do rekordu",
|
||||
"deleteRow": "Usuń rekord",
|
||||
"duplicateRow": "Duplikuj rekord",
|
||||
"insertAbove": "Wstaw powyżej",
|
||||
|
||||
@@ -7,6 +7,8 @@ import {
|
||||
encodeAnchor,
|
||||
insertFiles,
|
||||
linkedBlock,
|
||||
linkedRecord,
|
||||
openRecord,
|
||||
pagePath,
|
||||
scrollToBlock,
|
||||
setCommentMarks,
|
||||
@@ -88,14 +90,18 @@ function blockLinkCopied() {
|
||||
let scrolledTo = "";
|
||||
function scrollToHash() {
|
||||
const editor = editorRef.value?.editor;
|
||||
const id = main.value ? linkedBlock(route.hash) : "";
|
||||
// "#b-<id>" scrolls to a block; "#r-<database>-<record>" opens a database record.
|
||||
const block = main.value ? linkedBlock(route.hash) : "";
|
||||
const record = main.value ? linkedRecord(route.hash) : null;
|
||||
const id = block || (record ? route.hash : "");
|
||||
const key = `${props.id}${id}`;
|
||||
if (!editor || !id || scrolledTo === key) return;
|
||||
const go = () => (record ? openRecord(editor, record.database, record.row) : scrollToBlock(editor, block));
|
||||
// The shared document fills the editor just after it is created, and node
|
||||
// views draw a moment later: try again as it changes, for a few seconds.
|
||||
const attempt = () =>
|
||||
setTimeout(() => {
|
||||
if (scrolledTo !== key && scrollToBlock(editor, id)) {
|
||||
if (scrolledTo !== key && go()) {
|
||||
scrolledTo = key;
|
||||
stop();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user