Skip to content

Commit

Permalink
ui: login page improved
Browse files Browse the repository at this point in the history
  • Loading branch information
Mairon1206 committed Jul 29, 2024
1 parent b0c825d commit 60dcdc6
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 51 deletions.
4 changes: 2 additions & 2 deletions ui/app.slint
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export component App inherits Window {
width: ROOT-GLOBAL.window-width;
title: "SAST Evento";
icon: @image-url("assets/app_icon.png");
main_view := MainView {
y: 200px;
main-view := MainView {
y: 120px;
}
}
Binary file added ui/assets/evento_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/assets/evento_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed ui/assets/surrealism.png
Binary file not shown.
25 changes: 0 additions & 25 deletions ui/assets/surrealism.svg

This file was deleted.

4 changes: 2 additions & 2 deletions ui/global.slint
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! global styles
export global ROOT_GLOBAL {
in-out property <length> window-height : 600px;
in-out property <length> window-width : 800px;
in-out property <length> window-height : 760px;
in-out property <length> window-width : 1340px;
in-out property <length> font-size : 16px;
in-out property <length> padding : 0px;
}
51 changes: 29 additions & 22 deletions ui/views/main.slint
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,43 @@ import { Hello } from "../components/index.slint";
import { SText, SButton } from "../modules/surrealism-ui/index.slint";

export component MainView {
callback startLink;

eventoLogo := Image {
width: 150px;
height: 150px;
x: (root.width - self.width) / 2;
source: @image-url("../assets/app_icon.svg");
callback startLink <=> link-button.clicked;
evento-image := Image {
height: 240px;
width: 700px;
source: @image-url("../assets/evento_black.png");
}

title := SText {
x: (root.width - self.width) / 2;
y: eventoLogo.y + eventoLogo.height;
text: "SAST Evento";
link-button := SButton {
width: 400px;
height: 80px;
y: evento-image.y + evento-image.height + 140px;
text: "使用Link登录";
font-size: 35px;
theme: Dark;
border-radius: 12px;
show-icon: true;
icon: @image-url("../assets/sast_link.svg");
}

linkButton := SButton {
x: (root.width - self.width) / 2;
y: title.y + title.height + 30px;
visitor-button := SButton {
y: link-button.y + link-button.height + 30px;
text: "访客登录";
theme: Light;
border-radius: 8px;
show-icon: true;
icon: @image-url("../assets/sast_link.svg");
text: "使用Link登入";
clicked => {
root.startLink();
}
icon: @image-url("../modules/surrealism-ui/icons/user.svg");
}

infoText := SText {
x: (root.width - self.width) / 2;
y: linkButton.y + linkButton.height + 30px;
group-label := SText {
y: visitor-button.y + visitor-button.height + 20px;
text: "SAST-C++组开发";
theme: Light;
}

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

0 comments on commit 60dcdc6

Please sign in to comment.