Compare commits

...

15 commits
1.0.0 ... main

Author SHA1 Message Date
f1200ce49a Changed some Translations 2024-05-25 22:12:27 +03:30
DX
bc77e00bb2
Fix launch Issue related to Calamares start (#18) 2024-04-18 14:31:18 +03:30
35a406eb25 changed pkgbuild branch to main 2024-04-12 20:46:42 +03:30
Sohrab Behdani
f35077f109
New Parch Welcome written in slint and rust (#16)
* new slint build

* new slint build + desktop files

* fixed the pkgbuild
2024-04-12 17:14:01 +00:00
DX
bf94546f47
Fix draggable and window position (#14) 2023-11-26 21:42:16 +03:30
hikari
a7fc110a27
add qt6-svg in pkgbuild 2023-09-10 17:54:51 +03:30
DanielcoderX
03ba4e424c
Fixed PKGBUILD (#12)
* Fixed PKGBUILD & Updated Readme

* fixed PKGBUILD
2023-09-03 09:18:10 +00:00
komeil Parseh
646329afff
Add QT's files to ignore to .gitignore 2023-08-31 20:05:01 +03:30
DanielcoderX
1ec6f728ae
completely moved on CPP (#9)
* Changed to CPP

* updated README
2023-08-31 15:53:25 +00:00
5ffb460097 fix bug 2023-08-21 23:23:08 +03:30
198d6e87bb fix logo 2023-08-21 23:19:17 +03:30
b71f7f4b3e fix version 2023-08-21 23:17:19 +03:30
743ce0681a fix bugs 2023-08-21 23:15:40 +03:30
3ae23445b9 fix bugs 2023-08-21 23:03:29 +03:30
Sohrab Behdani
b08a9b3575
fixed the desktop file (#8) 2023-08-21 10:59:37 +00:00
49 changed files with 5611 additions and 1826 deletions

60
.gitignore vendored
View file

@ -1,6 +1,54 @@
venv
.idea
__pycache__
*.tar.*
parch-welcome-bin
.vscode
# C++ objects and libs
*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.so.*
*.dll
*.dylib
# Qt-es
object_script.*.Release
object_script.*.Debug
*_plugin_import.cpp
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
*.qmlc
*.jsc
Makefile*
*build-*
*.qm
*.prl
# Qt unit tests
target_wrapper.*
# QtCreator
*.autosave
# QtCreator Qml
*.qmlproject.user
*.qmlproject.user.*
# QtCreator CMake
CMakeLists.txt.user*
# QtCreator 4.8< compilation database
compile_commands.json
# QtCreator local machine-specific files for imported projects
*creator.user*
*_qmlcache.qrc

4833
Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

20
Cargo.toml Normal file
View file

@ -0,0 +1,20 @@
[package]
name = "parch-welcome"
version = "2.0.0"
authors = ["DanielcoderX <danielcoderx@keemail.me>"]
edition = "2021"
build = "build.rs"
[dependencies]
open = "5.1.2"
slint = "1.4"
[build-dependencies]
slint-build = "1.4"
[profile.release]
lto = true
panic = "abort"
strip = true
codegen-units = 1
opt-level = "s"

View file

@ -4,24 +4,18 @@ Parch dorood (/do-rood/, درود, pronunciation) which is Persian word for "Gre
- Showing Parch Linux pages on social media
- Running the installer program
- Updating Parch repositories
This program is still on alpha stages and it is not completely ready to use.
This program is still on beta stages and it is semi complete and ready to use.
## Build the package on Arch machines
- For building this package run:
```shell
cd build/
makepkg -f
```
### Install the package
- For installing this pacakge run:
```shell
cd build
cd build/
sudo pacman -U ./parch-welcome*
```
## Generate Qt Resources (if edited)
if you made a changes in src you can update the `qrc` by running this command:
```shell
cd src
python QrcGenerate.py
```

4
build.rs Normal file
View file

@ -0,0 +1,4 @@
fn main() {
let config = slint_build::CompilerConfiguration::new().with_style("native".into());
let _ = slint_build::compile_with_config("ui/parch-welcome.slint", config);
}

View file

@ -1,53 +1,38 @@
# Maintainer: ParchLinux
pkgname=parch-welcome
arch=('x86_64')
pkgver=r44.91178ea
pkgver=2.0.0
pkgrel=1
pkgdesc='Parch dorood (/do-rood/, درود, pronunciation) which is Persian word for "Greetings", is a welcome app in the Parch distribution.'
url="https://github.com/parchlinux/${pkgname}"
license=('GPL')
makedepends=("git")
depends=("qt6-base" "python" "python-pyqt6")
conflicts=("${pkgname}")
provides=("${pkgname}")
source=("${pkgname}::git+${url}")
#source=("${pkgname}.tar.gz")
pkgdesc="Welcome application for Parch Linux"
arch=('x86_64')
url="https://github.com/parchlinux/parch-welcome"
license=('GPL-3')
depends=('gcc-libs')
makedepends=('git' 'rust')
source=("$pkgname::git+$url#branch=main")
md5sums=('SKIP')
build(){
_src="${srcdir}/${pkgname}/src"
_ui="${_src}/UI"
rcc -g python "${_ui}/res.qrc" -o "${_src}/Res.py"
sed -i 's/PySide2/PyQt6/g' "${_src}/Res.py"
_welcome="${_src}/../${pkgname}-bin"
echo "#!/usr/bin/python" > $_welcome && cat "${_src}/Res.py" >> $_welcome && cat "${_src}/Welcome.py" >> $_welcome
sed -i 's/import Res//g' $_welcome
build() {
cd "$srcdir/$pkgname"
cargo build --release
}
pkgver() {
cd "${srcdir}/${pkgname}"
( set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
package() {
cd "$srcdir/$pkgname"
# copy license
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# copy license
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
#copy logo
install -Dm644 "${srcdir}/${pkgname}/resources/logo.png" "${pkgdir}/usr/share/icons/${pkgname}.png"
# copy logo
install -Dm644 "${srcdir}/${pkgname}/resources/logo.png" "${pkgdir}/usr/share/icons/${pkgname}.png"
# copy welcome binfile into /bin
install -Dm755 "${srcdir}/${pkgname}/${pkgname}-bin" "${pkgdir}/usr/bin/${pkgname}"
# copy autostart desktop file
install -Dm644 "${srcdir}/${pkgname}/resources/autostart.desktop" "${pkgdir}/etc/xdg/autostart/${pkgname}.desktop"
# copy autostart desktop file into autostart dir
install -Dm644 "${srcdir}/${pkgname}/resources/autostart.desktop" "${pkgdir}/etc/xdg/autostart/${pkgname}.desktop"
# copy application desktop file
install -Dm644 "${srcdir}/${pkgname}/resources/application.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
# copy appliction desktop file into autostart dir
install -Dm644 "${srcdir}/${pkgname}/resources/application.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
# install binary
install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
}

View file

@ -1 +0,0 @@
PyQt6

View file

@ -2,7 +2,7 @@
[Desktop Entry]
Name=Welcome
Name[ir]=درود
Exec=/usr/bin/welcome
Exec=/usr/bin/parch-welcome
Terminal=false
Type=Application
Icon=/usr/share/icons/parch-welcome.png

View file

@ -1,20 +0,0 @@
#!/usr/bin/python
#!/usr/bin/python
import os, subprocess
# Create Qrc file
listrc = os.listdir("UI")
listrc.remove("res.qrc")
f = open("UI/res.qrc", "w")
f.write("""<RCC><qresource prefix="/">""")
for i in listrc:
f.write(f"<file>{i}</file>")
f.write("""</qresource></RCC>""")
f.close()
# Compile Qrc & Create onefile script & run it
subprocess.run(
"""rcc -g python UI/res.qrc -o Res.py && sed -i 's/PySide2/PyQt6/g' Res.py && echo "#!/usr/bin/python" > Welcome && cat Res.py >> Welcome && cat Welcome.py >> Welcome && chmod +x Welcome && sed -i 's/import Res//g' Welcome && mv Welcome ../build/parch-welcome/usr/bin""",
shell=True,
)

1214
src/Res.py

File diff suppressed because it is too large Load diff

View file

@ -1,189 +0,0 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
ApplicationWindow {
width: Screen.width
height: Screen.height
flags: Qt.FramelessWindowHint
visible: true
id: parch
color: "transparent"
MouseArea {
anchors.fill: parent
drag{ target: parent; axis: Drag.XandYAxis}
onMouseXChanged: {
if(drag.active){
print(parent.x)
}
}
onMouseYChanged: {
if(drag.active)
{
print(parent.y)
}
}
}
Rectangle {
anchors.centerIn: parent
width: 900
height: 500
radius: 20
color: "#DD010409"
Row {
anchors.right: parent.right
anchors.top: parent.top
ToolButton {
icon.color: "white"
icon.source: "x-lg.svg"
onClicked: {
parch.close()
}
}
}
Column {
anchors.centerIn: parent
Image {
source: "ParchLogo.svg"
width: 128
height: 128
anchors.horizontalCenter: parent.horizontalCenter
}
Rectangle {
width: parent.width
height: 12
color: "transparent"
}
Text {
text: "<strong>Parch Linux</strong>"
color: "white"
font.family: "Ubuntu"
font.pixelSize: 30
anchors.horizontalCenter: parent.horizontalCenter
}
Rectangle {
width: parent.width
height: 8
color: "transparent"
}
Text {
text: "<strong><font color='#3b82f6'>Parch Linux</font></strong> is an open-source, Arch-based Linux distribution,"
color: "white"
verticalAlignment: Text.AlignCenter
font.family: "Ubuntu Light"
font.pixelSize: 14
anchors.horizontalCenter: parent.horizontalCenter
}
Text {
color: "white"
text: "that tried to be pretty, easy to use, light, fast and stable."
verticalAlignment: Text.AlignCenter
font.family: "Ubuntu Light"
font.pixelSize: 14
anchors.horizontalCenter: parent.horizontalCenter
}
Rectangle {
width: parent.width
height: 8
color: "transparent"
}
Row {
anchors.horizontalCenter: parent.horizontalCenter
ToolButton {
icon.color: "white"
icon.source: "github.svg"
objectName: "b1"
}
ToolButton {
icon.color: "white"
icon.source: "tw.svg"
objectName: "b2"
}
ToolButton {
icon.color: "white"
icon.source: "tele.svg"
objectName: "b3"
}
ToolButton {
icon.color: "white"
icon.source: "discord.svg"
objectName: "b4"
}
ToolButton {
icon.color: "white"
icon.source: "masto.svg"
objectName: "b5"
}
ToolButton {
icon.color: "white"
icon.source: "cafe.svg"
objectName: "b6"
}
ToolButton {
icon.color: "white"
icon.source: "website.svg"
objectName: "b7"
}
ToolButton {
icon.color: "white"
icon.source: "book.svg"
objectName: "b8"
}
}
Rectangle {
width: parent.width
height: 20
color: "transparent"
}
Rectangle {
color: "#4063eb"
width: 160
height: 40
radius: 15
anchors.horizontalCenter: parent.horizontalCenter
ToolButton {
anchors.fill: parent
objectName: "install"
}
Row {
anchors.centerIn: parent
Rectangle {
width: 18
height: 20
color: "transparent"
}
Text {
color: "white"
font.family: "Ubuntu"
text: "Install Parch"
font.pixelSize: 14
anchors.verticalCenter: parent.verticalCenter
}
ToolButton {
width: 40
height: 40
anchors.verticalCenter: parent.verticalCenter
icon.color: "white"
icon.source: "install.svg"
}
}
}
}
}
}

View file

@ -1,187 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="1024.0px"
height="1024.0px"
viewBox="0 0 1024.0 1024.0"
version="1.1"
id="SVGRoot"
sodipodi:docname="Parch_LOGO_N1.svg"
inkscape:export-filename="Parch_LOGO_N1.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview433"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="0.46769781"
inkscape:cx="215.95141"
inkscape:cy="489.6324"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="layer1">
<inkscape:grid
type="xygrid"
id="grid556" />
</sodipodi:namedview>
<defs
id="defs428">
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient7364"
id="linearGradient7366"
x1="881.64832"
y1="1399.6702"
x2="1086.3264"
y2="1551.4346"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(2.00014,-2.000019)" />
<linearGradient
inkscape:collect="always"
id="linearGradient7364">
<stop
style="stop-color:#25d8a3;stop-opacity:1;"
offset="0"
id="stop7360" />
<stop
style="stop-color:#189c76;stop-opacity:1;"
offset="1"
id="stop7362" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient6175"
id="linearGradient6177"
x1="764.72528"
y1="1331.642"
x2="1072.3627"
y2="1186.5356"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-2,2)" />
<linearGradient
inkscape:collect="always"
id="linearGradient6175">
<stop
style="stop-color:#15b7ba;stop-opacity:1;"
offset="0"
id="stop6171" />
<stop
style="stop-color:#017fd1;stop-opacity:1;"
offset="1"
id="stop6173" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient6183"
id="linearGradient6185"
x1="692.88007"
y1="1434.4056"
x2="959.86017"
y2="1344.1935"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient6183">
<stop
style="stop-color:#003baf;stop-opacity:1;"
offset="0"
id="stop6179" />
<stop
style="stop-color:#1d47d1;stop-opacity:1;"
offset="1"
id="stop6181" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient6157"
id="linearGradient6159"
x1="822.84015"
y1="1035.7853"
x2="1085.449"
y2="807.15295"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-2,4)" />
<linearGradient
inkscape:collect="always"
id="linearGradient6157">
<stop
style="stop-color:#189974;stop-opacity:1;"
offset="0"
id="stop6153" />
<stop
style="stop-color:#26dda7;stop-opacity:1;"
offset="1"
id="stop6155" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient6165"
id="linearGradient6167"
x1="646.99298"
y1="1169.6515"
x2="963.47876"
y2="1103.2811"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0.948016,2.425276)" />
<linearGradient
inkscape:collect="always"
id="linearGradient6165">
<stop
style="stop-color:#1b66bd;stop-opacity:1;"
offset="0"
id="stop6163" />
<stop
style="stop-color:#34aee1;stop-opacity:1;"
offset="1"
id="stop6161" />
</linearGradient>
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g351"
transform="matrix(1.2617269,0,0,1.2617269,-615.56887,-1016.6823)">
<path
style="fill:url(#linearGradient7366);fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
d="m 907.42424,1616.2488 c -24.0017,-2.3297 -52.02635,-12.6231 -78.85555,-28.9638 -19.1068,-11.6372 -38.2733,-27.4597 -58.392,-48.2042 -18.2162,-18.7831 -32.4842,-36.7342 -49.1463,-61.8328 -11.964,-18.022 256.84077,-146.9291 265.90907,-151.2971 5.559,-2.6776 9.7948,3.391 77.01334,-7.6092 23.5832,-3.8593 47.0328,-7.1016 52.1103,-7.2049 11.0834,-0.2258 10.575,-0.8697 14.9478,18.9334 9.5134,43.0829 11.2104,105.2552 3.6828,134.9296 -12.2746,48.3882 -47.2143,95.0359 -92.2301,123.1357 -17.1131,10.6824 -40.2247,20.473 -58.20424,24.6566 -18.5624,4.3192 -52.3089,5.8373 -76.83512,3.4567 z"
id="path3231"
sodipodi:nodetypes="ssssssssssss" />
<path
style="fill:url(#linearGradient6177);fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 753.09235,1327.4446 c 14.69201,-16.956 20.24712,-23.1265 35.64256,-39.5902 37.37125,-39.9644 101.19042,-100.893 193.48705,-184.7236 L 1005.4868,1082 l 14.6318,23.0603 c 17.5013,27.5828 38.2795,62.1034 50.2441,83.4753 10.9347,19.5324 30.0316,55.7258 29.9881,56.8352 -0.04,1.0309 -4.4647,4.2189 -58.0939,41.86 -52.19334,36.6331 -63.14394,41.9779 -64.54684,43.9445 -1.009,1.4143 -4.1223,0.4021 -97.93319,1.3997 -56.13568,0.5971 -108.8089,1.0771 -117.05159,1.067 l -14.98672,-0.019 z"
id="path3769"
sodipodi:nodetypes="ssscsscsssccs" />
<path
style="fill:url(#linearGradient6185);fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 731.8397,1496.163 c -10.00346,-13.6029 -27.81008,-41.8293 -38.95966,-61.7574 l -5.23231,-9.3519 1.98771,-3.9211 c 4.31553,-8.5131 25.20717,-42.5347 32.62288,-53.1258 4.31725,-6.1658 11.96362,-16.4625 16.99192,-22.8816 l 9.1424,-11.671 13.37122,-0.046 c 7.35417,-0.026 58.8885,-0.5917 114.52072,-1.2585 55.63223,-0.6665 101.27368,-1.105 101.42548,-0.9744 0.1517,0.1304 -7.8807,5.9889 -17.8499,13.0182 -43.89257,30.9492 -223.75444,156.7755 -224.10191,156.7755 -0.21145,0 -1.97479,-2.1625 -3.91855,-4.8057 z"
id="path4642" />
<path
style="fill:url(#linearGradient6159);fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 964.42676,1105.7064 c -12.05629,-5.5736 -124.78074,-56.6746 -136.07706,-61.6875 -4.37064,-1.9395 -7.74994,-3.8447 -7.50956,-4.2336 1.12494,-1.8202 -7.65234,-12.5683 -33.49963,-41.0217 -9.37559,-10.3209 -24.39764,-26.9662 -33.38233,-36.98955 l -16.3358,-18.22421 26.91016,-26.68073 c 27.07406,-26.84323 40.7116,-38.647 60.14764,-52.05987 33.95218,-23.43049 70.95902,-40.2681 111.85024,-50.89034 20.20284,-5.24805 33.85524,-7.37717 51.26124,-7.9943 22.99314,-0.81522 76.51254,2.11 95.65734,5.22837 7.8718,1.28218 21.5114,4.76773 21.5114,5.49716 0,0.34064 -4.8401,0.90754 -10.7557,1.25978 -44.3554,2.64115 -69.1623,12.18788 -93.9112,36.14093 -18.96854,18.35864 -30.68274,35.92495 -37.14614,55.70373 -8.82302,26.99962 -9.13016,54.30253 -0.9571,85.08983 6.7109,25.2799 16.1428,44.8072 40.21074,83.2507 l 2.9601,4.7282 -3.947,3.5103 c -2.1709,1.9307 -8.28954,7.4236 -13.59714,12.2063 -5.3075,4.7829 -10.4811,9.397 -11.4969,10.2535 -1.7655,1.4886 -2.2897,1.3525 -11.8933,-3.087 z"
id="path5325" />
<path
style="fill:url(#linearGradient6167);fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 663.61648,1352.5852 c -2.64202,-5.1359 -7.955,-25.2502 -11.90803,-45.0825 -2.68093,-13.4502 -3.75606,-35.3932 -3.7674,-76.8919 -0.0172,-60.5435 3.60619,-91.424 15.64669,-133.3734 9.22105,-32.1264 29.67888,-79.8984 43.31308,-101.14242 l 4.52066,-7.0438 24.55009,10.99112 c 68.96751,30.8767 239.61449,108.0897 240.34849,108.7511 0.3763,0.339 -15.6886,15.6752 -35.6998,34.0803 -46.54744,42.8119 -66.77489,61.8478 -99.2361,93.3898 -14.50185,14.0911 -26.40796,24.9807 -26.6193,24.3468 -0.475,-1.4249 -11.42936,5.427 -68.4316,42.8033 -51.3851,33.6933 -79.53897,51.6888 -80.86682,51.6888 -0.30525,0 -1.13772,-1.1328 -1.84996,-2.5172 z"
id="path5116" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.8 KiB

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-book" viewBox="0 0 16 16">
<path d="M1 2.828c.885-.37 2.154-.769 3.388-.893 1.33-.134 2.458.063 3.112.752v9.746c-.935-.53-2.12-.603-3.213-.493-1.18.12-2.37.461-3.287.811V2.828zm7.5-.141c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z"/>
</svg>

Before

Width:  |  Height:  |  Size: 783 B

View file

@ -1,4 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="w-6 h-6" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M.5 6a.5.5 0 0 0-.488.608l1.652 7.434A2.5 2.5 0 0 0 4.104 16h5.792a2.5 2.5 0 0 0 2.44-1.958l.131-.59a3 3 0 0 0 1.3-5.854l.221-.99A.5.5 0 0 0 13.5 6H.5ZM13 12.5a2.01 2.01 0 0 1-.316-.025l.867-3.898A2.001 2.001 0 0 1 13 12.5Z"></path>
<path d="m4.4.8-.003.004-.014.019a4.167 4.167 0 0 0-.204.31 2.327 2.327 0 0 0-.141.267c-.026.06-.034.092-.037.103v.004a.593.593 0 0 0 .091.248c.075.133.178.272.308.445l.01.012c.118.158.26.347.37.543.112.2.22.455.22.745 0 .188-.065.368-.119.494a3.31 3.31 0 0 1-.202.388 5.444 5.444 0 0 1-.253.382l-.018.025-.005.008-.002.002A.5.5 0 0 1 3.6 4.2l.003-.004.014-.019a4.149 4.149 0 0 0 .204-.31 2.06 2.06 0 0 0 .141-.267c.026-.06.034-.092.037-.103a.593.593 0 0 0-.09-.252A4.334 4.334 0 0 0 3.6 2.8l-.01-.012a5.099 5.099 0 0 1-.37-.543A1.53 1.53 0 0 1 3 1.5c0-.188.065-.368.119-.494.059-.138.134-.274.202-.388a5.446 5.446 0 0 1 .253-.382l.025-.035A.5.5 0 0 1 4.4.8Zm3 0-.003.004-.014.019a4.167 4.167 0 0 0-.204.31 2.327 2.327 0 0 0-.141.267c-.026.06-.034.092-.037.103v.004a.593.593 0 0 0 .091.248c.075.133.178.272.308.445l.01.012c.118.158.26.347.37.543.112.2.22.455.22.745 0 .188-.065.368-.119.494a3.31 3.31 0 0 1-.202.388 5.444 5.444 0 0 1-.253.382l-.018.025-.005.008-.002.002A.5.5 0 0 1 6.6 4.2l.003-.004.014-.019a4.149 4.149 0 0 0 .204-.31 2.06 2.06 0 0 0 .141-.267c.026-.06.034-.092.037-.103a.593.593 0 0 0-.09-.252A4.334 4.334 0 0 0 6.6 2.8l-.01-.012a5.099 5.099 0 0 1-.37-.543A1.53 1.53 0 0 1 6 1.5c0-.188.065-.368.119-.494.059-.138.134-.274.202-.388a5.446 5.446 0 0 1 .253-.382l.025-.035A.5.5 0 0 1 7.4.8Zm3 0-.003.004-.014.019a4.077 4.077 0 0 0-.204.31 2.337 2.337 0 0 0-.141.267c-.026.06-.034.092-.037.103v.004a.593.593 0 0 0 .091.248c.075.133.178.272.308.445l.01.012c.118.158.26.347.37.543.112.2.22.455.22.745 0 .188-.065.368-.119.494a3.198 3.198 0 0 1-.202.388 5.385 5.385 0 0 1-.252.382l-.019.025-.005.008-.002.002A.5.5 0 0 1 9.6 4.2l.003-.004.014-.019a4.149 4.149 0 0 0 .204-.31 2.06 2.06 0 0 0 .141-.267c.026-.06.034-.092.037-.103a.593.593 0 0 0-.09-.252A4.334 4.334 0 0 0 9.6 2.8l-.01-.012a5.099 5.099 0 0 1-.37-.543A1.53 1.53 0 0 1 9 1.5c0-.188.065-.368.119-.494.059-.138.134-.274.202-.388a5.446 5.446 0 0 1 .253-.382l.025-.035A.5.5 0 0 1 10.4.8Z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -1,3 +0,0 @@
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
<path d="M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -1,3 +0,0 @@
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 736 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 ml-2" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"></path>
</svg>

Before

Width:  |  Height:  |  Size: 311 B

View file

@ -1,3 +0,0 @@
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
<path d="M11.19 12.195c2.016-.24 3.77-1.475 3.99-2.603.348-1.778.32-4.339.32-4.339 0-3.47-2.286-4.488-2.286-4.488C12.062.238 10.083.017 8.027 0h-.05C5.92.017 3.942.238 2.79.765c0 0-2.285 1.017-2.285 4.488l-.002.662c-.004.64-.007 1.35.011 2.091.083 3.394.626 6.74 3.78 7.57 1.454.383 2.703.463 3.709.408 1.823-.1 2.847-.647 2.847-.647l-.06-1.317s-1.303.41-2.767.36c-1.45-.05-2.98-.156-3.215-1.928a3.614 3.614 0 0 1-.033-.496s1.424.346 3.228.428c1.103.05 2.137-.064 3.188-.189zm1.613-2.47H11.13v-4.08c0-.859-.364-1.295-1.091-1.295-.804 0-1.207.517-1.207 1.541v2.233H7.168V5.89c0-1.024-.403-1.541-1.207-1.541-.727 0-1.091.436-1.091 1.296v4.079H3.197V5.522c0-.859.22-1.541.66-2.046.456-.505 1.052-.764 1.793-.764.856 0 1.504.328 1.933.983L8 4.39l.417-.695c.429-.655 1.077-.983 1.934-.983.74 0 1.336.259 1.791.764.442.505.661 1.187.661 2.046v4.203z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1,000 B

View file

@ -1 +0,0 @@
<RCC><qresource prefix="/"><file>install.svg</file><file>masto.svg</file><file>github.svg</file><file>ParchLinux.qml</file><file>book.svg</file><file>website.svg</file><file>discord.svg</file><file>tw.svg</file><file>x-lg.svg</file><file>tele.svg</file><file>cafe.svg</file><file>ParchLogo.svg</file></qresource></RCC>

View file

@ -1,3 +0,0 @@
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.287 5.906c-.778.324-2.334.994-4.666 2.01-.378.15-.577.298-.595.442-.03.243.275.339.69.47l.175.055c.408.133.958.288 1.243.294.26.006.549-.1.868-.32 2.179-1.471 3.304-2.214 3.374-2.23.05-.012.12-.026.166.016.047.041.042.12.037.141-.03.129-1.227 1.241-1.846 1.817-.193.18-.33.307-.358.336a8.154 8.154 0 0 1-.188.186c-.38.366-.664.64.015 1.088.327.216.589.393.85.571.284.194.568.387.936.629.093.06.183.125.27.187.331.236.63.448.997.414.214-.02.435-.22.547-.82.265-1.417.786-4.486.906-5.751a1.426 1.426 0 0 0-.013-.315.337.337 0 0 0-.114-.217.526.526 0 0 0-.31-.093c-.3.005-.763.166-2.984 1.09z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 793 B

View file

@ -1,3 +0,0 @@
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
<path d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 659 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-globe-americas" viewBox="0 0 16 16">
<path d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM2.04 4.326c.325 1.329 2.532 2.54 3.717 3.19.48.263.793.434.743.484-.08.08-.162.158-.242.234-.416.396-.787.749-.758 1.266.035.634.618.824 1.214 1.017.577.188 1.168.38 1.286.983.082.417-.075.988-.22 1.52-.215.782-.406 1.48.22 1.48 1.5-.5 3.798-3.186 4-5 .138-1.243-2-2-3.5-2.5-.478-.16-.755.081-.99.284-.172.15-.322.279-.51.216-.445-.148-2.5-2-1.5-2.5.78-.39.952-.171 1.227.182.078.099.163.208.273.318.609.304.662-.132.723-.633.039-.322.081-.671.277-.867.434-.434 1.265-.791 2.028-1.12.712-.306 1.365-.587 1.579-.88A7 7 0 1 1 2.04 4.327Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 724 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
<path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 320 B

View file

@ -1,126 +0,0 @@
# Import I/O
import subprocess
import sys
# Import PyQt6 Framework libraries
from PyQt6.QtCore import *
from PyQt6.QtGui import *
from PyQt6.QtQml import *
# Import Resources of Qt
import Res
# Simple Qt Quick class for loading QML files
class Quick(QQmlApplicationEngine):
# DO: Set property of object
def setProperty(self, name, value):
self.rootObjects()[0].setProperty(name, value)
# DO: Get property of object
def property(self, name):
return self.rootObjects()[0].property(name)
# DO: find a object
def findChild(self, name, **kwargs):
return self.rootObjects()[0].findChild(QObject, name)
# DO: Close the loader
def close(self):
self.rootObjects()[0].close()
def __init__(self):
super(Quick, self).__init__()
# Main Class of Parch Welcome Project
class Main(Quick):
# DO: Button 1 loading link: https://github.com/parchlinux
def b1_(self):
self.link("https://github.com/parchlinux")
# DO: Button 2 loading link: https://twitter.com/bssfoss
def b2_(self):
self.link("https://twitter.com/bssfoss")
# DO: Button 3 loading link: https://t.me/parchlinux
def b3_(self):
self.link("https://t.me/parchlinux")
# DO: Button 4 loading link: https://discord.gg/9RW5cRByAM
def b4_(self):
self.link("https://discord.gg/9RW5cRByAM")
# DO: Button 5 loading link: https://mas.to/@bssfoss
def b5_(self):
self.link("https://mas.to/@bssfoss")
# DO: Button 6 loading link: https://coffeete.ir/parchlinux
def b6_(self):
self.link("https://coffeete.ir/parchlinux")
# DO: Button 7 loading link: https://parchlinux.ir
def b7_(self):
self.link("https://parchlinux.ir")
# DO: Button 8 loading link: https://parchlinux.ir/parchwiki/
def b8_(self):
self.link("https://parchlinux.ir/parchwiki/")
# DO: Run Calamares Installer
def install_(self):
self.close()
subprocess.Popen("sudo sh /etc/calamares/launch.sh", shell=True)
# DO: Loading link in `xdg-open` function
async def link(self, url):
self.close()
await subprocess.Popen(f"xdg-open {url}", shell=True)
# DO: Init Function
def __init__(self):
super(Main, self).__init__()
# Load Main QML file
self.load(":/ParchLinux.qml")
self.b1 = self.findChild("b1") # Find Button 1
self.b1.clicked.connect(self.b1_) # Action: Connect Button 1 action to b1_
self.b2 = self.findChild("b2") # Find Button 2
self.b2.clicked.connect(self.b2_) # Action: Connect Button 2 action to b2_
self.b3 = self.findChild("b3") # Find Button 3
self.b3.clicked.connect(self.b3_) # Action: Connect Button 3 action to b3_
self.b4 = self.findChild("b4") # Find Button 4
self.b4.clicked.connect(self.b4_) # Action: Connect Button 4 action to b4_
self.b5 = self.findChild("b5") # Find Button 5
self.b5.clicked.connect(self.b5_) # Action: Connect Button 5 action to b5_
self.b6 = self.findChild("b6") # Find Button 6
self.b6.clicked.connect(self.b6_) # Action: Connect Button 6 action to b6_
self.b7 = self.findChild("b7") # Find Button 7
self.b7.clicked.connect(self.b7_) # Action: Connect Button 7 action to b7_
self.b8 = self.findChild("b8") # Find Button 8
self.b8.clicked.connect(self.b8_) # Action: Connect Button 8 action to b8_
self.install = self.findChild("install") # Find Install Button
self.install.clicked.connect(
self.install_
) # Action: Connect to install_ function
if __name__ == "__main__":
# Start Qt Qui Application loop
app = QGuiApplication([])
# Set Qt Window Icon
app.setWindowIcon(QIcon(":/ParchLogo.svg"))
# Loading Main Class
m = Main()
# Set loop exec
app.exec()

18
src/main.rs Normal file
View file

@ -0,0 +1,18 @@
use std::process::Command;
use slint::ComponentHandle;
slint::include_modules!();
fn main() {
let appwindow = App::new().unwrap();
appwindow.global::<Globals>().on_close(move || {
std::process::exit(0);
});
appwindow.global::<Globals>().on_openUrl(move |url| {
let _ = open::that(url.as_str());
});
appwindow.global::<Globals>().on_startInstaller(move || {
let _ = Command::new("sudo").arg("-E").arg("/etc/calamares/launch.sh").spawn();
});
let _ = appwindow.run();
}

Binary file not shown.

BIN
ui/pages/assets/close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

BIN
ui/pages/assets/discord.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

BIN
ui/pages/assets/github.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

BIN
ui/pages/assets/inbox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

BIN
ui/pages/assets/lang.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

BIN
ui/pages/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

BIN
ui/pages/assets/twitter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

BIN
ui/pages/assets/web.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

298
ui/pages/en.slint Normal file
View file

@ -0,0 +1,298 @@
import { Button, VerticalBox, HorizontalBox, GridBox } from "std-widgets.slint";
import { Globals } from "globals.slint";
export component EnglishApp {
VerticalLayout {
HorizontalLayout {
padding-left: 30px;
padding-right: 30px;
padding-top: 10px;
height: 80px;
width: 100%;
alignment: space-between;
Rectangle {
clip: true;
TouchArea {
HorizontalBox {
alignment: center;
padding: 0px;
Image {
colorize: Globals.themeStatus;
vertical-alignment: center;
source: @image-url("assets/night-mode.png");
}
Text {
vertical-alignment: center;
horizontal-alignment: right;
text: "Dark Mode";
font-family: "Vazirmatn";
font-weight: 900;
font-size: 16px;
color: Globals.themeStatus;
}
}
clicked => {
Globals.switchTheme();
}
}
}
Rectangle { }
TouchArea {
clicked => {
Globals.close();
}
Image {
image-fit: contain;
source: @image-url("assets/close.png");
}
}
}
HorizontalLayout {
height: 275px;
alignment: center;
VerticalBox {
HorizontalBox {
alignment: center;
Image {
image-fit: fill;
width: 100.52px;
height: 166px;
source: @image-url("assets/logo.png");
}
}
Image {
height: 80px;
source: @image-url("assets/parchlinux-en.png");
}
}
}
VerticalLayout {
HorizontalBox {
Image {
colorize: Globals.themeStatus;
source: @image-url("assets/parchlinuxtext-en.png");
height: 40px;
}
}
HorizontalBox {
height: 50px;
Text {
color: Globals.themeStatus;
horizontal-alignment: center;
text: "We will be glad if you support us!";
font-size: 20px;
font-family: "Vazirmatn";
font-weight: 900;
}
}
HorizontalBox {
height: 50px;
alignment: center;
GridBox {
spacing: 30px;
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/github.png");
}
clicked => {
Globals.openUrl("https://github.com/parchlinux");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/twitter.png");
}
clicked => {
Globals.openUrl("https://twitter.com/bssfoss");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/telegram.png");
}
clicked => {
Globals.openUrl("https://t.me/parchlinux");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/discord.png");
}
clicked => {
Globals.openUrl("https://discord.gg/9RW5cRByAM");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/mastadon.png");
}
clicked => {
Globals.openUrl("https://mas.to/@bssfoss");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/coffee-cup.png");
}
clicked => {
Globals.openUrl("https://daramet.com/parchlinux");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/web.png");
}
clicked => {
Globals.openUrl("https://parchlinux.com");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/open-book.png");
}
clicked => {
Globals.openUrl("https://wiki.parchlinux.com");
}
}
}
}
VerticalBox {
alignment: start;
height: 40px;
Text {
color: Globals.themeStatus;
height: 25px;
text: "Hit the button below to install Parch on your computer";
font-size: 16px;
font-family: "Vazirmatn";
horizontal-alignment: center;
vertical-alignment: center;
}
}
HorizontalLayout {
alignment: center;
TouchArea {
clicked => {
Globals.startInstaller();
}
Rectangle {
width: 144px;
height: 42px;
background: Globals.currentTheme ? white : Globals.primaryDark;
animate background, drop-shadow-color, drop-shadow-blur {
duration: 275ms;
easing: ease-in-out;
}
border-radius: 8px;
drop-shadow-color: Globals.currentTheme ? #d9d9d9 : #404040;
drop-shadow-blur: 12px;
drop-shadow-offset-x: 2px;
drop-shadow-offset-y: 2px;
HorizontalBox {
alignment: center;
Image {
colorize: Globals.currentTheme ? transparent : white;
image-fit: fill;
source: @image-url("assets/inbox.png");
}
Text {
text: "Install Parch";
font-family: "Vazirmatn";
color: Globals.currentTheme ? #0D40BF : Colors.white;
font-size: 16px;
font-weight: 900;
}
}
}
}
}
HorizontalLayout {
alignment: start;
TouchArea {
clicked => {
Globals.changeLang();
}
HorizontalBox {
padding-left: 30px;
Image {
colorize: Globals.themeStatus;
vertical-alignment: center;
source: @image-url("assets/lang.png");
}
Text {
vertical-alignment: center;
horizontal-alignment: right;
text: "English";
font-family: "Vazirmatn";
font-weight: 900;
font-size: 16px;
color: Globals.themeStatus;
}
}
}
}
}
}
}

298
ui/pages/fa.slint Normal file
View file

@ -0,0 +1,298 @@
import { Button, VerticalBox, HorizontalBox, GridBox } from "std-widgets.slint";
import { Globals } from "globals.slint";
export component PersianApp {
VerticalLayout {
HorizontalLayout {
padding-left: 30px;
padding-right: 30px;
padding-top: 10px;
height: 80px;
width: 100%;
alignment: space-between;
TouchArea {
clicked => {
Globals.close();
}
Image {
image-fit: contain;
source: @image-url("assets/close.png");
}
}
Rectangle { }
Rectangle {
clip: true;
TouchArea {
HorizontalBox {
alignment: center;
padding: 0px;
Text {
vertical-alignment: center;
horizontal-alignment: right;
text: "حالت تاریک";
font-family: "Vazirmatn";
font-weight: 900;
font-size: 16px;
color: Globals.themeStatus;
}
Image {
colorize: Globals.themeStatus;
vertical-alignment: center;
source: @image-url("assets/night-mode.png");
}
}
clicked => {
Globals.switchTheme();
}
}
}
}
HorizontalLayout {
height: 275px;
alignment: center;
VerticalBox {
HorizontalBox {
alignment: center;
Image {
image-fit: fill;
width: 100.52px;
height: 166px;
source: @image-url("assets/logo.png");
}
}
Image {
height: 80px;
source: @image-url("assets/parchlinux.png");
}
}
}
VerticalLayout {
HorizontalBox {
Image {
colorize: Globals.themeStatus;
source: @image-url("assets/parchlinuxtext.png");
height: 40px;
}
}
HorizontalBox {
height: 50px;
Text {
color: Globals.themeStatus;
horizontal-alignment: center;
text: "!اگر از ما حمایت کنید خوشحال خواهیم شد";
font-size: 20px;
font-family: "Vazirmatn";
font-weight: 900;
}
}
HorizontalBox {
height: 50px;
alignment: center;
GridBox {
spacing: 30px;
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/github.png");
}
clicked => {
Globals.openUrl("https://github.com/parchlinux");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/twitter.png");
}
clicked => {
Globals.openUrl("https://twitter.com/bssfoss");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/telegram.png");
}
clicked => {
Globals.openUrl("https://t.me/parchlinux");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/discord.png");
}
clicked => {
Globals.openUrl("https://discord.gg/9RW5cRByAM");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/mastadon.png");
}
clicked => {
Globals.openUrl("https://mas.to/@bssfoss");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/coffee-cup.png");
}
clicked => {
Globals.openUrl("https://daramet.com/parchlinux");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/web.png");
}
clicked => {
Globals.openUrl("https://parchlinux.com");
}
}
TouchArea {
Image {
colorize: Globals.themeStatus;
width: 30px;
height: 30px;
source: @image-url("assets/open-book.png");
}
clicked => {
Globals.openUrl("https://wiki.parchlinux.com");
}
}
}
}
VerticalBox {
alignment: start;
height: 40px;
Text {
color: Globals.themeStatus;
height: 25px;
text: "برای راه‌اندازی پارچ روی سامانه خود دکمه زیر را فشار دهید";
font-size: 16px;
font-family: "Vazirmatn";
horizontal-alignment: center;
vertical-alignment: center;
}
}
HorizontalLayout {
alignment: center;
TouchArea {
clicked => {
Globals.startInstaller();
}
Rectangle {
width: 144px;
height: 42px;
background: Globals.currentTheme ? white : Globals.primaryDark;
animate background, drop-shadow-color, drop-shadow-blur {
duration: 275ms;
easing: ease-in-out;
}
border-radius: 8px;
drop-shadow-color: Globals.currentTheme ? #d9d9d9 : #404040;
drop-shadow-blur: 12px;
drop-shadow-offset-x: 2px;
drop-shadow-offset-y: 2px;
HorizontalBox {
alignment: center;
Text {
text: "نصب پارچ";
font-family: "Vazirmatn";
color: Globals.currentTheme ? #0D40BF : Colors.white;
font-size: 16px;
font-weight: 900;
}
Image {
colorize: Globals.currentTheme ? transparent : white;
image-fit: fill;
source: @image-url("assets/inbox.png");
}
}
}
}
}
HorizontalLayout {
alignment: end;
TouchArea {
clicked => {
Globals.changeLang();
}
HorizontalBox {
padding-right: 30px;
Text {
vertical-alignment: center;
horizontal-alignment: right;
text: "فارسی";
font-family: "Vazirmatn";
font-weight: 900;
font-size: 16px;
color: Globals.themeStatus;
}
Image {
colorize: Globals.themeStatus;
vertical-alignment: center;
source: @image-url("assets/lang.png");
}
}
}
}
}
}
}

26
ui/pages/globals.slint Normal file
View file

@ -0,0 +1,26 @@
export global Globals {
callback close();
callback openUrl(string);
callback startInstaller();
// True Stand for Light Theme
in-out property <bool> currentTheme: true;
// True Stand for PersianApp
in-out property <bool> isEnglishPage: true;
out property <color> lightTheme: #FAFAFA;
out property <color> darkTheme: #323232;
out property <color> primaryDark:#242424;
in-out property <color> themeStatus: primaryDark;
public function switchTheme(){
currentTheme = !currentTheme;
if themeStatus == primaryDark {
themeStatus = Colors.white;
} else {
themeStatus = primaryDark;
}
}
public function changeLang(){
isEnglishPage = !isEnglishPage;
}
}

3
ui/pages/pages.slint Normal file
View file

@ -0,0 +1,3 @@
import {EnglishApp} from "en.slint";
import {PersianApp} from "fa.slint";
export {EnglishApp,PersianApp}

27
ui/parch-welcome.slint Normal file
View file

@ -0,0 +1,27 @@
import { Button, VerticalBox, HorizontalBox, GridBox } from "std-widgets.slint";
import "pages/assets/vazirmatn.ttf";
import "pages/assets/Inter-Regular.ttf";
import {EnglishApp,PersianApp} from "pages/pages.slint";
import { Globals } from "pages/globals.slint";
// ReExport for Native access
export { Globals }
export component App inherits Window {
width: 949px;
height: 650px;
no-frame: true;
background: transparent;
Rectangle {
border-radius: 15px;
background: Globals.currentTheme ? Globals.lightTheme : Globals.darkTheme;
animate background {
duration: 275ms;
easing: ease-in-out;
}
VerticalLayout {
if Globals.isEnglishPage: EnglishApp { }
if !Globals.isEnglishPage: PersianApp { }
}
}
}