diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..2fe2411b
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,4 @@
+[*.cs]
+
+# SYSLIB0014: Type or member is obsolete
+dotnet_diagnostic.SYSLIB0014.severity = suggestion
\ No newline at end of file
diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml
index c2cbab80..1d6c0af3 100644
--- a/.github/workflows/github_actions.yml
+++ b/.github/workflows/github_actions.yml
@@ -1,51 +1,61 @@
name: VRCX
on:
- - workflow_dispatch
+ - push
+ - pull_request
jobs:
- build_dotnet:
- runs-on: windows-latest
-
- steps:
- - uses: actions/checkout@v3
- - name: Setup Nuget.exe
- uses: nuget/setup-nuget@v1
- - name: Restore packages
- run: nuget restore VRCX.sln
- - name: Setup MSBuild.exe
- uses: microsoft/setup-msbuild@v1.1
- - name: Build with MSBuild
- run: msbuild VRCX.sln -p:Configuration=Release -p:Platform=x64
- - uses: actions/upload-artifact@v3
- with:
- name: vrcx
- path: bin/x64/Release
-
- build_node:
+ build_vrcx_win:
runs-on: ubuntu-latest
- defaults:
- run:
- working-directory: html
steps:
- uses: actions/checkout@v3
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
+
+ - name: Setup .NET 8
+ uses: actions/setup-dotnet@v3
with:
- node-version: ${{ matrix.node-version }}
- - name: Restore dependencies
- run: npm ci
- - name: Lint
- run: npm run lint
- - name: Build
- run: npm run production
- - name: Fix folder structure
- id: fix-folders
- run: |
- mkdir upload
- mv dist upload/html
- - uses: actions/upload-artifact@v3
+ dotnet-version: '8.0.x'
+
+ - name: Setup NodeJS 18
+ uses: actions/setup-node@v4
with:
- name: vrcx
- path: html/upload
+ node-version: 18
+
+ - name: Setup NSIS
+ run: sudo apt update && sudo apt install -y nsis nsis-pluginapi
+
+ - name: Restore Node Dependencies
+ run: cd ${{ github.workspace }}/html && npm ci && cd ${{ github.workspace }}
+
+ #- name: JS Lint
+ # run: cd html && npm run lint && cd ..
+
+ - name: Build Web UI
+ run: cd ${{ github.workspace }}/html && npm run production && cd ${{ github.workspace }}
+
+ - name: Build .NET Application
+ run: dotnet build -p:Configuration=Release -p:Platform=x64 -p:EnableWindowsTargeting=true
+
+ - name: Copy Web UI
+ run: cp -r ${{ github.workspace }}/html/dist ${{ github.workspace }}/bin/x64/Release/html
+
+ - name: Fix NSIS Permissions
+ run: sudo chown -R $(whoami) /usr/share/nsis/Plugins/
+
+ - name: Build Installer
+ uses: joncloud/makensis-action@v4
+ with:
+ script-file: ${{ github.workspace }}/Installer/installer.nsi
+ additional-plugin-paths: ${{ github.workspace }}/Installer/Plugins
+
+ - name: Upload Zip
+ uses: actions/upload-artifact@v3
+ with:
+ name: "VRCX"
+ path: ${{ github.workspace }}/bin/x64/Release/*
+
+ - name: Upload Installer
+ uses: actions/upload-artifact@v3
+ with:
+ name: "VRCX_Setup"
+ path: ${{ github.workspace }}/Installer/VRCX_Setup.exe
\ No newline at end of file
diff --git a/Dotnet/AppApi/AppApi.cs b/Dotnet/AppApi/AppApi.cs
index 7734934f..b9d41267 100644
--- a/Dotnet/AppApi/AppApi.cs
+++ b/Dotnet/AppApi/AppApi.cs
@@ -14,9 +14,9 @@ using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Windows.Forms;
-using Windows.UI.Notifications;
using CefSharp;
using librsync.net;
+using Microsoft.Toolkit.Uwp.Notifications;
using Microsoft.Win32;
using NLog;
@@ -106,7 +106,10 @@ namespace VRCX
if (url.StartsWith("http://") ||
url.StartsWith("https://"))
{
- Process.Start(url).Close();
+ Process.Start(new ProcessStartInfo(url)
+ {
+ UseShellExecute = true
+ });
}
}
@@ -182,20 +185,18 @@ namespace VRCX
/// The optional image to display in the notification.
public void DesktopNotification(string BoldText, string Text = "", string Image = "")
{
- var toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastImageAndText02);
- var stringElements = toastXml.GetElementsByTagName("text");
- var imagePath = Path.Combine(Program.BaseDirectory, "VRCX.ico");
- if (!string.IsNullOrEmpty(Image))
- {
- imagePath = Image;
- }
+ ToastContentBuilder builder = new ToastContentBuilder();
+
+ if (Uri.TryCreate(Image, UriKind.Absolute, out Uri uri))
+ builder.AddAppLogoOverride(uri);
- stringElements[0].AppendChild(toastXml.CreateTextNode(BoldText));
- stringElements[1].AppendChild(toastXml.CreateTextNode(Text));
- var imageElements = toastXml.GetElementsByTagName("image");
- imageElements[0].Attributes.GetNamedItem("src").NodeValue = imagePath;
- var toast = new ToastNotification(toastXml);
- ToastNotificationManager.CreateToastNotifier("VRCX").Show(toast);
+ if (!string.IsNullOrEmpty(BoldText))
+ builder.AddText(BoldText);
+
+ if (!string.IsNullOrEmpty(Text))
+ builder.AddText(Text);
+
+ builder.Show();
}
///
@@ -229,7 +230,8 @@ namespace VRCX
{
IPCServer.Send(new IPCPacket
{
- Type = "VRCXLaunch"
+ Type = "VRCXLaunch",
+ MsgType = "VRCXLaunch"
});
}
diff --git a/Dotnet/AppApi/RegistryPlayerPrefs.cs b/Dotnet/AppApi/RegistryPlayerPrefs.cs
index 99e1761d..e0e11a79 100644
--- a/Dotnet/AppApi/RegistryPlayerPrefs.cs
+++ b/Dotnet/AppApi/RegistryPlayerPrefs.cs
@@ -14,27 +14,25 @@ namespace VRCX
public partial class AppApi
{
[DllImport("advapi32.dll", CharSet = CharSet.Ansi, SetLastError = true)]
- public static extern int RegSetValueExA(
- IntPtr hKey,
- string lpValueName,
- int reserved,
+ public static extern uint RegSetValueEx(
+ UIntPtr hKey,
+ [MarshalAs(UnmanagedType.LPStr)] string lpValueName,
+ int Reserved,
RegistryValueKind dwType,
byte[] lpData,
- int cbData
- );
-
+ int cbData);
+
[DllImport("advapi32.dll", CharSet = CharSet.Ansi, SetLastError = true)]
- public static extern int RegOpenKeyExA(
- IntPtr hKey,
- string lpSubKey,
+ public static extern int RegOpenKeyEx(
+ UIntPtr hKey,
+ string subKey,
int ulOptions,
int samDesired,
- out IntPtr phkResult
- );
-
+ out UIntPtr hkResult);
+
[DllImport("advapi32.dll")]
- public static extern int RegCloseKey(IntPtr hKey);
-
+ public static extern int RegCloseKey(UIntPtr hKey);
+
public string AddHashToKeyName(string key)
{
// https://discussions.unity.com/t/playerprefs-changing-the-name-of-keys/30332/4
@@ -44,7 +42,7 @@ namespace VRCX
hash = (hash * 33) ^ c;
return key + "_h" + hash;
}
-
+
///
/// Retrieves the value of the specified key from the VRChat group in the windows registry.
///
@@ -94,7 +92,7 @@ namespace VRCX
{
if (regKey == null)
return false;
-
+
object setValue = null;
switch (type)
{
@@ -109,13 +107,13 @@ namespace VRCX
if (setValue == null)
return false;
-
+
regKey.SetValue(keyName, setValue, type);
}
return true;
}
-
+
///
/// Sets the value of the specified key in the VRChat group in the windows registry.
///
@@ -124,20 +122,20 @@ namespace VRCX
public void SetVRChatRegistryKey(string key, byte[] value)
{
var keyName = AddHashToKeyName(key);
- var hKey = (IntPtr)0x80000001; // HKEY_LOCAL_MACHINE
+ var hKey = (UIntPtr)0x80000001; // HKEY_LOCAL_MACHINE
const int keyWrite = 0x20006;
const string keyFolder = @"SOFTWARE\VRChat\VRChat";
- var openKeyResult = RegOpenKeyExA(hKey, keyFolder, 0, keyWrite, out var folderPointer);
+ var openKeyResult = RegOpenKeyEx(hKey, keyFolder, 0, keyWrite, out var folderPointer);
if (openKeyResult != 0)
throw new Exception("Error opening registry key. Error code: " + openKeyResult);
-
- var setKeyResult = RegSetValueExA(folderPointer, keyName, 0, RegistryValueKind.DWord, value, value.Length);
+
+ var setKeyResult = RegSetValueEx(folderPointer, keyName, 0, RegistryValueKind.DWord, value, value.Length);
if (setKeyResult != 0)
throw new Exception("Error setting registry value. Error code: " + setKeyResult);
RegCloseKey(hKey);
}
-
+
public Dictionary> GetVRChatRegistry()
{
var output = new Dictionary>();
@@ -147,13 +145,17 @@ namespace VRCX
throw new Exception("Nothing to backup.");
var keys = regKey.GetValueNames();
+
+ Span spanLong = stackalloc long[1];
+ Span doubleSpan = MemoryMarshal.Cast(spanLong);
+
foreach (var key in keys)
{
var data = regKey.GetValue(key);
var index = key.LastIndexOf("_h", StringComparison.Ordinal);
if (index <= 0)
continue;
-
+
var keyName = key.Substring(0, index);
if (data == null)
continue;
@@ -181,9 +183,9 @@ namespace VRCX
output.Add(keyName, dwordDict);
break;
}
-
- Span spanLong = stackalloc long[] { (long)data };
- var doubleValue = MemoryMarshal.Cast(spanLong)[0];
+
+ spanLong[0] = (long)data;
+ var doubleValue = doubleSpan[0];
var floatDict = new Dictionary
{
{ "data", doubleValue },
@@ -191,7 +193,7 @@ namespace VRCX
};
output.Add(keyName, floatDict);
break;
-
+
default:
Debug.WriteLine($"Unknown registry value kind: {type}");
break;
@@ -225,20 +227,20 @@ namespace VRCX
SetVRChatRegistryKey(item.Key, dataBytes);
continue;
}
-
+
if (int.TryParse(data.ToString(), out var intValue))
{
SetVRChatRegistryKey(item.Key, intValue, type);
continue;
}
-
+
throw new Exception("Unknown number type: " + item.Key);
}
-
+
SetVRChatRegistryKey(item.Key, data, type);
}
}
-
+
public bool HasVRChatRegistryFolder()
{
using (var regKey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\VRChat\VRChat"))
@@ -258,7 +260,7 @@ namespace VRCX
throw new Exception("Error creating registry key.");
}
}
-
+
public void DeleteVRChatRegistryFolder()
{
using (var regKey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\VRChat\VRChat"))
@@ -269,7 +271,7 @@ namespace VRCX
Registry.CurrentUser.DeleteSubKeyTree(@"SOFTWARE\VRChat\VRChat");
}
}
-
+
///
/// Opens a file dialog to select a VRChat registry backup JSON file.
///
@@ -298,7 +300,7 @@ namespace VRCX
var path = openFileDialog.FileName;
if (string.IsNullOrEmpty(path))
return;
-
+
// return file contents
var json = File.ReadAllText(path);
ExecuteAppFunction("restoreVrcRegistryFromFile", json);
diff --git a/Dotnet/AutoAppLaunchManager.cs b/Dotnet/AutoAppLaunchManager.cs
index fe7abdf0..decea820 100644
--- a/Dotnet/AutoAppLaunchManager.cs
+++ b/Dotnet/AutoAppLaunchManager.cs
@@ -5,6 +5,7 @@ using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Timers;
+using NLog;
namespace VRCX
{
@@ -14,6 +15,7 @@ namespace VRCX
public class AutoAppLaunchManager
{
public static AutoAppLaunchManager Instance { get; private set; }
+ private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public static readonly string VRChatProcessName = "VRChat";
public bool Enabled = false;
@@ -215,14 +217,23 @@ namespace VRCX
/// Starts a new child process.
///
/// The path.
- internal void StartChildProcess(string path)
+ private void StartChildProcess(string path)
{
try
{
- using (var process = Process.Start(path))
- if (process != null)
- startedProcesses.Add(path, new HashSet() { process.Id });
- } catch { }
+ var process = new Process();
+ process.StartInfo = new ProcessStartInfo(path)
+ {
+ UseShellExecute = true
+ };
+ process.Start();
+ if (process.Id != 0)
+ startedProcesses.Add(path, new HashSet() { process.Id });
+ }
+ catch (Exception ex)
+ {
+ logger.Error(ex);
+ }
}
///
diff --git a/Dotnet/Cef/CefService.cs b/Dotnet/Cef/CefService.cs
index b70e3188..0643c9b1 100644
--- a/Dotnet/Cef/CefService.cs
+++ b/Dotnet/Cef/CefService.cs
@@ -56,7 +56,7 @@ namespace VRCX
cefSettings.CefCommandLineArgs["remote-allow-origins"] = "*";
}
- CefSharpSettings.WcfEnabled = true; // TOOD: REMOVE THIS LINE YO (needed for synchronous configRepository)
+ //CefSharpSettings.WcfEnabled = true; // TOOD: REMOVE THIS LINE YO (needed for synchronous configRepository)
CefSharpSettings.ShutdownOnExit = false;
if (Cef.Initialize(cefSettings) == false)
diff --git a/Dotnet/MainForm.cs b/Dotnet/MainForm.cs
index 1fd66c5e..5f0fe627 100644
--- a/Dotnet/MainForm.cs
+++ b/Dotnet/MainForm.cs
@@ -110,7 +110,7 @@ namespace VRCX
if ("true".Equals(VRCXStorage.Instance.Get("VRCX_StartAsMinimizedState")) &&
"true".Equals(VRCXStorage.Instance.Get("VRCX_CloseToTray")))
{
- BeginInvoke(new MethodInvoker(Hide));
+ BeginInvoke(Hide);
}
else
{
diff --git a/Dotnet/Overlay/OffScreenBrowser.cs b/Dotnet/Overlay/OffScreenBrowser.cs
index 9dbd5f70..48c2f871 100644
--- a/Dotnet/Overlay/OffScreenBrowser.cs
+++ b/Dotnet/Overlay/OffScreenBrowser.cs
@@ -12,6 +12,7 @@ using SharpDX.Direct3D11;
using System;
using System.Runtime.InteropServices;
using System.Threading;
+using Range = CefSharp.Structs.Range;
namespace VRCX
{
@@ -87,7 +88,7 @@ namespace VRCX
var rowPitch = dataBox.RowPitch;
if (pitch == rowPitch)
{
- WinApi.CopyMemory(
+ WinApi.RtlCopyMemory(
destinationPtr,
sourcePtr,
(uint)(_width * _height * 4)
@@ -97,7 +98,7 @@ namespace VRCX
{
for (var y = _height; y > 0; --y)
{
- WinApi.CopyMemory(
+ WinApi.RtlCopyMemory(
destinationPtr,
sourcePtr,
(uint)pitch
@@ -168,7 +169,7 @@ namespace VRCX
);
}
- WinApi.CopyMemory(
+ WinApi.RtlCopyMemory(
_paintBuffer.AddrOfPinnedObject(),
buffer,
(uint)(width * height * 4)
diff --git a/Dotnet/Overlay/VRCXVR.cs b/Dotnet/Overlay/VRCXVR.cs
index 7aaccf51..96bbcf52 100644
--- a/Dotnet/Overlay/VRCXVR.cs
+++ b/Dotnet/Overlay/VRCXVR.cs
@@ -263,11 +263,11 @@ namespace VRCX
}
}
- _browser2.Dispose();
- _browser1.Dispose();
- _texture2.Dispose();
- _texture1.Dispose();
- _device.Dispose();
+ _browser2?.Dispose();
+ _browser1?.Dispose();
+ _texture2?.Dispose();
+ _texture1?.Dispose();
+ _device?.Dispose();
}
public void SetActive(bool active, bool hmdOverlay, bool wristOverlay, bool menuButton, int overlayHand)
diff --git a/Dotnet/SQLite.cs b/Dotnet/SQLite.cs
index 93b78c97..e33ee80d 100644
--- a/Dotnet/SQLite.cs
+++ b/Dotnet/SQLite.cs
@@ -2003,7 +2003,7 @@ namespace SQLite
throw NotNullConstraintViolationException.New (ex, map, obj);
}
- throw ex;
+ throw;
}
if (rowsAffected > 0)
diff --git a/Dotnet/Update.cs b/Dotnet/Update.cs
index 5fcd75cb..80abddf6 100644
--- a/Dotnet/Update.cs
+++ b/Dotnet/Update.cs
@@ -32,7 +32,7 @@ namespace VRCX
Install();
}
- public static void Install()
+ private static void Install()
{
try
{
@@ -42,7 +42,9 @@ namespace VRCX
StartInfo = new ProcessStartInfo
{
FileName = VRCX_Setup_Executable,
- Arguments = "/S"
+ Arguments = "/S",
+ UseShellExecute = true,
+ WorkingDirectory = Program.AppDataDirectory
}
};
VRCXProcess.Start();
diff --git a/Dotnet/Util.cs b/Dotnet/Util.cs
index 18689fb3..73f1f60d 100644
--- a/Dotnet/Util.cs
+++ b/Dotnet/Util.cs
@@ -8,14 +8,14 @@ namespace VRCX
public static void ApplyJavascriptBindings(IJavascriptObjectRepository repository)
{
repository.NameConverter = null;
- repository.Register("AppApi", AppApi.Instance, true);
- repository.Register("SharedVariable", SharedVariable.Instance, false);
- repository.Register("WebApi", WebApi.Instance, true);
- repository.Register("VRCXStorage", VRCXStorage.Instance, true);
- repository.Register("SQLite", SQLiteLegacy.Instance, true);
- repository.Register("LogWatcher", LogWatcher.Instance, true);
- repository.Register("Discord", Discord.Instance, true);
- repository.Register("AssetBundleCacher", AssetBundleCacher.Instance, true);
+ repository.Register("AppApi", AppApi.Instance);
+ repository.Register("SharedVariable", SharedVariable.Instance);
+ repository.Register("WebApi", WebApi.Instance);
+ repository.Register("VRCXStorage", VRCXStorage.Instance);
+ repository.Register("SQLite", SQLiteLegacy.Instance);
+ repository.Register("LogWatcher", LogWatcher.Instance);
+ repository.Register("Discord", Discord.Instance);
+ repository.Register("AssetBundleCacher", AssetBundleCacher.Instance);
}
}
}
diff --git a/Dotnet/WebApi.cs b/Dotnet/WebApi.cs
index 94308506..e627d32c 100644
--- a/Dotnet/WebApi.cs
+++ b/Dotnet/WebApi.cs
@@ -70,7 +70,9 @@ namespace VRCX
{
using (var stream = new MemoryStream(Convert.FromBase64String((string)values[0])))
{
- _cookieContainer = (CookieContainer)new BinaryFormatter().Deserialize(stream);
+ _cookieContainer = new CookieContainer();
+ _cookieContainer.Add(System.Text.Json.JsonSerializer.Deserialize(stream));
+ //_cookieContainer = (CookieContainer)new BinaryFormatter().Deserialize(stream);
}
}
catch
@@ -94,7 +96,8 @@ namespace VRCX
{
using (var memoryStream = new MemoryStream())
{
- new BinaryFormatter().Serialize(memoryStream, _cookieContainer);
+ System.Text.Json.JsonSerializer.Serialize(memoryStream, _cookieContainer.GetAllCookies());
+ //new BinaryFormatter().Serialize(memoryStream, _cookieContainer);
SQLiteLegacy.Instance.ExecuteNonQuery(
"INSERT OR REPLACE INTO `cookies` (`key`, `value`) VALUES (@key, @value)",
new Dictionary() {
@@ -116,7 +119,8 @@ namespace VRCX
using (var memoryStream = new MemoryStream())
{
- new BinaryFormatter().Serialize(memoryStream, _cookieContainer);
+ System.Text.Json.JsonSerializer.Serialize(memoryStream, _cookieContainer.GetAllCookies());
+ //new BinaryFormatter().Serialize(memoryStream, _cookieContainer);
return Convert.ToBase64String(memoryStream.ToArray());
}
}
@@ -125,7 +129,9 @@ namespace VRCX
{
using (var stream = new MemoryStream(Convert.FromBase64String(cookies)))
{
- _cookieContainer = (CookieContainer)new BinaryFormatter().Deserialize(stream);
+ //_cookieContainer = (CookieContainer)new BinaryFormatter().Deserialize(stream);
+ _cookieContainer = new CookieContainer();
+ _cookieContainer.Add(System.Text.Json.JsonSerializer.Deserialize(stream));
}
_cookieDirty = true; // force cookies to be saved for lastUserLoggedIn
diff --git a/Dotnet/WinApi.cs b/Dotnet/WinApi.cs
index ab6768a6..3790d82a 100644
--- a/Dotnet/WinApi.cs
+++ b/Dotnet/WinApi.cs
@@ -12,7 +12,7 @@ namespace VRCX
public static class WinApi
{
[DllImport("kernel32.dll", SetLastError = false)]
- public static extern void CopyMemory(IntPtr destination, IntPtr source, uint length);
+ public static extern void RtlCopyMemory(IntPtr destination, IntPtr source, uint length);
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
diff --git a/Installer/installer.nsi b/Installer/installer.nsi
index 79c3a70a..9e677a60 100644
--- a/Installer/installer.nsi
+++ b/Installer/installer.nsi
@@ -46,6 +46,12 @@
!define MUI_ABORTWARNING
+;--------------------------------
+;Icons
+
+ !define MUI_ICON "../VRCX.ico"
+ !define MUI_UNICON "../VRCX.ico"
+
;--------------------------------
;Pages
@@ -112,6 +118,20 @@ Function .onInit
done:
FunctionEnd
+Function CheckAndInstallDotNet
+ nsExec::ExecToStack /OEM 'cmd /c dir "%windir%\system32" | dotnet --list-runtimes | find /c /i "Microsoft.NETCore.App 8"'
+ Pop $0
+ Pop $1
+ StrCpy $2 $1 1
+ StrCmp $2 "1" 0 version_not_found
+ goto version_found
+ version_not_found:
+ inetc::get "https://aka.ms/dotnet/8.0/windowsdesktop-runtime-win-x64.exe" $TEMP\dotnet-runtime-win-x64.exe
+ ExecWait "$TEMP\dotnet-runtime-win-x64.exe /install /quiet /norestart"
+ Delete "$TEMP\dotnet-runtime-win-x64.exe"
+ version_found:
+FunctionEnd
+
Function createDesktopShortcut
CreateShortcut "$DESKTOP\VRCX.lnk" "$INSTDIR\VRCX.exe"
FunctionEnd
@@ -142,9 +162,10 @@ Section "Install" SecInstall
inetc::get "https://aka.ms/vs/17/release/vc_redist.x64.exe" $TEMP\vcredist_x64.exe
ExecWait "$TEMP\vcredist_x64.exe /install /quiet /norestart"
Delete "$TEMP\vcredist_x64.exe"
-
VSRedistInstalled:
+ Call CheckAndInstallDotNet
+
SetOutPath "$INSTDIR"
File /r /x *.log /x *.pdb "..\bin\x64\Release\*.*"
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
index 19df680c..4fb72ab1 100644
--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -1,18 +1,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-
-// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
-// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
-// 이러한 특성 값을 변경하세요.
-[assembly: AssemblyTitle("VRCX")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("VRCX")]
-[assembly: AssemblyCopyright("vrcx-team, pypy, natsumi")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
+using System.Runtime.Versioning;
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
@@ -21,16 +10,4 @@ using System.Runtime.InteropServices;
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
[assembly: Guid("d9f66f2e-3ed9-4d53-a6ac-adcc1513562a")]
-
-// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
-//
-// 주 버전
-// 부 버전
-// 빌드 번호
-// 수정 버전
-//
-// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
-// 지정되도록 할 수 있습니다.
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: SupportedOSPlatform("windows")]
diff --git a/VRCX.csproj b/VRCX.csproj
index 19ca1cdd..14171e63 100644
--- a/VRCX.csproj
+++ b/VRCX.csproj
@@ -1,161 +1,89 @@
-
-
-
+
- Debug
- AnyCPU
- {D9F66F2E-3ED9-4D53-A6AC-ADCC1513562A}
WinExe
- VRCX
- VRCX
- v4.7.2
- 512
- true
- true
-
-
- false
-
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
+ net8-windows10.0.19041.0
+ x64
+ true
0
1.0.0.%2a
- false
- true
+ VRCX
+ VRCX
+ vrcx-team, pypy, natsumi
+ bin\$(Platform)\$(Configuration)\
+ false
+ false
+ VRCX
+ VRCX
+ VRCX.png
+ https://github.com/vrcx-team/VRCX
+
- true
- bin\x64\Debug\
- DEBUG;TRACE
full
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
- bin\x64\Release\
- TRACE
- true
pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
+
VRCX.ico
+
+ true
+
+
+ win-x64
+ false
app.manifest
+
+ true
+ false
+ false
+ false
+
-
- librsync.net\Blake2Sharp.dll
-
-
- librsync.net\librsync.net.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ librsync.net\Blake2Sharp.dll
+
+
+ librsync.net\librsync.net.dll
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
Form
-
+
MainForm.cs
-
-
-
-
+
Form
-
+
VRForm.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
Form
-
-
-
+
MainForm.cs
Designer
-
+
VRForm.cs
Designer
-
+
ResXFileCodeGenerator
Resources.Designer.cs
Designer
-
+
True
Resources.resx
True
@@ -165,7 +93,7 @@
SettingsSingleFileGenerator
Settings.Designer.cs
-
+
True
Settings.settings
True
@@ -174,9 +102,6 @@
Always
-
-
-
PreserveNewest
@@ -192,66 +117,22 @@
-
- False
- Microsoft .NET Framework 4.5.2 %28x86 and x64%29
- true
-
-
- False
- .NET Framework 3.5 SP1
- false
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- 119.1.20
-
-
- 119.1.20
-
-
- 119.1.20
-
-
- 1.2.1.24
-
-
- 7.1.3
-
-
- 13.0.3
-
-
- 5.2.5
-
-
- 4.2.0
-
-
- 4.2.0
-
-
- 4.2.0
-
-
- 4.2.0
-
-
- 4.2.0
-
-
- 1.0.118
-
-
- 7.0.3
-
-
-
-
- true
- false
- false
- false
-
+
+
+
+
\ No newline at end of file
diff --git a/VRCX.sln b/VRCX.sln
index 5fb4fec9..184f3634 100644
--- a/VRCX.sln
+++ b/VRCX.sln
@@ -1,9 +1,14 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.31605.320
+# Visual Studio Version 17
+VisualStudioVersion = 17.8.34309.116
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VRCX", "VRCX.csproj", "{D9F66F2E-3ED9-4D53-A6AC-ADCC1513562A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VRCX", "VRCX.csproj", "{D9F66F2E-3ED9-4D53-A6AC-ADCC1513562A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8612F19B-3C1F-4B17-8679-A2747A53EC6B}"
+ ProjectSection(SolutionItems) = preProject
+ .editorconfig = .editorconfig
+ EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/build-dotnet.cmd b/build-dotnet.cmd
index b4c96e30..0c733c6a 100644
--- a/build-dotnet.cmd
+++ b/build-dotnet.cmd
@@ -1,4 +1,4 @@
@echo off
-msbuild VRCX.sln -p:Configuration=Release -p:Platform=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m
+dotnet build VRCX.sln -p:Configuration=Release -p:Platform=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m
mklink /J "%~dp0\bin\x64\Release\html" "%~dp0\html\dist"
pause
diff --git a/html/.eslintrc.json b/html/.eslintrc.json
index 20cfa458..426b210f 100644
--- a/html/.eslintrc.json
+++ b/html/.eslintrc.json
@@ -87,6 +87,7 @@
"sort-vars": 0,
"strict": 0,
"vars-on-top": 0,
- "object-curly-spacing": ["error", "always"]
+ "object-curly-spacing": ["error", "always"],
+ "require-atomic-updates": 0
}
}
diff --git a/html/src/app.js b/html/src/app.js
index 10ea9027..c0ae5dd6 100644
--- a/html/src/app.js
+++ b/html/src/app.js
@@ -5228,7 +5228,7 @@ speechSynthesis.getVoices();
nextAutoStateChange: 0,
isDiscordActive: false,
isGameRunning: false,
- isGameNoVR: configRepository.getBool('isGameNoVR'),
+ isGameNoVR: true,
isSteamVRRunning: false,
isHmdAfk: false,
appVersion: '',
@@ -5240,19 +5240,18 @@ speechSynthesis.getVoices();
methods: {},
watch: {},
el: '#x-app',
- mounted() {
- this.changeThemeMode();
- AppApi.SetUserAgent();
- AppApi.GetVersion().then((version) => {
- this.appVersion = version;
- this.comapreAppVersion();
- this.setBranch();
- if (this.autoUpdateVRCX !== 'Off') {
- this.checkForVRCXUpdate();
- }
- });
- AppApi.CheckGameRunning();
- AppApi.SetAppLauncherSettings(
+ async mounted() {
+ await this.changeThemeMode();
+ await AppApi.SetUserAgent();
+ this.appVersion = await AppApi.GetVersion();
+ await this.compareAppVersion();
+ await this.setBranch();
+ if (this.autoUpdateVRCX !== 'Off') {
+ this.checkForVRCXUpdate();
+ }
+ await AppApi.CheckGameRunning();
+ this.isGameNoVR = await configRepository.getBool('isGameNoVR');
+ await AppApi.SetAppLauncherSettings(
this.enableAppLauncher,
this.enableAppLauncherAutoClose
);
@@ -5275,12 +5274,13 @@ speechSynthesis.getVoices();
this.refreshCustomScript();
this.checkVRChatDebugLogging();
this.checkAutoBackupRestoreVrcRegistry();
- this.migrateStoredUsers();
- this.$nextTick(function () {
+ await this.migrateStoredUsers();
+ this.$nextTick(async function () {
this.$el.style.display = '';
if (
!this.enablePrimaryPassword &&
- configRepository.getString('lastUserLoggedIn') !== null
+ (await configRepository.getString('lastUserLoggedIn')) !==
+ null
) {
// login at startup
this.loginForm.loading = true;
@@ -5349,27 +5349,35 @@ speechSynthesis.getVoices();
});
};
- $app.methods.comapreAppVersion = function () {
+ $app.methods.compareAppVersion = async function () {
if (!this.appVersion) {
return;
}
- var lastVersion = configRepository.getString(
+ var lastVersion = await configRepository.getString(
'VRCX_lastVRCXVersion',
''
);
if (!lastVersion) {
- configRepository.setString('VRCX_lastVRCXVersion', this.appVersion);
+ await configRepository.setString(
+ 'VRCX_lastVRCXVersion',
+ this.appVersion
+ );
return;
}
if (lastVersion !== this.appVersion) {
- configRepository.setString('VRCX_lastVRCXVersion', this.appVersion);
- if (configRepository.getString('VRCX_branch') === 'Stable') {
+ await configRepository.setString(
+ 'VRCX_lastVRCXVersion',
+ this.appVersion
+ );
+ if (
+ (await configRepository.getString('VRCX_branch')) === 'Stable'
+ ) {
this.showChangeLogDialog();
}
}
};
- $app.methods.setBranch = function () {
+ $app.methods.setBranch = async function () {
if (!this.appVersion) {
return;
}
@@ -5378,7 +5386,7 @@ speechSynthesis.getVoices();
} else {
this.branch = 'Stable';
}
- configRepository.setString('VRCX_branch', this.branch);
+ await configRepository.setString('VRCX_branch', this.branch);
};
$app.methods.languageClass = function (language) {
@@ -5453,7 +5461,7 @@ speechSynthesis.getVoices();
workerTimers.setTimeout(() => this.updateLoop(), 500);
};
- $app.methods.updateIsGameRunning = function (
+ $app.methods.updateIsGameRunning = async function (
isGameRunning,
isSteamVRRunning,
isHmdAfk
@@ -5464,7 +5472,7 @@ speechSynthesis.getVoices();
API.currentUser.$online_for = Date.now();
API.currentUser.$offline_for = '';
} else {
- configRepository.setBool('isGameNoVR', this.isGameNoVR);
+ await configRepository.setBool('isGameNoVR', this.isGameNoVR);
API.currentUser.$online_for = '';
API.currentUser.$offline_for = Date.now();
this.removeAllQueuedInstances();
@@ -7398,7 +7406,7 @@ speechSynthesis.getVoices();
webApiService.clearCookies();
// eslint-disable-next-line require-atomic-updates
$app.loginForm.lastUserLoggedIn = '';
- configRepository.remove('lastUserLoggedIn');
+ await configRepository.remove('lastUserLoggedIn');
// workerTimers.setTimeout(() => location.reload(), 500);
});
@@ -7425,7 +7433,7 @@ speechSynthesis.getVoices();
});
};
- $app.data.enablePrimaryPassword = configRepository.getBool(
+ $app.data.enablePrimaryPassword = await configRepository.getBool(
'enablePrimaryPassword',
false
);
@@ -7460,7 +7468,7 @@ speechSynthesis.getVoices();
.loginParmas.password,
value
)
- .then((pt) => {
+ .then(async (pt) => {
this.saveCredentials = {
username:
this.loginForm.savedCredentials[userId]
@@ -7470,28 +7478,31 @@ speechSynthesis.getVoices();
this.updateStoredUser(
this.loginForm.savedCredentials[userId].user
);
- configRepository.setBool(
+ await configRepository.setBool(
'enablePrimaryPassword',
false
);
})
- .catch(() => {
+ .catch(async () => {
this.enablePrimaryPassword = true;
- configRepository.setBool(
+ await configRepository.setBool(
'enablePrimaryPassword',
true
);
});
}
})
- .catch(() => {
+ .catch(async () => {
this.enablePrimaryPassword = true;
- configRepository.setBool('enablePrimaryPassword', true);
+ await configRepository.setBool(
+ 'enablePrimaryPassword',
+ true
+ );
});
}
};
- $app.methods.setPrimaryPassword = function () {
- configRepository.setBool(
+ $app.methods.setPrimaryPassword = async function () {
+ await configRepository.setBool(
'enablePrimaryPassword',
this.enablePrimaryPassword
);
@@ -7522,9 +7533,9 @@ speechSynthesis.getVoices();
$app.methods.updateStoredUser = async function (currentUser) {
var savedCredentials = {};
- if (configRepository.getString('savedCredentials') !== null) {
+ if ((await configRepository.getString('savedCredentials')) !== null) {
savedCredentials = JSON.parse(
- configRepository.getString('savedCredentials')
+ await configRepository.getString('savedCredentials')
);
}
if (this.saveCredentials) {
@@ -7541,16 +7552,19 @@ speechSynthesis.getVoices();
}
this.loginForm.savedCredentials = savedCredentials;
var jsonCredentialsArray = JSON.stringify(savedCredentials);
- configRepository.setString('savedCredentials', jsonCredentialsArray);
+ await configRepository.setString(
+ 'savedCredentials',
+ jsonCredentialsArray
+ );
this.loginForm.lastUserLoggedIn = currentUser.id;
- configRepository.setString('lastUserLoggedIn', currentUser.id);
+ await configRepository.setString('lastUserLoggedIn', currentUser.id);
};
- $app.methods.migrateStoredUsers = function () {
+ $app.methods.migrateStoredUsers = async function () {
var savedCredentials = {};
- if (configRepository.getString('savedCredentials') !== null) {
+ if ((await configRepository.getString('savedCredentials')) !== null) {
savedCredentials = JSON.parse(
- configRepository.getString('savedCredentials')
+ await configRepository.getString('savedCredentials')
);
}
for (let name in savedCredentials) {
@@ -7560,7 +7574,7 @@ speechSynthesis.getVoices();
delete savedCredentials[name];
}
}
- configRepository.setString(
+ await configRepository.setString(
'savedCredentials',
JSON.stringify(savedCredentials)
);
@@ -7641,19 +7655,19 @@ speechSynthesis.getVoices();
});
};
- $app.methods.deleteSavedLogin = function (userId) {
+ $app.methods.deleteSavedLogin = async function (userId) {
var savedCredentials = JSON.parse(
- configRepository.getString('savedCredentials')
+ await configRepository.getString('savedCredentials')
);
delete savedCredentials[userId];
// Disable primary password when no account is available.
if (Object.keys(savedCredentials).length === 0) {
this.enablePrimaryPassword = false;
- configRepository.setBool('enablePrimaryPassword', false);
+ await configRepository.setBool('enablePrimaryPassword', false);
}
this.loginForm.savedCredentials = savedCredentials;
var jsonCredentials = JSON.stringify(savedCredentials);
- configRepository.setString('savedCredentials', jsonCredentials);
+ await configRepository.setString('savedCredentials', jsonCredentials);
new Noty({
type: 'success',
text: 'Account removed.'
@@ -7685,10 +7699,12 @@ speechSynthesis.getVoices();
websocket: '',
saveCredentials: false,
savedCredentials:
- configRepository.getString('savedCredentials') !== null
- ? JSON.parse(configRepository.getString('savedCredentials'))
+ (await configRepository.getString('savedCredentials')) !== null
+ ? JSON.parse(
+ await configRepository.getString('savedCredentials')
+ )
: {},
- lastUserLoggedIn: configRepository.getString('lastUserLoggedIn'),
+ lastUserLoggedIn: await configRepository.getString('lastUserLoggedIn'),
rules: {
username: [
{
@@ -9102,7 +9118,10 @@ speechSynthesis.getVoices();
return true;
};
- $app.data.tablePageSize = configRepository.getInt('VRCX_tablePageSize', 15);
+ $app.data.tablePageSize = await configRepository.getInt(
+ 'VRCX_tablePageSize',
+ 15
+ );
$app.data.feedTable = {
data: [],
@@ -9129,11 +9148,14 @@ speechSynthesis.getVoices();
$app.data.feedSessionTable = [];
$app.methods.feedTableLookup = async function () {
- configRepository.setString(
+ await configRepository.setString(
'VRCX_feedTableFilters',
JSON.stringify(this.feedTable.filter)
);
- configRepository.setBool('VRCX_feedTableVIPFilter', this.feedTable.vip);
+ await configRepository.setBool(
+ 'VRCX_feedTableVIPFilter',
+ this.feedTable.vip
+ );
this.feedTable.loading = true;
var vipList = [];
if (this.feedTable.vip) {
@@ -9177,7 +9199,9 @@ speechSynthesis.getVoices();
await this.refreshNotifications();
await $app.getCurrentUserGroups();
try {
- if (configRepository.getBool(`friendLogInit_${args.json.id}`)) {
+ if (
+ await configRepository.getBool(`friendLogInit_${args.json.id}`)
+ ) {
await $app.getFriendLog();
} else {
await $app.initFriendLog(args.json.id);
@@ -9742,7 +9766,7 @@ speechSynthesis.getVoices();
$app.data.gameLogSessionTable = [];
$app.methods.gameLogTableLookup = async function () {
- configRepository.setString(
+ await configRepository.setString(
'VRCX_gameLogTableFilters',
JSON.stringify(this.gameLogTable.filter)
);
@@ -10644,7 +10668,7 @@ speechSynthesis.getVoices();
'MasterMigrate'
];
- $app.methods.photonEventTableFilterChange = function () {
+ $app.methods.photonEventTableFilterChange = async function () {
this.photonEventTable.filters[0].value = this.photonEventTableFilter;
this.photonEventTable.filters[1].value =
this.photonEventTableTypeFilter;
@@ -10654,11 +10678,11 @@ speechSynthesis.getVoices();
this.photonEventTablePrevious.filters[1].value =
this.photonEventTableTypeFilter;
- configRepository.setString(
+ await configRepository.setString(
'VRCX_photonEventTypeFilter',
JSON.stringify(this.photonEventTableTypeFilter)
);
- configRepository.setString(
+ await configRepository.setString(
'VRCX_photonEventTypeOverlayFilter',
JSON.stringify(this.photonEventTableTypeOverlayFilter)
);
@@ -13285,9 +13309,8 @@ speechSynthesis.getVoices();
}
} else {
// try fetch from local avatar history
- var avatar = await database.getCachedAvatarById(
- objectId
- );
+ var avatar =
+ await database.getCachedAvatarById(objectId);
if (avatar) {
ctx.ref = avatar;
ctx.name = avatar.name;
@@ -13562,7 +13585,7 @@ speechSynthesis.getVoices();
sqlValues.unshift(row);
}
database.setFriendLogCurrentArray(sqlValues);
- configRepository.setBool(`friendLogInit_${userId}`, true);
+ await configRepository.setBool(`friendLogInit_${userId}`, true);
this.friendLogInitStatus = true;
};
@@ -13574,7 +13597,7 @@ speechSynthesis.getVoices();
);
database.addFriendLogHistoryArray(this.friendLogTable.data);
VRCXStorage.Remove(`${userId}_friendLogTable`);
- configRepository.setBool(`friendLogInit_${userId}`, true);
+ await configRepository.setBool(`friendLogInit_${userId}`, true);
};
$app.methods.getFriendLog = async function () {
@@ -14048,48 +14071,55 @@ speechSynthesis.getVoices();
};
// Save Table Filters
- $app.methods.saveTableFilters = function () {
- configRepository.setString(
+ $app.methods.saveTableFilters = async function () {
+ await configRepository.setString(
'VRCX_friendLogTableFilters',
JSON.stringify(this.friendLogTable.filters[0].value)
);
- configRepository.setString(
+ await configRepository.setString(
'VRCX_playerModerationTableFilters',
JSON.stringify(this.playerModerationTable.filters[0].value)
);
- configRepository.setString(
+ await configRepository.setString(
'VRCX_notificationTableFilters',
JSON.stringify(this.notificationTable.filters[0].value)
);
};
+
$app.data.feedTable.filter = JSON.parse(
- configRepository.getString('VRCX_feedTableFilters', '[]')
+ await configRepository.getString('VRCX_feedTableFilters', '[]')
);
- $app.data.feedTable.vip = configRepository.getBool(
+ $app.data.feedTable.vip = await configRepository.getBool(
'VRCX_feedTableVIPFilter',
false
);
$app.data.gameLogTable.filter = JSON.parse(
- configRepository.getString('VRCX_gameLogTableFilters', '[]')
+ await configRepository.getString('VRCX_gameLogTableFilters', '[]')
);
$app.data.friendLogTable.filters[0].value = JSON.parse(
- configRepository.getString('VRCX_friendLogTableFilters', '[]')
+ await configRepository.getString('VRCX_friendLogTableFilters', '[]')
);
$app.data.playerModerationTable.filters[0].value = JSON.parse(
- configRepository.getString('VRCX_playerModerationTableFilters', '[]')
+ await configRepository.getString(
+ 'VRCX_playerModerationTableFilters',
+ '[]'
+ )
);
$app.data.notificationTable.filters[0].value = JSON.parse(
- configRepository.getString('VRCX_notificationTableFilters', '[]')
+ await configRepository.getString('VRCX_notificationTableFilters', '[]')
);
$app.data.photonEventTableTypeFilter = JSON.parse(
- configRepository.getString('VRCX_photonEventTypeFilter', '[]')
+ await configRepository.getString('VRCX_photonEventTypeFilter', '[]')
);
$app.data.photonEventTable.filters[1].value =
$app.data.photonEventTableTypeFilter;
$app.data.photonEventTablePrevious.filters[1].value =
$app.data.photonEventTableTypeFilter;
$app.data.photonEventTableTypeOverlayFilter = JSON.parse(
- configRepository.getString('VRCX_photonEventTypeOverlayFilter', '[]')
+ await configRepository.getString(
+ 'VRCX_photonEventTypeOverlayFilter',
+ '[]'
+ )
);
// #endregion
@@ -14208,137 +14238,161 @@ speechSynthesis.getVoices();
layout: 'table'
};
$app.data.visits = 0;
- $app.data.openVR = configRepository.getBool('openVR', false);
- $app.data.openVRAlways = configRepository.getBool('openVRAlways', false);
- $app.data.overlaybutton = configRepository.getBool(
+ $app.data.openVR = await configRepository.getBool('openVR', false);
+ $app.data.openVRAlways = await configRepository.getBool(
+ 'openVRAlways',
+ false
+ );
+ $app.data.overlaybutton = await configRepository.getBool(
'VRCX_overlaybutton',
false
);
- $app.data.overlayHand = configRepository.getInt('VRCX_overlayHand', 0);
- $app.data.hidePrivateFromFeed = configRepository.getBool(
+ $app.data.overlayHand = await configRepository.getInt(
+ 'VRCX_overlayHand',
+ 0
+ );
+ $app.data.hidePrivateFromFeed = await configRepository.getBool(
'VRCX_hidePrivateFromFeed',
false
);
- $app.data.hideDevicesFromFeed = configRepository.getBool(
+ $app.data.hideDevicesFromFeed = await configRepository.getBool(
'VRCX_hideDevicesFromFeed',
false
);
- $app.data.hideCpuUsageFromFeed = configRepository.getBool(
+ $app.data.hideCpuUsageFromFeed = await configRepository.getBool(
'VRCX_hideCpuUsageFromFeed',
false
);
- $app.data.hideUptimeFromFeed = configRepository.getBool(
+ $app.data.hideUptimeFromFeed = await configRepository.getBool(
'VRCX_hideUptimeFromFeed',
false
);
- $app.data.pcUptimeOnFeed = configRepository.getBool(
+ $app.data.pcUptimeOnFeed = await configRepository.getBool(
'VRCX_pcUptimeOnFeed',
false
);
- $app.data.overlayNotifications = configRepository.getBool(
+ $app.data.overlayNotifications = await configRepository.getBool(
'VRCX_overlayNotifications',
true
);
- $app.data.overlayWrist = configRepository.getBool(
+ $app.data.overlayWrist = await configRepository.getBool(
'VRCX_overlayWrist',
false
);
- $app.data.xsNotifications = configRepository.getBool(
+ $app.data.xsNotifications = await configRepository.getBool(
'VRCX_xsNotifications',
true
);
- $app.data.imageNotifications = configRepository.getBool(
+ $app.data.imageNotifications = await configRepository.getBool(
'VRCX_imageNotifications',
true
);
- $app.data.desktopToast = configRepository.getString(
+ $app.data.desktopToast = await configRepository.getString(
'VRCX_desktopToast',
'Never'
);
- $app.data.afkDesktopToast = configRepository.getBool(
+ $app.data.afkDesktopToast = await configRepository.getBool(
'VRCX_afkDesktopToast',
false
);
- $app.data.minimalFeed = configRepository.getBool('VRCX_minimalFeed', false);
- $app.data.displayVRCPlusIconsAsAvatar = configRepository.getBool(
+ $app.data.minimalFeed = await configRepository.getBool(
+ 'VRCX_minimalFeed',
+ false
+ );
+ $app.data.displayVRCPlusIconsAsAvatar = await configRepository.getBool(
'displayVRCPlusIconsAsAvatar',
true
);
- $app.data.hideTooltips = configRepository.getBool(
+ $app.data.hideTooltips = await configRepository.getBool(
'VRCX_hideTooltips',
false
);
- $app.data.notificationTTS = configRepository.getString(
+ $app.data.notificationTTS = await configRepository.getString(
'VRCX_notificationTTS',
'Never'
);
- $app.data.notificationTTSVoice = configRepository.getString(
+ $app.data.notificationTTSVoice = await configRepository.getString(
'VRCX_notificationTTSVoice',
'0'
);
- $app.data.notificationTimeout = configRepository.getString(
+ $app.data.notificationTimeout = await configRepository.getString(
'VRCX_notificationTimeout',
'3000'
);
- $app.data.autoSweepVRChatCache = configRepository.getBool(
+ $app.data.autoSweepVRChatCache = await configRepository.getBool(
'VRCX_autoSweepVRChatCache',
false
);
- $app.data.relaunchVRChatAfterCrash = configRepository.getBool(
+ $app.data.relaunchVRChatAfterCrash = await configRepository.getBool(
'VRCX_relaunchVRChatAfterCrash',
false
);
- $app.data.vrcQuitFix = configRepository.getBool('VRCX_vrcQuitFix', true);
- $app.data.vrBackgroundEnabled = configRepository.getBool(
+ $app.data.vrcQuitFix = await configRepository.getBool(
+ 'VRCX_vrcQuitFix',
+ true
+ );
+ $app.data.vrBackgroundEnabled = await configRepository.getBool(
'VRCX_vrBackgroundEnabled',
false
);
- $app.data.asideWidth = configRepository.getInt('VRCX_sidePanelWidth', 300);
- if (configRepository.getInt('VRCX_asidewidth')) {
+ $app.data.asideWidth = await configRepository.getInt(
+ 'VRCX_sidePanelWidth',
+ 300
+ );
+ if (await configRepository.getInt('VRCX_asidewidth')) {
// migrate to new defaults
- $app.data.asideWidth = configRepository.getInt('VRCX_asidewidth');
+ $app.data.asideWidth = await configRepository.getInt('VRCX_asidewidth');
if ($app.data.asideWidth < 300) {
$app.data.asideWidth = 300;
}
- configRepository.setInt('VRCX_sidePanelWidth', $app.data.asideWidth);
- configRepository.remove('VRCX_asidewidth');
+ await configRepository.setInt(
+ 'VRCX_sidePanelWidth',
+ $app.data.asideWidth
+ );
+ await configRepository.remove('VRCX_asidewidth');
}
- $app.data.autoUpdateVRCX = configRepository.getString(
+ $app.data.autoUpdateVRCX = await configRepository.getString(
'VRCX_autoUpdateVRCX',
'Auto Download'
);
- $app.data.branch = configRepository.getString('VRCX_branch', 'Stable');
- $app.data.maxTableSize = configRepository.getInt('VRCX_maxTableSize', 1000);
+ $app.data.branch = await configRepository.getString(
+ 'VRCX_branch',
+ 'Stable'
+ );
+ $app.data.maxTableSize = await configRepository.getInt(
+ 'VRCX_maxTableSize',
+ 1000
+ );
if ($app.data.maxTableSize > 10000) {
$app.data.maxTableSize = 1000;
}
database.setmaxTableSize($app.data.maxTableSize);
- $app.data.photonLobbyTimeoutThreshold = configRepository.getString(
+ $app.data.photonLobbyTimeoutThreshold = await configRepository.getString(
'VRCX_photonLobbyTimeoutThreshold',
6000
);
- $app.data.clearVRCXCacheFrequency = configRepository.getString(
+ $app.data.clearVRCXCacheFrequency = await configRepository.getString(
'VRCX_clearVRCXCacheFrequency',
'172800'
);
- $app.data.avatarRemoteDatabase = configRepository.getBool(
+ $app.data.avatarRemoteDatabase = await configRepository.getBool(
'VRCX_avatarRemoteDatabase',
true
);
$app.data.avatarRemoteDatabaseProvider = '';
$app.data.avatarRemoteDatabaseProviderList = JSON.parse(
- configRepository.getString(
+ await configRepository.getString(
'VRCX_avatarRemoteDatabaseProviderList',
'[ "https://avtr.just-h.party/vrcx_search.php" ]'
)
);
- $app.data.pendingOfflineDelay = configRepository.getInt(
+ $app.data.pendingOfflineDelay = await configRepository.getInt(
'VRCX_pendingOfflineDelay',
110000
);
- if (configRepository.getString('VRCX_avatarRemoteDatabaseProvider')) {
+ if (await configRepository.getString('VRCX_avatarRemoteDatabaseProvider')) {
// move existing provider to new list
- var avatarRemoteDatabaseProvider = configRepository.getString(
+ var avatarRemoteDatabaseProvider = await configRepository.getString(
'VRCX_avatarRemoteDatabaseProvider'
);
if (
@@ -14350,8 +14404,8 @@ speechSynthesis.getVoices();
avatarRemoteDatabaseProvider
);
}
- configRepository.remove('VRCX_avatarRemoteDatabaseProvider');
- configRepository.setString(
+ await configRepository.remove('VRCX_avatarRemoteDatabaseProvider');
+ await configRepository.setString(
'VRCX_avatarRemoteDatabaseProviderList',
JSON.stringify($app.data.avatarRemoteDatabaseProviderList)
);
@@ -14360,92 +14414,107 @@ speechSynthesis.getVoices();
$app.data.avatarRemoteDatabaseProvider =
$app.data.avatarRemoteDatabaseProviderList[0];
}
- $app.data.sortFavorites = configRepository.getBool(
+ $app.data.sortFavorites = await configRepository.getBool(
'VRCX_sortFavorites',
true
);
- $app.data.randomUserColours = configRepository.getBool(
+ $app.data.randomUserColours = await configRepository.getBool(
'VRCX_randomUserColours',
false
);
- $app.data.hideUserNotes = configRepository.getBool(
+ $app.data.hideUserNotes = await configRepository.getBool(
'VRCX_hideUserNotes',
false
);
- $app.data.hideUserMemos = configRepository.getBool(
+ $app.data.hideUserMemos = await configRepository.getBool(
'VRCX_hideUserMemos',
false
);
- $app.methods.saveOpenVROption = function () {
- configRepository.setBool('openVR', this.openVR);
- configRepository.setBool('openVRAlways', this.openVRAlways);
- configRepository.setBool('VRCX_overlaybutton', this.overlaybutton);
+ $app.methods.saveOpenVROption = async function () {
+ await configRepository.setBool('openVR', this.openVR);
+ await configRepository.setBool('openVRAlways', this.openVRAlways);
+ await configRepository.setBool(
+ 'VRCX_overlaybutton',
+ this.overlaybutton
+ );
this.overlayHand = parseInt(this.overlayHand, 10);
if (isNaN(this.overlayHand)) {
this.overlayHand = 0;
}
- configRepository.setInt('VRCX_overlayHand', this.overlayHand);
- configRepository.setBool(
+ await configRepository.setInt('VRCX_overlayHand', this.overlayHand);
+ await configRepository.setBool(
'VRCX_hidePrivateFromFeed',
this.hidePrivateFromFeed
);
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_hideDevicesFromFeed',
this.hideDevicesFromFeed
);
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_hideCpuUsageFromFeed',
this.hideCpuUsageFromFeed
);
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_hideUptimeFromFeed',
this.hideUptimeFromFeed
);
- configRepository.setBool('VRCX_pcUptimeOnFeed', this.pcUptimeOnFeed);
- configRepository.setBool(
+ await configRepository.setBool(
+ 'VRCX_pcUptimeOnFeed',
+ this.pcUptimeOnFeed
+ );
+ await configRepository.setBool(
'VRCX_overlayNotifications',
this.overlayNotifications
);
- configRepository.setBool('VRCX_overlayWrist', this.overlayWrist);
- configRepository.setBool('VRCX_xsNotifications', this.xsNotifications);
- configRepository.setBool(
+ await configRepository.setBool('VRCX_overlayWrist', this.overlayWrist);
+ await configRepository.setBool(
+ 'VRCX_xsNotifications',
+ this.xsNotifications
+ );
+ await configRepository.setBool(
'VRCX_imageNotifications',
this.imageNotifications
);
- configRepository.setString('VRCX_desktopToast', this.desktopToast);
- configRepository.setBool('VRCX_afkDesktopToast', this.afkDesktopToast);
- configRepository.setBool('VRCX_minimalFeed', this.minimalFeed);
- configRepository.setBool(
+ await configRepository.setString(
+ 'VRCX_desktopToast',
+ this.desktopToast
+ );
+ await configRepository.setBool(
+ 'VRCX_afkDesktopToast',
+ this.afkDesktopToast
+ );
+ await configRepository.setBool('VRCX_minimalFeed', this.minimalFeed);
+ await configRepository.setBool(
'displayVRCPlusIconsAsAvatar',
this.displayVRCPlusIconsAsAvatar
);
- configRepository.setBool('VRCX_hideTooltips', this.hideTooltips);
- configRepository.setBool(
+ await configRepository.setBool('VRCX_hideTooltips', this.hideTooltips);
+ await configRepository.setBool(
'VRCX_autoSweepVRChatCache',
this.autoSweepVRChatCache
);
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_relaunchVRChatAfterCrash',
this.relaunchVRChatAfterCrash
);
- configRepository.setBool('VRCX_vrcQuitFix', this.vrcQuitFix);
- configRepository.setBool(
+ await configRepository.setBool('VRCX_vrcQuitFix', this.vrcQuitFix);
+ await configRepository.setBool(
'VRCX_vrBackgroundEnabled',
this.vrBackgroundEnabled
);
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_avatarRemoteDatabase',
this.avatarRemoteDatabase
);
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_instanceUsersSortAlphabetical',
this.instanceUsersSortAlphabetical
);
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_randomUserColours',
this.randomUserColours
);
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_udonExceptionLogging',
this.udonExceptionLogging
);
@@ -14455,30 +14524,40 @@ speechSynthesis.getVoices();
AppApi.ExecuteVrOverlayFunction('notyClear', '');
this.updateOpenVR();
};
- $app.methods.saveSortFavoritesOption = function () {
+ $app.methods.saveSortFavoritesOption = async function () {
this.getLocalWorldFavorites();
- configRepository.setBool('VRCX_sortFavorites', this.sortFavorites);
+ await configRepository.setBool(
+ 'VRCX_sortFavorites',
+ this.sortFavorites
+ );
};
- $app.methods.saveUserDialogOption = function () {
- configRepository.setBool('VRCX_hideUserNotes', this.hideUserNotes);
- configRepository.setBool('VRCX_hideUserMemos', this.hideUserMemos);
+ $app.methods.saveUserDialogOption = async function () {
+ await configRepository.setBool(
+ 'VRCX_hideUserNotes',
+ this.hideUserNotes
+ );
+ await configRepository.setBool(
+ 'VRCX_hideUserMemos',
+ this.hideUserMemos
+ );
};
$app.data.TTSvoices = speechSynthesis.getVoices();
- $app.methods.saveNotificationTTS = function () {
+ $app.methods.saveNotificationTTS = async function () {
speechSynthesis.cancel();
if (
- configRepository.getString('VRCX_notificationTTS') === 'Never' &&
+ (await configRepository.getString('VRCX_notificationTTS')) ===
+ 'Never' &&
this.notificationTTS !== 'Never'
) {
this.speak('Notification text-to-speech enabled');
}
- configRepository.setString(
+ await configRepository.setString(
'VRCX_notificationTTS',
this.notificationTTS
);
this.updateVRConfigVars();
};
- $app.data.themeMode = configRepository.getString(
+ $app.data.themeMode = await configRepository.getString(
'VRCX_ThemeMode',
'system'
);
@@ -14491,18 +14570,18 @@ speechSynthesis.getVoices();
window
.matchMedia('(prefers-color-scheme: dark)')
- .addEventListener('change', () => {
+ .addEventListener('change', async () => {
if ($app.themeMode === 'system') {
- $app.saveThemeMode();
+ await $app.saveThemeMode();
}
});
- $app.methods.saveThemeMode = function () {
- configRepository.setString('VRCX_ThemeMode', this.themeMode);
- this.changeThemeMode();
+ $app.methods.saveThemeMode = async function () {
+ await configRepository.setString('VRCX_ThemeMode', this.themeMode);
+ await this.changeThemeMode();
};
- $app.methods.changeThemeMode = function () {
+ $app.methods.changeThemeMode = async function () {
if (document.contains(document.getElementById('app-theme-style'))) {
document.getElementById('app-theme-style').remove();
}
@@ -14547,10 +14626,10 @@ speechSynthesis.getVoices();
}
document.head.appendChild($appThemeStyle);
this.updateVRConfigVars();
- this.updatetrustColor();
+ await this.updatetrustColor();
};
- $app.data.isStartAtWindowsStartup = configRepository.getBool(
+ $app.data.isStartAtWindowsStartup = await configRepository.getBool(
'VRCX_StartAtWindowsStartup',
false
);
@@ -14562,14 +14641,15 @@ speechSynthesis.getVoices();
VRCXStorage.Get('VRCX_CloseToTray').then((result) => {
$app.isCloseToTray = result === 'true';
});
- if (configRepository.getBool('VRCX_CloseToTray')) {
+ if (await configRepository.getBool('VRCX_CloseToTray')) {
// move back to JSON
- $app.data.isCloseToTray = configRepository.getBool('VRCX_CloseToTray');
+ $app.data.isCloseToTray =
+ await configRepository.getBool('VRCX_CloseToTray');
VRCXStorage.Set('VRCX_CloseToTray', $app.data.isCloseToTray.toString());
- configRepository.remove('VRCX_CloseToTray');
+ await configRepository.remove('VRCX_CloseToTray');
}
- $app.methods.saveVRCXWindowOption = function () {
- configRepository.setBool(
+ $app.methods.saveVRCXWindowOption = async function () {
+ await configRepository.setBool(
'VRCX_StartAtWindowsStartup',
this.isStartAtWindowsStartup
);
@@ -14580,52 +14660,55 @@ speechSynthesis.getVoices();
VRCXStorage.Set('VRCX_CloseToTray', this.isCloseToTray.toString());
AppApi.SetStartup(this.isStartAtWindowsStartup);
};
- $app.data.photonEventOverlay = configRepository.getBool(
+ $app.data.photonEventOverlay = await configRepository.getBool(
'VRCX_PhotonEventOverlay',
false
);
- $app.data.timeoutHudOverlay = configRepository.getBool(
+ $app.data.timeoutHudOverlay = await configRepository.getBool(
'VRCX_TimeoutHudOverlay',
false
);
- $app.data.timeoutHudOverlayFilter = configRepository.getString(
+ $app.data.timeoutHudOverlayFilter = await configRepository.getString(
'VRCX_TimeoutHudOverlayFilter',
'Everyone'
);
- $app.data.photonEventOverlayFilter = configRepository.getString(
+ $app.data.photonEventOverlayFilter = await configRepository.getString(
'VRCX_PhotonEventOverlayFilter',
'Everyone'
);
$app.data.photonOverlayMessageTimeout = Number(
- configRepository.getString('VRCX_photonOverlayMessageTimeout', 6000)
+ await configRepository.getString(
+ 'VRCX_photonOverlayMessageTimeout',
+ 6000
+ )
);
$app.data.photonLoggingEnabled = false;
- $app.data.gameLogDisabled = configRepository.getBool(
+ $app.data.gameLogDisabled = await configRepository.getBool(
'VRCX_gameLogDisabled',
false
);
- $app.data.udonExceptionLogging = configRepository.getBool(
+ $app.data.udonExceptionLogging = await configRepository.getBool(
'VRCX_udonExceptionLogging',
false
);
- $app.data.instanceUsersSortAlphabetical = configRepository.getBool(
+ $app.data.instanceUsersSortAlphabetical = await configRepository.getBool(
'VRCX_instanceUsersSortAlphabetical',
false
);
- $app.methods.saveEventOverlay = function () {
- configRepository.setBool(
+ $app.methods.saveEventOverlay = async function () {
+ await configRepository.setBool(
'VRCX_PhotonEventOverlay',
this.photonEventOverlay
);
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_TimeoutHudOverlay',
this.timeoutHudOverlay
);
- configRepository.setString(
+ await configRepository.setString(
'VRCX_TimeoutHudOverlayFilter',
this.timeoutHudOverlayFilter
);
- configRepository.setString(
+ await configRepository.setString(
'VRCX_PhotonEventOverlayFilter',
this.photonEventOverlayFilter
);
@@ -14635,104 +14718,131 @@ speechSynthesis.getVoices();
this.updateOpenVR();
this.updateVRConfigVars();
};
- $app.data.logResourceLoad = configRepository.getBool(
+ $app.data.logResourceLoad = await configRepository.getBool(
'VRCX_logResourceLoad',
false
);
- $app.methods.saveGameLogOptions = function () {
- configRepository.setBool('VRCX_logResourceLoad', this.logResourceLoad);
+ $app.methods.saveGameLogOptions = async function () {
+ await configRepository.setBool(
+ 'VRCX_logResourceLoad',
+ this.logResourceLoad
+ );
};
- $app.data.autoStateChange = configRepository.getString(
+ $app.data.autoStateChange = await configRepository.getString(
'VRCX_autoStateChange',
'Off'
);
- $app.methods.saveAutomationOptions = function () {
- configRepository.setString(
+ $app.methods.saveAutomationOptions = async function () {
+ await configRepository.setString(
'VRCX_autoStateChange',
this.autoStateChange
);
};
- $app.data.vrcRegistryAutoBackup = configRepository.getBool(
+ $app.data.vrcRegistryAutoBackup = await configRepository.getBool(
'VRCX_vrcRegistryAutoBackup',
true
);
- $app.methods.saveVrcRegistryAutoBackup = function () {
- configRepository.setBool(
+ $app.methods.saveVrcRegistryAutoBackup = async function () {
+ await configRepository.setBool(
'VRCX_vrcRegistryAutoBackup',
this.vrcRegistryAutoBackup
);
};
- $app.data.orderFriendsGroup0 = configRepository.getBool(
+ $app.data.orderFriendsGroup0 = await configRepository.getBool(
'orderFriendGroup0',
true
);
- $app.data.orderFriendsGroup1 = configRepository.getBool(
+ $app.data.orderFriendsGroup1 = await configRepository.getBool(
'orderFriendGroup1',
true
);
- $app.data.orderFriendsGroup2 = configRepository.getBool(
+ $app.data.orderFriendsGroup2 = await configRepository.getBool(
'orderFriendGroup2',
true
);
- $app.data.orderFriendsGroup3 = configRepository.getBool(
+ $app.data.orderFriendsGroup3 = await configRepository.getBool(
'orderFriendGroup3',
true
);
- $app.data.orderFriendsGroupPrivate = configRepository.getBool(
+ $app.data.orderFriendsGroupPrivate = await configRepository.getBool(
'orderFriendGroupPrivate',
false
);
- $app.data.orderFriendsGroupStatus = configRepository.getBool(
+ $app.data.orderFriendsGroupStatus = await configRepository.getBool(
'orderFriendsGroupStatus',
false
);
- $app.data.orderFriendsGroupGPS = configRepository.getBool(
+ $app.data.orderFriendsGroupGPS = await configRepository.getBool(
'orderFriendGroupGPS',
true
);
- $app.methods.saveOrderFriendGroup = function () {
- configRepository.setBool('orderFriendGroup0', this.orderFriendsGroup0);
- configRepository.setBool('orderFriendGroup1', this.orderFriendsGroup1);
- configRepository.setBool('orderFriendGroup2', this.orderFriendsGroup2);
- configRepository.setBool('orderFriendGroup3', this.orderFriendsGroup3);
- configRepository.setBool(
+ $app.methods.saveOrderFriendGroup = async function () {
+ await configRepository.setBool(
+ 'orderFriendGroup0',
+ this.orderFriendsGroup0
+ );
+ await configRepository.setBool(
+ 'orderFriendGroup1',
+ this.orderFriendsGroup1
+ );
+ await configRepository.setBool(
+ 'orderFriendGroup2',
+ this.orderFriendsGroup2
+ );
+ await configRepository.setBool(
+ 'orderFriendGroup3',
+ this.orderFriendsGroup3
+ );
+ await configRepository.setBool(
'orderFriendGroupPrivate',
this.orderFriendsGroupPrivate
);
- configRepository.setBool(
+ await configRepository.setBool(
'orderFriendsGroupStatus',
this.orderFriendsGroupStatus
);
- configRepository.setBool(
+ await configRepository.setBool(
'orderFriendGroupGPS',
this.orderFriendsGroupGPS
);
this.sortFriendsGroup0 = true;
this.sortFriendsGroup1 = true;
};
- $app.data.discordActive = configRepository.getBool('discordActive', false);
- $app.data.discordInstance = configRepository.getBool(
+ $app.data.discordActive = await configRepository.getBool(
+ 'discordActive',
+ false
+ );
+ $app.data.discordInstance = await configRepository.getBool(
'discordInstance',
true
);
- $app.data.discordJoinButton = configRepository.getBool(
+ $app.data.discordJoinButton = await configRepository.getBool(
'discordJoinButton',
false
);
- $app.data.discordHideInvite = configRepository.getBool(
+ $app.data.discordHideInvite = await configRepository.getBool(
'discordHideInvite',
true
);
- $app.data.discordHideImage = configRepository.getBool(
+ $app.data.discordHideImage = await configRepository.getBool(
'discordHideImage',
false
);
- $app.methods.saveDiscordOption = function () {
- configRepository.setBool('discordActive', this.discordActive);
- configRepository.setBool('discordInstance', this.discordInstance);
- configRepository.setBool('discordJoinButton', this.discordJoinButton);
- configRepository.setBool('discordHideInvite', this.discordHideInvite);
- configRepository.setBool('discordHideImage', this.discordHideImage);
+ $app.methods.saveDiscordOption = async function () {
+ await configRepository.setBool('discordActive', this.discordActive);
+ await configRepository.setBool('discordInstance', this.discordInstance);
+ await configRepository.setBool(
+ 'discordJoinButton',
+ this.discordJoinButton
+ );
+ await configRepository.setBool(
+ 'discordHideInvite',
+ this.discordHideInvite
+ );
+ await configRepository.setBool(
+ 'discordHideImage',
+ this.discordHideImage
+ );
this.lastLocation$.tag = '';
this.nextDiscordUpdate = 7;
this.updateDiscord();
@@ -14818,7 +14928,7 @@ speechSynthesis.getVoices();
}
};
$app.data.sharedFeedFilters = JSON.parse(
- configRepository.getString(
+ await configRepository.getString(
'sharedFeedFilters',
JSON.stringify(sharedFeedFilters)
)
@@ -14853,7 +14963,7 @@ speechSynthesis.getVoices();
}
$app.data.trustColor = JSON.parse(
- configRepository.getString(
+ await configRepository.getString(
'VRCX_trustColor',
JSON.stringify({
untrusted: '#CCCCCC',
@@ -14867,15 +14977,15 @@ speechSynthesis.getVoices();
)
);
- $app.methods.updatetrustColor = function () {
+ $app.methods.updatetrustColor = async function () {
if (typeof API.currentUser?.id === 'undefined') {
return;
}
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_randomUserColours',
this.randomUserColours
);
- configRepository.setString(
+ await configRepository.setString(
'VRCX_trustColor',
JSON.stringify(this.trustColor)
);
@@ -14890,12 +15000,12 @@ speechSynthesis.getVoices();
API.applyUserTrustLevel(ref);
});
}
- this.updatetrustColorClasses();
+ await this.updatetrustColorClasses();
};
- $app.methods.updatetrustColorClasses = function () {
+ $app.methods.updatetrustColorClasses = async function () {
var trustColor = JSON.parse(
- configRepository.getString(
+ await configRepository.getString(
'VRCX_trustColor',
JSON.stringify({
untrusted: '#CCCCCC',
@@ -14921,66 +15031,72 @@ speechSynthesis.getVoices();
style.innerHTML = newCSS;
document.getElementsByTagName('head')[0].appendChild(style);
};
- $app.methods.updatetrustColorClasses();
+ await $app.methods.updatetrustColorClasses();
- $app.methods.saveSharedFeedFilters = function () {
+ $app.methods.saveSharedFeedFilters = async function () {
this.notyFeedFiltersDialog.visible = false;
this.wristFeedFiltersDialog.visible = false;
- configRepository.setString(
+ await configRepository.setString(
'sharedFeedFilters',
JSON.stringify(this.sharedFeedFilters)
);
this.updateSharedFeed(true);
};
- $app.methods.cancelSharedFeedFilters = function () {
+ $app.methods.cancelSharedFeedFilters = async function () {
this.notyFeedFiltersDialog.visible = false;
this.wristFeedFiltersDialog.visible = false;
this.sharedFeedFilters = JSON.parse(
- configRepository.getString('sharedFeedFilters')
+ await configRepository.getString('sharedFeedFilters')
);
};
- $app.data.notificationPosition = configRepository.getString(
+ $app.data.notificationPosition = await configRepository.getString(
'VRCX_notificationPosition',
'topCenter'
);
- $app.methods.changeNotificationPosition = function () {
- configRepository.setString(
+ $app.methods.changeNotificationPosition = async function () {
+ await configRepository.setString(
'VRCX_notificationPosition',
this.notificationPosition
);
this.updateVRConfigVars();
};
- $app.data.youTubeApi = configRepository.getBool('VRCX_youtubeAPI', false);
- $app.data.youTubeApiKey = configRepository.getString(
+ $app.data.youTubeApi = await configRepository.getBool(
+ 'VRCX_youtubeAPI',
+ false
+ );
+ $app.data.youTubeApiKey = await configRepository.getString(
'VRCX_youtubeAPIKey',
''
);
- $app.data.progressPie = configRepository.getBool('VRCX_progressPie', false);
- $app.data.progressPieFilter = configRepository.getBool(
+ $app.data.progressPie = await configRepository.getBool(
+ 'VRCX_progressPie',
+ false
+ );
+ $app.data.progressPieFilter = await configRepository.getBool(
'VRCX_progressPieFilter',
true
);
- $app.data.screenshotHelper = configRepository.getBool(
+ $app.data.screenshotHelper = await configRepository.getBool(
'VRCX_screenshotHelper',
true
);
- $app.data.screenshotHelperModifyFilename = configRepository.getBool(
+ $app.data.screenshotHelperModifyFilename = await configRepository.getBool(
'VRCX_screenshotHelperModifyFilename',
false
);
- $app.data.enableAppLauncher = configRepository.getBool(
+ $app.data.enableAppLauncher = await configRepository.getBool(
'VRCX_enableAppLauncher',
true
);
- $app.data.enableAppLauncherAutoClose = configRepository.getBool(
+ $app.data.enableAppLauncherAutoClose = await configRepository.getBool(
'VRCX_enableAppLauncherAutoClose',
true
);
@@ -15159,9 +15275,9 @@ speechSynthesis.getVoices();
return voices[this.notificationTTSVoice].name;
};
- $app.methods.changeTTSVoice = function (index) {
+ $app.methods.changeTTSVoice = async function (index) {
this.notificationTTSVoice = index;
- configRepository.setString(
+ await configRepository.setString(
'VRCX_notificationTTSVoice',
this.notificationTTSVoice
);
@@ -15489,7 +15605,7 @@ speechSynthesis.getVoices();
inputErrorMessage: $t(
'prompt.notification_timeout.input_error'
),
- callback: (action, instance) => {
+ callback: async (action, instance) => {
if (
action === 'confirm' &&
instance.inputValue &&
@@ -15498,7 +15614,7 @@ speechSynthesis.getVoices();
this.notificationTimeout = Math.trunc(
Number(instance.inputValue) * 1000
);
- configRepository.setString(
+ await configRepository.setString(
'VRCX_notificationTimeout',
this.notificationTimeout
);
@@ -15522,7 +15638,7 @@ speechSynthesis.getVoices();
inputErrorMessage: $t(
'prompt.overlay_message_timeout.input_error'
),
- callback: (action, instance) => {
+ callback: async (action, instance) => {
if (
action === 'confirm' &&
instance.inputValue &&
@@ -15531,7 +15647,7 @@ speechSynthesis.getVoices();
this.photonOverlayMessageTimeout = Math.trunc(
Number(instance.inputValue) * 1000
);
- configRepository.setString(
+ await configRepository.setString(
'VRCX_photonOverlayMessageTimeout',
this.photonOverlayMessageTimeout
);
@@ -15821,13 +15937,13 @@ speechSynthesis.getVoices();
inputValue: this.maxTableSize,
inputPattern: /\d+$/,
inputErrorMessage: $t('prompt.change_table_size.input_error'),
- callback: (action, instance) => {
+ callback: async (action, instance) => {
if (action === 'confirm' && instance.inputValue) {
if (instance.inputValue > 10000) {
instance.inputValue = 10000;
}
this.maxTableSize = instance.inputValue;
- configRepository.setString(
+ await configRepository.setString(
'VRCX_maxTableSize',
this.maxTableSize
);
@@ -15840,14 +15956,14 @@ speechSynthesis.getVoices();
);
};
- $app.methods.setTablePageSize = function (pageSize) {
+ $app.methods.setTablePageSize = async function (pageSize) {
this.tablePageSize = pageSize;
this.feedTable.pageSize = pageSize;
this.gameLogTable.pageSize = pageSize;
this.friendLogTable.pageSize = pageSize;
this.playerModerationTable.pageSize = pageSize;
this.notificationTable.pageSize = pageSize;
- configRepository.setInt('VRCX_tablePageSize', pageSize);
+ await configRepository.setInt('VRCX_tablePageSize', pageSize);
};
$app.methods.promptPhotonLobbyTimeoutThreshold = function () {
@@ -15863,7 +15979,7 @@ speechSynthesis.getVoices();
inputErrorMessage: $t(
'prompt.photon_lobby_timeout.input_error'
),
- callback: (action, instance) => {
+ callback: async (action, instance) => {
if (
action === 'confirm' &&
instance.inputValue &&
@@ -15872,7 +15988,7 @@ speechSynthesis.getVoices();
this.photonLobbyTimeoutThreshold = Math.trunc(
Number(instance.inputValue) * 1000
);
- configRepository.setString(
+ await configRepository.setString(
'VRCX_photonLobbyTimeoutThreshold',
this.photonLobbyTimeoutThreshold
);
@@ -15893,7 +16009,7 @@ speechSynthesis.getVoices();
inputValue: this.clearVRCXCacheFrequency / 3600 / 2,
inputPattern: /\d+$/,
inputErrorMessage: $t('prompt.auto_clear_cache.input_error'),
- callback: (action, instance) => {
+ callback: async (action, instance) => {
if (
action === 'confirm' &&
instance.inputValue &&
@@ -15902,7 +16018,7 @@ speechSynthesis.getVoices();
this.clearVRCXCacheFrequency = Math.trunc(
Number(instance.inputValue) * 3600 * 2
);
- configRepository.setString(
+ await configRepository.setString(
'VRCX_clearVRCXCacheFrequency',
this.clearVRCXCacheFrequency
);
@@ -19188,46 +19304,46 @@ speechSynthesis.getVoices();
D.url = this.getLaunchURL(L);
};
- $app.methods.saveNewInstanceDialog = function () {
- configRepository.setString(
+ $app.methods.saveNewInstanceDialog = async function () {
+ await configRepository.setString(
'instanceDialogAccessType',
this.newInstanceDialog.accessType
);
- configRepository.setString(
+ await configRepository.setString(
'instanceRegion',
this.newInstanceDialog.region
);
- configRepository.setString(
+ await configRepository.setString(
'instanceDialogInstanceName',
this.newInstanceDialog.instanceName
);
if (this.newInstanceDialog.userId === API.currentUser.id) {
- configRepository.setString('instanceDialogUserId', '');
+ await configRepository.setString('instanceDialogUserId', '');
} else {
- configRepository.setString(
+ await configRepository.setString(
'instanceDialogUserId',
this.newInstanceDialog.userId
);
}
- configRepository.setString(
+ await configRepository.setString(
'instanceDialogGroupId',
this.newInstanceDialog.groupId
);
- configRepository.setString(
+ await configRepository.setString(
'instanceDialogGroupAccessType',
this.newInstanceDialog.groupAccessType
);
- configRepository.setBool(
+ await configRepository.setBool(
'instanceDialogStrict',
this.newInstanceDialog.strict
);
- configRepository.setBool(
+ await configRepository.setBool(
'instanceDialogQueueEnabled',
this.newInstanceDialog.queueEnabled
);
};
- $app.methods.showNewInstanceDialog = function (tag) {
+ $app.methods.showNewInstanceDialog = async function (tag) {
if (!this.isRealInstance(tag)) {
return;
}
@@ -19235,22 +19351,28 @@ speechSynthesis.getVoices();
var D = this.newInstanceDialog;
var L = API.parseLocation(tag);
D.worldId = L.worldId;
- D.accessType = configRepository.getString(
+ D.accessType = await configRepository.getString(
'instanceDialogAccessType',
'public'
);
- D.region = configRepository.getString('instanceRegion', 'US West');
- D.instanceName = configRepository.getString(
+ D.region = await configRepository.getString(
+ 'instanceRegion',
+ 'US West'
+ );
+ D.instanceName = await configRepository.getString(
'instanceDialogInstanceName',
''
);
- D.userId = configRepository.getString('instanceDialogUserId', '');
- D.groupId = configRepository.getString('instanceDialogGroupId', '');
- D.groupAccessType = configRepository.getString(
+ D.userId = await configRepository.getString('instanceDialogUserId', '');
+ D.groupId = await configRepository.getString(
+ 'instanceDialogGroupId',
+ ''
+ );
+ D.groupAccessType = await configRepository.getString(
'instanceDialogGroupAccessType',
'plus'
);
- D.queueEnabled = configRepository.getBool(
+ D.queueEnabled = await configRepository.getBool(
'instanceDialogQueueEnabled',
true
);
@@ -19293,20 +19415,20 @@ speechSynthesis.getVoices();
$app.data.launchOptionsDialog = {
visible: false,
- launchArguments: configRepository.getString('launchArguments'),
- vrcLaunchPathOverride: configRepository.getString(
+ launchArguments: await configRepository.getString('launchArguments'),
+ vrcLaunchPathOverride: await configRepository.getString(
'vrcLaunchPathOverride'
)
};
- API.$on('LOGIN', function () {
+ API.$on('LOGIN', async function () {
var D = $app.launchOptionsDialog;
if (
D.vrcLaunchPathOverride === null ||
D.vrcLaunchPathOverride === 'null'
) {
D.vrcLaunchPathOverride = '';
- configRepository.setString(
+ await configRepository.setString(
'vrcLaunchPathOverride',
D.vrcLaunchPathOverride
);
@@ -19317,14 +19439,14 @@ speechSynthesis.getVoices();
$app.launchOptionsDialog.visible = false;
});
- $app.methods.updateLaunchOptions = function () {
+ $app.methods.updateLaunchOptions = async function () {
var D = this.launchOptionsDialog;
D.visible = false;
D.launchArguments = String(D.launchArguments)
.replace(/\s+/g, ' ')
.trim();
- configRepository.setString('launchArguments', D.launchArguments);
- configRepository.setString(
+ await configRepository.setString('launchArguments', D.launchArguments);
+ await configRepository.setString(
'vrcLaunchPathOverride',
D.vrcLaunchPathOverride
);
@@ -19710,7 +19832,7 @@ speechSynthesis.getVoices();
$app.data.launchDialog = {
visible: false,
loading: false,
- desktop: configRepository.getBool('launchAsDesktop'),
+ desktop: await configRepository.getBool('launchAsDesktop'),
tag: '',
location: '',
url: '',
@@ -19719,8 +19841,11 @@ speechSynthesis.getVoices();
secureOrShortName: ''
};
- $app.watch['launchDialog.desktop'] = function () {
- configRepository.setBool('launchAsDesktop', this.launchDialog.desktop);
+ $app.methods.saveLaunchDialog = async function () {
+ await configRepository.setBool(
+ 'launchAsDesktop',
+ this.launchDialog.desktop
+ );
};
API.$on('LOGOUT', function () {
@@ -22514,17 +22639,16 @@ speechSynthesis.getVoices();
AppApi.OpenShortcutFolder();
};
- $app.methods.updateAppLauncherSettings = function () {
- configRepository.setBool(
+ $app.methods.updateAppLauncherSettings = async function () {
+ await configRepository.setBool(
'VRCX_enableAppLauncher',
this.enableAppLauncher
);
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_enableAppLauncherAutoClose',
this.enableAppLauncherAutoClose
);
-
- AppApi.SetAppLauncherSettings(
+ await AppApi.SetAppLauncherSettings(
this.enableAppLauncher,
this.enableAppLauncherAutoClose
);
@@ -22532,12 +22656,12 @@ speechSynthesis.getVoices();
// Screenshot Helper
- $app.methods.saveScreenshotHelper = function () {
- configRepository.setBool(
+ $app.methods.saveScreenshotHelper = async function () {
+ await configRepository.setBool(
'VRCX_screenshotHelper',
this.screenshotHelper
);
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_screenshotHelperModifyFilename',
this.screenshotHelperModifyFilename
);
@@ -22876,7 +23000,7 @@ speechSynthesis.getVoices();
type: 'error'
});
} else {
- configRepository.setString(
+ await configRepository.setString(
'VRCX_youtubeAPIKey',
this.youTubeApiKey
);
@@ -22888,10 +23012,10 @@ speechSynthesis.getVoices();
}
};
- $app.methods.changeYouTubeApi = function () {
- configRepository.setBool('VRCX_youtubeAPI', this.youTubeApi);
- configRepository.setBool('VRCX_progressPie', this.progressPie);
- configRepository.setBool(
+ $app.methods.changeYouTubeApi = async function () {
+ await configRepository.setBool('VRCX_youtubeAPI', this.youTubeApi);
+ await configRepository.setBool('VRCX_progressPie', this.progressPie);
+ await configRepository.setBool(
'VRCX_progressPieFilter',
this.progressPieFilter
);
@@ -23884,9 +24008,9 @@ speechSynthesis.getVoices();
return true;
};
- $app.methods.setAsideWidth = function () {
+ $app.methods.setAsideWidth = async function () {
document.getElementById('aside').style.width = `${this.asideWidth}px`;
- configRepository.setInt('VRCX_sidePanelWidth', this.asideWidth);
+ await configRepository.setInt('VRCX_sidePanelWidth', this.asideWidth);
};
// VRCX auto update
@@ -24051,16 +24175,19 @@ speechSynthesis.getVoices();
// update already downloaded and latest version
this.VRCXUpdateDialog.updatePendingIsLatest = true;
}
- if (configRepository.getString('VRCX_branch') !== this.branch) {
- configRepository.setString('VRCX_branch', this.branch);
+ if ((await configRepository.getString('VRCX_branch')) !== this.branch) {
+ await configRepository.setString('VRCX_branch', this.branch);
}
};
- $app.methods.saveAutoUpdateVRCX = function () {
+ $app.methods.saveAutoUpdateVRCX = async function () {
if (this.autoUpdateVRCX === 'Off') {
this.pendingVRCXUpdate = false;
}
- configRepository.setString('VRCX_autoUpdateVRCX', this.autoUpdateVRCX);
+ await configRepository.setString(
+ 'VRCX_autoUpdateVRCX',
+ this.autoUpdateVRCX
+ );
};
$app.methods.checkForVRCXUpdate = async function () {
@@ -24074,7 +24201,7 @@ speechSynthesis.getVoices();
if (this.branch === 'Beta') {
// move Beta users to stable
this.branch = 'Stable';
- configRepository.setString('VRCX_branch', this.branch);
+ await configRepository.setString('VRCX_branch', this.branch);
}
var url = this.branches[this.branch].urlLatest;
this.checkingForVRCXUpdate = true;
@@ -24848,22 +24975,28 @@ speechSynthesis.getVoices();
});
};
- $app.data.dtHour12 = configRepository.getBool('VRCX_dtHour12', false);
- $app.data.dtIsoFormat = configRepository.getBool('VRCX_dtIsoFormat', false);
+ $app.data.dtHour12 = await configRepository.getBool('VRCX_dtHour12', false);
+ $app.data.dtIsoFormat = await configRepository.getBool(
+ 'VRCX_dtIsoFormat',
+ false
+ );
$app.methods.setDatetimeFormat = async function () {
var currentCulture = await AppApi.CurrentCulture();
- var hour12 = configRepository.getBool('VRCX_dtHour12');
- var isoFormat = configRepository.getBool('VRCX_dtIsoFormat');
+ var hour12 = await configRepository.getBool('VRCX_dtHour12');
+ var isoFormat = await configRepository.getBool('VRCX_dtIsoFormat');
if (typeof this.dtHour12 !== 'undefined') {
if (hour12 !== this.dtHour12) {
- configRepository.setBool('VRCX_dtHour12', this.dtHour12);
+ await configRepository.setBool('VRCX_dtHour12', this.dtHour12);
this.updateVRConfigVars();
}
var hour12 = this.dtHour12;
}
if (typeof this.dtIsoFormat !== 'undefined') {
if (isoFormat !== this.dtIsoFormat) {
- configRepository.setBool('VRCX_dtIsoFormat', this.dtIsoFormat);
+ await configRepository.setBool(
+ 'VRCX_dtIsoFormat',
+ this.dtIsoFormat
+ );
}
var isoFormat = this.dtIsoFormat;
}
@@ -24925,12 +25058,12 @@ speechSynthesis.getVoices();
};
$app.methods.setDatetimeFormat();
- $app.data.enableCustomEndpoint = configRepository.getBool(
+ $app.data.enableCustomEndpoint = await configRepository.getBool(
'VRCX_enableCustomEndpoint',
false
);
- $app.methods.toggleCustomEndpoint = function () {
- configRepository.setBool(
+ $app.methods.toggleCustomEndpoint = async function () {
+ await configRepository.setBool(
'VRCX_enableCustomEndpoint',
this.enableCustomEndpoint
);
@@ -24960,7 +25093,7 @@ speechSynthesis.getVoices();
}
};
- $app.methods.disableGameLogDialog = function () {
+ $app.methods.disableGameLogDialog = async function () {
if (this.isGameRunning) {
this.$message({
message:
@@ -24975,10 +25108,10 @@ speechSynthesis.getVoices();
confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel',
type: 'info',
- callback: (action) => {
+ callback: async (action) => {
if (action !== 'confirm') {
this.gameLogDisabled = !this.gameLogDisabled;
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_gameLogDisabled',
this.gameLogDisabled
);
@@ -24986,7 +25119,7 @@ speechSynthesis.getVoices();
}
});
} else {
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_gameLogDisabled',
this.gameLogDisabled
);
@@ -25224,7 +25357,7 @@ speechSynthesis.getVoices();
database.clearAvatarHistory();
};
- $app.data.databaseVersion = configRepository.getInt(
+ $app.data.databaseVersion = await configRepository.getInt(
'VRCX_databaseVersion',
0
);
@@ -25251,7 +25384,7 @@ speechSynthesis.getVoices();
await database.fixBrokenGroupInvites(); // fix notification v2 in wrong table
await database.updateTableForGroupNames(); // alter tables to include group name
database.fixBrokenNotifications(); // fix notifications being null
- configRepository.setInt(
+ await configRepository.setInt(
'VRCX_databaseVersion',
databaseVersion
);
@@ -26085,14 +26218,14 @@ speechSynthesis.getVoices();
this.saveAvatarProviderList();
};
- $app.methods.saveAvatarProviderList = function () {
+ $app.methods.saveAvatarProviderList = async function () {
var length = this.avatarRemoteDatabaseProviderList.length;
for (var i = 0; i < length; ++i) {
if (!this.avatarRemoteDatabaseProviderList[i]) {
this.avatarRemoteDatabaseProviderList.splice(i, 1);
}
}
- configRepository.setString(
+ await configRepository.setString(
'VRCX_avatarRemoteDatabaseProviderList',
JSON.stringify(this.avatarRemoteDatabaseProviderList)
);
@@ -26104,7 +26237,7 @@ speechSynthesis.getVoices();
this.avatarRemoteDatabaseProvider = '';
this.avatarRemoteDatabase = false;
}
- configRepository.setBool(
+ await configRepository.setBool(
'VRCX_avatarRemoteDatabase',
this.avatarRemoteDatabase
);
@@ -26487,7 +26620,7 @@ speechSynthesis.getVoices();
inputErrorMessage: $t(
'prompt.pending_offline_delay.input_error'
),
- callback: (action, instance) => {
+ callback: async (action, instance) => {
if (
action === 'confirm' &&
instance.inputValue &&
@@ -26496,7 +26629,7 @@ speechSynthesis.getVoices();
this.pendingOfflineDelay = Math.trunc(
Number(instance.inputValue) * 1000
);
- configRepository.setInt(
+ await configRepository.setInt(
'VRCX_pendingOfflineDelay',
this.pendingOfflineDelay
);
@@ -26518,9 +26651,9 @@ speechSynthesis.getVoices();
"' by '",
'[Spotify] '
];
- if (configRepository.getString('VRCX_chatboxBlacklist')) {
+ if (await configRepository.getString('VRCX_chatboxBlacklist')) {
$app.data.chatboxBlacklist = JSON.parse(
- configRepository.getString('VRCX_chatboxBlacklist')
+ await configRepository.getString('VRCX_chatboxBlacklist')
);
}
$app.data.chatboxBlacklistDialog = {
@@ -26532,8 +26665,8 @@ speechSynthesis.getVoices();
$app.chatboxBlacklistDialog.visible = false;
});
- $app.methods.saveChatboxBlacklist = function () {
- configRepository.setString(
+ $app.methods.saveChatboxBlacklist = async function () {
+ await configRepository.setString(
'VRCX_chatboxBlacklist',
JSON.stringify(this.chatboxBlacklist)
);
@@ -26559,32 +26692,34 @@ speechSynthesis.getVoices();
// #endregion
// #region | App: ChatBox User Blacklist
$app.data.chatboxUserBlacklist = new Map();
- if (configRepository.getString('VRCX_chatboxUserBlacklist')) {
+ if (await configRepository.getString('VRCX_chatboxUserBlacklist')) {
$app.data.chatboxUserBlacklist = new Map(
Object.entries(
JSON.parse(
- configRepository.getString('VRCX_chatboxUserBlacklist')
+ await configRepository.getString(
+ 'VRCX_chatboxUserBlacklist'
+ )
)
)
);
}
- $app.methods.saveChatboxUserBlacklist = function () {
- configRepository.setString(
+ $app.methods.saveChatboxUserBlacklist = async function () {
+ await configRepository.setString(
'VRCX_chatboxUserBlacklist',
JSON.stringify(Object.fromEntries(this.chatboxUserBlacklist))
);
};
- $app.methods.addChatboxUserBlacklist = function (user) {
+ $app.methods.addChatboxUserBlacklist = async function (user) {
this.chatboxUserBlacklist.set(user.id, user.displayName);
- this.saveChatboxUserBlacklist();
+ await this.saveChatboxUserBlacklist();
this.getCurrentInstanceUserList();
};
- $app.methods.deleteChatboxUserBlacklist = function (userId) {
+ $app.methods.deleteChatboxUserBlacklist = async function (userId) {
this.chatboxUserBlacklist.delete(userId);
- this.saveChatboxUserBlacklist();
+ await this.saveChatboxUserBlacklist();
this.getCurrentInstanceUserList();
this.$nextTick(() =>
adjustDialogZ(this.$refs.chatboxBlacklistDialog.$el)
@@ -28432,9 +28567,8 @@ speechSynthesis.getVoices();
return;
}
try {
- var loggingEnabled = await AppApi.GetVRChatRegistryKey(
- 'LOGGING_ENABLED'
- );
+ var loggingEnabled =
+ await AppApi.GetVRChatRegistryKey('LOGGING_ENABLED');
if (loggingEnabled === null) {
// key not found
return;
@@ -28560,31 +28694,34 @@ speechSynthesis.getVoices();
// #region | App: Language
$app.data.appLanguage = 'en';
- if (configRepository.getString('VRCX_appLanguage')) {
- $app.data.appLanguage = configRepository.getString('VRCX_appLanguage');
- i18n.locale = $app.data.appLanguage;
- } else {
- AppApi.CurrentLanguage().then((result) => {
+ var initLanguage = async () => {
+ if (await configRepository.getString('VRCX_appLanguage')) {
+ $app.data.appLanguage =
+ await configRepository.getString('VRCX_appLanguage');
+ i18n.locale = $app.data.appLanguage;
+ } else {
+ var result = await AppApi.CurrentLanguage();
if (!result) {
console.error('Failed to get current language');
- $app.changeAppLanguage('en');
+ await $app.changeAppLanguage('en');
return;
}
var lang = result.split('-')[0];
- i18n.availableLocales.forEach((ref) => {
+ i18n.availableLocales.forEach(async (ref) => {
var refLang = ref.split('_')[0];
if (refLang === lang) {
- $app.changeAppLanguage(ref);
+ await $app.changeAppLanguage(ref);
}
});
- });
- }
+ }
+ };
+ await initLanguage();
- $app.methods.changeAppLanguage = function (language) {
+ $app.methods.changeAppLanguage = async function (language) {
console.log('Language changed:', language);
this.appLanguage = language;
i18n.locale = language;
- configRepository.setString('VRCX_appLanguage', language);
+ await configRepository.setString('VRCX_appLanguage', language);
this.updateVRConfigVars();
};
@@ -28899,13 +29036,13 @@ speechSynthesis.getVoices();
this.updateRegistryBackupDialog();
};
- $app.methods.updateRegistryBackupDialog = function () {
+ $app.methods.updateRegistryBackupDialog = async function () {
var D = this.registryBackupDialog;
this.registryBackupTable.data = [];
if (!D.visible) {
return;
}
- var backupsJson = configRepository.getString(
+ var backupsJson = await configRepository.getString(
'VRCX_VRChatRegistryBackups'
);
if (!backupsJson) {
@@ -28938,7 +29075,7 @@ speechSynthesis.getVoices();
date: new Date().toJSON(),
data: regJson
};
- var backupsJson = configRepository.getString(
+ var backupsJson = await configRepository.getString(
'VRCX_VRChatRegistryBackups'
);
if (!backupsJson) {
@@ -28946,21 +29083,21 @@ speechSynthesis.getVoices();
}
var backups = JSON.parse(backupsJson);
backups.push(newBackup);
- configRepository.setString(
+ await configRepository.setString(
'VRCX_VRChatRegistryBackups',
JSON.stringify(backups)
);
- this.updateRegistryBackupDialog();
+ await this.updateRegistryBackupDialog();
};
- $app.methods.deleteVrcRegistryBackup = function (row) {
+ $app.methods.deleteVrcRegistryBackup = async function (row) {
var backups = this.registryBackupTable.data;
removeFromArray(backups, row);
- configRepository.setString(
+ await configRepository.setString(
'VRCX_VRChatRegistryBackups',
JSON.stringify(backups)
);
- this.updateRegistryBackupDialog();
+ await this.updateRegistryBackupDialog();
};
$app.methods.restoreVrcRegistryBackup = function (row) {
@@ -29065,10 +29202,10 @@ speechSynthesis.getVoices();
// check for auto restore
var hasVRChatRegistryFolder = await AppApi.HasVRChatRegistryFolder();
if (!hasVRChatRegistryFolder) {
- var lastBackupDate = configRepository.getString(
+ var lastBackupDate = await configRepository.getString(
'VRCX_VRChatRegistryLastBackupDate'
);
- var lastRestoreCheck = configRepository.getString(
+ var lastRestoreCheck = await configRepository.getString(
'VRCX_VRChatRegistryLastRestoreCheck'
);
if (
@@ -29085,19 +29222,19 @@ speechSynthesis.getVoices();
$t('dialog.registry_backup.header')
);
this.showRegistryBackupDialog();
- AppApi.FocusWindow();
- configRepository.setString(
+ await AppApi.FocusWindow();
+ await configRepository.setString(
'VRCX_VRChatRegistryLastRestoreCheck',
lastBackupDate
);
} else {
- this.autoBackupVrcRegistry();
+ await this.autoBackupVrcRegistry();
}
};
- $app.methods.autoBackupVrcRegistry = function () {
+ $app.methods.autoBackupVrcRegistry = async function () {
var date = new Date();
- var lastBackupDate = configRepository.getString(
+ var lastBackupDate = await configRepository.getString(
'VRCX_VRChatRegistryLastBackupDate'
);
if (lastBackupDate) {
@@ -29108,7 +29245,7 @@ speechSynthesis.getVoices();
return;
}
}
- var backupsJson = configRepository.getString(
+ var backupsJson = await configRepository.getString(
'VRCX_VRChatRegistryBackups'
);
if (!backupsJson) {
@@ -29121,12 +29258,12 @@ speechSynthesis.getVoices();
removeFromArray(backups, backup);
}
});
- configRepository.setString(
+ await configRepository.setString(
'VRCX_VRChatRegistryBackups',
JSON.stringify(backups)
);
this.backupVrcRegistry('Auto Backup');
- configRepository.setString(
+ await configRepository.setString(
'VRCX_VRChatRegistryLastBackupDate',
date.toJSON()
);
diff --git a/html/src/index.pug b/html/src/index.pug
index 921a15e7..607aea20 100644
--- a/html/src/index.pug
+++ b/html/src/index.pug
@@ -1677,7 +1677,7 @@ html
el-tooltip(placement="right" :content="$t('dialog.launch.copy_tooltip')" :disabled="hideTooltips")
el-button(@click="copyInstanceMessage(launchDialog.location)" size="mini" icon="el-icon-s-order" style="margin-right:5px" circle)
template(#footer)
- el-checkbox(v-model="launchDialog.desktop" style="float:left;margin-top:5px") {{ $t('dialog.launch.start_as_desktop') }}
+ el-checkbox(v-model="launchDialog.desktop" @change="saveLaunchDialog" style="float:left;margin-top:5px") {{ $t('dialog.launch.start_as_desktop') }}
el-button(size="small" @click="showPreviousInstanceInfoDialog(launchDialog.location)") {{ $t('dialog.launch.info') }}
el-button(size="small" @click="showInviteDialog(launchDialog.location)" :disabled="!checkCanInvite(launchDialog.location)") {{ $t('dialog.launch.invite') }}
el-button(type="primary" size="small" @click="launchGame(launchDialog.location, launchDialog.shortName, launchDialog.desktop)" :disabled="!launchDialog.secureOrShortName") {{ $t('dialog.launch.launch') }}
diff --git a/html/src/localization/ja/en.json b/html/src/localization/ja/en.json
index d80e1e60..17bf35e5 100644
--- a/html/src/localization/ja/en.json
+++ b/html/src/localization/ja/en.json
@@ -823,7 +823,7 @@
"role_updated_at": "更新日:",
"role_created_at": "作成日:",
"role_permissions": "権限:"
- },
+ },
"posts": {
"header": "アナウンス",
"visibility": "表示範囲:",
diff --git a/html/src/localization/zh-CN/en.json b/html/src/localization/zh-CN/en.json
index a9a8b1e3..06658541 100644
--- a/html/src/localization/zh-CN/en.json
+++ b/html/src/localization/zh-CN/en.json
@@ -801,7 +801,7 @@
"invite_to_group": "邀请好友加入群组",
"visibility_everyone": "可见性:所有人",
"visibility_friends": "可见性:好友",
- "visibility_hidden": "可见性:隐藏",
+ "visibility_hidden": "可见性:隐藏",
"moderation_tools": "成员管理",
"leave": "离开群组"
},
diff --git a/html/src/repository/config.js b/html/src/repository/config.js
index 21c71aa8..54fdc06e 100644
--- a/html/src/repository/config.js
+++ b/html/src/repository/config.js
@@ -13,7 +13,7 @@ async function syncLoop() {
await sqliteService.executeNonQuery('BEGIN');
try {
for (var key of dirtyKeySet) {
- var value = sharedRepository.getString(key);
+ var value = await sharedRepository.getString(key);
if (value === null) {
await sqliteService.executeNonQuery(
'DELETE FROM configs WHERE `key` = @key',
@@ -54,9 +54,9 @@ class ConfigRepository extends SharedRepository {
syncLoop();
}
- remove(key) {
+ async remove(key) {
var _key = transformKey(key);
- sharedRepository.remove(_key);
+ await sharedRepository.remove(_key);
dirtyKeySet.add(_key);
}
@@ -65,10 +65,10 @@ class ConfigRepository extends SharedRepository {
return sharedRepository.getString(_key, defaultValue);
}
- setString(key, value) {
+ async setString(key, value) {
var _key = transformKey(key);
var _value = String(value);
- sharedRepository.setString(_key, _value);
+ await sharedRepository.setString(_key, _value);
dirtyKeySet.add(_key);
}
}
diff --git a/html/src/repository/shared.js b/html/src/repository/shared.js
index 96b3e53c..0f8ee614 100644
--- a/html/src/repository/shared.js
+++ b/html/src/repository/shared.js
@@ -10,35 +10,35 @@ class SharedRepository {
return SharedVariable.Remove(_key);
}
- getString(key, defaultValue = null) {
+ async getString(key, defaultValue = null) {
var _key = transformKey(key);
- var value = SharedVariable.Get(_key);
+ var value = await SharedVariable.Get(_key);
if (value === null) {
return defaultValue;
}
return value;
}
- setString(key, value) {
+ async setString(key, value) {
var _key = transformKey(key);
var _value = String(value);
- SharedVariable.Set(_key, _value);
+ await SharedVariable.Set(_key, _value);
}
- getBool(key, defaultValue = null) {
- var value = this.getString(key, null);
+ async getBool(key, defaultValue = null) {
+ var value = await this.getString(key, null);
if (value === null) {
return defaultValue;
}
return value === 'true';
}
- setBool(key, value) {
- this.setString(key, value ? 'true' : 'false');
+ async setBool(key, value) {
+ await this.setString(key, value ? 'true' : 'false');
}
- getInt(key, defaultValue = null) {
- var value = this.getString(key, null);
+ async getInt(key, defaultValue = null) {
+ var value = await this.getString(key, null);
if (value === null) {
return defaultValue;
}
@@ -49,12 +49,12 @@ class SharedRepository {
return value;
}
- setInt(key, value) {
- this.setString(key, value);
+ async setInt(key, value) {
+ await this.setString(key, value);
}
- getFloat(key, defaultValue = null) {
- var value = this.getString(key, null);
+ async getFloat(key, defaultValue = null) {
+ var value = await this.getString(key, null);
if (value === null) {
return defaultValue;
}
@@ -65,12 +65,12 @@ class SharedRepository {
return value;
}
- setFloat(key, value) {
- this.setString(key, value);
+ async setFloat(key, value) {
+ await this.setString(key, value);
}
- getObject(key, defaultValue = null) {
- var value = this.getString(key, null);
+ async getObject(key, defaultValue = null) {
+ var value = await this.getString(key, null);
if (value === null) {
return defaultValue;
}
@@ -83,20 +83,20 @@ class SharedRepository {
return value;
}
- setObject(key, value) {
- this.setString(key, JSON.stringify(value));
+ async setObject(key, value) {
+ await this.setString(key, JSON.stringify(value));
}
- getArray(key, defaultValue = null) {
- var value = this.getObject(key, null);
+ async getArray(key, defaultValue = null) {
+ var value = await this.getObject(key, null);
if (Array.isArray(value) === false) {
return defaultValue;
}
return value;
}
- setArray(key, value) {
- this.setObject(key, value);
+ async setArray(key, value) {
+ await this.setObject(key, value);
}
}