Skip to content

Commit

Permalink
Automatically detect when broadcast should be used as the current set…
Browse files Browse the repository at this point in the history
…ting is confusing to users

Closes #445
  • Loading branch information
streetpea committed Oct 26, 2024
1 parent c5246b0 commit 4dc2858
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions gui/src/qml/RegistDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ DialogView {
buttonText: qsTr("✓ Register")
buttonEnabled: hostField.text.trim() && pin.acceptableInput && cpin.acceptableInput && (!onlineId.visible || onlineId.text.trim()) && (!accountId.visible || accountId.text.trim())
StackView.onActivated: {
if (host == "255.255.255.255")
broadcast.checked = true;
if(Chiaki.settings.psnAccountId)
accountId.text = Chiaki.settings.psnAccountId
}
onAccepted: {
let psnId = onlineId.visible ? onlineId.text.trim() : accountId.text.trim();
let registerOk = Chiaki.registerHost(hostField.text.trim(), psnId, pin.text.trim(), cpin.text.trim(), broadcast.checked, consoleButtons.checkedButton.target, function(msg, ok, done) {
let registerOk = Chiaki.registerHost(hostField.text.trim(), psnId, pin.text.trim(), cpin.text.trim(), hostField.text.trim() == "255.255.255.255", consoleButtons.checkedButton.target, function(msg, ok, done) {
if (!done)
logArea.text += msg + "\n";
else
Expand Down Expand Up @@ -158,15 +156,6 @@ DialogView {
Layout.preferredWidth: 400
}

Label {
Layout.alignment: Qt.AlignRight
text: qsTr("Broadcast:")
}

C.CheckBox {
id: broadcast
}

Label {
Layout.alignment: Qt.AlignRight
text: qsTr("Console:")
Expand Down

0 comments on commit 4dc2858

Please sign in to comment.