mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
ff45ebcdaf
commit
2659052bb9
40 changed files with 164 additions and 151 deletions
|
|
@ -33,7 +33,7 @@ const bindAttrInput = (inputElement: HTMLInputElement, id: string) => {
|
|||
export const openWechatNotify = (nodeElement: Element) => {
|
||||
const id = nodeElement.getAttribute("data-node-id");
|
||||
const range = getEditorRange(nodeElement);
|
||||
const reminder = nodeElement.getAttribute("custom-reminder-wechat");
|
||||
const reminder = nodeElement.getAttribute(Constants.CUSTOM_REMINDER_WECHAT);
|
||||
let reminderFormat = "";
|
||||
if (reminder) {
|
||||
reminderFormat = dayjs(reminder).format("YYYY-MM-DDTHH:mm");
|
||||
|
|
@ -68,7 +68,7 @@ export const openWechatNotify = (nodeElement: Element) => {
|
|||
}
|
||||
btnsElement[1].setAttribute("disabled", "disabled");
|
||||
fetchPost("/api/block/setBlockReminder", {id, timed: "0"}, () => {
|
||||
nodeElement.removeAttribute("custom-reminder-wechat");
|
||||
nodeElement.removeAttribute(Constants.CUSTOM_REMINDER_WECHAT);
|
||||
dialog.destroy();
|
||||
});
|
||||
});
|
||||
|
|
@ -85,7 +85,7 @@ export const openWechatNotify = (nodeElement: Element) => {
|
|||
btnsElement[2].setAttribute("disabled", "disabled");
|
||||
const timed = dayjs(date).format("YYYYMMDDHHmmss");
|
||||
fetchPost("/api/block/setBlockReminder", {id, timed}, () => {
|
||||
nodeElement.setAttribute("custom-reminder-wechat", timed);
|
||||
nodeElement.setAttribute(Constants.CUSTOM_REMINDER_WECHAT, timed);
|
||||
dialog.destroy();
|
||||
});
|
||||
} else {
|
||||
|
|
@ -98,7 +98,7 @@ export const openFileWechatNotify = (protyle: IProtyle) => {
|
|||
fetchPost("/api/block/getDocInfo", {
|
||||
id: protyle.block.rootID
|
||||
}, (response) => {
|
||||
const reminder = response.data.ial["custom-reminder-wechat"];
|
||||
const reminder = response.data.ial[Constants.CUSTOM_REMINDER_WECHAT];
|
||||
let reminderFormat = "";
|
||||
if (reminder) {
|
||||
reminderFormat = dayjs(reminder).format("YYYY-MM-DDTHH:mm");
|
||||
|
|
@ -155,10 +155,10 @@ export const openFileAttr = (attrs: IObject, focusName = "bookmark") => {
|
|||
let hasAV = false;
|
||||
const range = getSelection().rangeCount > 0 ? getSelection().getRangeAt(0) : null;
|
||||
Object.keys(attrs).forEach(item => {
|
||||
if ("custom-riff-decks" === item || item.startsWith("custom-sy-")) {
|
||||
if (Constants.CUSTOM_RIFF_DECKS === item || item.startsWith("custom-sy-")) {
|
||||
return;
|
||||
}
|
||||
if (item === "custom-reminder-wechat") {
|
||||
if (item === Constants.CUSTOM_REMINDER_WECHAT) {
|
||||
notifyHTML = `<label class="b3-label b3-label--noborder">
|
||||
${window.siyuan.languages.wechatReminder}
|
||||
<div class="fn__hr"></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue