obliteration/gui/ui/setup/firmware.slint
2025-03-23 11:03:26 +01:00

67 lines
1.5 KiB
Text

import { VerticalBox, HorizontalBox, LineEdit, Button, Palette, ProgressIndicator } from "std-widgets.slint";
import { Header } from "header.slint";
export component Firmware {
in-out property <string> firmware-dump <=> input.text;
pure callback browse();
VerticalBox {
Header {
title: "Install Firmware";
}
Text {
text: "Select a firmware dump that you got from Firmware Dumper.";
}
HorizontalBox {
padding: 0;
input := LineEdit {
placeholder-text: "Path to a firmware dump";
}
Button {
text: "...";
clicked => {
browse();
}
}
}
Rectangle { }
}
}
export component InstallFirmware inherits Window {
in property <string> status;
in property <float> progress;
title: "Installing Firmware";
icon: @image-url("@root/assets/icon.png");
min-width: 400px;
preferred-width: 400px;
min-height: 100px;
preferred-height: 100px;
VerticalBox {
alignment: center;
Text {
text: "Installing firmware, please wait.";
horizontal-alignment: center;
}
ProgressIndicator {
progress: progress;
}
Text {
text: status;
horizontal-alignment: center;
wrap: no-wrap;
overflow: elide;
}
}
}