- Loc updates
- Add access URL to webinterface panel
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Dalamud.Interface.ImGuiNotification;
|
||||
using ChatTwo.Resources;
|
||||
using Dalamud.Interface.ImGuiNotification;
|
||||
|
||||
namespace ChatTwo.Util;
|
||||
|
||||
@@ -9,6 +10,20 @@ public static class WrapperUtil
|
||||
Plugin.Notification.AddNotification(new Notification { Content = content, Type = type, Minimized = minimized });
|
||||
}
|
||||
|
||||
public static void TryOpenURI(Uri uri)
|
||||
{
|
||||
try
|
||||
{
|
||||
Plugin.Log.Debug($"Opening URI {uri} in default browser");
|
||||
Dalamud.Utility.Util.OpenLink(uri.ToString());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Plugin.Log.Error($"Error opening URI: {ex}");
|
||||
AddNotification(Language.Context_OpenInBrowserError, NotificationType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<(T Value, int Index)> WithIndex<T>(this IEnumerable<T> list)
|
||||
=> list.Select((x, i) => (x, i));
|
||||
}
|
||||
Reference in New Issue
Block a user