From 7d6b8805dfc3b38515bf9752d85bce8f2c992179 Mon Sep 17 00:00:00 2001
From: Andrew Moore <andrewm.finewolf@gmail.com>
Date: Wed, 14 Feb 2024 23:45:55 -0500
Subject: [Feature] Freeze updates for devs (#582)

---
 frontend/src/components/DeckyState.tsx | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'frontend/src/components/DeckyState.tsx')

diff --git a/frontend/src/components/DeckyState.tsx b/frontend/src/components/DeckyState.tsx
index d20c8d86..749e27ce 100644
--- a/frontend/src/components/DeckyState.tsx
+++ b/frontend/src/components/DeckyState.tsx
@@ -8,6 +8,7 @@ import { VerInfo } from '../updater';
 interface PublicDeckyState {
   plugins: Plugin[];
   pluginOrder: string[];
+  frozenPlugins: string[];
   hiddenPlugins: string[];
   activePlugin: Plugin | null;
   updates: PluginUpdateMapping | null;
@@ -26,6 +27,7 @@ export interface UserInfo {
 export class DeckyState {
   private _plugins: Plugin[] = [];
   private _pluginOrder: string[] = [];
+  private _frozenPlugins: string[] = [];
   private _hiddenPlugins: string[] = [];
   private _activePlugin: Plugin | null = null;
   private _updates: PluginUpdateMapping | null = null;
@@ -41,6 +43,7 @@ export class DeckyState {
     return {
       plugins: this._plugins,
       pluginOrder: this._pluginOrder,
+      frozenPlugins: this._frozenPlugins,
       hiddenPlugins: this._hiddenPlugins,
       activePlugin: this._activePlugin,
       updates: this._updates,
@@ -67,6 +70,11 @@ export class DeckyState {
     this.notifyUpdate();
   }
 
+  setFrozenPlugins(frozenPlugins: string[]) {
+    this._frozenPlugins = frozenPlugins;
+    this.notifyUpdate();
+  }
+
   setHiddenPlugins(hiddenPlugins: string[]) {
     this._hiddenPlugins = hiddenPlugins;
     this.notifyUpdate();
-- 
cgit v1.2.3

