diff --git a/app/src/config/about.ts b/app/src/config/about.ts index 9b2550805..e5f9ac2d7 100644 --- a/app/src/config/about.ts +++ b/app/src/config/about.ts @@ -3,7 +3,7 @@ import {Constants} from "../constants"; import {shell} from "electron"; import {dialog} from "@electron/remote"; /// #endif -import {isBrowser, isMobile} from "../util/functions"; +import {isBrowser} from "../util/functions"; import {fetchPost} from "../util/fetch"; import {setAccessAuthCode} from "./util"; import {exportLayout} from "../layout/util"; @@ -214,7 +214,7 @@ export const about = {
`, - width: isMobile() ? "80vw" : "520px", + width: "520px", }); const textAreaElement = passwordDialog.element.querySelector("textarea"); textAreaElement.focus(); diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts index 1a614bc64..15cd75ff2 100644 --- a/app/src/layout/util.ts +++ b/app/src/layout/util.ts @@ -396,13 +396,13 @@ export const layoutToJSON = (layout: Layout | Wnd | Tab | Model, json: any) => { export const resizeDrag = () => { const dragElement = document.getElementById("drag"); - const right = dragElement.getBoundingClientRect().left - document.querySelector("#windowControls").clientWidth + const right = dragElement.getBoundingClientRect().left - document.querySelector("#windowControls").clientWidth; if (right < dragElement.clientWidth) { dragElement.style.paddingRight = right + "px"; } else { dragElement.style.paddingRight = ""; } -} +}; export const resizeTabs = () => { const models = getAllModels(); diff --git a/app/src/protyle/wysiwyg/list.ts b/app/src/protyle/wysiwyg/list.ts index 3c6eea261..90b198ae0 100644 --- a/app/src/protyle/wysiwyg/list.ts +++ b/app/src/protyle/wysiwyg/list.ts @@ -176,55 +176,55 @@ export const listIndent = (protyle: IProtyle, liItemElements: Element[], range: }; export const breakList = (protyle: IProtyle, blockElement: Element, range: Range) => { - const listItemElement = blockElement.parentElement - const listItemId = listItemElement.getAttribute("data-node-id") + const listItemElement = blockElement.parentElement; + const listItemId = listItemElement.getAttribute("data-node-id"); const doOperations: IOperation[] = []; const undoOperations: IOperation[] = []; - range.insertNode(document.createElement("wbr")) - const newListId = Lute.NewNodeID() - let newListHTML = '' - let hasFind = 0 + range.insertNode(document.createElement("wbr")); + const newListId = Lute.NewNodeID(); + let newListHTML = ""; + let hasFind = 0; Array.from(listItemElement.parentElement.children).forEach(item => { if (!hasFind && item.isSameNode(listItemElement)) { - hasFind = 1 + hasFind = 1; } else if (hasFind && !item.classList.contains("protyle-attr")) { undoOperations.push({ id: item.getAttribute("data-node-id"), action: "move", previousID: listItemId, - }) + }); doOperations.push({ id: item.getAttribute("data-node-id"), action: "delete", - }) + }); if (item.getAttribute("data-subtype") === "o") { undoOperations.push({ id: item.getAttribute("data-node-id"), action: "update", data: item.outerHTML, - }) - item.setAttribute("data-marker", hasFind + ".") - item.firstElementChild.innerHTML = hasFind + "." + }); + item.setAttribute("data-marker", hasFind + "."); + item.firstElementChild.innerHTML = hasFind + "."; } - newListHTML += item.outerHTML + newListHTML += item.outerHTML; item.remove(); hasFind++; } - }) + }); undoOperations.reverse(); - newListHTML = `