mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-16 00:50:56 +08:00
🚨
This commit is contained in:
parent
513031de5a
commit
5191cfd6c7
@ -1250,10 +1250,10 @@ export const windowKeyDown = (app: App, event: KeyboardEvent) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const avElement = document.querySelector(".av__panel")
|
||||
const avElement = document.querySelector(".av__panel");
|
||||
if (avElement) {
|
||||
avElement.remove();
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
if (!window.siyuan.menus.menu.element.classList.contains("fn__none")) {
|
||||
|
@ -19,12 +19,12 @@ const genSVGBG = () => {
|
||||
svgs.push(item.id);
|
||||
});
|
||||
Array.from({length: 45}, () => {
|
||||
const index = Math.floor(Math.random()*svgs.length);
|
||||
const index = Math.floor(Math.random() * svgs.length);
|
||||
html += `<svg><use xlink:href="#${svgs[index]}"></use></svg>`;
|
||||
svgs.splice(index, 1);
|
||||
});
|
||||
return `<div class="fn__flex config-account__svg">${html}</div>`;
|
||||
}
|
||||
};
|
||||
|
||||
export const account = {
|
||||
element: undefined as Element,
|
||||
|
@ -325,7 +325,7 @@ export const getColNameByType = (type: TAVCol) => {
|
||||
case "mAsset":
|
||||
return window.siyuan.languages.assets;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const getColIconByType = (type: TAVCol) => {
|
||||
switch (type) {
|
||||
@ -650,8 +650,8 @@ const genUpdateColItem = (type: TAVCol, oldType: TAVCol, name: string) => {
|
||||
<svg class="b3-menu__icon"><use xlink:href="#${getColIconByType(type)}"></use></svg>
|
||||
<span class="b3-menu__label">${getColNameByType(type)}</span>
|
||||
${type === oldType ? '<span class="b3-menu__accelerator"><svg class="svg" style="height: 30px; float: left;"><use xlink:href="#iconSelect"></use></svg></span>' : ""}
|
||||
</button>`
|
||||
}
|
||||
</button>`;
|
||||
};
|
||||
|
||||
export const addCol = (protyle: IProtyle, blockElement: Element) => {
|
||||
const menu = new Menu("av-header-add");
|
||||
|
@ -109,13 +109,13 @@ export const bindDateEvent = (options: {
|
||||
if (inputElements[3].checked) {
|
||||
inputElements[0].setAttribute("type", "datetime-local");
|
||||
inputElements[1].setAttribute("type", "datetime-local");
|
||||
inputElements[0].value = inputElements[0].dataset.value
|
||||
inputElements[1].value = inputElements[1].dataset.value
|
||||
inputElements[0].value = inputElements[0].dataset.value;
|
||||
inputElements[1].value = inputElements[1].dataset.value;
|
||||
} else {
|
||||
inputElements[0].setAttribute("type", "date");
|
||||
inputElements[1].setAttribute("type", "date");
|
||||
inputElements[0].value = inputElements[0].dataset.value.substring(0, 10)
|
||||
inputElements[1].value = inputElements[1].dataset.value.substring(0, 10)
|
||||
inputElements[0].value = inputElements[0].dataset.value.substring(0, 10);
|
||||
inputElements[1].value = inputElements[1].dataset.value.substring(0, 10);
|
||||
}
|
||||
setDateValue({
|
||||
cellElements: options.cellElements,
|
||||
|
@ -601,7 +601,7 @@ export const openMenuPanel = (options: {
|
||||
break;
|
||||
} else if (type === "updateColType") {
|
||||
if (target.dataset.newType !== target.dataset.oldType) {
|
||||
const name = target.dataset.name
|
||||
const name = target.dataset.name;
|
||||
transaction(options.protyle, [{
|
||||
action: "updateAttrViewCol",
|
||||
id: options.colId,
|
||||
@ -621,7 +621,7 @@ export const openMenuPanel = (options: {
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (type === "goUpdateColType") {
|
||||
const editMenuElement = hasClosestByClassName(target, "b3-menu")
|
||||
const editMenuElement = hasClosestByClassName(target, "b3-menu");
|
||||
if (editMenuElement) {
|
||||
editMenuElement.firstElementChild.classList.add("fn__none");
|
||||
editMenuElement.lastElementChild.classList.remove("fn__none");
|
||||
@ -631,7 +631,7 @@ export const openMenuPanel = (options: {
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (type === "goEditCol") {
|
||||
const editMenuElement = hasClosestByClassName(target, "b3-menu")
|
||||
const editMenuElement = hasClosestByClassName(target, "b3-menu");
|
||||
if (editMenuElement) {
|
||||
editMenuElement.firstElementChild.classList.remove("fn__none");
|
||||
editMenuElement.lastElementChild.classList.add("fn__none");
|
||||
|
Loading…
Reference in New Issue
Block a user