mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
feat(react/ribbon): port note info tab
This commit is contained in:
@@ -12,7 +12,7 @@ import ValidationError from "../../errors/validation_error.js";
|
||||
import blobService from "../../services/blob.js";
|
||||
import type { Request } from "express";
|
||||
import type BBranch from "../../becca/entities/bbranch.js";
|
||||
import type { AttributeRow, DeleteNotesPreview } from "@triliumnext/commons";
|
||||
import type { AttributeRow, DeleteNotesPreview, MetadataResponse } from "@triliumnext/commons";
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
@@ -101,7 +101,7 @@ function getNoteMetadata(req: Request) {
|
||||
utcDateCreated: note.utcDateCreated,
|
||||
dateModified: note.dateModified,
|
||||
utcDateModified: note.utcDateModified
|
||||
};
|
||||
} satisfies MetadataResponse;
|
||||
}
|
||||
|
||||
function createNote(req: Request) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import sql from "../../services/sql.js";
|
||||
import becca from "../../becca/becca.js";
|
||||
import type { Request } from "express";
|
||||
import { NoteSizeResponse, SubtreeSizeResponse } from "@triliumnext/commons";
|
||||
|
||||
function getNoteSize(req: Request) {
|
||||
const { noteId } = req.params;
|
||||
@@ -22,7 +23,7 @@ function getNoteSize(req: Request) {
|
||||
|
||||
return {
|
||||
noteSize
|
||||
};
|
||||
} satisfies NoteSizeResponse;
|
||||
}
|
||||
|
||||
function getSubtreeSize(req: Request) {
|
||||
@@ -45,7 +46,7 @@ function getSubtreeSize(req: Request) {
|
||||
return {
|
||||
subTreeSize,
|
||||
subTreeNoteCount: subTreeNoteIds.length
|
||||
};
|
||||
} satisfies SubtreeSizeResponse;
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user