mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	feat(mobile): use custom icon for configure launchbar
This commit is contained in:
		@@ -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) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user