feat: replace the login screen's Exit button with an X in the corner
The full-width button under Connect took a row in a card that is close to filling an 800 px high screen. The X is a focus stop between the saved servers and the address field, so Up from the address field still reaches it from a controller. Bumps the version to 0.10.1.
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
|
||||
One section per version, newest first.
|
||||
|
||||
## v0.10.1 (2026-11-06)
|
||||
|
||||
### Features
|
||||
|
||||
- Exit on the login screen is an X in the top right corner of the card instead of a button under Connect, which makes the card shorter. Up from the address field reaches it on a controller. When adding a server it cancels, as the button did.
|
||||
|
||||
## v0.10.0 (2026-11-06)
|
||||
|
||||
### Features
|
||||
|
||||
Generated
+1
-1
@@ -4385,7 +4385,7 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
|
||||
|
||||
[[package]]
|
||||
name = "remus"
|
||||
version = "0.10.0"
|
||||
version = "0.10.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"directories",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "remus"
|
||||
version = "0.10.0"
|
||||
version = "0.10.1"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
</supports>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<releases>
|
||||
<release version="0.10.1" date="2026-11-06"/>
|
||||
<release version="0.10.0" date="2026-11-06"/>
|
||||
<release version="0.9.1" date="2026-11-06"/>
|
||||
<release version="0.9.0" date="2026-11-05"/>
|
||||
|
||||
+18
-17
@@ -584,15 +584,15 @@ impl App {
|
||||
self.set_area(area);
|
||||
}
|
||||
|
||||
/// 0 to 2 are the fields and 3 and 4 the buttons. Below 0 are the saved
|
||||
/// servers in the card beside the form, from the top one at -n to the
|
||||
/// bottom one at -1, so Up from the address field reaches the list.
|
||||
/// Top to bottom: the saved servers in the card beside the form, from
|
||||
/// -n-1 to -2; the X in the form's corner at -1; the fields 0 to 2; and
|
||||
/// Connect at 3. So Up from the address field reaches the X, then the list.
|
||||
fn set_login_focus(&mut self, i: i32) {
|
||||
let known = self.logins.servers.len() as i32;
|
||||
self.login_focus = i.clamp(-known, 4);
|
||||
self.login_focus = i.clamp(-known - 1, 3);
|
||||
self.ui.set_login_focus(self.login_focus);
|
||||
self.ui.set_login_known_selected(if self.login_focus < 0 {
|
||||
known + self.login_focus
|
||||
self.ui.set_login_known_selected(if self.login_focus < -1 {
|
||||
known + 1 + self.login_focus
|
||||
} else {
|
||||
-1
|
||||
});
|
||||
@@ -606,16 +606,16 @@ impl App {
|
||||
Action::Down | Action::SectionNext => self.set_login_focus(self.login_focus + 1),
|
||||
// Across to the saved servers and back. A text field keeps Left
|
||||
// and Right on a keyboard for its cursor.
|
||||
Action::Left if self.login_focus >= 0 && !self.logins.servers.is_empty() => {
|
||||
self.set_login_focus(-(self.logins.servers.len() as i32))
|
||||
Action::Left if self.login_focus >= -1 && !self.logins.servers.is_empty() => {
|
||||
self.set_login_focus(-(self.logins.servers.len() as i32) - 1)
|
||||
}
|
||||
Action::Right if self.login_focus < 0 => self.set_login_focus(0),
|
||||
Action::Activate if self.login_focus < 0 => {
|
||||
self.pick_known((self.logins.servers.len() as i32 + self.login_focus) as usize)
|
||||
Action::Right if self.login_focus < -1 => self.set_login_focus(0),
|
||||
Action::Activate if self.login_focus < -1 => {
|
||||
self.pick_known((self.logins.servers.len() as i32 + 1 + self.login_focus) as usize)
|
||||
}
|
||||
Action::Activate if self.login_focus == -1 && self.client.is_some() => self.cancel_login(),
|
||||
Action::Activate if self.login_focus == -1 => self.action(Action::Quit),
|
||||
Action::Activate if self.login_focus < 2 => self.set_login_focus(self.login_focus + 1),
|
||||
Action::Activate if self.login_focus == 4 && self.client.is_some() => self.cancel_login(),
|
||||
Action::Activate if self.login_focus == 4 => self.action(Action::Quit),
|
||||
Action::Activate => self.login_submit(),
|
||||
Action::Back => self.cancel_login(),
|
||||
// The face button that queues elsewhere; a keyboard types into
|
||||
@@ -2051,10 +2051,10 @@ impl App {
|
||||
Screen::Login => {
|
||||
let adding = self.client.is_some();
|
||||
let label = match self.login_focus {
|
||||
..0 => "Use this server",
|
||||
..-1 => "Use this server",
|
||||
-1 if adding => "Cancel",
|
||||
-1 => "Exit",
|
||||
0 | 1 => "Next",
|
||||
4 if adding => "Cancel",
|
||||
4 => "Exit",
|
||||
_ => "Connect",
|
||||
};
|
||||
h(Control::Activate, label);
|
||||
@@ -2062,7 +2062,8 @@ impl App {
|
||||
let shown = self.ui.get_login_password_shown();
|
||||
h(Control::Queue, if shown { "Hide password" } else { "Show password" });
|
||||
}
|
||||
if adding {
|
||||
// Already the activate hint while the X has focus.
|
||||
if adding && self.login_focus != -1 {
|
||||
h(Control::Back, "Cancel");
|
||||
}
|
||||
}
|
||||
|
||||
+26
-16
@@ -1101,21 +1101,6 @@ component LoginView inherits Rectangle {
|
||||
clicked => { root.submit(); }
|
||||
}
|
||||
}
|
||||
// Secondary to Connect: outlined, no fill, and only lit when focused.
|
||||
Rectangle {
|
||||
height: 46px * Theme.s;
|
||||
border-radius: 12px * Theme.s;
|
||||
border-width: 2px * Theme.s;
|
||||
border-color: root.focus-index == 4 ? Theme.focus : Theme.line;
|
||||
Text {
|
||||
text: root.can-cancel ? "Cancel" : "Exit";
|
||||
font-size: 17px * Theme.s;
|
||||
color: root.focus-index == 4 ? Theme.text : Theme.muted;
|
||||
}
|
||||
TouchArea {
|
||||
clicked => { root.exit(); }
|
||||
}
|
||||
}
|
||||
if root.error != "": Text {
|
||||
text: root.error;
|
||||
font-size: 15px * Theme.s;
|
||||
@@ -1129,6 +1114,31 @@ component LoginView inherits Rectangle {
|
||||
wrap: word-wrap;
|
||||
}
|
||||
}
|
||||
|
||||
// Exit, or Cancel when adding a server from inside the app. A
|
||||
// corner button rather than a row, to keep the card short.
|
||||
Rectangle {
|
||||
x: parent.width - self.width - 14px * Theme.s;
|
||||
y: 14px * Theme.s;
|
||||
width: 44px * Theme.s;
|
||||
height: 44px * Theme.s;
|
||||
border-radius: self.width / 2;
|
||||
background: root.focus-index == -1 || x-area.has-hover ? Theme.raised : transparent;
|
||||
border-width: 2px * Theme.s;
|
||||
border-color: root.focus-index == -1 ? Theme.focus : transparent;
|
||||
Path {
|
||||
width: 18px * Theme.s;
|
||||
height: 18px * Theme.s;
|
||||
viewbox-width: 24;
|
||||
viewbox-height: 24;
|
||||
commands: "M 4 4 L 20 20 M 20 4 L 4 20";
|
||||
stroke: root.focus-index == -1 || x-area.has-hover ? Theme.text : Theme.muted;
|
||||
stroke-width: 2px * Theme.s;
|
||||
}
|
||||
x-area := TouchArea {
|
||||
clicked => { root.exit(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1419,7 +1429,7 @@ export component AppWindow inherits Window {
|
||||
search.focus-input();
|
||||
}
|
||||
public function focus-login(i: int) {
|
||||
// Below 0 is a saved server, above 2 a button: keys go to the scope.
|
||||
// Below 0 is the X or a saved server, 3 is Connect: keys go to the scope.
|
||||
if (i >= 3 || i < 0) {
|
||||
fs.focus();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user