mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 22:55:24 +00:00
feat: convert serial console into the serial plugin
This commit is contained in:
1 parent
708eedb861
commit
791d8656a1
121 files changed
+2216
-1425
No files matched your search
@@ -61,6 +61,8 @@ export interface TabTypeDef {
|
||||
persistent?: boolean;
|
||||
singleton?: boolean;
|
||||
session?: boolean;
|
||||
/** Whether a session tab offers "Share session". Default true. */
|
||||
shareable?: boolean;
|
||||
hostless?: boolean;
|
||||
restore?: (host: Host) => boolean;
|
||||
activityTypes?: string[];
|
||||
@@ -91,7 +93,7 @@ export const resetTabTypes = registry.reset;
|
||||
/** Core tab types that are saved and reopened after login. */
|
||||
const CORE_PERSISTENT = new Set<string>();
|
||||
/** Core tab types that hold a live session (close confirm, refresh). */
|
||||
const CORE_SESSION = new Set(["serial"]);
|
||||
const CORE_SESSION = new Set<string>();
|
||||
/** Core tab types that restore without a host. */
|
||||
const CORE_HOSTLESS = new Set(["dashboard"]);
|
||||
|
||||
@@ -115,6 +117,11 @@ export function isSessionTabType(type: string): boolean {
|
||||
return CORE_SESSION.has(type) || !!registry.get(type)?.session;
|
||||
}
|
||||
|
||||
/** Whether a session tab of this type offers "Share session". Default true. */
|
||||
export function isShareableTabType(type: string): boolean {
|
||||
return registry.get(type)?.shareable !== false;
|
||||
}
|
||||
|
||||
export function isHostlessTabType(type: string): boolean {
|
||||
return CORE_HOSTLESS.has(type) || !!registry.get(type)?.hostless;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user