summaryrefslogtreecommitdiff
path: root/raveos-calamares-theme/etc/calamares/branding/raveos/finishedq.qml
blob: d89d4a96bc1aa10ef7fb3b4b663273c82d63eda1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
import io.calamares.core 1.0
import io.calamares.ui 1.0

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15

import "RaveOS"
import "supporters.js" as Supporters

Rectangle {
    id: kesz
    color: Stilus.hatter

    readonly property int nevekOldalankent: 18
    readonly property var kiemeltek: Supporters.highlighted || []
    readonly property var tobbiek: Supporters.names.filter(function(n) { return kiemeltek.indexOf(n) === -1 })
    readonly property int oldalakSzama: Math.max(1, Math.ceil(tobbiek.length / nevekOldalankent))
    property int oldal: 0
    readonly property bool hibas: config.failed

    function onActivate() {
        oldal = 0
    }

    function onLeave() {
    }

    Image {
        anchors.fill: parent
        source: "images/raveos-finish.png"
        fillMode: Image.PreserveAspectCrop
        horizontalAlignment: Image.AlignLeft
        verticalAlignment: Image.AlignBottom
        smooth: true
        mipmap: true
        asynchronous: true
    }

    component Jelolo: CheckBox {
        id: jelolo
        Layout.fillWidth: true
        implicitHeight: 40
        spacing: 10
        indicator: Rectangle {
            x: jelolo.leftPadding
            y: (jelolo.height - height) / 2
            width: 18
            height: 18
            color: jelolo.checked ? Stilus.zold : Stilus.felulet
            border.width: 1
            border.color: jelolo.checked ? Stilus.zold : Stilus.keretErosebb

            Canvas {
                anchors.fill: parent
                visible: jelolo.checked
                onVisibleChanged: if (visible) requestPaint()
                onPaint: {
                    var c = getContext("2d")
                    c.reset()
                    c.strokeStyle = Stilus.zoldonSzoveg
                    c.lineWidth = 2
                    c.beginPath()
                    c.moveTo(4, 9)
                    c.lineTo(8, 13)
                    c.lineTo(14, 5)
                    c.stroke()
                }
            }
        }
        contentItem: Text {
            leftPadding: jelolo.indicator.width + jelolo.spacing
            text: jelolo.text
            color: Stilus.szoveg
            font.family: Stilus.font
            font.pixelSize: 14
            verticalAlignment: Text.AlignVCenter
        }
    }

    ColumnLayout {
        id: panelek
        x: (kesz.width - width) / 2
        y: Math.max(32, (kesz.height - implicitHeight) / 2 - 40)
        width: Math.min(560, kesz.width - 64)
        spacing: 16

        Rectangle {
            Layout.fillWidth: true
            implicitHeight: panel.implicitHeight + 48
            color: Qt.rgba(26 / 255, 27 / 255, 29 / 255, 0.9)
            border.width: 1
            border.color: Stilus.keret

            ColumnLayout {
                id: panel
                x: 26
                y: 24
                width: parent.width - 52
                spacing: 14

                RowLayout {
                    Layout.alignment: Qt.AlignHCenter
                    spacing: 12

                    Rectangle {
                        width: 32
                        height: 32
                        color: kesz.hibas ? Stilus.sarga : Stilus.zold

                        Canvas {
                            id: ikon
                            anchors.fill: parent
                            Connections {
                                target: kesz
                                function onHibasChanged() { ikon.requestPaint() }
                            }
                            onPaint: {
                                var c = getContext("2d")
                                c.reset()
                                c.strokeStyle = Stilus.zoldonSzoveg
                                c.lineWidth = 3
                                c.beginPath()
                                if (kesz.hibas) {
                                    c.moveTo(10, 10)
                                    c.lineTo(22, 22)
                                    c.moveTo(22, 10)
                                    c.lineTo(10, 22)
                                } else {
                                    c.moveTo(9, 16.5)
                                    c.lineTo(13.5, 21)
                                    c.lineTo(23, 11.5)
                                }
                                c.stroke()
                            }
                        }
                    }

                    Text {
                        text: (ViewManager.currentStepIndex < 10 ? "0" : "") + ViewManager.currentStepIndex + " · " + (kesz.hibas ? qsTr("ERROR") : qsTr("DONE"))
                        color: kesz.hibas ? Stilus.sarga : Stilus.zold
                        font.family: Stilus.mono
                        font.pixelSize: 12
                        font.letterSpacing: 2
                    }
                }

                Text {
                    Layout.fillWidth: true
                    horizontalAlignment: Text.AlignHCenter
                    text: kesz.hibas ? qsTr("THE INSTALLATION FAILED") : qsTr("RAVEOS IS INSTALLED")
                    wrapMode: Text.WordWrap
                    color: Stilus.szoveg
                    font.family: Stilus.cim
                    font.weight: Font.Bold
                    font.pixelSize: 36
                    lineHeight: 0.95
                }

                Text {
                    Layout.fillWidth: true
                    horizontalAlignment: Text.AlignHCenter
                    text: kesz.hibas ? config.failureMessage : qsTr("Restart the computer and remove the installer USB drive.")
                    wrapMode: Text.WordWrap
                    color: Stilus.szovegMasodlagos
                    font.family: Stilus.font
                    font.pixelSize: 14
                    lineHeight: 1.2
                }

                ColumnLayout {
                    Layout.alignment: Qt.AlignHCenter
                    spacing: 0

                    Jelolo {
                        Layout.fillWidth: false
                        Layout.alignment: Qt.AlignHCenter
                        visible: !kesz.hibas && (config.restartNowMode === 1 || config.restartNowMode === 2)
                        text: qsTr("Restart now")
                        checked: config.restartNowWanted
                        onToggled: config.restartNowWanted = checked
                    }
                }

                Text {
                    Layout.fillWidth: true
                    horizontalAlignment: Text.AlignHCenter
                    visible: !kesz.hibas
                    text: qsTr("The installation log is saved on the new system: %1").arg("/var/log/Calamares.log")
                    wrapMode: Text.WordWrap
                    color: Stilus.szovegHalvany
                    font.family: Stilus.font
                    font.pixelSize: 12
                }
            }
        }

        Rectangle {
            visible: Supporters.names.length > 0
            Layout.fillWidth: true
            implicitHeight: tamogatok.implicitHeight + 36
            color: Qt.rgba(26 / 255, 27 / 255, 29 / 255, 0.9)
            border.width: 1
            border.color: Stilus.keret

            ColumnLayout {
                id: tamogatok
                x: 26
                y: 18
                width: parent.width - 52
                spacing: 8

                Text {
                    Layout.alignment: Qt.AlignHCenter
                    text: qsTr("RAVEOS SUPPORTERS")
                    color: Stilus.szovegHalvany
                    font.family: Stilus.font
                    font.pixelSize: 12
                    font.weight: Font.Medium
                    font.letterSpacing: 1
                }

                Text {
                    Layout.fillWidth: true
                    horizontalAlignment: Text.AlignHCenter
                    visible: kesz.kiemeltek.length > 0
                    text: kesz.kiemeltek.join("   ")
                    wrapMode: Text.WordWrap
                    color: Stilus.zold
                    font.family: Stilus.font
                    font.pixelSize: 15
                    font.weight: Font.DemiBold
                }

                Text {
                    id: nevek
                    Layout.fillWidth: true
                    horizontalAlignment: Text.AlignHCenter
                    text: kesz.tobbiek.slice(kesz.oldal * kesz.nevekOldalankent, (kesz.oldal + 1) * kesz.nevekOldalankent).join("   ")
                    wrapMode: Text.WordWrap
                    color: Stilus.szoveg
                    font.family: Stilus.font
                    font.pixelSize: 14
                    lineHeight: 1.3
                    Behavior on opacity { NumberAnimation { duration: 250 } }
                }

                Text {
                    Layout.alignment: Qt.AlignHCenter
                    visible: kesz.oldalakSzama > 1
                    text: (kesz.oldal + 1) + " / " + kesz.oldalakSzama
                    color: Stilus.szovegHalvany
                    font.family: Stilus.mono
                    font.pixelSize: 12
                }

                Text {
                    Layout.fillWidth: true
                    horizontalAlignment: Text.AlignHCenter
                    text: qsTr("Thank you for your support, from every member of the team!")
                    wrapMode: Text.WordWrap
                    color: Stilus.szovegMasodlagos
                    font.family: Stilus.font
                    font.pixelSize: 12
                }
            }
        }
    }

    Timer {
        interval: 4000
        repeat: true
        running: kesz.oldalakSzama > 1
        onTriggered: {
            nevek.opacity = 0
            lapozas.start()
        }
    }

    Timer {
        id: lapozas
        interval: 260
        onTriggered: {
            kesz.oldal = (kesz.oldal + 1) % kesz.oldalakSzama
            nevek.opacity = 1
        }
    }
}