mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-02 19:00:15 +01:00
🎨 Add created and updated type column to database https://github.com/siyuan-note/siyuan/issues/9371
This commit is contained in:
parent
74110cda68
commit
f0e1dcc6a7
6 changed files with 16 additions and 6 deletions
|
|
@ -257,12 +257,12 @@ export const addCol = (protyle: IProtyle, blockElement: Element) => {
|
|||
});
|
||||
menu.addItem({
|
||||
icon: "iconClock",
|
||||
label: window.siyuan.languages.creationDate,
|
||||
label: window.siyuan.languages.createdTime,
|
||||
click() {
|
||||
const id = Lute.NewNodeID();
|
||||
transaction(protyle, [{
|
||||
action: "addAttrViewCol",
|
||||
name: window.siyuan.languages.creationDate,
|
||||
name: window.siyuan.languages.createdTime,
|
||||
avID,
|
||||
type: "created",
|
||||
id
|
||||
|
|
@ -275,19 +275,19 @@ export const addCol = (protyle: IProtyle, blockElement: Element) => {
|
|||
blockElement: blockElement,
|
||||
protyle: protyle,
|
||||
type: "created",
|
||||
name: window.siyuan.languages.creationDate,
|
||||
name: window.siyuan.languages.createdTime,
|
||||
id
|
||||
});
|
||||
}
|
||||
});
|
||||
menu.addItem({
|
||||
icon: "iconClock",
|
||||
label: window.siyuan.languages.modificationDate,
|
||||
label: window.siyuan.languages.updatedTime,
|
||||
click() {
|
||||
const id = Lute.NewNodeID();
|
||||
transaction(protyle, [{
|
||||
action: "addAttrViewCol",
|
||||
name: window.siyuan.languages.modificationDate,
|
||||
name: window.siyuan.languages.updatedTime,
|
||||
avID,
|
||||
type: "updated",
|
||||
id
|
||||
|
|
@ -300,7 +300,7 @@ export const addCol = (protyle: IProtyle, blockElement: Element) => {
|
|||
blockElement: blockElement,
|
||||
protyle: protyle,
|
||||
type: "updated",
|
||||
name: window.siyuan.languages.modificationDate,
|
||||
name: window.siyuan.languages.updatedTime,
|
||||
id
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue