ui: one dialog to add a server, with Save and Connect
Join a Server and Add a Server were the same dialog with other buttons, and Join saved the server in Slint and then connected the one shown: when saving failed, that was the server shown before. The dialog now has Cancel, Save and Connect (also Enter in the address or password field). Connect goes through Bridge.save-and-connect, which connects only the server it saved (vm::servers::connect_to); it is hidden while the server has voice, and Save is the main button then. On a phone Delete shows only its icon, so the four buttons fit. BookmarkForm carries a channel, its password and a privilege key for the links to come: the dialog shows "Joins <channel>" and "This link grants a server group", Connect connects into that channel, and connect_voice_to passes the key on. Nav.join-server is gone; the dev switch join opens the same dialog as bookmark. "Add server" reads "Add a server" everywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
This commit is contained in:
1 parent
4940966538
commit
95d86af627
14 files changed
+275
-70
No files matched your search
@@ -47,8 +47,9 @@ pub(super) fn wire(ui: &MainWindow) {
|
||||
});
|
||||
bridge.on_edit_bookmark(|id| with_app(|app| app.bookmark_form(id as i64)).unwrap_or_default());
|
||||
bridge.on_save_bookmark(|form| {
|
||||
with_app(|app| app.save_bookmark(form));
|
||||
with_app(|app| app.save_bookmark(&form));
|
||||
});
|
||||
bridge.on_save_and_connect(|form| with_app(|app| app.save_and_connect(&form)).unwrap_or(false));
|
||||
bridge.on_delete_bookmark(|id| {
|
||||
with_app(|app| app.delete_bookmark(id as i64));
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user