mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
feat(mobile): use custom icon for configure launchbar
This commit is contained in:
parent
fa6d229ecf
commit
6966f92339
@ -91,7 +91,8 @@ export default class RootCommandExecutor extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async showLaunchBarSubtreeCommand() {
|
async showLaunchBarSubtreeCommand() {
|
||||||
await this.showAndHoistSubtree('_lbRoot');
|
const rootNote = utils.isMobile() ? "_lbMobileRoot" : "_lbRoot";
|
||||||
|
await this.showAndHoistSubtree(rootNote);
|
||||||
this.showLeftPaneCommand();
|
this.showLeftPaneCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ const TPL = `
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="dropdown-item" data-trigger-command="showLaunchBarSubtree">
|
<li class="dropdown-item" data-trigger-command="showLaunchBarSubtree">
|
||||||
<span class="bx bx-sidebar"></span>
|
<span class="bx ${utils.isMobile() ? "bx-mobile" : "bx-sidebar"}"></span>
|
||||||
${t('global_menu.configure_launchbar')}
|
${t('global_menu.configure_launchbar')}
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ import { t } from "../services/i18n.js";
|
|||||||
import BasicWidget from "./basic_widget.js";
|
import BasicWidget from "./basic_widget.js";
|
||||||
import contextMenu from "../menus/context_menu.js";
|
import contextMenu from "../menus/context_menu.js";
|
||||||
import appContext from "../components/app_context.js";
|
import appContext from "../components/app_context.js";
|
||||||
|
import utils from "../services/utils.js";
|
||||||
|
|
||||||
const TPL = `<div class="spacer"></div>`;
|
const TPL = `<div class="spacer"></div>`;
|
||||||
|
|
||||||
@ -30,7 +31,7 @@ export default class SpacerWidget extends BasicWidget {
|
|||||||
x: e.pageX,
|
x: e.pageX,
|
||||||
y: e.pageY,
|
y: e.pageY,
|
||||||
items: [
|
items: [
|
||||||
{title: t("spacer.configure_launchbar"), command: "showLaunchBarSubtree", uiIcon: "bx bx-sidebar"}
|
{title: t("spacer.configure_launchbar"), command: "showLaunchBarSubtree", uiIcon: "bx " + (utils.isMobile() ? "bx-mobile" : "bx-sidebar")}
|
||||||
],
|
],
|
||||||
selectMenuItemHandler: ({command}) => {
|
selectMenuItemHandler: ({command}) => {
|
||||||
if (command) {
|
if (command) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user