mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-09 09:42:28 +08:00
feat(mobile): change context menu icon on horizontal layout
This commit is contained in:
parent
ea399e590d
commit
fbae0062af
@ -138,13 +138,13 @@ export default class MobileLayout {
|
|||||||
.child(new FlexContainer('row').contentSized()
|
.child(new FlexContainer('row').contentSized()
|
||||||
.css('font-size', 'larger')
|
.css('font-size', 'larger')
|
||||||
.css('align-items', 'center')
|
.css('align-items', 'center')
|
||||||
.optChild(!launcherPaneIsHorizontal, new MobileDetailMenuWidget().contentSized())
|
.optChild(!launcherPaneIsHorizontal, new MobileDetailMenuWidget(false).contentSized())
|
||||||
.child(new NoteTitleWidget()
|
.child(new NoteTitleWidget()
|
||||||
.contentSized()
|
.contentSized()
|
||||||
.css("position: relative;")
|
.css("position: relative;")
|
||||||
.css("top: 5px;")
|
.css("top: 5px;")
|
||||||
)
|
)
|
||||||
.optChild(launcherPaneIsHorizontal, new MobileDetailMenuWidget().contentSized())
|
.optChild(launcherPaneIsHorizontal, new MobileDetailMenuWidget(true).contentSized())
|
||||||
.child(new CloseDetailButtonWidget().contentSized()))
|
.child(new CloseDetailButtonWidget().contentSized()))
|
||||||
.child(new SharedInfoWidget())
|
.child(new SharedInfoWidget())
|
||||||
.child(new FloatingButtons()
|
.child(new FloatingButtons()
|
||||||
|
@ -6,12 +6,20 @@ import branchService from "../../services/branches.js";
|
|||||||
import treeService from "../../services/tree.js";
|
import treeService from "../../services/tree.js";
|
||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
|
|
||||||
const TPL = `<button type="button" class="action-button bx bx-menu" style="padding-top: 10px;"></button>`;
|
const TPL = `<button type="button" class="action-button bx" style="padding-top: 10px;"></button>`;
|
||||||
|
|
||||||
class MobileDetailMenuWidget extends BasicWidget {
|
class MobileDetailMenuWidget extends BasicWidget {
|
||||||
|
|
||||||
|
constructor(isHorizontalLayout) {
|
||||||
|
super();
|
||||||
|
this.isHorizontalLayout = isHorizontalLayout;
|
||||||
|
}
|
||||||
|
|
||||||
doRender() {
|
doRender() {
|
||||||
this.$widget = $(TPL);
|
this.$widget = $(TPL);
|
||||||
|
|
||||||
|
this.$widget.addClass(this.isHorizontalLayout ? "bx-dots-vertical-rounded" : "bx-menu");
|
||||||
|
|
||||||
this.$widget.on("click", async e => {
|
this.$widget.on("click", async e => {
|
||||||
const note = appContext.tabManager.getActiveContextNote();
|
const note = appContext.tabManager.getActiveContextNote();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user