mirror of
https://github.com/QRouland/UTPass.git
synced 2026-01-10 19:36:57 +00:00
Fix style command
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import QtQuick 2.4
|
||||
import Lomiri.Components 1.3
|
||||
import Lomiri.Components.Popups 1.3
|
||||
import QtQuick 2.4
|
||||
import "headers"
|
||||
|
||||
Page {
|
||||
@@ -10,38 +10,15 @@ Page {
|
||||
property string plainText
|
||||
property var objects
|
||||
|
||||
header: PageHeader {
|
||||
id: passwordPageHeader
|
||||
width: parent.width
|
||||
height: units.gu(6)
|
||||
title: passwordPage.title
|
||||
|
||||
contents: Item {
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
Label {
|
||||
id: labelTitle
|
||||
text: passwordPage.title
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Component.onCompleted: {
|
||||
var text_split = passwordPage.plainText.split('\n');
|
||||
var component = Qt.createComponent("../components/CopyText.qml");
|
||||
for (var i = 0; i < text_split.length; i++) {
|
||||
if (text_split[i]) {
|
||||
var object = component.createObject(container);
|
||||
object.text = text_split[i];
|
||||
}
|
||||
}
|
||||
|
||||
leadingActionBar.height: units.gu(4)
|
||||
leadingActionBar.actions: [
|
||||
Action {
|
||||
id: backAction
|
||||
iconName: "back"
|
||||
text: "Back"
|
||||
onTriggered: {
|
||||
passwordPage.plainText = ""
|
||||
for (var object in objects) {
|
||||
object.text = ""
|
||||
object.destroy()
|
||||
}
|
||||
pageStack.pop()
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -52,18 +29,49 @@ Page {
|
||||
|
||||
Flow {
|
||||
id: container
|
||||
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
var text_split = passwordPage.plainText.split('\n')
|
||||
var component = Qt.createComponent("../components/CopyText.qml")
|
||||
for (var i = 0; i < text_split.length; i++) {
|
||||
if (text_split[i]) {
|
||||
var object = component.createObject(container)
|
||||
object.text = text_split[i]
|
||||
header: PageHeader {
|
||||
id: passwordPageHeader
|
||||
|
||||
width: parent.width
|
||||
height: units.gu(6)
|
||||
title: passwordPage.title
|
||||
leadingActionBar.height: units.gu(4)
|
||||
leadingActionBar.actions: [
|
||||
Action {
|
||||
id: backAction
|
||||
|
||||
iconName: "back"
|
||||
text: "Back"
|
||||
onTriggered: {
|
||||
passwordPage.plainText = "";
|
||||
for (var object in objects) {
|
||||
object.text = "";
|
||||
object.destroy();
|
||||
}
|
||||
pageStack.pop();
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
contents: Item {
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
|
||||
Label {
|
||||
id: labelTitle
|
||||
|
||||
text: passwordPage.title
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user