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

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

View file

@ -4,6 +4,7 @@ import {fetchPost} from "../../util/fetch";
import {updateHotkeyTip} from "../util/compatibility";
import {hasClosestByClassName} from "../util/hasClosest";
import {goEnd, goHome} from "../wysiwyg/commonHotkey";
import {isMobile} from "../../util/functions";
export class Scroll {
public element: HTMLElement;
@ -15,6 +16,9 @@ export class Scroll {
constructor(protyle: IProtyle) {
this.parentElement = document.createElement("div");
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")}">
<svg><use xlink:href="#iconUp"></use></svg>
</div>