SettingsDialog: Mild refactor and add Connect Info dialog

Among lots of stuff:

- Generate a random password on first load

- Add `ConnectInfo` dialog including QR code display

- Add `Generate Password` button to generate a new random
password

- Delete `Copy Password to Clipboard` button

- Delete `GetConnectString` or whatever from WebSocketServer
(reimplemented the functionality directly into ConnectInfo)

- Added `GeneratePassword()` to Utils

Todo: Show warning when users specify their own passwords
This commit is contained in:
tt2468
2021-05-08 01:42:06 -07:00
parent 600505b60a
commit ee751edf54
17 changed files with 464 additions and 101 deletions

View File

@ -2,12 +2,13 @@ OBSWebSocket.Settings.DialogTitle="WebSocket Server Settings"
OBSWebSocket.Settings.ServerEnable="Enable WebSocket server"
OBSWebSocket.Settings.AlertsEnable="Enable System Tray Alerts"
OBSWebSocket.Settings.DebugEnable="Enable Debug Logging"
OBSWebSocket.Settings.DebugEnableHoverText="Changing this requires the WebSocket server to restart. However, changing this will not automatically restart the obs-websocket server."
OBSWebSocket.Settings.AuthRequired="Enable Authentication"
OBSWebSocket.Settings.Password="Server Password"
OBSWebSocket.Settings.CopyPassword="Copy Password to Clipboard"
OBSWebSocket.Settings.GeneratePassword="Generate Password"
OBSWebSocket.Settings.ShowConnectInfo="Show Connect Info"
OBSWebSocket.Settings.ServerPort="Server Port"
OBSWebSocket.Settings.ConnectedSessionsTitle="Connected WebSocket Sessions"
OBSWebSocket.Settings.DebugEnableHoverText="Changing this requires the WebSocket server to restart. However, changing this will not automatically restart the obs-websocket server."
OBSWebSocket.SessionTable.RemoteAddressColumnTitle="Remote Address"
OBSWebSocket.SessionTable.SessionDurationColumnTitle="Session Duration"
@ -16,6 +17,14 @@ OBSWebSocket.SessionTable.IdentifiedTitle="Identified"
OBSWebSocket.SessionTable.KickButtonColumnTitle="Kick?"
OBSWebSocket.SessionTable.KickButtonText="Kick"
OBSWebSocket.ConnectInfo.DialogTitle="WebSocket Connect Info"
OBSWebSocket.ConnectInfo.CopyText="Copy"
OBSWebSocket.ConnectInfo.ServerIp="Server IP"
OBSWebSocket.ConnectInfo.ServerPort="Server Port"
OBSWebSocket.ConnectInfo.ServerPassword="Server Password"
OBSWebSocket.ConnectInfo.ServerPasswordPlaceholderText="[Auth Disabled]"
OBSWebSocket.ConnectInfo.QrTitle="Connect QR"
OBSWebSocket.NotifyConnect.Title="New WebSocket connection."
OBSWebSocket.NotifyConnect.Message="Client %1 connected."
OBSWebSocket.NotifyDisconnect.Title="WebSocket client disconnected."