mirror of
https://github.com/docmost/docmost.git
synced 2026-08-28 01:07:08 +08:00
feat: kanban group editing (#2322)
* feat: support opening property menu directly on options panel * refactor: expose group-by property from useKanbanColumns * feat: rename kanban group by clicking column name * feat: edit group-by property from kanban column menu * fix: license-gate base and kanban inserts * fix: add missing bases strings to en-US translation file
This commit is contained in:
@@ -2,6 +2,8 @@ import type { Editor, Range } from "@tiptap/core";
|
||||
import { v7 as uuid7 } from "uuid";
|
||||
import { notifications } from "@mantine/notifications";
|
||||
import api from "@/lib/api-client";
|
||||
import i18n from "@/i18n.ts";
|
||||
import { getApiErrorMessage } from "@/lib/api-error";
|
||||
|
||||
function findBaseEmbedPlaceholderPos(
|
||||
editor: Editor,
|
||||
@@ -50,7 +52,7 @@ export async function insertBaseEmbedBlock(
|
||||
return true;
|
||||
})
|
||||
.run();
|
||||
} catch {
|
||||
} catch (err) {
|
||||
const pos = findBaseEmbedPlaceholderPos(editor, pendingKey);
|
||||
if (pos !== null) {
|
||||
editor
|
||||
@@ -62,6 +64,9 @@ export async function insertBaseEmbedBlock(
|
||||
})
|
||||
.run();
|
||||
}
|
||||
notifications.show({ message: "Failed to create base", color: "red" });
|
||||
notifications.show({
|
||||
message: getApiErrorMessage(err, i18n.t("Failed to create base")),
|
||||
color: "red",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user