mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-11-06 02:25:24 +00:00
feat: shared tile grid for plugin pages and many-tile dashboard cards (SDK 1.0.26)
This commit is contained in:
1 parent
1c4fa52de3
commit
9613b787a7
22 files changed
+1997
-7
No files matched your search
@@ -799,6 +799,26 @@ export interface KeybindingDefaultContribution {
|
||||
export interface DashboardCardProps {
|
||||
isVisible: boolean;
|
||||
shell: ShellApi;
|
||||
/** This tile's settings, for cards with `entries`. Empty otherwise. Core 26.11.1+. */
|
||||
config?: Record<string, unknown>;
|
||||
/** Saves this tile's settings. Keep it small, it is stored in one line. */
|
||||
setConfig?: (config: Record<string, unknown>) => void;
|
||||
/** True while the user is arranging the dashboard. */
|
||||
editMode?: boolean;
|
||||
}
|
||||
|
||||
/** One tile a card with `entries` offers in the dashboard's add list. */
|
||||
export interface DashboardCardEntry {
|
||||
/** Stable within the card, used to mark entries already placed. */
|
||||
key: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
/** Group heading in the add list. Defaults to the card title. */
|
||||
group?: string;
|
||||
kind?: "card" | "chart" | "signal" | "action" | "resource" | "session";
|
||||
/** Passed back as `config`. */
|
||||
config: Record<string, unknown>;
|
||||
defaultSize?: { w: number; h?: number | null };
|
||||
}
|
||||
|
||||
export interface DashboardCardContribution {
|
||||
@@ -813,6 +833,13 @@ export interface DashboardCardContribution {
|
||||
* edge, for a strip of numbers. Defaults to "framed".
|
||||
*/
|
||||
frame?: "framed" | "bare";
|
||||
/** Size on the 12 column dashboard grid when added. Core 26.11.1+. */
|
||||
defaultSize?: { w: number; h?: number | null };
|
||||
/**
|
||||
* Lets the card be placed many times, once per entry, each with its own
|
||||
* `config`. Titles come back already translated. Core 26.11.1+.
|
||||
*/
|
||||
entries?: (language: string) => Promise<DashboardCardEntry[]>;
|
||||
component: ComponentType<DashboardCardProps>;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ export {
|
||||
* "^1.2" needs 1.2 or later). engine.termix is checked against the core
|
||||
* version by the server.
|
||||
*/
|
||||
export const PLUGIN_API_VERSION = "1.14.0";
|
||||
export const PLUGIN_API_VERSION = "1.15.0";
|
||||
|
||||
/** The API major, the default engine.api for a new plugin. */
|
||||
export const SUPPORTED_PLUGIN_API_VERSION = String(
|
||||
|
||||
Reference in new issue
Block a user