From 2db77fa31c7167e421dbbdc5bd872c56dbc82dd9 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Tue, 26 Oct 2021 16:21:08 +0200 Subject: [PATCH] refactor: replace StatusIcon and StatusLoadingIndicator with StatusQ components --- .../Browser/controls/DownloadElement.qml | 8 ++--- .../messages/FetchMoreMessagesButton.qml | 5 +-- ui/app/AppLayouts/Chat/views/MessageView.qml | 5 +-- .../popups/ChangePasswordSuccessModal.qml | 6 ++-- .../AppLayouts/Profile/views/ContactsView.qml | 4 +-- .../AppLayouts/Profile/views/PrivacyView.qml | 1 - .../Wallet/controls/CollectiblesHeader.qml | 6 ++-- .../WalletV2/popups/CryptoServicesModal.qml | 2 +- .../AppLayouts/WalletV2/popups/ShareModal.qml | 1 - .../WalletV2/views/CollectiblesView.qml | 4 +-- .../WalletV2/views/SavedAddressesView.qml | 1 - ui/shared/panels/ImageLoader.qml | 5 ++- ui/shared/status/StatusRoundButton.qml | 4 +-- ui/shared/status/StatusStickersPopup.qml | 3 +- ui/shared/status/core/StatusIcon.qml | 32 ------------------- .../status/core/StatusLoadingIndicator.qml | 17 ---------- ui/shared/views/EnsResolver.qml | 3 +- 17 files changed, 26 insertions(+), 81 deletions(-) delete mode 100644 ui/shared/status/core/StatusIcon.qml delete mode 100644 ui/shared/status/core/StatusLoadingIndicator.qml diff --git a/ui/app/AppLayouts/Browser/controls/DownloadElement.qml b/ui/app/AppLayouts/Browser/controls/DownloadElement.qml index a8b7a0a7ad..7824278c70 100644 --- a/ui/app/AppLayouts/Browser/controls/DownloadElement.qml +++ b/ui/app/AppLayouts/Browser/controls/DownloadElement.qml @@ -2,14 +2,12 @@ import QtQuick 2.1 import QtQuick.Controls 2.13 import QtGraphicalEffects 1.13 +import StatusQ.Controls 0.1 +import StatusQ.Components 0.1 + import utils 1.0 -import StatusQ.Controls 0.1 - -import "../../../../shared" import "../../../../shared/panels" -import "../../../../shared/status/core" -import "../../../../shared/status" Rectangle { property bool downloadComplete: false diff --git a/ui/app/AppLayouts/Chat/controls/messages/FetchMoreMessagesButton.qml b/ui/app/AppLayouts/Chat/controls/messages/FetchMoreMessagesButton.qml index e9ed4d44ec..7280f6c999 100644 --- a/ui/app/AppLayouts/Chat/controls/messages/FetchMoreMessagesButton.qml +++ b/ui/app/AppLayouts/Chat/controls/messages/FetchMoreMessagesButton.qml @@ -1,7 +1,8 @@ import QtQuick 2.13 -import "../../../../../shared" + +import StatusQ.Components 0.1 + import "../../../../../shared/panels" -import "../../../../../shared/status/core" import utils 1.0 diff --git a/ui/app/AppLayouts/Chat/views/MessageView.qml b/ui/app/AppLayouts/Chat/views/MessageView.qml index 8aab0a365a..63eba3e6af 100644 --- a/ui/app/AppLayouts/Chat/views/MessageView.qml +++ b/ui/app/AppLayouts/Chat/views/MessageView.qml @@ -1,9 +1,10 @@ import QtQuick 2.13 -import "../../../../shared" + +import StatusQ.Components 0.1 + import "../../../../shared/panels" import "../../../../shared/controls" import "../../../../shared/status" -import "../../../../shared/status/core" import utils 1.0 import "../panels" diff --git a/ui/app/AppLayouts/Profile/popups/ChangePasswordSuccessModal.qml b/ui/app/AppLayouts/Profile/popups/ChangePasswordSuccessModal.qml index baab4a7481..585d02a7ad 100644 --- a/ui/app/AppLayouts/Profile/popups/ChangePasswordSuccessModal.qml +++ b/ui/app/AppLayouts/Profile/popups/ChangePasswordSuccessModal.qml @@ -2,15 +2,13 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 import QtQuick.Layouts 1.12 - -import utils 1.0 -import "../../../../shared" - import StatusQ.Core 0.1 import StatusQ.Popups 0.1 import StatusQ.Controls 0.1 import StatusQ.Core.Theme 0.1 +import utils 1.0 + StatusModal { id: root width: 400 diff --git a/ui/app/AppLayouts/Profile/views/ContactsView.qml b/ui/app/AppLayouts/Profile/views/ContactsView.qml index 3f72194ddf..fa27f860f4 100644 --- a/ui/app/AppLayouts/Profile/views/ContactsView.qml +++ b/ui/app/AppLayouts/Profile/views/ContactsView.qml @@ -2,13 +2,13 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 import QtQuick.Layouts 1.13 +import StatusQ.Components 0.1 import utils 1.0 -import "../../../../shared" + import "../../../../shared/popups" import "../../../../shared/panels" import "../../../../shared/controls" import "../../../../shared/views" -import "../../../../shared/status/core" import "../../../../shared/status" import "../panels" diff --git a/ui/app/AppLayouts/Profile/views/PrivacyView.qml b/ui/app/AppLayouts/Profile/views/PrivacyView.qml index b52aa72f7d..6a6738732c 100644 --- a/ui/app/AppLayouts/Profile/views/PrivacyView.qml +++ b/ui/app/AppLayouts/Profile/views/PrivacyView.qml @@ -4,7 +4,6 @@ import QtQuick.Layouts 1.13 import QtGraphicalEffects 1.13 import utils 1.0 -import "../../../../shared" import "../../../../shared/panels" import "../../../../shared/status" import "../../Onboarding/shared" as OnboardingComponents diff --git a/ui/app/AppLayouts/Wallet/controls/CollectiblesHeader.qml b/ui/app/AppLayouts/Wallet/controls/CollectiblesHeader.qml index 11f679c3a4..db2a17847e 100644 --- a/ui/app/AppLayouts/Wallet/controls/CollectiblesHeader.qml +++ b/ui/app/AppLayouts/Wallet/controls/CollectiblesHeader.qml @@ -1,11 +1,11 @@ import QtQuick 2.13 import QtGraphicalEffects 1.13 +import StatusQ.Components 0.1 + import utils 1.0 -import "../../../../shared" + import "../../../../shared/panels" -import "../../../../shared/status/core" -import "../../../../shared/status" Rectangle { property url collectibleIconSource: "CryptoKitties" diff --git a/ui/app/AppLayouts/WalletV2/popups/CryptoServicesModal.qml b/ui/app/AppLayouts/WalletV2/popups/CryptoServicesModal.qml index 80451bf6f1..db5f563604 100644 --- a/ui/app/AppLayouts/WalletV2/popups/CryptoServicesModal.qml +++ b/ui/app/AppLayouts/WalletV2/popups/CryptoServicesModal.qml @@ -2,7 +2,7 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 import utils 1.0 -import "../../../../shared" + import "../../../../shared/panels" import StatusQ.Popups 0.1 diff --git a/ui/app/AppLayouts/WalletV2/popups/ShareModal.qml b/ui/app/AppLayouts/WalletV2/popups/ShareModal.qml index 6048828c13..5737ff0f10 100644 --- a/ui/app/AppLayouts/WalletV2/popups/ShareModal.qml +++ b/ui/app/AppLayouts/WalletV2/popups/ShareModal.qml @@ -5,7 +5,6 @@ import StatusQ.Popups 0.1 import StatusQ.Controls 0.1 import StatusQ.Core.Theme 0.1 -import "../../../../shared" import "../../../../shared/panels" StatusModal { diff --git a/ui/app/AppLayouts/WalletV2/views/CollectiblesView.qml b/ui/app/AppLayouts/WalletV2/views/CollectiblesView.qml index 1649d91512..89f00eef89 100644 --- a/ui/app/AppLayouts/WalletV2/views/CollectiblesView.qml +++ b/ui/app/AppLayouts/WalletV2/views/CollectiblesView.qml @@ -2,10 +2,10 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 import QtGraphicalEffects 1.13 +import StatusQ.Components 0.1 + import utils 1.0 -import "../../../../shared" import "../../../../shared/panels" -import "../../../../shared/status/core" import "../popups" import "collectibles" diff --git a/ui/app/AppLayouts/WalletV2/views/SavedAddressesView.qml b/ui/app/AppLayouts/WalletV2/views/SavedAddressesView.qml index b9384cae8b..a1a8dc757b 100644 --- a/ui/app/AppLayouts/WalletV2/views/SavedAddressesView.qml +++ b/ui/app/AppLayouts/WalletV2/views/SavedAddressesView.qml @@ -4,7 +4,6 @@ import QtQuick.Layouts 1.13 import utils 1.0 -import "../../../../shared" import StatusQ.Controls 0.1 import StatusQ.Components 0.1 diff --git a/ui/shared/panels/ImageLoader.qml b/ui/shared/panels/ImageLoader.qml index e3f4167d02..466766d282 100644 --- a/ui/shared/panels/ImageLoader.qml +++ b/ui/shared/panels/ImageLoader.qml @@ -1,10 +1,9 @@ import QtQuick 2.3 import QtGraphicalEffects 1.13 +import StatusQ.Components 0.1 + import utils 1.0 -import "../status/core" -import "../status" -import "../" import "./" Rectangle { diff --git a/ui/shared/status/StatusRoundButton.qml b/ui/shared/status/StatusRoundButton.qml index bc848ce721..66b935a8c7 100644 --- a/ui/shared/status/StatusRoundButton.qml +++ b/ui/shared/status/StatusRoundButton.qml @@ -3,10 +3,10 @@ import QtQuick.Controls 2.13 import QtGraphicalEffects 1.13 import QtQml 2.14 +import StatusQ.Components 0.1 import utils 1.0 -import "../../shared" + import "../../shared/panels" -import "./core" RoundButton { property string type: "primary" diff --git a/ui/shared/status/StatusStickersPopup.qml b/ui/shared/status/StatusStickersPopup.qml index 3e1f8efeb2..0ccb360d83 100644 --- a/ui/shared/status/StatusStickersPopup.qml +++ b/ui/shared/status/StatusStickersPopup.qml @@ -3,12 +3,13 @@ import QtQuick.Controls 2.13 import QtQuick.Layouts 1.3 import QtGraphicalEffects 1.0 +import StatusQ.Components 0.1 + import utils 1.0 import StatusQ.Controls 0.1 as StatusQControls import "../../shared/panels" -import "../../shared/status/core" import "../../shared/status" //TODO improve this! import "../../app/AppLayouts/Chat/stores" diff --git a/ui/shared/status/core/StatusIcon.qml b/ui/shared/status/core/StatusIcon.qml deleted file mode 100644 index 1bc23a6312..0000000000 --- a/ui/shared/status/core/StatusIcon.qml +++ /dev/null @@ -1,32 +0,0 @@ -import QtQuick 2.13 -import QtGraphicalEffects 1.13 -import utils 1.0 - -Image { - property string icon: "" - property color color - - id: root - width: 24 - height: 24 - sourceSize.width: width - sourceSize.height: height - fillMode: Image.PreserveAspectFit - - onIconChanged: { - if (icon !== "") { - source = Style.icon(icon); - } - } - - ColorOverlay { - visible: root.color !== undefined - anchors.fill: root - source: root - color: root.color - antialiasing: true - smooth: true - rotation: root.rotation - } -} - diff --git a/ui/shared/status/core/StatusLoadingIndicator.qml b/ui/shared/status/core/StatusLoadingIndicator.qml deleted file mode 100644 index 9cd3d359ab..0000000000 --- a/ui/shared/status/core/StatusLoadingIndicator.qml +++ /dev/null @@ -1,17 +0,0 @@ -import QtQuick 2.13 -import "." - -StatusIcon { - id: root - icon: "loading" - height: 17 - width: 17 - RotationAnimator { - target: root; - from: 0; - to: 360; - duration: 1200 - running: true - loops: Animation.Infinite - } -} diff --git a/ui/shared/views/EnsResolver.qml b/ui/shared/views/EnsResolver.qml index 95f92efbe3..26d7d2a1f7 100644 --- a/ui/shared/views/EnsResolver.qml +++ b/ui/shared/views/EnsResolver.qml @@ -3,9 +3,8 @@ import QtQuick.Controls 2.13 import QtQuick.Layouts 1.13 import QtGraphicalEffects 1.13 +import StatusQ.Components 0.1 import utils 1.0 -import "../status/core" -import "../status" Item { id: root