Add GUI crate skeleton with libadwaita placeholder (build deferred until libgtk-4-dev/libadwaita-1-dev installed)

This commit is contained in:
michael
2026-04-26 14:43:04 -07:00
parent e6db10f5a9
commit 9627ca7533
4 changed files with 64 additions and 0 deletions

15
gui/Cargo.toml Normal file
View File

@@ -0,0 +1,15 @@
[package]
name = "ubuntu-fido-gui"
version.workspace = true
edition.workspace = true
license.workspace = true
[[bin]]
name = "ubuntu-fido"
path = "src/main.rs"
[dependencies]
gtk = { package = "gtk4", version = "0.8" }
adw = { package = "libadwaita", version = "0.6" }
ubuntu-fido-common = { path = "../common" }
anyhow = { workspace = true }

View File

@@ -0,0 +1,11 @@
[Desktop Entry]
Name=Authentication
GenericName=Security Keys & MFA
Comment=Manage U2F/FIDO2 keys and authentication policy
Exec=ubuntu-fido
Icon=io.dangerousthings.UbuntuFido
Terminal=false
Type=Application
Categories=Settings;Security;
Keywords=mfa;u2f;fido2;passkey;totp;security;
StartupNotify=true

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
<!-- Placeholder icon: a simple key glyph. Replace with branded asset before release. -->
<g fill="none" stroke="#3584e4" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
<circle cx="22" cy="32" r="9"/>
<path d="M31 32h22"/>
<path d="M44 32v8"/>
<path d="M52 32v6"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 440 B

28
gui/src/main.rs Normal file
View File

@@ -0,0 +1,28 @@
use adw::prelude::*;
use gtk::glib;
const APP_ID: &str = "io.dangerousthings.UbuntuFido";
fn main() -> glib::ExitCode {
let app = adw::Application::builder().application_id(APP_ID).build();
app.connect_activate(|app| {
let win = adw::ApplicationWindow::builder()
.application(app)
.default_width(720)
.default_height(540)
.title("Authentication")
.build();
let header = adw::HeaderBar::new();
let toolbar = adw::ToolbarView::new();
toolbar.add_top_bar(&header);
let status = adw::StatusPage::builder()
.icon_name("dialog-password-symbolic")
.title("Authentication setup")
.description("Phase 0 placeholder. Real UI in Phase 8.")
.build();
toolbar.set_content(Some(&status));
win.set_content(Some(&toolbar));
win.present();
});
app.run()
}