mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🚨
This commit is contained in:
parent
28a790f7eb
commit
daf043bd0c
6 changed files with 23 additions and 23 deletions
|
|
@ -204,7 +204,7 @@ export const about = {
|
|||
tokenElement.addEventListener("change", () => {
|
||||
fetchPost("/api/system/setAPIToken", {token: tokenElement.value}, () => {
|
||||
window.siyuan.config.api.token = tokenElement.value;
|
||||
about.element.querySelector("#tokenTip").innerHTML = window.siyuan.languages.about14.replace("${token}", window.siyuan.config.api.token)
|
||||
about.element.querySelector("#tokenTip").innerHTML = window.siyuan.languages.about14.replace("${token}", window.siyuan.config.api.token);
|
||||
});
|
||||
});
|
||||
about.element.querySelector("#exportLog").addEventListener("click", () => {
|
||||
|
|
|
|||
|
|
@ -279,10 +279,10 @@ export class Outline extends Model {
|
|||
if (selectItem) {
|
||||
getAllModels().editor.find(editItem => {
|
||||
if (editItem.editor.protyle.block.rootID === this.blockId) {
|
||||
let previousID
|
||||
let parentID
|
||||
const undoPreviousID = item.previousElementSibling?.getAttribute("data-node-id")
|
||||
const undoParentID = item.parentElement.previousElementSibling?.getAttribute("data-node-id")
|
||||
let previousID;
|
||||
let parentID;
|
||||
const undoPreviousID = item.previousElementSibling?.getAttribute("data-node-id");
|
||||
const undoParentID = item.parentElement.previousElementSibling?.getAttribute("data-node-id");
|
||||
if (selectItem.classList.contains("dragover")) {
|
||||
parentID = selectItem.getAttribute("data-node-id");
|
||||
if (selectItem.nextElementSibling && selectItem.nextElementSibling.tagName === "UL") {
|
||||
|
|
|
|||
|
|
@ -836,7 +836,7 @@ export const zoomOut = (options: {
|
|||
const focusElement = options.protyle.wysiwyg.element.querySelector(`[data-node-id="${options.focusId}"]`);
|
||||
if (focusElement) {
|
||||
// 退出聚焦后块在折叠中 https://github.com/siyuan-note/siyuan/issues/10746
|
||||
let showElement = focusElement
|
||||
let showElement = focusElement;
|
||||
while (showElement.getBoundingClientRect().height === 0) {
|
||||
showElement = showElement.parentElement;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ export const initAbout = () => {
|
|||
tokenElement.addEventListener("change", () => {
|
||||
fetchPost("/api/system/setAPIToken", {token: tokenElement.value}, () => {
|
||||
window.siyuan.config.api.token = tokenElement.value;
|
||||
modelMainElement.querySelector("#tokenTip").innerHTML = window.siyuan.languages.about14.replace("${token}", window.siyuan.config.api.token)
|
||||
modelMainElement.querySelector("#tokenTip").innerHTML = window.siyuan.languages.about14.replace("${token}", window.siyuan.config.api.token);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -251,11 +251,11 @@ export const openCalcMenu = async (protyle: IProtyle, calcElement: HTMLElement,
|
|||
target: calcElement
|
||||
});
|
||||
}
|
||||
let rollupIsNumber = false
|
||||
let rollupIsNumber = false;
|
||||
if (type === "rollup") {
|
||||
let relationKeyID: string
|
||||
let keyID: string
|
||||
let avData = panelData?.data
|
||||
let relationKeyID: string;
|
||||
let keyID: string;
|
||||
let avData = panelData?.data;
|
||||
if (!avData) {
|
||||
const avResponse = await fetchSyncPost("api/av/renderAttributeView", {id: avId});
|
||||
avData = avResponse.data;
|
||||
|
|
@ -264,25 +264,25 @@ export const openCalcMenu = async (protyle: IProtyle, calcElement: HTMLElement,
|
|||
if (item.id === colId) {
|
||||
relationKeyID = item.rollup?.relationKeyID;
|
||||
keyID = item.rollup?.keyID;
|
||||
return true
|
||||
return true;
|
||||
}
|
||||
})
|
||||
});
|
||||
if (relationKeyID && keyID) {
|
||||
let relationAvId: string
|
||||
let relationAvId: string;
|
||||
avData.view.columns.find((item) => {
|
||||
if (item.id === relationKeyID) {
|
||||
relationAvId = item.relation?.avID;
|
||||
return true
|
||||
return true;
|
||||
}
|
||||
})
|
||||
});
|
||||
if (relationAvId) {
|
||||
const colResponse = await fetchSyncPost("api/av/getAttributeView", {id: relationAvId})
|
||||
const colResponse = await fetchSyncPost("api/av/getAttributeView", {id: relationAvId});
|
||||
colResponse.data.av.keyValues.find((item: { key: { id: string, name: string, type: TAVCol } }) => {
|
||||
if (item.key.id === keyID) {
|
||||
rollupIsNumber = item.key.type === "number"
|
||||
return true
|
||||
rollupIsNumber = item.key.type === "number";
|
||||
return true;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,12 +168,12 @@ export const uploadLocalFiles = (files: string[], protyle: IProtyle, isUpload: b
|
|||
id: protyle.block.rootID
|
||||
}, (response) => {
|
||||
hideMessage(msgId);
|
||||
let tip = ""
|
||||
let tip = "";
|
||||
Object.keys(response.data.succMap).forEach(name => {
|
||||
if (response.data.succMap[name].startsWith("file:")) {
|
||||
tip += name + ", "
|
||||
tip += name + ", ";
|
||||
}
|
||||
})
|
||||
});
|
||||
if (tip) {
|
||||
showMessage(window.siyuan.languages.dndFolderTip.replace("${x}", `<b>${tip.substring(0, tip.length - 2)}</b>`));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue