浏览代码

Random fixes. Lang file

Marcel Baumgartner 2 年之前
父节点
当前提交
24f131f264

+ 3 - 1
Moonlight/App/Helpers/SmartTranslateHelper.cs

@@ -21,7 +21,9 @@ public class SmartTranslateHelper
                 foreach (var line in lines)
                 {
                     var parts = line.Split(";");
-                    content.Add(parts[0], parts[1]);
+                    
+                    if(!content.ContainsKey(parts[0]))
+                        content.Add(parts[0], parts[1]);
                 }
                 
                 Languages.Add(langKey, content);

+ 1 - 4
Moonlight/Shared/Components/ErrorBoundaries/GlobalErrorBoundary.razor

@@ -52,10 +52,7 @@ else
     {
         receivedExceptions.Add(exception);
         
-        var user = await IdentityService.Get();
-        var id = user == null ? -1 : user.Id;
-
-        Logger.Error($"[{id}] An unhanded exception occured:");
+        Logger.Error($"An unhanded exception occured:");
         Logger.Error(exception);
 
         await base.OnErrorAsync(exception);

+ 18 - 11
Moonlight/Shared/Views/Admin/Servers/Manager.razor

@@ -100,23 +100,30 @@
         {
             await lazyLoader.SetText(node.Name);
 
-            var containerStats = await NodeService.GetContainerStats(node);
-
-            foreach (var container in containerStats.Containers)
+            try
             {
-                if (Guid.TryParse(container.Name, out Guid uuid))
-                {
-                    var server = ServerRepository
-                        .Get()
-                        .Include(x => x.Owner)
-                        .FirstOrDefault(x => x.Uuid == uuid);
+                var containerStats = await NodeService.GetContainerStats(node);
 
-                    if (server != null)
+                foreach (var container in containerStats.Containers)
+                {
+                    if (Guid.TryParse(container.Name, out Guid uuid))
                     {
-                        Containers.Add(server, container);
+                        var server = ServerRepository
+                            .Get()
+                            .Include(x => x.Owner)
+                            .FirstOrDefault(x => x.Uuid == uuid);
+
+                        if (server != null)
+                        {
+                            Containers.Add(server, container);
+                        }
                     }
                 }
             }
+            catch (Exception)
+            {
+                // ignored
+            }
         }
     }
 

+ 2 - 1
Moonlight/resources/lang/de_de.lang

@@ -554,4 +554,5 @@ You have no domains;You have no domains
 We were not able to find any domains associated with your account;We were not able to find any domains associated with your account
 You have no websites;You have no websites
 We were not able to find any websites associated with your account;We were not able to find any websites associated with your account
-The name should only consist of lower case characters;The name should only consist of lower case characters
+Guest;Guest
+You need a domain;You need a domain