add ui mockup

This commit is contained in:
Ferdinand Schober
2024-09-25 02:00:48 +02:00
parent c480bb6ea6
commit f056f790c7
4 changed files with 75 additions and 2 deletions

View File

@@ -213,6 +213,58 @@
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Incoming Connections</property>
<child>
<object class="GtkListBox" id="connection_list">
<property name="selection-mode">none</property>
<child type="placeholder">
<object class="AdwActionRow">
<property name="title">no incoming connections!</property>
<property name="subtitle">devices that control this pc will show up here</property>
</object>
</child>
<style>
<class name="boxed-list" />
</style>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Authorized Keys</property>
<property name="header-suffix">
<object class="GtkButton">
<signal name="clicked" handler="handle_add_cert_fingerprint" swapped="true"/>
<property name="child">
<object class="AdwButtonContent">
<property name="icon-name">list-add-symbolic</property>
<property name="label" translatable="yes">Add</property>
</object>
</property>
<style>
<class name="flat"/>
</style>
</object>
</property>
<child>
<object class="GtkListBox" id="fingerprint_list">
<property name="selection-mode">none</property>
<child type="placeholder">
<object class="AdwActionRow">
<property name="title">no fingerprints!</property>
<property name="subtitle">add a public key fingerprint via the + button</property>
</object>
</child>
<style>
<class name="boxed-list" />
</style>
</object>
</child>
</object>
</child>
</object>
</property>
</object>

View File

@@ -118,6 +118,11 @@ impl Window {
self.obj().request_capture();
}
#[template_callback]
fn handle_add_cert_fingerprint(&self, _button: &Button) {
log::info!("TODO: impl add certificate fingerprint");
}
pub fn set_port(&self, port: u16) {
self.port.set(port);
if port == DEFAULT_PORT {