Commit ed393e4a authored by Big Bad Waffle's avatar Big Bad Waffle

the context menu can now add suffixes (blue) to context items even if they have no hotkeys

parent 6f4f4313
......@@ -33,6 +33,7 @@ define([
config.forEach((c, i) => {
const text = (c.text || c);
const hotkey = c.hotkey;
const suffix = c.suffix;
const html = templateItem
.replace('$TEXT$', text);
......@@ -42,12 +43,18 @@ define([
if (hotkey)
row.find('.hotkey').html(`(${hotkey})`);
else if (suffix)
row.find('.hotkey').html(`${suffix}`);
if (c.callback) {
row.on('click', this.onClick.bind(this, i, c.callback));
row.on('click', events.emit.bind(events, 'onClickContextItem'));
} else
} else {
row.addClass('no-hover');
if (text.includes('---'))
row.addClass('divider');
}
});
this.el
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment