mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
feat(views/board): delete empty columns
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import { setupHorizontalScrollViaWheel } from "../../widget_utils";
|
||||
import ViewMode, { ViewModeArgs } from "../view_mode";
|
||||
import { getBoardData } from "./data";
|
||||
import attributeService from "../../../services/attributes";
|
||||
import branchService from "../../../services/branches";
|
||||
import noteCreateService from "../../../services/note_create";
|
||||
import appContext, { EventData } from "../../../components/app_context";
|
||||
import { BoardData } from "./config";
|
||||
import SpacedUpdate from "../../../services/spaced_update";
|
||||
import { showNoteContextMenu } from "./context_menu";
|
||||
import { setupContextMenu } from "./context_menu";
|
||||
import BoardApi from "./api";
|
||||
|
||||
const TPL = /*html*/`
|
||||
@@ -201,7 +200,7 @@ export default class BoardView extends ViewMode<BoardData> {
|
||||
|
||||
private async renderBoard(el: HTMLElement) {
|
||||
this.api = await BoardApi.build(this.parentNote, this.viewStorage);
|
||||
showNoteContextMenu({
|
||||
setupContextMenu({
|
||||
$container: this.$container,
|
||||
api: this.api
|
||||
});
|
||||
@@ -571,6 +570,11 @@ export default class BoardView extends ViewMode<BoardData> {
|
||||
return true;
|
||||
}
|
||||
|
||||
// React to attachment change.
|
||||
if (loadResults.getAttachmentRows().some(att => att.ownerId === this.parentNote.noteId && att.title === "board.json")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user