@achyutlabsau/vue-payment-gateway 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { reactive, ref, defineComponent, createElementBlock, openBlock, createElementVNode, createVNode, unref, Fragment, renderList, toDisplayString } from "vue";
2
- import { QIcon, QBtn } from "quasar";
1
+ import { reactive, ref, defineComponent, createBlock, openBlock, unref, withCtx, createElementVNode, createVNode, createElementBlock, Fragment, renderList, toDisplayString } from "vue";
2
+ import { QCard, QIcon, QBtn } from "quasar";
3
3
  var PaymentGateways = /* @__PURE__ */ ((PaymentGateways2) => {
4
4
  PaymentGateways2["Tyro"] = "tyro";
5
5
  PaymentGateways2["TillPayment"] = "till-instore";
@@ -49,14 +49,13 @@ const mdiDevices = "M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M1
49
49
  const mdiInformation = "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";
50
50
  const mdiLink = "M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z";
51
51
  const mdiRefresh = "M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z";
52
- const _hoisted_1 = { class: "rounded-lg bg-white p-6 shadow-lg" };
53
- const _hoisted_2 = { class: "mb-8 space-y-4" };
54
- const _hoisted_3 = { class: "flex items-center justify-center" };
55
- const _hoisted_4 = { class: "mb-8 space-y-4" };
56
- const _hoisted_5 = { class: "text-primary flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-gray-100 font-semibold" };
57
- const _hoisted_6 = { class: "text-gray-700" };
58
- const _hoisted_7 = { class: "mb-6 flex items-start space-x-3 rounded-lg bg-amber-50 p-4" };
59
- const _hoisted_8 = { class: "flex justify-end" };
52
+ const _hoisted_1 = { class: "mb-8 space-y-4" };
53
+ const _hoisted_2 = { class: "flex items-center justify-center" };
54
+ const _hoisted_3 = { class: "mb-8 space-y-4" };
55
+ const _hoisted_4 = { class: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-gray-100 font-semibold dark:bg-gray-700" };
56
+ const _hoisted_5 = { class: "text-gray-700 dark:text-gray-200" };
57
+ const _hoisted_6 = { class: "mb-6 flex items-start space-x-3 rounded-lg bg-amber-50 p-4 dark:bg-slate-700" };
58
+ const _hoisted_7 = { class: "flex justify-end" };
60
59
  const _sfc_main = /* @__PURE__ */ defineComponent({
61
60
  __name: "PairInstructions",
62
61
  props: {
@@ -65,52 +64,55 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
65
64
  emits: ["next"],
66
65
  setup(__props) {
67
66
  return (_ctx, _cache) => {
68
- return openBlock(), createElementBlock("div", _hoisted_1, [
69
- createElementVNode("div", _hoisted_2, [
70
- createElementVNode("div", _hoisted_3, [
67
+ return openBlock(), createBlock(unref(QCard), { class: "rounded-lg p-6 shadow-lg" }, {
68
+ default: withCtx(() => [
69
+ createElementVNode("div", _hoisted_1, [
70
+ createElementVNode("div", _hoisted_2, [
71
+ createVNode(unref(QIcon), {
72
+ name: unref(mdiDevices),
73
+ size: "3rem",
74
+ class: "text-primary"
75
+ }, null, 8, ["name"])
76
+ ]),
77
+ _cache[1] || (_cache[1] = createElementVNode("h2", { class: "text-center text-2xl font-bold" }, "Terminal Setup Instructions", -1)),
78
+ _cache[2] || (_cache[2] = createElementVNode("p", { class: "text-center text-gray-600 dark:text-gray-200" }, "Please follow these steps to pair your terminal", -1))
79
+ ]),
80
+ createElementVNode("ul", _hoisted_3, [
81
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.steps, (step, index) => {
82
+ return openBlock(), createElementBlock("li", {
83
+ key: index,
84
+ class: "flex items-center space-x-3"
85
+ }, [
86
+ createElementVNode("span", _hoisted_4, toDisplayString(index + 1), 1),
87
+ createElementVNode("span", _hoisted_5, toDisplayString(step), 1)
88
+ ]);
89
+ }), 128))
90
+ ]),
91
+ createElementVNode("div", _hoisted_6, [
71
92
  createVNode(unref(QIcon), {
72
- name: unref(mdiDevices),
73
- size: "3rem",
74
- class: "text-primary"
75
- }, null, 8, ["name"])
93
+ name: unref(mdiInformation),
94
+ size: "sm",
95
+ class: "mt-0.5 text-amber-500 dark:text-white"
96
+ }, null, 8, ["name"]),
97
+ _cache[3] || (_cache[3] = createElementVNode("div", { class: "flex-1" }, [
98
+ createElementVNode("div", { class: "font-medium text-amber-800 dark:text-white" }, "Important Note"),
99
+ createElementVNode("div", { class: "text-amber-700 dark:text-gray-300" }, " Please refer to your terminal guide for the most up-to-date instructions. ")
100
+ ], -1))
76
101
  ]),
77
- _cache[1] || (_cache[1] = createElementVNode("h2", { class: "text-center text-2xl font-bold text-gray-800" }, "Terminal Setup Instructions", -1)),
78
- _cache[2] || (_cache[2] = createElementVNode("p", { class: "text-center text-gray-600" }, "Please follow these steps to pair your terminal", -1))
79
- ]),
80
- createElementVNode("ul", _hoisted_4, [
81
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.steps, (step, index) => {
82
- return openBlock(), createElementBlock("li", {
83
- key: index,
84
- class: "flex items-center space-x-3"
85
- }, [
86
- createElementVNode("span", _hoisted_5, toDisplayString(index + 1), 1),
87
- createElementVNode("span", _hoisted_6, toDisplayString(step), 1)
88
- ]);
89
- }), 128))
90
- ]),
91
- createElementVNode("div", _hoisted_7, [
92
- createVNode(unref(QIcon), {
93
- name: unref(mdiInformation),
94
- size: "sm",
95
- class: "mt-0.5 text-amber-500"
96
- }, null, 8, ["name"]),
97
- _cache[3] || (_cache[3] = createElementVNode("div", { class: "flex-1" }, [
98
- createElementVNode("div", { class: "font-medium text-amber-800" }, "Important Note"),
99
- createElementVNode("div", { class: "text-amber-700" }, "Please refer to your terminal guide for the most up-to-date instructions.")
100
- ], -1))
102
+ createElementVNode("div", _hoisted_7, [
103
+ createVNode(unref(QBtn), {
104
+ color: "primary",
105
+ unelevated: "",
106
+ "icon-right": "chevron_right",
107
+ label: "Next",
108
+ "no-caps": "",
109
+ ripple: false,
110
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("next"))
111
+ })
112
+ ])
101
113
  ]),
102
- createElementVNode("div", _hoisted_8, [
103
- createVNode(unref(QBtn), {
104
- color: "primary",
105
- unelevated: "",
106
- "icon-right": "chevron_right",
107
- label: "Next",
108
- "no-caps": "",
109
- ripple: false,
110
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("next"))
111
- })
112
- ])
113
- ]);
114
+ _: 1
115
+ });
114
116
  };
115
117
  }
116
118
  });
@@ -7,7 +7,7 @@ import { i as isNetworkError, a as isServerError, d as delay, g as generateTrans
7
7
  import axios, { isAxiosError, HttpStatusCode } from "axios";
8
8
  import { v7 } from "uuid";
9
9
  import { d as dialogDefaultOpts } from "./utils-GrbVNAXw.js";
10
- import { e as environment, b as state, m as mdiCheckCircle, d as mdiChevronLeft, c as mdiRefresh, _ as _sfc_main$3, f as mdiLink } from "./PairInstructions.vue_vue_type_script_setup_true_lang-BkPzOduD.js";
10
+ import { e as environment, b as state, m as mdiCheckCircle, d as mdiChevronLeft, c as mdiRefresh, _ as _sfc_main$3, f as mdiLink } from "./PairInstructions.vue_vue_type_script_setup_true_lang-gQoPMiBm.js";
11
11
  import { _ as _sfc_main$2 } from "./TransactionDialog.vue_vue_type_script_setup_true_lang-DTIELKw0.js";
12
12
  import { useLocalStorage } from "@vueuse/core";
13
13
  const LINKLY_CONSTANTS = {
@@ -614,16 +614,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
614
614
  }
615
615
  });
616
616
  const _hoisted_1 = { class: "" };
617
- const _hoisted_2 = {
618
- key: "paired",
619
- class: "flex items-center justify-center rounded-lg bg-white p-8 shadow-lg"
620
- };
621
- const _hoisted_3 = { class: "text-center" };
622
- const _hoisted_4 = { class: "mb-6" };
623
- const _hoisted_5 = { class: "mb-6 text-sm text-gray-500" };
624
- const _hoisted_6 = { class: "!space-x-3" };
625
- const _hoisted_7 = { key: 1 };
626
- const _hoisted_8 = { class: "flex items-center justify-end gap-3" };
617
+ const _hoisted_2 = { class: "text-center" };
618
+ const _hoisted_3 = { class: "mb-6" };
619
+ const _hoisted_4 = { class: "mb-6 text-sm text-gray-500 dark:text-gray-300" };
620
+ const _hoisted_5 = { class: "!space-x-3" };
621
+ const _hoisted_6 = { key: 1 };
622
+ const _hoisted_7 = { class: "flex items-center justify-end gap-3" };
627
623
  const _sfc_main = /* @__PURE__ */ defineComponent({
628
624
  __name: "PairLinkly",
629
625
  emits: ["pairing-success"],
@@ -673,38 +669,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
673
669
  });
674
670
  return (_ctx, _cache) => {
675
671
  return openBlock(), createElementBlock("div", _hoisted_1, [
676
- unref(pairConfig).isPaired ? (openBlock(), createElementBlock("div", _hoisted_2, [
677
- createElementVNode("div", _hoisted_3, [
678
- createElementVNode("div", _hoisted_4, [
679
- createVNode(unref(QIcon), {
680
- name: unref(mdiCheckCircle),
681
- size: "4rem",
682
- class: "text-green-500"
683
- }, null, 8, ["name"])
684
- ]),
685
- _cache[6] || (_cache[6] = createElementVNode("h2", { class: "mb-4 text-3xl font-bold text-gray-800" }, "Terminal Connected", -1)),
686
- createElementVNode("p", _hoisted_5, " Last paired: " + toDisplayString(new Date(unref(pairConfig).lastPairedDate).toLocaleString()), 1),
687
- createElementVNode("div", _hoisted_6, [
688
- createVNode(unref(QBtn), {
689
- color: "green",
690
- "no-caps": "",
691
- outline: "",
692
- unelevated: "",
693
- label: "Reprint Receipt",
694
- "icon-left": unref(mdiChevronLeft),
695
- onClick: _cache[0] || (_cache[0] = ($event) => reprintReceiptModel.value = true)
696
- }, null, 8, ["icon-left"]),
697
- createVNode(unref(QBtn), {
698
- color: "primary",
699
- unelevated: "",
700
- "no-caps": "",
701
- "icon-left": unref(mdiRefresh),
702
- label: "Re-pair Terminal",
703
- onClick: handleRepair
704
- }, null, 8, ["icon-left"])
672
+ unref(pairConfig).isPaired ? (openBlock(), createBlock(unref(QCard), {
673
+ key: "paired",
674
+ class: "flex items-center justify-center rounded-lg p-8 shadow-lg"
675
+ }, {
676
+ default: withCtx(() => [
677
+ createElementVNode("div", _hoisted_2, [
678
+ createElementVNode("div", _hoisted_3, [
679
+ createVNode(unref(QIcon), {
680
+ name: unref(mdiCheckCircle),
681
+ size: "4rem",
682
+ class: "text-green-500"
683
+ }, null, 8, ["name"])
684
+ ]),
685
+ _cache[6] || (_cache[6] = createElementVNode("h2", { class: "mb-4 text-3xl font-bold" }, "Terminal Connected", -1)),
686
+ createElementVNode("p", _hoisted_4, " Last paired: " + toDisplayString(new Date(unref(pairConfig).lastPairedDate).toLocaleString()), 1),
687
+ createElementVNode("div", _hoisted_5, [
688
+ createVNode(unref(QBtn), {
689
+ color: "green",
690
+ "no-caps": "",
691
+ outline: "",
692
+ unelevated: "",
693
+ label: "Reprint Receipt",
694
+ "icon-left": unref(mdiChevronLeft),
695
+ onClick: _cache[0] || (_cache[0] = ($event) => reprintReceiptModel.value = true)
696
+ }, null, 8, ["icon-left"]),
697
+ createVNode(unref(QBtn), {
698
+ color: "primary",
699
+ unelevated: "",
700
+ "no-caps": "",
701
+ "icon-left": unref(mdiRefresh),
702
+ label: "Re-pair Terminal",
703
+ onClick: handleRepair
704
+ }, null, 8, ["icon-left"])
705
+ ])
705
706
  ])
706
- ])
707
- ])) : (openBlock(), createElementBlock("section", _hoisted_7, [
707
+ ]),
708
+ _: 1
709
+ })) : (openBlock(), createElementBlock("section", _hoisted_6, [
708
710
  showInstructions.value ? (openBlock(), createBlock(_sfc_main$3, {
709
711
  key: 0,
710
712
  onNext: handleNext,
@@ -716,7 +718,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
716
718
  class: "w-full rounded-md p-6"
717
719
  }, {
718
720
  default: withCtx(() => [
719
- _cache[7] || (_cache[7] = createElementVNode("div", { class: "text-lg font-semibold text-gray-600" }, "Pairing configuration", -1)),
721
+ _cache[7] || (_cache[7] = createElementVNode("div", { class: "text-lg font-semibold" }, "Pairing configuration", -1)),
720
722
  createVNode(unref(QForm), {
721
723
  onSubmit: doPairing,
722
724
  class: "mt-6 space-y-4"
@@ -730,6 +732,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
730
732
  hint: "Cloud EFT Client Username",
731
733
  type: "text",
732
734
  outlined: "",
735
+ "no-error-icon": "",
733
736
  dense: ""
734
737
  }, null, 8, ["modelValue", "rules"]),
735
738
  createVNode(unref(QInput), {
@@ -737,6 +740,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
737
740
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => pairingForm.value.password = $event),
738
741
  rules: fieldValidation("Password"),
739
742
  label: "Password",
743
+ "no-error-icon": "",
740
744
  type: "password",
741
745
  outlined: "",
742
746
  hint: "Enter Cloud EFT Client Password",
@@ -749,10 +753,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
749
753
  label: "Pairing Code",
750
754
  type: "text",
751
755
  outlined: "",
756
+ "no-error-icon": "",
752
757
  hint: "Enter Pair code from terminal screen",
753
758
  dense: ""
754
759
  }, null, 8, ["modelValue", "rules"]),
755
- createElementVNode("div", _hoisted_8, [
760
+ createElementVNode("div", _hoisted_7, [
756
761
  createVNode(unref(QBtn), {
757
762
  flat: "",
758
763
  "no-caps": "",
@@ -2,7 +2,7 @@ import { defineComponent, ref, computed, onMounted, watch, resolveDirective, cre
2
2
  import { QCard, QForm, QSelect, QInput, QIcon, QBtn, QDialog, QCardSection, Dialog } from "quasar";
3
3
  import { Spi, TransactionOptions, SuccessState, TransactionType, SpiStatus } from "@mx51/spi-client-js";
4
4
  import { useEventListener } from "@vueuse/core";
5
- import { b as state, _ as _sfc_main$1 } from "./PairInstructions.vue_vue_type_script_setup_true_lang-BkPzOduD.js";
5
+ import { b as state, _ as _sfc_main$1 } from "./PairInstructions.vue_vue_type_script_setup_true_lang-gQoPMiBm.js";
6
6
  const spiSettings = {
7
7
  secureWebSockets: true,
8
8
  // checks for HTTPs
@@ -153,7 +153,7 @@ function cancelPairing() {
153
153
  const _hoisted_1 = { class: "" };
154
154
  const _hoisted_2 = { class: "mb-0 grid grid-cols-2 gap-x-3" };
155
155
  const _hoisted_3 = { class: "grid grid-cols-2 gap-x-3" };
156
- const _hoisted_4 = { class: "rounded bg-gray-100 p-3" };
156
+ const _hoisted_4 = { class: "rounded bg-gray-100 p-3 dark:bg-slate-900" };
157
157
  const _hoisted_5 = {
158
158
  key: 0,
159
159
  class: "flex items-center gap-1 font-semibold"
@@ -167,8 +167,8 @@ const _hoisted_7 = {
167
167
  class: "flex items-center gap-1 font-semibold"
168
168
  };
169
169
  const _hoisted_8 = { class: "text-center font-semibold uppercase text-gray-500" };
170
- const _hoisted_9 = { class: "py-3 text-center text-2xl font-semibold uppercase text-slate-700" };
171
- const _hoisted_10 = { class: "text-center font-semibold uppercase text-gray-500" };
170
+ const _hoisted_9 = { class: "py-3 text-center text-2xl font-semibold uppercase text-slate-700 dark:text-gray-200" };
171
+ const _hoisted_10 = { class: "text-center font-semibold uppercase text-gray-500 dark:text-gray-200" };
172
172
  const _sfc_main = /* @__PURE__ */ defineComponent({
173
173
  __name: "PairMX51",
174
174
  setup(__props) {
@@ -324,7 +324,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
324
324
  class: "w-full rounded-md p-6"
325
325
  }, {
326
326
  default: withCtx(() => [
327
- _cache[13] || (_cache[13] = createElementVNode("div", { class: "text-lg font-semibold text-gray-600" }, "Pairing configuration", -1)),
327
+ _cache[13] || (_cache[13] = createElementVNode("div", { class: "text-lg font-semibold" }, "Pairing configuration", -1)),
328
328
  createVNode(unref(QForm), {
329
329
  onSubmit: onPairTerminal,
330
330
  class: "space-y-4"
@@ -425,7 +425,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
425
425
  }, null, 8, ["disable", "modelValue", "rules"])
426
426
  ]),
427
427
  createElementVNode("div", _hoisted_4, [
428
- _cache[10] || (_cache[10] = createElementVNode("div", { class: "text-sm font-medium text-gray-500" }, "Pairing Status", -1)),
428
+ _cache[10] || (_cache[10] = createElementVNode("div", { class: "text-sm font-medium text-gray-500 dark:text-gray-300" }, "Pairing Status", -1)),
429
429
  pairStatus.value === unref(SpiStatus).PairedConnected ? (openBlock(), createElementBlock("div", _hoisted_5, [
430
430
  createVNode(unref(QIcon), {
431
431
  name: "check_circle",
@@ -500,7 +500,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
500
500
  default: withCtx(() => [
501
501
  _cache[11] || (_cache[11] = createElementVNode("div", { class: "text-center font-semibold uppercase text-gray-500" }, "Confirm your pairing code", -1)),
502
502
  createElementVNode("div", _hoisted_9, toDisplayString(pairInfo.value.confirmationCode), 1),
503
- _cache[12] || (_cache[12] = createElementVNode("div", { class: "text-center text-sm text-gray-500" }, "Confirm the matching pairing code on the terminal", -1))
503
+ _cache[12] || (_cache[12] = createElementVNode("div", { class: "text-center text-sm text-gray-500 dark:text-gray-300" }, " Confirm the matching pairing code on the terminal ", -1))
504
504
  ]),
505
505
  _: 1
506
506
  })) : pairInfo.value.state === "FINISHED" ? (openBlock(), createBlock(unref(QCardSection), { key: 2 }, {
@@ -1,10 +1,10 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { defineComponent, ref, createElementBlock, unref, openBlock, createElementVNode, createVNode, createTextVNode, toDisplayString, createBlock, withModifiers } from "vue";
4
+ import { defineComponent, ref, createBlock, createElementBlock, unref, openBlock, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, withModifiers } from "vue";
5
5
  import { useLocalStorage } from "@vueuse/core";
6
- import { Dialog, QIcon, QBtn, QInput } from "quasar";
7
- import { b as state, e as environment, m as mdiCheckCircle, c as mdiRefresh, _ as _sfc_main$1, d as mdiChevronLeft, f as mdiLink } from "./PairInstructions.vue_vue_type_script_setup_true_lang-BkPzOduD.js";
6
+ import { Dialog, QCard, QIcon, QBtn, QInput } from "quasar";
7
+ import { b as state, e as environment, m as mdiCheckCircle, c as mdiRefresh, _ as _sfc_main$1, d as mdiChevronLeft, f as mdiLink } from "./PairInstructions.vue_vue_type_script_setup_true_lang-gQoPMiBm.js";
8
8
  import axios, { HttpStatusCode, isAxiosError } from "axios";
9
9
  import { d as delay } from "./index-e4lpzJsL.js";
10
10
  import { d as dialogDefaultOpts } from "./utils-GrbVNAXw.js";
@@ -266,7 +266,7 @@ const useSmartPay = () => {
266
266
  title: "Error!",
267
267
  class: "text-red-500",
268
268
  progress: false,
269
- message: `<div class="text-gray-800 text-base">${errorMessage}</div>`
269
+ message: errorMessage
270
270
  });
271
271
  reject({ success: false });
272
272
  });
@@ -280,25 +280,17 @@ const useSmartPay = () => {
280
280
  };
281
281
  return { pairTerminal, initiatePurchase, initiateRefund };
282
282
  };
283
- const _hoisted_1 = {
284
- key: "paired",
285
- class: "flex items-center justify-center rounded-lg bg-white p-8 shadow-lg"
286
- };
287
- const _hoisted_2 = { class: "text-center" };
288
- const _hoisted_3 = { class: "mb-6" };
289
- const _hoisted_4 = { class: "mb-2 text-gray-600" };
290
- const _hoisted_5 = { class: "font-mono font-medium" };
291
- const _hoisted_6 = { class: "mb-6 text-sm text-gray-500" };
292
- const _hoisted_7 = { class: "flex items-center justify-center gap-3" };
293
- const _hoisted_8 = {
283
+ const _hoisted_1 = { class: "text-center" };
284
+ const _hoisted_2 = { class: "mb-6" };
285
+ const _hoisted_3 = { class: "mb-2 text-gray-600 dark:text-gray-200" };
286
+ const _hoisted_4 = { class: "font-mono font-medium" };
287
+ const _hoisted_5 = { class: "mb-6 text-sm text-gray-500 dark:text-gray-300" };
288
+ const _hoisted_6 = { class: "flex items-center justify-center gap-3" };
289
+ const _hoisted_7 = {
294
290
  key: 1,
295
291
  class: "p-6"
296
292
  };
297
- const _hoisted_9 = {
298
- key: 1,
299
- class: "rounded-lg bg-white p-8 shadow-lg"
300
- };
301
- const _hoisted_10 = { class: "flex items-center justify-end gap-3" };
293
+ const _hoisted_8 = { class: "flex items-center justify-end gap-3" };
302
294
  const _sfc_main = /* @__PURE__ */ defineComponent({
303
295
  __name: "PairSmartPay",
304
296
  setup(__props) {
@@ -331,72 +323,84 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
331
323
  }
332
324
  };
333
325
  return (_ctx, _cache) => {
334
- return unref(pairConfig).isPaired ? (openBlock(), createElementBlock("div", _hoisted_1, [
335
- createElementVNode("div", _hoisted_2, [
336
- createElementVNode("div", _hoisted_3, [
337
- createVNode(unref(QIcon), {
338
- name: unref(mdiCheckCircle),
339
- size: "4rem",
340
- class: "text-green-500"
341
- }, null, 8, ["name"])
342
- ]),
343
- _cache[3] || (_cache[3] = createElementVNode("h2", { class: "mb-4 text-3xl font-bold text-gray-800" }, "Terminal Connected", -1)),
344
- createElementVNode("p", _hoisted_4, [
345
- _cache[2] || (_cache[2] = createTextVNode(" Pairing Code: ")),
346
- createElementVNode("span", _hoisted_5, toDisplayString(unref(pairConfig).pairingCode), 1)
347
- ]),
348
- createElementVNode("p", _hoisted_6, "Last paired: " + toDisplayString(new Date(unref(pairConfig).lastPairedDate).toLocaleString()), 1),
349
- createElementVNode("div", _hoisted_7, [
350
- createVNode(unref(QBtn), {
351
- color: "primary",
352
- unelevated: "",
353
- "no-caps": "",
354
- "icon-left": unref(mdiRefresh),
355
- label: "Re-pair Terminal",
356
- onClick: handleRepair
357
- }, null, 8, ["icon-left"])
358
- ])
359
- ])
360
- ])) : (openBlock(), createElementBlock("div", _hoisted_8, [
361
- showInstructions.value ? (openBlock(), createBlock(_sfc_main$1, {
362
- key: 0,
363
- onNext: handleNext,
364
- steps: SETUP_STEPS
365
- })) : (openBlock(), createElementBlock("div", _hoisted_9, [
366
- _cache[4] || (_cache[4] = createElementVNode("h3", { class: "mb-6 text-xl font-semibold text-gray-800" }, "Enter Terminal Details", -1)),
367
- createElementVNode("form", {
368
- onSubmit: withModifiers(doPairing, ["prevent"]),
369
- class: "space-y-6"
370
- }, [
371
- createVNode(unref(QInput), {
372
- modelValue: unref(pairConfig).pairingCode,
373
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(pairConfig).pairingCode = $event),
374
- outlined: "",
375
- dense: "",
376
- label: "Pairing Code",
377
- rules: [(val) => !!val || "Pairing Code is required"],
378
- hint: "Enter the Pairing Code shown on your device",
379
- class: "w-full"
380
- }, null, 8, ["modelValue", "rules"]),
381
- createElementVNode("div", _hoisted_10, [
382
- createVNode(unref(QBtn), {
383
- flat: "",
384
- "no-caps": "",
385
- label: "Back",
386
- "icon-left": unref(mdiChevronLeft),
387
- onClick: _cache[1] || (_cache[1] = ($event) => showInstructions.value = true)
388
- }, null, 8, ["icon-left"]),
326
+ return unref(pairConfig).isPaired ? (openBlock(), createBlock(unref(QCard), {
327
+ key: "paired",
328
+ class: "flex items-center justify-center rounded-lg p-8 shadow-lg"
329
+ }, {
330
+ default: withCtx(() => [
331
+ createElementVNode("div", _hoisted_1, [
332
+ createElementVNode("div", _hoisted_2, [
333
+ createVNode(unref(QIcon), {
334
+ name: unref(mdiCheckCircle),
335
+ size: "4rem",
336
+ class: "text-green-500"
337
+ }, null, 8, ["name"])
338
+ ]),
339
+ _cache[3] || (_cache[3] = createElementVNode("h2", { class: "mb-4 text-3xl font-bold" }, "Terminal Connected", -1)),
340
+ createElementVNode("p", _hoisted_3, [
341
+ _cache[2] || (_cache[2] = createTextVNode(" Pairing Code: ")),
342
+ createElementVNode("span", _hoisted_4, toDisplayString(unref(pairConfig).pairingCode), 1)
343
+ ]),
344
+ createElementVNode("p", _hoisted_5, " Last paired: " + toDisplayString(new Date(unref(pairConfig).lastPairedDate).toLocaleString()), 1),
345
+ createElementVNode("div", _hoisted_6, [
389
346
  createVNode(unref(QBtn), {
390
- type: "submit",
391
347
  color: "primary",
392
348
  unelevated: "",
393
349
  "no-caps": "",
394
- "icon-right": unref(mdiLink),
395
- label: "Pair Terminal"
396
- }, null, 8, ["icon-right"])
350
+ "icon-left": unref(mdiRefresh),
351
+ label: "Re-pair Terminal",
352
+ onClick: handleRepair
353
+ }, null, 8, ["icon-left"])
397
354
  ])
398
- ], 32)
399
- ]))
355
+ ])
356
+ ]),
357
+ _: 1
358
+ })) : (openBlock(), createElementBlock("div", _hoisted_7, [
359
+ showInstructions.value ? (openBlock(), createBlock(_sfc_main$1, {
360
+ key: 0,
361
+ onNext: handleNext,
362
+ steps: SETUP_STEPS
363
+ })) : (openBlock(), createBlock(unref(QCard), {
364
+ key: 1,
365
+ class: "rounded-lg p-8 shadow-lg"
366
+ }, {
367
+ default: withCtx(() => [
368
+ _cache[4] || (_cache[4] = createElementVNode("h3", { class: "mb-6 text-xl font-semibold" }, "Enter Terminal Details", -1)),
369
+ createElementVNode("form", {
370
+ onSubmit: withModifiers(doPairing, ["prevent"]),
371
+ class: "space-y-6"
372
+ }, [
373
+ createVNode(unref(QInput), {
374
+ modelValue: unref(pairConfig).pairingCode,
375
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(pairConfig).pairingCode = $event),
376
+ outlined: "",
377
+ dense: "",
378
+ label: "Pairing Code",
379
+ rules: [(val) => !!val || "Pairing Code is required"],
380
+ hint: "Enter the Pairing Code shown on your device",
381
+ class: "w-full"
382
+ }, null, 8, ["modelValue", "rules"]),
383
+ createElementVNode("div", _hoisted_8, [
384
+ createVNode(unref(QBtn), {
385
+ flat: "",
386
+ "no-caps": "",
387
+ label: "Back",
388
+ "icon-left": unref(mdiChevronLeft),
389
+ onClick: _cache[1] || (_cache[1] = ($event) => showInstructions.value = true)
390
+ }, null, 8, ["icon-left"]),
391
+ createVNode(unref(QBtn), {
392
+ type: "submit",
393
+ color: "primary",
394
+ unelevated: "",
395
+ "no-caps": "",
396
+ "icon-right": unref(mdiLink),
397
+ label: "Pair Terminal"
398
+ }, null, 8, ["icon-right"])
399
+ ])
400
+ ], 32)
401
+ ]),
402
+ _: 1
403
+ }))
400
404
  ]));
401
405
  };
402
406
  }