Просмотр исходного кода

Consolidate OtherCardComponent code blocks

Merge the three separate @code blocks into one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tim Jones 17 часов назад
Родитель
Сommit
1f9382bcba
1 измененных файлов с 17 добавлено и 25 удалено
  1. 17 25
      Shared.Rcl/OtherHardware/OtherCardComponent.razor

+ 17 - 25
Shared.Rcl/OtherHardware/OtherCardComponent.razor

@@ -207,27 +207,6 @@
             await OnDeleted.InvokeAsync(Other.Name);
     }
 
-    public class OtherEditModel
-    {
-        public string? Model { get; set; }
-        public string? Description { get; set; }
-        public string? Notes { get; set; }
-
-        public static OtherEditModel From(Other other)
-        {
-            return new OtherEditModel
-            {
-                Model = other.Model,
-                Description = other.Description,
-                Notes = other.Notes
-            };
-        }
-    }
-
-}
-
-@code
-{
     bool _renameOpen;
 
     void OpenRename()
@@ -241,10 +220,6 @@
         Nav.NavigateTo($"resources/hardware/{Uri.EscapeDataString(newName)}");
     }
 
-}
-
-@code
-{
     bool _cloneOpen;
 
     void OpenClone()
@@ -259,4 +234,21 @@
         Nav.NavigateTo($"resources/hardware/{Uri.EscapeDataString(newName)}");
     }
 
+    public class OtherEditModel
+    {
+        public string? Model { get; set; }
+        public string? Description { get; set; }
+        public string? Notes { get; set; }
+
+        public static OtherEditModel From(Other other)
+        {
+            return new OtherEditModel
+            {
+                Model = other.Model,
+                Description = other.Description,
+                Notes = other.Notes
+            };
+        }
+    }
+
 }