mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-04 10:43:19 +00:00
Refactor the whole structure, no more separation for C++ and Slint files
This commit is contained in:
parent
d6c781faa2
commit
893fcc11e3
35 changed files with 920 additions and 518 deletions
|
@ -1,41 +0,0 @@
|
|||
import { Backend } from "../Backend.slint";
|
||||
import { VerticalBox, CheckBox } from "std-widgets.slint";
|
||||
import { SideBar } from "../components/SideBar.slint";
|
||||
import { VButton, VText, VTextInput, Palette } from "@selenite";
|
||||
|
||||
export component AddSourceWindow inherits Window {
|
||||
|
||||
title: "Mirai - Add source";
|
||||
min-height: 100px;
|
||||
max-height: 4000px; // needed, otherwise the window wants to fit the content (on Swaywm)
|
||||
min-width: 400px;
|
||||
default-font-size: 16px;
|
||||
background: Palette.background;
|
||||
|
||||
in-out property <string> default-source-path;
|
||||
|
||||
VerticalLayout {
|
||||
padding: 16px;
|
||||
spacing: 8px;
|
||||
nameInput := VTextInput {
|
||||
label: "Name";
|
||||
text: "todo";
|
||||
}
|
||||
pathInput := VTextInput {
|
||||
label: "Path";
|
||||
text: root.default-source-path + nameInput.text + ".md";
|
||||
}
|
||||
VButton {
|
||||
text: "Create";
|
||||
clicked => {
|
||||
Backend.add-source({
|
||||
name: nameInput.text,
|
||||
type: "FileSystemMarkdown",
|
||||
path: pathInput.text
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { Backend, Palette } // Export to make it visible to the C++ backend
|
Loading…
Add table
Add a link
Reference in a new issue