mirror of
https://github.com/modrinth/code.git
synced 2026-08-31 03:55:59 +00:00
menu refactor + web account switcher (#7307)
* add account switcher, migrate context menus to overflow menu system, update version filter controls, only pad instance icons * app account switcher, improve some context menus, theme stuff * prepr * handle reauthentication * fix a couple sign in issues, admin page cleanup, fix org status badges, fix official account badge, open in local keybind, publish plus icons * rename generic menus to ButtonMenu (& types) * fix hydration issue w/ dropdowns + middleware error
This commit is contained in:
@@ -132,6 +132,15 @@ const keybinds: { [id: string]: KeybindListener } = {
|
||||
globalThis.open(ctx.officialUrl, '_blank', 'noopener,noreferrer')
|
||||
},
|
||||
},
|
||||
'open-localhost': {
|
||||
keybind: [],
|
||||
description: 'Open current page on localhost',
|
||||
scope: 'global',
|
||||
enabled: () => !isLocalhost(),
|
||||
action: (ctx) => {
|
||||
globalThis.open(ctx.localhostUrl, '_blank', 'noopener,noreferrer')
|
||||
},
|
||||
},
|
||||
'copy-official-site': {
|
||||
keybind: 'Ctrl+Shift+O',
|
||||
description: 'Copy production/staging URL (localhost only)',
|
||||
|
||||
@@ -58,6 +58,7 @@ export type ModerationTechReviewContext = {
|
||||
export type ModerationGlobalContext = {
|
||||
scope: 'global'
|
||||
officialUrl: string
|
||||
localhostUrl: string
|
||||
notifyCopied: (value: string, title: string) => void
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user