This commit is contained in:
Vanessa 2022-11-15 11:03:07 +08:00
parent f3b3d4065d
commit 7c41d289dd
3 changed files with 9 additions and 3 deletions

View File

@ -1906,10 +1906,10 @@ packages:
resolution: {integrity: sha512-m0+M53+HYMzqKxwNQZT143K7WwXEGUy9LY31l8dJphXx2P/FQod615mVbxHyqbDCG4J5bHdWm21qZ0e2DVY6CQ==} resolution: {integrity: sha512-m0+M53+HYMzqKxwNQZT143K7WwXEGUy9LY31l8dJphXx2P/FQod615mVbxHyqbDCG4J5bHdWm21qZ0e2DVY6CQ==}
engines: {node: '>=14.0.0'} engines: {node: '>=14.0.0'}
dependencies: dependencies:
7zip-bin: 5.1.1
'@develar/schema-utils': 2.6.5 '@develar/schema-utils': 2.6.5
'@electron/universal': 1.2.1 '@electron/universal': 1.2.1
'@malept/flatpak-bundler': 0.4.0 '@malept/flatpak-bundler': 0.4.0
7zip-bin: 5.1.1
async-exit-hook: 2.0.1 async-exit-hook: 2.0.1
bluebird-lst: 1.0.9 bluebird-lst: 1.0.9
builder-util: 23.3.3 builder-util: 23.3.3
@ -2193,9 +2193,9 @@ packages:
/builder-util/23.3.3: /builder-util/23.3.3:
resolution: {integrity: sha512-MJZlUiq2PY5hjYv9+XNaoYdsITqvLgRDoHSFg/4nzpInbNxNjLQOolL04Zsyp+hgfcbFvMC4h0KkR1CMPHLWbA==} resolution: {integrity: sha512-MJZlUiq2PY5hjYv9+XNaoYdsITqvLgRDoHSFg/4nzpInbNxNjLQOolL04Zsyp+hgfcbFvMC4h0KkR1CMPHLWbA==}
dependencies: dependencies:
7zip-bin: 5.1.1
'@types/debug': 4.1.7 '@types/debug': 4.1.7
'@types/fs-extra': 9.0.13 '@types/fs-extra': 9.0.13
7zip-bin: 5.1.1
app-builder-bin: 4.0.0 app-builder-bin: 4.0.0
bluebird-lst: 1.0.9 bluebird-lst: 1.0.9
builder-util-runtime: 9.0.3 builder-util-runtime: 9.0.3

View File

@ -8,7 +8,9 @@
right: 0; right: 0;
height: 100%; height: 100%;
top: 0; top: 0;
width: 24px; width: 16px;
padding: 0 8px;
svg { svg {
height: 16px; height: 16px;
width: 16px; width: 16px;

View File

@ -4,6 +4,7 @@ import {fetchPost} from "../../util/fetch";
import {updateHotkeyTip} from "../util/compatibility"; import {updateHotkeyTip} from "../util/compatibility";
import {hasClosestByClassName} from "../util/hasClosest"; import {hasClosestByClassName} from "../util/hasClosest";
import {goEnd, goHome} from "../wysiwyg/commonHotkey"; import {goEnd, goHome} from "../wysiwyg/commonHotkey";
import {isMobile} from "../../util/functions";
export class Scroll { export class Scroll {
public element: HTMLElement; public element: HTMLElement;
@ -15,6 +16,9 @@ export class Scroll {
constructor(protyle: IProtyle) { constructor(protyle: IProtyle) {
this.parentElement = document.createElement("div"); this.parentElement = document.createElement("div");
this.parentElement.classList.add("protyle-scroll"); this.parentElement.classList.add("protyle-scroll");
if (!isMobile()) {
this.parentElement.style.right = "10px";
}
this.parentElement.innerHTML = `<div class="b3-tooltips b3-tooltips__nw protyle-scroll__up" aria-label="${updateHotkeyTip("⌘Home")}"> this.parentElement.innerHTML = `<div class="b3-tooltips b3-tooltips__nw protyle-scroll__up" aria-label="${updateHotkeyTip("⌘Home")}">
<svg><use xlink:href="#iconUp"></use></svg> <svg><use xlink:href="#iconUp"></use></svg>
</div> </div>