Use menu font icon for Omarchy update entry
This commit is contained in:
@@ -283,7 +283,7 @@
|
|||||||
"remove.development.elixir.phoenix": {"icon":"","label":"Phoenix","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-remove-dev-env phoenix'"},
|
"remove.development.elixir.phoenix": {"icon":"","label":"Phoenix","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-remove-dev-env phoenix'"},
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
"update.omarchy": {"icon":"","label":"Omarchy","keywords":"system","action":"omarchy-launch-floating-terminal-with-presentation omarchy-update"},
|
"update.omarchy": {"icon":"","label":"Omarchy","keywords":"system","action":"omarchy-launch-floating-terminal-with-presentation omarchy-update"},
|
||||||
"update.channel": {"icon":"","label":"Channel","keywords":"stable rc dev edge source"},
|
"update.channel": {"icon":"","label":"Channel","keywords":"stable rc dev edge source"},
|
||||||
"update.config": {"icon":"","label":"Config","keywords":"refresh default"},
|
"update.config": {"icon":"","label":"Config","keywords":"refresh default"},
|
||||||
"update.themes": {"icon":"","label":"Extra Themes","action":"omarchy-launch-floating-terminal-with-presentation omarchy-theme-update"},
|
"update.themes": {"icon":"","label":"Extra Themes","action":"omarchy-launch-floating-terminal-with-presentation omarchy-theme-update"},
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ run_node_test <<'JS'
|
|||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const menu = requireFromRoot('shell/plugins/menu/MenuModel.js')
|
const menu = requireFromRoot('shell/plugins/menu/MenuModel.js')
|
||||||
const menuQml = fs.readFileSync(path.join(root, 'shell/plugins/menu/Menu.qml'), 'utf8')
|
const menuQml = fs.readFileSync(path.join(root, 'shell/plugins/menu/Menu.qml'), 'utf8')
|
||||||
|
const defaultMenuJsonc = fs.readFileSync(path.join(root, 'default/omarchy/omarchy-menu.jsonc'), 'utf8')
|
||||||
|
|
||||||
const parsed = menu.parseMenuJsonc(`
|
const parsed = menu.parseMenuJsonc(`
|
||||||
{
|
{
|
||||||
@@ -88,6 +89,17 @@ assertDeepEqual(
|
|||||||
'menu builds display rows'
|
'menu builds display rows'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const defaultItems = menu.parseMenuJsonc(defaultMenuJsonc)
|
||||||
|
const defaultById = Object.fromEntries(defaultItems.map(item => [item.id, item]))
|
||||||
|
assert(
|
||||||
|
defaultById['update.omarchy'].icon === defaultById['learn.omarchy'].icon,
|
||||||
|
'menu update Omarchy entry uses the menu-font Omarchy icon'
|
||||||
|
)
|
||||||
|
assert(
|
||||||
|
!defaultMenuJsonc.includes('\ue900'),
|
||||||
|
'menu entries do not use the private Omarchy bar-font glyph'
|
||||||
|
)
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
/function select\(delta\)[\s\S]*root\.disarmPointer\(\)[\s\S]*selectedIndex =/.test(menuQml),
|
/function select\(delta\)[\s\S]*root\.disarmPointer\(\)[\s\S]*selectedIndex =/.test(menuQml),
|
||||||
'menu keyboard navigation disarms pointer selection'
|
'menu keyboard navigation disarms pointer selection'
|
||||||
|
|||||||
Reference in New Issue
Block a user