Skip to content

Commit

Permalink
ui: version display
Browse files Browse the repository at this point in the history
  • Loading branch information
Mairon1206 committed Jul 30, 2024
1 parent fa1469d commit 1864dc3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ int main(int argc, char** argv) {
Logger logger(Logger::Level::debug, "logs/evento.log");
spdlog::info("SAST Evento version: v" VERSION_FULL);
auto ui = App::create();
ui->set_version_string("v" VERSION_FULL);
ui->on_loginClicked(start_sast_link);
ui->run();
}
6 changes: 4 additions & 2 deletions ui/app.slint
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import {ROOT_GLOBAL} from "./global.slint";

export component App inherits Window {
callback loginClicked <=> main-view.startLink;
height: ROOT-GLOBAL.window-height;
width: ROOT-GLOBAL.window-width;
in-out property <string> version-string <=> main-view.version-string;
min-height: ROOT-GLOBAL.window-height;
min-width: ROOT-GLOBAL.window-width;
title: "SAST Evento";
background: white;
icon: @image-url("assets/app_icon.png");
main-view := MainView {
y: 120px;
Expand Down
2 changes: 1 addition & 1 deletion ui/views/main.slint
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { SText, SButton } from "../modules/surrealism-ui/index.slint";

export component MainView {
callback startLink <=> link-button.clicked;
in-out property <string> version-string <=> version-label.text;
evento-image := Image {
height: 240px;
width: 700px;
Expand Down Expand Up @@ -38,7 +39,6 @@ export component MainView {

version-label := SText {
y: group-label.y + group-label.height + 5px;
text: "v0.0.0-alpha";
theme: Light;
}
}

0 comments on commit 1864dc3

Please sign in to comment.