- Fix links not showing up in webinterface
- Switch to debug logging
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Dalamud.NET.Sdk/14.0.1">
|
<Project Sdk="Dalamud.NET.Sdk/14.0.1">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>1.34.2</Version>
|
<Version>1.34.3</Version>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
|||||||
@@ -241,14 +241,21 @@ export class ChatTwoWeb {
|
|||||||
|
|
||||||
processUrlTemplate(template: Template, spanElement: HTMLSpanElement) {
|
processUrlTemplate(template: Template, spanElement: HTMLSpanElement) {
|
||||||
const urlElement = document.createElement('a');
|
const urlElement = document.createElement('a');
|
||||||
|
let url = template.content;
|
||||||
|
if (!url.startsWith('https://')) {
|
||||||
|
url = `https://${url}`;
|
||||||
|
}
|
||||||
|
|
||||||
urlElement.innerText = template.content;
|
urlElement.innerText = template.content;
|
||||||
urlElement.href = encodeURI(template.content);
|
urlElement.href = encodeURI(url);
|
||||||
urlElement.target = '_blank'
|
urlElement.target = '_blank'
|
||||||
|
|
||||||
if (template.color !== 0)
|
if (template.color !== 0)
|
||||||
{
|
{
|
||||||
this.processColor(template, spanElement);
|
this.processColor(template, spanElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spanElement.appendChild(urlElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
// converts a RGBA uint number to components
|
// converts a RGBA uint number to components
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class HostContext
|
|||||||
Host.Settings.Debug.Responses = true;
|
Host.Settings.Debug.Responses = true;
|
||||||
Host.Settings.Debug.AccessControl = true;
|
Host.Settings.Debug.AccessControl = true;
|
||||||
#endif
|
#endif
|
||||||
Host.Events.Logger = logMessage => Plugin.Log.Information(logMessage);
|
Host.Events.Logger = logMessage => Plugin.Log.Debug(logMessage);
|
||||||
|
|
||||||
IsActive = true;
|
IsActive = true;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ public class RouteController
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Plugin.Log.Information($"Client connected: {ctx.Guid}");
|
Plugin.Log.Debug($"Client connected: {ctx.Guid}");
|
||||||
|
|
||||||
var sse = new SSEConnection(HostContext.TokenSource.Token);
|
var sse = new SSEConnection(HostContext.TokenSource.Token);
|
||||||
await HostContext.Core.PrepareNewClient(sse);
|
await HostContext.Core.PrepareNewClient(sse);
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ public class SSEConnection
|
|||||||
|
|
||||||
if (!await ctx.Response.SendChunk(outgoingEvent.Build(), false, Token))
|
if (!await ctx.Response.SendChunk(outgoingEvent.Build(), false, Token))
|
||||||
{
|
{
|
||||||
Plugin.Log.Information("SSE connection was unable to send new data");
|
Plugin.Log.Debug("SSE connection was unable to send new data");
|
||||||
Plugin.Log.Information($"Client disconnected: {ctx.Guid}");
|
Plugin.Log.Debug($"Client disconnected: {ctx.Guid}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public static class WrapperUtil
|
|||||||
public static IEnumerable<(T Value, int Index)> WithIndex<T>(this IEnumerable<T> list)
|
public static IEnumerable<(T Value, int Index)> WithIndex<T>(this IEnumerable<T> list)
|
||||||
=> list.Select((x, i) => (x, i));
|
=> list.Select((x, i) => (x, i));
|
||||||
|
|
||||||
/// <summary> Return the first object fulfilling the predicate or null for structs. </summary>
|
/// <summary> Return the first object fulfilling the predicate or null for structs.</summary>
|
||||||
/// <param name="values"> The enumerable. </param>
|
/// <param name="values"> The enumerable. </param>
|
||||||
/// <param name="predicate"> The predicate. </param>
|
/// <param name="predicate"> The predicate. </param>
|
||||||
/// <returns> The first object fulfilling the predicate, or a null-optional. </returns>
|
/// <returns> The first object fulfilling the predicate, or a null-optional. </returns>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user