subsurface/mobile-widgets/qml/About.qml
jan Iversen a181020b19 mobile: add "Copy log to clipboard" button
on iOS it is practically impossible to copy the App log
to e.g. a mail! in iOS 11 the log file is stored within
the subsurface container and you first need to copy (actually
using the clipboard) out from there to the "normal" document
shared space, before it can be used.

At least iOS users (and I believe Android users) are not really
used to work with files, so the process is not easy to document
in an understandable way.

The alternative is to provide a button, which simply puts the
log on the general clipboard, allowing it to be pasted in a
multitud of applications.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-18 12:43:15 -07:00

69 lines
2 KiB
QML

// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
import QtQuick.Layouts 1.2
import org.kde.kirigami 2.2 as Kirigami
import org.subsurfacedivelog.mobile 1.0
Kirigami.ScrollablePage {
id: aboutPage
property int pageWidth: aboutPage.width - aboutPage.leftPadding - aboutPage.rightPadding
title: qsTr("About Subsurface-mobile")
background: Rectangle { color: subsurfaceTheme.backgroundColor }
ColumnLayout {
spacing: Kirigami.Units.largeSpacing
width: aboutPage.width
Layout.margins: Kirigami.Units.gridUnit / 2
Kirigami.Heading {
text: qsTr("About Subsurface-mobile")
Layout.topMargin: Kirigami.Units.gridUnit
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: pageWidth
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
}
Image {
id: image
source: "qrc:/qml/subsurface-mobile-icon.png"
width: pageWidth / 2
height: width
fillMode: Image.Stretch
Layout.alignment: Qt.AlignCenter
horizontalAlignment: Image.AlignHCenter
}
Kirigami.Heading {
text: qsTr("A mobile version of the free Subsurface divelog software.\n") +
qsTr("View your dive logs while on the go.")
level: 4
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: Kirigami.Units.largeSpacing * 3
Layout.maximumWidth: pageWidth
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
anchors.horizontalCenter: parent.Center
horizontalAlignment: Text.AlignHCenter
}
Kirigami.Heading {
text: qsTr("Version: %1\n\n© Subsurface developer team\n2011-2018").arg(manager.getVersion())
level: 5
font.pointSize: subsurfaceTheme.smallPointSize + 1
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.maximumWidth: pageWidth
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
anchors.horizontalCenter: parent.Center
horizontalAlignment: Text.AlignHCenter
}
SsrfButton {
id: copyAppLogToClipboard
Layout.alignment: Qt.AlignHCenter
text: qsTr("Copy app log to clipboard")
onClicked: {
manager.copyAppLogToClipboard()
rootItem.returnTopPage()
}
}
}
}