[home] fix 'plugin' sidebar's button

This commit is contained in:
maxkadushkin
2025-06-13 15:45:05 +03:00
parent be586ada46
commit b32501fe3e
6 changed files with 21 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M5.5 9.5v-3a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1Zm0 8v-3a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1Zm8-8v-3a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1Zm2.5 3.75a2.75 2.75 0 1 1 0 5.5 2.75 2.75 0 0 1 0-5.5Z" class="icon-gray-primary"/>
</svg>

After

Width:  |  Height:  |  Size: 405 B

View File

@ -49,6 +49,7 @@
var ViewCustomPanel = function(args) {
var _lang = utils.Lang;
const isSvgIcons = window.devicePixelRatio >= 2 || window.devicePixelRatio === 1;
let _html = `<div class="action-panel style--free ${args.action}">
<div class="flexbox">
@ -59,8 +60,21 @@
args.tplPage = _html;
args.menu = '.main-column.tool-menu';
args.field = '.main-column.col-center';
args.itemindex = 3;
args.itemtext = args.itemtext;
// args.itemindex = 3;
// args.itemtext = args.itemtext;
args.tplItem = `
<li class="menu-item">
<a action="${args.action}">
<div class="icon-box">
<svg class="icon" data-iconname="plugin" data-precls="tool-icon">
<use href="#plugin"></use>
</svg>
${!isSvgIcons ? '<i class="icon tool-icon plugin"></i>`' : ''}
</div>
<span class="text" l10n>${args.itemtext}</span>
</a>
</li>
`;
baseView.prototype.constructor.call(this, args);
};

View File

@ -440,6 +440,8 @@ utils.fn.decodeHtml = function(str) {
}
utils.fn.getToolMenuItemOrder = function(item) {
return { item: $('.menu-item a[action=settings]').parent(), after: false };
let $item = $(item);
let _action = $item.find('[action]').attr('action'),