From 298fa5c0b49cda62e56089fbf9b6dd6aeea7fe32 Mon Sep 17 00:00:00 2001 From: "Peter G. (nephros)" Date: Thu, 19 Jan 2023 23:51:58 +0100 Subject: [PATCH] initial SFV integration Contributes-To: #36 --- qml/pages/MainPage.qml | 6 ++-- qml/pages/PostSelector.qml | 63 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 qml/pages/PostSelector.qml diff --git a/qml/pages/MainPage.qml b/qml/pages/MainPage.qml index 1205a7f..1f065c8 100644 --- a/qml/pages/MainPage.qml +++ b/qml/pages/MainPage.qml @@ -2,7 +2,7 @@ Apache License 2.0 -Copyright (c) 2022 Peter G. (nephros) +Copyright (c) 2023 Peter G. (nephros) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -436,7 +436,9 @@ Page { ); } console.info("Submitting Bug Report... "); - Qt.openUrlExternally( formToUrl() ); + //Qt.openUrlExternally( formToUrl() ); + var finalUrl = formToUrl(); + var dialog = pageStack.push(Qt.resolvedUrl("PostSelector.qml"), { "postUrl": finalUrl } ) } } } diff --git a/qml/pages/PostSelector.qml b/qml/pages/PostSelector.qml new file mode 100644 index 0000000..ec56aeb --- /dev/null +++ b/qml/pages/PostSelector.qml @@ -0,0 +1,63 @@ +/* + +Apache License 2.0 + +Copyright (c) 2022 Peter G. (nephros) + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ + +import QtQuick 2.6 +import Sailfish.Silica 1.0 +//import "../components" +//import "../config/settings.js" as Settings + +Page { id: page + property string postUrl + property bool haveSFV: false + + SilicaFlickable { id: flick + anchors.fill: parent + contentHeight: col.height + PageHeader { id: header ; + width: parent.width + title: qsTr("Select App to post with") + } + Column { id: col + width: parent.width - Theme.horizontalPageMargin + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: header.bottom + Label { + width: parent.width + font.pixelSize: Theme.fontSizeSmall + color: Theme.secondaryHighlightColor + horizontalAlignment: Text.AlignJustify + text: qsTr("There are several way to finally post your report.
") + + "" + } + ButtonLayout { + width: parent.width + preferredWidth: Theme.buttonSizeExtraLarge + Button { label: qsTr("Browser") } + Button { label: qsTr("Forum Viewer"); enabled: page.haveSFV } + } + } + VerticalScrollDecorator {} + } +} + +// vim: expandtab ts=4 st=4 sw=4 filetype=javascript