summaryrefslogtreecommitdiff
path: root/Link.qml
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-12 10:54:05 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-12 10:54:05 +0800
commite5429cf6eb8f83be50b4fb7d764375f7c3713265 (patch)
treef5a400d5b7373350544c57a212e8f458d8a0b581 /Link.qml
parentb3f865c86c7a000efec39222c4c22b53f757f1b6 (diff)
Link view to give it some delay
before user goes to their catalog. Update the handler to conform to the updated shop results page. Make the stack push relation more generic, that what view gets pushed is decided in the C++ controller, not the QML views. Refactor code.
Diffstat (limited to 'Link.qml')
-rw-r--r--Link.qml30
1 files changed, 30 insertions, 0 deletions
diff --git a/Link.qml b/Link.qml
new file mode 100644
index 0000000..199d552
--- /dev/null
+++ b/Link.qml
@@ -0,0 +1,30 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.15
+
+Rectangle {
+ property string arg
+ color: "#2a2a2a"
+ ColumnLayout {
+ anchors.centerIn: parent
+ Image {
+ Layout.alignment: Qt.AlignCenter
+ source: "images/2be179c1-b901-4db5-b9ab-81327a450ee5.png"
+ }
+ Text {
+ objectName: "link"
+ signal catalog(string brand)
+ function push(view, arg) {
+ stack.push(view + ".qml", {
+ "arg": arg
+ })
+ pushed()
+ }
+ signal pushed()
+ Layout.alignment: Qt.AlignCenter
+ text: "<a href=\"https://darapsa.com/" + arg + "\">https://darapsa.com/" + arg + "</a>"
+ linkColor: "#ffffff"
+ onLinkActivated: catalog(arg)
+ }
+ }
+}