mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
feat(ui): preview port menu, terminal auto-start, and project actions tabs
This commit is contained in:
1 parent
cf9fa61118
commit
62e36eb3b2
31 files changed
+1332
-489
No files matched your search
@@ -1,7 +1,14 @@
|
||||
import { useCallback } from 'react'
|
||||
import { openDialogParam } from './useDialogParam'
|
||||
import { openDialogParam, useDialogParam } from './useDialogParam'
|
||||
import { useUrlParams } from './useUrlParams'
|
||||
|
||||
const TERMINAL_DIALOG = 'terminal'
|
||||
const TERMINAL_DIALOG_PARAMS = ['terminal'] as const
|
||||
|
||||
export function useTerminalDialogParam(): [boolean, (open: boolean) => void] {
|
||||
return useDialogParam(TERMINAL_DIALOG, TERMINAL_DIALOG_PARAMS)
|
||||
}
|
||||
|
||||
export function useOpenTerminal(): (
|
||||
terminalId: string,
|
||||
extraParams?: Record<string, string>,
|
||||
@@ -10,7 +17,7 @@ export function useOpenTerminal(): (
|
||||
|
||||
return useCallback(
|
||||
(terminalId: string, extraParams?: Record<string, string>) => {
|
||||
openDialogParam(updateParams, 'terminal', { terminal: terminalId, ...extraParams })
|
||||
openDialogParam(updateParams, TERMINAL_DIALOG, { terminal: terminalId, ...extraParams })
|
||||
},
|
||||
[updateParams],
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user