@@ -42,7 +42,7 @@
No hay plugins instalados
Actualmente no hay ninguna extensión o plugin registrado en este servidor OpenGnsys.
- Cuando instales un paquete compatible (como ogfreeze), aparecerá automáticamente aquí.
+ Cuando instales un paquete compatible, aparecerá automáticamente aquí.
}
diff --git a/ogWebconsole/src/app/services/plugin.service.ts b/ogWebconsole/src/app/services/plugin.service.ts
index 65fbf3f..d9f91bc 100644
--- a/ogWebconsole/src/app/services/plugin.service.ts
+++ b/ogWebconsole/src/app/services/plugin.service.ts
@@ -1,12 +1,14 @@
import { Injectable, inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
-import { BehaviorSubject, Observable, of } from 'rxjs';
-import { catchError, map, tap } from 'rxjs/operators';
+import { BehaviorSubject, Observable, forkJoin, of } from 'rxjs';
+import { catchError, map, switchMap, tap } from 'rxjs/operators';
+import { TranslateService } from '@ngx-translate/core';
import { ConfigService } from './config.service';
export interface PluginCommand {
slug: string;
translationKey?: string;
+ labelKey?: string;
label: string;
icon: string;
disabled: boolean;
@@ -14,9 +16,19 @@ export interface PluginCommand {
os?: string[]; // Ej: ['windows'], ['linux']
}
+export interface PluginBadgeRule {
+ status: string;
+ type: string;
+ icon: string;
+ label: string;
+ labelKey?: string;
+ tooltip: string;
+ tooltipKey?: string;
+}
+
export interface PluginBadge {
- id: string;
- type: 'frozen' | 'unfrozen' | 'info';
+ id: string; // Plugin name
+ type: string;
icon: string;
label: string;
tooltip: string;
@@ -32,7 +44,9 @@ export interface FieldAction {
export interface SchemaField {
key: string;
label: string;
+ labelKey?: string;
description?: string;
+ descriptionKey?: string;
type: 'text' | 'number' | 'select' | 'checkbox' | 'textarea';
options?: string[];
default: any;
@@ -42,12 +56,17 @@ export interface SchemaField {
export interface PluginManifest {
name: string;
title: string;
+ titleKey?: string;
version: string;
description: string;
+ descriptionKey?: string;
author: string;
icon: string;
enabled: boolean;
commands: PluginCommand[];
+ statusEndpoint?: string;
+ badges?: PluginBadgeRule[];
+ i18n?: Record