| 1 |
// SPDX-FileCopyrightText: Nheko Contributors |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: GPL-3.0-or-later |
| 4 |
|
| 5 |
import QtQuick 2.15 |
| 6 |
import QtQuick.Controls 2.15 |
| 7 |
import QtQuick.Layouts 1.2 |
| 8 |
import QtQuick.Window 2.15 |
| 9 |
import im.nheko 1.0 |
| 10 |
import "../components/" |
| 11 |
import ".." |
| 12 |
|
| 13 |
ColumnLayout { |
| 14 |
Item { |
| 15 |
Layout.fillHeight: true |
| 16 |
} |
| 17 |
|
| 18 |
Image { |
| 19 |
Layout.alignment: Qt.AlignHCenter |
| 20 |
source: "qrc:/logos/splash.png" |
| 21 |
Layout.preferredHeight: 256 |
| 22 |
Layout.preferredWidth: 256 |
| 23 |
} |
| 24 |
|
| 25 |
Label { |
| 26 |
Layout.margins: Nheko.paddingLarge |
| 27 |
Layout.bottomMargin: 0 |
| 28 |
Layout.alignment: Qt.AlignHCenter |
| 29 |
Layout.fillWidth: true |
| 30 |
text: qsTr("Welcome to nheko! The desktop client for the Matrix protocol.") |
| 31 |
color: palette.text |
| 32 |
font.pointSize: fontMetrics.font.pointSize*2 |
| 33 |
wrapMode: Text.Wrap |
| 34 |
horizontalAlignment: Text.AlignHCenter |
| 35 |
} |
| 36 |
Label { |
| 37 |
Layout.margins: Nheko.paddingLarge |
| 38 |
Layout.alignment: Qt.AlignHCenter |
| 39 |
Layout.fillWidth: true |
| 40 |
text: qsTr("Enjoy your stay!") |
| 41 |
color: palette.text |
| 42 |
font.pointSize: fontMetrics.font.pointSize*1.5 |
| 43 |
wrapMode: Text.Wrap |
| 44 |
horizontalAlignment: Text.AlignHCenter |
| 45 |
} |
| 46 |
|
| 47 |
RowLayout { |
| 48 |
Item { |
| 49 |
Layout.fillWidth: true |
| 50 |
} |
| 51 |
FlatButton { |
| 52 |
Layout.margins: Nheko.paddingLarge |
| 53 |
Layout.alignment: Qt.AlignHCenter |
| 54 |
text: qsTr("REGISTER") |
| 55 |
onClicked: { |
| 56 |
mainWindow.push(registerPage); |
| 57 |
} |
| 58 |
} |
| 59 |
FlatButton { |
| 60 |
Layout.margins: Nheko.paddingLarge |
| 61 |
Layout.alignment: Qt.AlignHCenter |
| 62 |
text: qsTr("LOGIN") |
| 63 |
onClicked: { |
| 64 |
mainWindow.push(loginPage); |
| 65 |
} |
| 66 |
} |
| 67 |
|
| 68 |
Item { |
| 69 |
Layout.fillWidth: true |
| 70 |
} |
| 71 |
|
| 72 |
} |
| 73 |
|
| 74 |
RowLayout { |
| 75 |
Layout.alignment: Qt.AlignHCenter |
| 76 |
Layout.margins: Nheko.paddingLarge |
| 77 |
|
| 78 |
ToggleButton { |
| 79 |
Layout.margins: Nheko.paddingLarge |
| 80 |
Layout.alignment: Qt.AlignRight |
| 81 |
checked: Settings.reducedMotion |
| 82 |
onCheckedChanged: Settings.reducedMotion = checked |
| 83 |
} |
| 84 |
|
| 85 |
Label { |
| 86 |
Layout.alignment: Qt.AlignLeft |
| 87 |
Layout.margins: Nheko.paddingLarge |
| 88 |
text: qsTr("Reduce animations") |
| 89 |
color: palette.text |
| 90 |
|
| 91 |
HoverHandler { |
| 92 |
id: hovered |
| 93 |
} |
| 94 |
ToolTip.visible: hovered.hovered |
| 95 |
ToolTip.text: qsTr("Nheko uses animations in several places to make stuff pretty. This allows you to turn those off if they make you feel unwell.") |
| 96 |
ToolTip.delay: Nheko.tooltipDelay |
| 97 |
} |
| 98 |
} |
| 99 |
Item { |
| 100 |
Layout.fillHeight: true |
| 101 |
} |
| 102 |
} |