Skip to content

Commit

Permalink
another progress
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik committed Dec 11, 2023
1 parent 30bc645 commit 002955a
Show file tree
Hide file tree
Showing 26 changed files with 838 additions and 76 deletions.
3 changes: 3 additions & 0 deletions app/icons/AcceptInvitationImage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions app/icons/AcceptInvitationLogoImage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/icons/Back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions app/icons/Bubble.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/icons/icons.qrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<RCC>
<qresource prefix="/">
<file>Arrow Link Right.svg</file>
<file>Back.svg</file>
<file>Bubble.svg</file>
<file>AcceptInvitationImage.svg</file>
<file>AcceptInvitationLogoImage.svg</file>
<file>Calendar.svg</file>
<file>Hide.svg</file>
<file>Search.svg</file>
Expand Down
8 changes: 8 additions & 0 deletions app/mmstyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class MMStyle: public QObject
// Icons
Q_PROPERTY( QUrl arrowLinkRightIcon READ arrowLinkRightIcon CONSTANT )
Q_PROPERTY( QUrl searchIcon READ searchIcon CONSTANT )
Q_PROPERTY( QUrl backIcon READ backIcon CONSTANT )
Q_PROPERTY( QUrl bubbleIcon READ bubbleIcon CONSTANT )
Q_PROPERTY( QUrl calendarIcon READ calendarIcon CONSTANT )
Q_PROPERTY( QUrl showIcon READ showIcon CONSTANT )
Q_PROPERTY( QUrl hideIcon READ hideIcon CONSTANT )
Expand All @@ -97,6 +99,8 @@ class MMStyle: public QObject
// Images
Q_PROPERTY( QUrl uploadImage READ uploadImage CONSTANT )
Q_PROPERTY( QUrl reachedDataLimitImage READ reachedDataLimitImage CONSTANT )
Q_PROPERTY( QUrl acceptInvitationImage READ acceptInvitationImage CONSTANT )
Q_PROPERTY( QUrl acceptInvitationLogoImage READ acceptInvitationLogoImage CONSTANT )

// Map items
Q_PROPERTY( double mapItemHeight READ mapItemHeight CONSTANT )
Expand Down Expand Up @@ -160,6 +164,8 @@ class MMStyle: public QObject

QUrl arrowLinkRightIcon() {return QUrl( "qrc:/Arrow Link Right.svg" );}
QUrl searchIcon() {return QUrl( "qrc:/Search.svg" );}
QUrl backIcon() {return QUrl( "qrc:/Back.svg" );}
QUrl bubbleIcon() {return QUrl( "qrc:/Bubble.svg" );}
QUrl calendarIcon() {return QUrl( "qrc:/Calendar.svg" );}
QUrl showIcon() {return QUrl( "qrc:/Show.svg" );}
QUrl hideIcon() {return QUrl( "qrc:/Hide.svg" );}
Expand All @@ -177,6 +183,8 @@ class MMStyle: public QObject
QUrl editIcon() {return QUrl( "qrc:/Edit.svg" );}
QUrl moreIcon() {return QUrl( "qrc:/More.svg" );}

QUrl acceptInvitationLogoImage() {return QUrl( "qrc:/AcceptInvitationLogoImage.svg" ); }
QUrl acceptInvitationImage() {return QUrl( "qrc:/AcceptInvitationImage.svg" ); }
QUrl uploadImage() {return QUrl( "qrc:/UploadImage.svg" );}
QUrl reachedDataLimitImage() {return QUrl( "qrc:/ReachedDataLimitImage.svg" );}

Expand Down
32 changes: 32 additions & 0 deletions app/qml/components/MMBackButton.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import "."

RoundButton {
id: control

implicitWidth: icon.width * 2
implicitHeight: icon.height * 2

contentItem: MMIcon {
id: icon

source: __style.backIcon
color: __style.forestColor
}

background: Rectangle {
color: control.down || control.hovered ? __style.mediumGreenColor : __style.lightGreenColor
radius: control.implicitHeight / 2
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ RowLayout {

property bool backVisible: true

RoundButton {
MMBackButton {
visible: backVisible
onClicked: root.backClicked()
text: "<"
}

Label {
text: headerTitle
font: __style.p2
color: __style.forestColor
}

ProgressBar {
MMProgressBar {
width: 50
visible: step > 0
from: 0
to: 3
value: step > 0 ? step : 0
position: step > 0 ? step / 3 : 0
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,21 @@ RowLayout {
spacing: 10

Rectangle {
id: topRect
width: 50
height: 1
color: __style.forestColor
}

Label {
text: title
font: __style.p5
color: topRect.color
}

Rectangle {
width: 50
height: 1
width: topRect.width
height: topRect.height
color: topRect.color
}
}
20 changes: 19 additions & 1 deletion app/qml/components/MMPasswordInput.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@ import QtQuick.Controls.Basic
Column {
id: control

signal textEdited

enum MsgShowBehaviour {
Never,
OnNotMatchingRegex,
Always
}

property alias title: titleItem.text
property alias text: textField.text
property alias placeholderText: textField.placeholderText
required property string regexp
property string regexp: '.*'
property int msgShowBehaviour: MMPasswordInput.OnNotMatchingRegex
property url iconSource: ""
property string warningMsg
property string errorMsg
Expand Down Expand Up @@ -77,6 +86,10 @@ Column {
background: Rectangle {
color: __style.transparentColor
}

onTextEdited: {
control.textEdited()
}
}

MMIcon {
Expand Down Expand Up @@ -127,6 +140,11 @@ Column {
}

function isPasswordCorrect(pwd) {
if (msgShowBehaviour === MMPasswordInput.Never)
return true
else if (msgShowBehaviour === MMPasswordInput.Always)
return false

let pwdRegexp = new RegExp(control.regexp)
return pwdRegexp.test(pwd)
}
Expand Down
70 changes: 70 additions & 0 deletions app/qml/components/MMTextBubble.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

Item {
id: root

height: 100
width: 300

required property var title
required property var description

Rectangle {
width: root.width
height: root.height
color: __style.whiteColor
radius: 15
}

Row {
padding: 10
spacing: 10
anchors.fill: parent

Rectangle {
implicitWidth: radius * 2
implicitHeight: radius * 2
// x: control.leftPadding
y: parent.height / 2 - height / 2
radius: 20
color: __style.forestColor

MMIcon {
id: icon
anchors.centerIn: parent
source: __style.bubbleIcon
}
}

Column {
id: column
width: 2* root.width / 3
spacing: 10
Label {
text: root.title
font: __style.t1
color: __style.nightColor
wrapMode: Label.WordWrap
}

Label {
text:root.description
font: __style.p5
color: __style.forestColor
wrapMode: Label.WordWrap
width: column.width
}
}
}
}
2 changes: 1 addition & 1 deletion app/qml/inputs/MMCheckBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CheckBox {
property bool small: false

width: (control.small ? 16 : 24) * __dp
height: width
height: control.width

indicator: Rectangle {
width: control.width
Expand Down
53 changes: 47 additions & 6 deletions app/qml/onboarding/MMAcceptInvitation.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,69 @@ import QtQuick
import QtQuick.Layouts
import QtQuick.Controls

import "../components"

Page {
id: root

signal backClicked
signal continueClicked
signal createWorkspaceClicked

ColumnLayout {
MMOnboardingHeader {
Column {
spacing: 20

MMHeader {
headerTitle: qsTr("Accept Invitation")

onBackClicked: root.backClicked()
}

ToolButton {
Item {
width: bg.width
height: bg.height

MMIcon {
id: bg
source: __style.acceptInvitationImage
}

MMIcon {
id: fg
x: ( bg.width - fg.width ) / 2 + 7
y: ( bg.height - fg.height ) / 2 + 5
source: __style.acceptInvitationLogoImage
}
}

Label {
text: qsTr("You have been invited to workspace")
font: __style.t1
color: __style.forestColor
}

Label {
text: qsTr("User %1 has invited you to join his workspace").arg("andrej")
font: __style.p2
}

Label {
text: "my-workspace-funny"
font: __style.p2
}

MMButton {
onClicked: root.continueClicked()
text: qsTr("Continue")
text: qsTr("Join workspace")
}

MMHlineText {
title: qsTr("or")
}

ToolButton {
MMLinkButton {
onClicked: root.createWorkspaceClicked()
text: qsTr("Create Workspace")
text: qsTr("Create new workspace")
}
}
}
Loading

1 comment on commit 002955a

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 23.12.493711 just submitted!

Please sign in to comment.