mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-11-07 02:55:24 +00:00
feat: shared toolbar, footer and host dot pieces for plugin UI
This commit is contained in:
1 parent
3c6229671c
commit
020f30541a
25 files changed
+539
-39
No files matched your search
@@ -656,7 +656,7 @@ export interface HostProtocolContribution {
|
||||
quickConnect?: { showDomain?: boolean };
|
||||
}
|
||||
|
||||
export interface HostBadgeContribution {
|
||||
export interface HostRowContribution {
|
||||
id: string;
|
||||
when: (host: PluginHostRecord) => boolean;
|
||||
component: ComponentType<{ host: PluginHostRecord }>;
|
||||
@@ -664,11 +664,32 @@ export interface HostBadgeContribution {
|
||||
order?: number;
|
||||
}
|
||||
|
||||
/** A problem shown as the host row's status dot. */
|
||||
export interface HostDot {
|
||||
tone: "bad" | "warn";
|
||||
label: string;
|
||||
}
|
||||
|
||||
export interface HostBadgeContribution {
|
||||
id: string;
|
||||
when: (host: PluginHostRecord) => boolean;
|
||||
/** Drawn as is on the row. Leave out for a badge that is only a dot. */
|
||||
component?: ComponentType<{ host: PluginHostRecord }>;
|
||||
/**
|
||||
* A hook that returns a problem or null. Every plugin's dots merge into one
|
||||
* dot on the row, with the worst tone and each label in its tooltip, so two
|
||||
* plugins reporting the same host never draw two dots. Core 26.11.1+.
|
||||
*/
|
||||
useDot?: (host: PluginHostRecord) => HostDot | null;
|
||||
/** Lower comes first. Ties sort by id. */
|
||||
order?: number;
|
||||
}
|
||||
|
||||
/** The dot or stripe that shows a host's status on its row. */
|
||||
export type HostStatusIndicatorContribution = HostBadgeContribution;
|
||||
export type HostStatusIndicatorContribution = HostRowContribution;
|
||||
|
||||
/** A control in the host editor's toolbar. */
|
||||
export type HostEditorToolbarItemContribution = HostBadgeContribution;
|
||||
export type HostEditorToolbarItemContribution = HostRowContribution;
|
||||
|
||||
export interface HostSectionProps {
|
||||
host: PluginHostRecord;
|
||||
|
||||
Reference in new issue
Block a user