mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-11 15:12:33 +01:00
This commit is contained in:
parent
6c6f7d8ce2
commit
8e853fe66f
3 changed files with 14 additions and 5 deletions
|
|
@ -193,7 +193,7 @@ export const getEditHTML = (options: {
|
|||
<label class="b3-menu__item">
|
||||
<span class="fn__flex-center">${window.siyuan.languages.includeTime}</span>
|
||||
<span class="fn__space fn__flex-1"></span>
|
||||
<input data-type="includeTime" type="checkbox" class="b3-switch b3-switch--menu" ${colData.date?.includeTime ? "checked" : ""}>
|
||||
<input data-type="includeTime" type="checkbox" class="b3-switch b3-switch--menu" ${colData[colData.type as "updated"].includeTime ? "checked" : ""}>
|
||||
</label>`;
|
||||
}
|
||||
html += `<button class="b3-menu__separator" data-id="separator_3"></button>
|
||||
|
|
@ -376,17 +376,17 @@ export const bindEditEvent = (options: {
|
|||
if (includeTimeElement) {
|
||||
includeTimeElement.addEventListener("change", () => {
|
||||
transaction(options.protyle, [{
|
||||
action: "setAttrViewUpdatedIncludeTime",
|
||||
action: colData.type === "updated" ? "setAttrViewUpdatedIncludeTime" : "setAttrViewCreatedIncludeTime",
|
||||
id: colId,
|
||||
avID,
|
||||
data: includeTimeElement.checked,
|
||||
}], [{
|
||||
action: "setAttrViewUpdatedIncludeTime",
|
||||
action: colData.type === "updated" ? "setAttrViewUpdatedIncludeTime" : "setAttrViewCreatedIncludeTime",
|
||||
id: colId,
|
||||
avID,
|
||||
data: !includeTimeElement.checked,
|
||||
}]);
|
||||
colData.includeTime = includeTimeElement.checked;
|
||||
colData[colData.type as "updated"].includeTime = includeTimeElement.checked;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue