From 81a62311aa364601bcfd2d93ae9cd7469c52d714 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Tue, 18 Aug 2020 17:07:56 +0200 Subject: [PATCH] Remove stomt Replacing it with website, forum, bugtracker etc --- .gitmodules | 4 - CMakeLists.txt | 1 - Common/stomt-qml | 1 - ScreenPlay/CMakeLists.txt | 6 +- ScreenPlay/Resources.qrc | 1 - ScreenPlay/assets/icons/icon_forum.svg | 1 + ScreenPlay/assets/icons/icon_help_center.svg | 1 + ScreenPlay/assets/icons/icon_new_releases.svg | 1 + .../assets/icons/icon_report_problem.svg | 1 + ScreenPlay/assets/icons/icon_stomt.svg | 1 - .../assets/icons/icon_supervisor_account.svg | 1 + ScreenPlay/qml.qrc | 7 +- ScreenPlay/qml/Community/Community.qml | 309 +++++------------- ScreenPlay/qml/Community/CommunityNavItem.qml | 66 ++++ ScreenPlay/qml/Community/Feedback.qml | 56 ---- 15 files changed, 160 insertions(+), 297 deletions(-) delete mode 160000 Common/stomt-qml create mode 100644 ScreenPlay/assets/icons/icon_forum.svg create mode 100644 ScreenPlay/assets/icons/icon_help_center.svg create mode 100644 ScreenPlay/assets/icons/icon_new_releases.svg create mode 100644 ScreenPlay/assets/icons/icon_report_problem.svg delete mode 100644 ScreenPlay/assets/icons/icon_stomt.svg create mode 100644 ScreenPlay/assets/icons/icon_supervisor_account.svg create mode 100644 ScreenPlay/qml/Community/CommunityNavItem.qml delete mode 100644 ScreenPlay/qml/Community/Feedback.qml diff --git a/.gitmodules b/.gitmodules index c984af67..433fa4bd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,7 +4,3 @@ [submodule "Common/qt-breakpad"] path = Common/qt-breakpad url = https://github.com/kelteseth/qt-breakpad -[submodule "Common/stomt-qml"] - path = Common/stomt-qml - url = https://gitlab.com/kelteseth/stomt-qml.git - branch = master diff --git a/CMakeLists.txt b/CMakeLists.txt index f07166fb..c9112c1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,6 @@ add_subdirectory(ScreenPlaySDK) add_subdirectory(ScreenPlayWallpaper) add_subdirectory(ScreenPlayWidget) add_subdirectory(ScreenPlaySysInfo) -add_subdirectory(Common/stomt-qml) add_subdirectory(Common/qt-breakpad) diff --git a/Common/stomt-qml b/Common/stomt-qml deleted file mode 160000 index aeed3e75..00000000 --- a/Common/stomt-qml +++ /dev/null @@ -1 +0,0 @@ -Subproject commit aeed3e7572d845cc87301a9d2b637e88e5086fb9 diff --git a/ScreenPlay/CMakeLists.txt b/ScreenPlay/CMakeLists.txt index 7e93b809..41457908 100644 --- a/ScreenPlay/CMakeLists.txt +++ b/ScreenPlay/CMakeLists.txt @@ -58,12 +58,12 @@ set(headers app.h -qt5_add_big_resources(resources resources.qrc) +#qt5_add_big_resources(resources resources.qrc) +qt5_add_resources(qml qml.qrc resources.qrc) if(CMAKE_BUILD_TYPE STREQUAL "Debug") - qt5_add_resources(qml qml.qrc) else() - qtquick_compiler_add_resources(qml qml.qrc ) +# qtquick_compiler_add_resources(qml qml.qrc resources.qrc) endif() add_executable(${PROJECT_NAME} ${src} ${headers} ${resources} ${qml}) diff --git a/ScreenPlay/Resources.qrc b/ScreenPlay/Resources.qrc index d969f9a9..a10350c6 100644 --- a/ScreenPlay/Resources.qrc +++ b/ScreenPlay/Resources.qrc @@ -45,7 +45,6 @@ assets/icons/icon_share.svg assets/icons/icon_single_image.svg assets/icons/icon_steam.svg - assets/icons/icon_stomt.svg assets/icons/icon_time.svg assets/icons/icon_tv.svg assets/icons/icon_upload.svg diff --git a/ScreenPlay/assets/icons/icon_forum.svg b/ScreenPlay/assets/icons/icon_forum.svg new file mode 100644 index 00000000..10b5689a --- /dev/null +++ b/ScreenPlay/assets/icons/icon_forum.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ScreenPlay/assets/icons/icon_help_center.svg b/ScreenPlay/assets/icons/icon_help_center.svg new file mode 100644 index 00000000..702082c0 --- /dev/null +++ b/ScreenPlay/assets/icons/icon_help_center.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ScreenPlay/assets/icons/icon_new_releases.svg b/ScreenPlay/assets/icons/icon_new_releases.svg new file mode 100644 index 00000000..670a0379 --- /dev/null +++ b/ScreenPlay/assets/icons/icon_new_releases.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ScreenPlay/assets/icons/icon_report_problem.svg b/ScreenPlay/assets/icons/icon_report_problem.svg new file mode 100644 index 00000000..d27c4c6e --- /dev/null +++ b/ScreenPlay/assets/icons/icon_report_problem.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ScreenPlay/assets/icons/icon_stomt.svg b/ScreenPlay/assets/icons/icon_stomt.svg deleted file mode 100644 index f1dfa984..00000000 --- a/ScreenPlay/assets/icons/icon_stomt.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/ScreenPlay/assets/icons/icon_supervisor_account.svg b/ScreenPlay/assets/icons/icon_supervisor_account.svg new file mode 100644 index 00000000..4e14c296 --- /dev/null +++ b/ScreenPlay/assets/icons/icon_supervisor_account.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ScreenPlay/qml.qrc b/ScreenPlay/qml.qrc index a88be789..2fc4fdc1 100644 --- a/ScreenPlay/qml.qrc +++ b/ScreenPlay/qml.qrc @@ -21,7 +21,6 @@ qml/Installed/Sidebar.qml qml/Installed/InstalledWelcomeScreen.qml qml/Community/Community.qml - qml/Community/Feedback.qml qml/Community/XMLNewsfeed.qml qml/Settings/SettingBool.qml qml/Settings/Settings.qml @@ -53,5 +52,11 @@ qml/Common/CloseIcon.qml qml/Common/Headline.qml qml/Settings/SettingsPage.qml + qml/Community/CommunityNavItem.qml + assets/icons/icon_supervisor_account.svg + assets/icons/icon_new_releases.svg + assets/icons/icon_report_problem.svg + assets/icons/icon_help_center.svg + assets/icons/icon_forum.svg diff --git a/ScreenPlay/qml/Community/Community.qml b/ScreenPlay/qml/Community/Community.qml index 6a42a7df..0e21739d 100644 --- a/ScreenPlay/qml/Community/Community.qml +++ b/ScreenPlay/qml/Community/Community.qml @@ -1,6 +1,6 @@ import QtQuick 2.12 -import QtQuick.Controls 2.3 -import QtQuick.Controls.Material 2.2 +import QtQuick.Controls 2.14 +import QtQuick.Controls.Material 2.14 import QtGraphicalEffects 1.0 import QtQuick.Layouts 1.3 import ScreenPlay 1.0 @@ -10,247 +10,98 @@ Item { id: community anchors.fill: parent + RectangularGlow { + id: effect + anchors { + fill: navWrapper + } + cached: true + glowRadius: 2 + spread: 0.15 + color: "black" + opacity: 0.3 + cornerRadius: 15 + } + Rectangle { - id: stomtWrapper - width: 500 - color: "gray" + id: navWrapper + color: Material.theme === Material.Light ? "white" : Material.background + height: 50 anchors { top: parent.top + right: parent.right + left: parent.left + } + TabBar { + id: nav + height: parent.height + background: Item {} + anchors { + top: parent.top + left: parent.left + bottom: parent.bottom + right: parent.right + } + + CommunityNavItem { + text: qsTr("Forum") + openLink: swipeView.itemAt(0).url + icon.source: "qrc:/assets/icons/icon_forum.svg" + } + + CommunityNavItem { + text: qsTr("Wiki") + openLink: swipeView.itemAt(1).url + icon.source: "qrc:/assets/icons/icon_help_center.svg" + } + + CommunityNavItem { + text: qsTr("Issues List") + openLink: swipeView.itemAt(2).url + icon.source: "qrc:/assets/icons/icon_report_problem.svg" + } + + CommunityNavItem { + text: qsTr("Release Notes") + openLink: swipeView.itemAt(3).url + icon.source: "qrc:/assets/icons/icon_new_releases.svg" + } + CommunityNavItem { + text: qsTr("Contribution Guide") + openLink: swipeView.itemAt(4).url + icon.source: "qrc:/assets/icons/icon_supervisor_account.svg" + } + } + } + + SwipeView { + id: swipeView + currentIndex: nav.currentIndex + anchors { + top: navWrapper.bottom + right: parent.right bottom: parent.bottom left: parent.left } - LinearGradient { - id: tabShadow - cached: true - anchors.fill: parent - start: Qt.point(0, 0) - end: Qt.point(stomtWrapper.width, stomtWrapper.height) - gradient: Gradient { - GradientStop { - position: 0.0 - color: "#199EF1" - } - GradientStop { - position: 1.0 - color: "#092E6C" - } - } - } - Image { - id: imgStomt - source: "qrc:/assets/images/Stomt_Logo+Wordmark_Mono_BLK.svg" - width: 250 - height: 250 - sourceSize: Qt.size(250, 250) - anchors { - top: parent.top - topMargin: -30 - horizontalCenter: parent.horizontalCenter - } - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: Qt.openUrlExternally("https://stomt.com/") - } - } - Text { - id: txtStomtDescription - font.pointSize: 14 - color: "white" - height: 100 - text: qsTr("We use Stomt because it provides quick and easy feedback via I like/I wish. So you can easily give us feedback and speak your mind. We will read these wishes on a daily basis!") - font.family: ScreenPlay.settings.font - font.weight: Font.Normal - wrapMode: Text.WordWrap - horizontalAlignment: Qt.AlignHCenter - - anchors { - top: imgStomt.bottom - topMargin: -50 - right: parent.right - rightMargin: 50 - left: parent.left - leftMargin: 50 - } + + WebEngineView { + url: "https://forum.screen-play.app/" } - Component { - id: component_feedback - Feedback { - id: feedback - anchors.fill: parent - } - } - Loader { - id: loader_feedback - height: 236 - width: 420 - anchors { - top: txtStomtDescription.bottom - horizontalCenter: parent.horizontalCenter - } + WebEngineView { + url: "https://kelteseth.gitlab.io/ScreenPlayDocs/" } - Timer { - interval: 200 - running: true - repeat: false - onTriggered: { - loader_feedback.sourceComponent = component_feedback - } + WebEngineView { + url: "https://gitlab.com/kelteseth/ScreenPlay/-/issues" } - Button { - id: btnStomt - text: qsTr("Open ScreenPlay Stomt page") - anchors { - bottom: parent.bottom - bottomMargin: 30 - horizontalCenter: parent.horizontalCenter - } - Material.background: Material.accent - Material.foreground: "white" - - icon.source: "qrc:/assets/icons/icon_share.svg" - icon.color: "white" - icon.width: 16 - icon.height: 16 - onClicked: { - Qt.openUrlExternally("https://www.stomt.com/screenplay") - } - } - } - - LinearGradient { - id: tabShadowFoot - height: 4 - z: 500 - cached: true - anchors { - bottom: footer.top - right: parent.right - left: stomtWrapper.right - } - start: Qt.point(0, 4) - end: Qt.point(0, 0) - gradient: Gradient { - GradientStop { - position: 0.0 - color: "#33000000" - } - GradientStop { - position: 1.0 - color: "#00000000" - } - } - } - - // XMLNewsfeed { - // id: changelogFlickableWrapper - // anchors { - // bottom: footer.top - // left: stomtWrapper.right - // leftMargin: 90 - // right: parent.right - // rightMargin: 20 - // top: parent.top - // topMargin: 20 - // } - // } - WebEngineView { - id: we - url:"https://forum.screen-play.app/" - onUrlChanged: { - var tmp = we.url.toString() - if(!tmp.includes("https://forum.screen-play.app/")) { - we.url = "https://forum.screen-play.app/" - } + WebEngineView { + url: "https://gitlab.com/kelteseth/ScreenPlay/-/releases" } - anchors { - bottom: footer.top - left: stomtWrapper.right - leftMargin: 0 - right: parent.right - rightMargin: 0 - top: parent.top - topMargin:0 - } - - } - - Rectangle { - id: footer - height: 80 - z: 100 - anchors { - right: parent.right - bottom: parent.bottom - left: stomtWrapper.right - } - Row { - anchors.centerIn: parent - spacing: 20 - Button { - text: qsTr("Forums") - Material.background: Material.Blue - Material.foreground: "white" - font.family: ScreenPlay.settings.font - onClicked: Qt.openUrlExternally( - "https://forum.screen-play.app/") - icon.source: "qrc:/assets/icons/icon_people.svg" - icon.color: "white" - icon.width: 16 - icon.height: 16 - } - Button { - text: qsTr("Blog") - Material.background: Material.LightGreen - Material.foreground: "white" - font.family: ScreenPlay.settings.font - icon.source: "qrc:/assets/icons/icon_document.svg" - icon.color: "white" - icon.width: 16 - icon.height: 16 - onClicked: Qt.openUrlExternally( - "https://screen-play.app/blog/") - } - Button { - text: qsTr("Source Code") - Material.background: Material.Orange - Material.foreground: "white" - font.family: ScreenPlay.settings.font - icon.source: "qrc:/assets/icons/icon_code.svg" - icon.color: "white" - icon.width: 16 - icon.height: 16 - onClicked: Qt.openUrlExternally( - "https://gitlab.com/kelteseth/ScreenPlay/") - } - Button { - text: qsTr("Workshop") - Material.background: Material.Red - Material.foreground: "white" - font.family: ScreenPlay.settings.font - icon.source: "qrc:/assets/icons/icon_steam.svg" - icon.color: "white" - icon.width: 16 - icon.height: 16 - onClicked: Qt.openUrlExternally( - "steam://url/SteamWorkshopPage/672870") - } - Button { - text: qsTr("Changelog") - Material.background: Material.Purple - Material.foreground: "white" - font.family: ScreenPlay.settings.font - icon.source: "qrc:/assets/icons/icon_info.svg" - icon.color: "white" - icon.width: 16 - icon.height: 16 - onClicked: Qt.openUrlExternally( - "https://gitlab.com/kelteseth/ScreenPlay/-/releases") - } + WebEngineView { + url: "https://gitlab.com/kelteseth/ScreenPlay#contributing-for-none-programmer" } } } diff --git a/ScreenPlay/qml/Community/CommunityNavItem.qml b/ScreenPlay/qml/Community/CommunityNavItem.qml new file mode 100644 index 00000000..db3b0a2d --- /dev/null +++ b/ScreenPlay/qml/Community/CommunityNavItem.qml @@ -0,0 +1,66 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.14 +import QtQuick.Controls.Material 2.14 +import ScreenPlay 1.0 + +TabButton { + id: control + height: parent.height + property url openLink + + contentItem: Item { + anchors.fill: parent + + ToolButton { + icon.source: control.icon.source + anchors { + right: txt.left + rightMargin: 5 + verticalCenter: txt.verticalCenter + } + icon.color: control.checked ? Material.accentColor : Material.primaryTextColor + hoverEnabled: false + icon.width: 16 + icon.height: 16 + } + + Text { + id: txt + text: control.text + font.family: ScreenPlay.settings.font + opacity: enabled ? 1.0 : 0.3 + color: control.checked ? Material.accentColor : Material.primaryTextColor + horizontalAlignment: Text.AlignHCenter + elide: Text.ElideRight + anchors.bottom: parent.bottom + anchors.bottomMargin: 5 + anchors.horizontalCenter: parent.horizontalCenter + font.capitalization: Font.AllUppercase + font.pointSize: 11 + } + + ToolButton { + anchors { + top: parent.top + topMargin: 15 + + right: parent.right + } + + width: parent.width * .2 + icon.source: "qrc:/assets/icons/icon_open_in_new.svg" + icon.width: 16 + icon.height: 16 + onClicked: Qt.openUrlExternally(control.openLink) + } + } + + background: Item {} +} + +/*##^## +Designer { + D{i:0;height:60;width:300} +} +##^##*/ + diff --git a/ScreenPlay/qml/Community/Feedback.qml b/ScreenPlay/qml/Community/Feedback.qml deleted file mode 100644 index 19ed04a4..00000000 --- a/ScreenPlay/qml/Community/Feedback.qml +++ /dev/null @@ -1,56 +0,0 @@ -import QtQuick 2.12 -import com.stomt.sdk 1.0 - -Item { - id: feedback - height: 236 - width: 420 - state: "out" - - StomtWidget { - id: stomtWidget - - anchors { - top: parent.top - topMargin: 30 - horizontalCenter: parent.horizontalCenter - } - targetID: "screenplay" - appKey: "C1IfJAruqWFdkM8e7BMPK3dx1" - targetDisplayName: "ScreenPlay" - targetImageUrl: "qrc:/assets/images/ScreenPlayIconStomt.png" - Component.onCompleted: feedback.state = "in" - } - - states: [ - State { - name: "out" - - PropertyChanges { - target: stomtWidget - opacity: 0 - anchors.topMargin: 100 - } - }, - State { - name: "in" - PropertyChanges { - target: stomtWidget - opacity: 1 - anchors.topMargin: 30 - } - } - ] - transitions: [ - Transition { - from: "out" - to: "in" - PropertyAnimation { - target: stomtWidget - duration: 300 - easing.type: Easing.InOutQuart - properties: "opacity,anchors.topMargin" - } - } - ] -}