ts-glitter 13.8.757 → 13.8.758
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.
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/cms-plugin/POS-setting.js +101 -100
- package/lowcode/cms-plugin/POS-setting.ts +97 -96
- package/package.json +1 -1
package/lowcode/Entry.js
CHANGED
|
@@ -68,7 +68,7 @@ export class Entry {
|
|
|
68
68
|
}
|
|
69
69
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
70
70
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
71
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
71
|
+
glitter.share.editerVersion = 'V_13.8.758';
|
|
72
72
|
glitter.share.start = new Date();
|
|
73
73
|
const vm = {
|
|
74
74
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -68,7 +68,7 @@ export class Entry {
|
|
|
68
68
|
}
|
|
69
69
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
70
70
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
71
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
71
|
+
glitter.share.editerVersion = 'V_13.8.758';
|
|
72
72
|
glitter.share.start = new Date();
|
|
73
73
|
const vm: {
|
|
74
74
|
appConfig: any;
|
|
@@ -577,23 +577,24 @@ cursor: pointer;
|
|
|
577
577
|
</div>
|
|
578
578
|
<div class="dropdown-menu position-absolute"
|
|
579
579
|
style="top:50px; right: 0;">
|
|
580
|
-
${
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
580
|
+
${[
|
|
581
|
+
...(() => {
|
|
582
|
+
const view = member_auth.filter((dd) => {
|
|
583
|
+
return dd.config.member_id !== POSSetting.config.who;
|
|
584
|
+
}).map((dd) => {
|
|
585
|
+
const memberDD = dd;
|
|
586
|
+
return `
|
|
586
587
|
<a class="dropdown-item cursor_pointer d-flex flex-column" onclick="${gvc.event(() => {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
588
|
+
gvc.glitter.innerDialog((gvc) => {
|
|
589
|
+
const c_vm = {
|
|
590
|
+
text: '',
|
|
591
|
+
id: gvc.glitter.getUUID()
|
|
592
|
+
};
|
|
593
|
+
return gvc.bindView(() => {
|
|
594
|
+
return {
|
|
595
|
+
bind: c_vm.id,
|
|
596
|
+
view: () => {
|
|
597
|
+
return `<div style="flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 42px; display: inline-flex">
|
|
597
598
|
<div style="align-self: stretch; height: 100px; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: flex">
|
|
598
599
|
<div style="align-self: stretch; justify-content: center; align-items: flex-start; gap: 16px; display: inline-flex">
|
|
599
600
|
<div style="text-align: center"><span style="color: #FFB400; font-size: 42px; font-family: Lilita One; font-weight: 400; word-wrap: break-word">SHOPNE</span><span style="color: #FFB400; font-size: 42px; font-family: Lilita One; font-weight: 400; letter-spacing: 2.52px; word-wrap: break-word">X</span></div>
|
|
@@ -603,123 +604,123 @@ cursor: pointer;
|
|
|
603
604
|
</div>
|
|
604
605
|
<div style="align-self: stretch; justify-content: center; align-items: center; gap: 20px; display: inline-flex">
|
|
605
606
|
${(() => {
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
607
|
+
let view = [];
|
|
608
|
+
for (let a = 0; a < 6; a++) {
|
|
609
|
+
if (c_vm.text.length > a) {
|
|
610
|
+
view.push(`<div style="width: 18px; height: 18px; position: relative; background: #FFB400; border-radius: 30px"></div>`);
|
|
611
|
+
}
|
|
612
|
+
else {
|
|
613
|
+
view.push(` <div style="width: 18px; height: 18px; position: relative; background: #B0B0B0; border-radius: 30px"></div>`);
|
|
614
|
+
}
|
|
613
615
|
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
})()}
|
|
616
|
+
return view.join('');
|
|
617
|
+
})()}
|
|
617
618
|
</div>
|
|
618
619
|
<div style="background: white; flex-direction: column; justify-content: flex-start; align-items: center; gap: 32px; display: flex">
|
|
619
620
|
<div style="align-self: stretch; border-radius: 10px; flex-direction: column; justify-content: flex-start; align-items: center; display: flex;border: 1px solid #DDD;">
|
|
620
621
|
${[[1, 2, 3], [4, 5, 6], [7, 8, 9], ['取消', 0, '<i class="fa-regular fa-delete-left"></i>']].map((dd) => {
|
|
621
|
-
|
|
622
|
+
return ` <div style="justify-content: flex-start; align-items: center; display: inline-flex">
|
|
622
623
|
${dd.map((dd) => {
|
|
623
|
-
|
|
624
|
+
return `<div style="height:56px;width:95px;flex-direction: column; justify-content: center; align-items: center; gap: 10px; display: inline-flex">
|
|
624
625
|
<div style="align-self: stretch; text-align: center; color: #393939; font-size: 20px; font-weight: 700; line-height: 28px; word-wrap: break-word" onclick="${gvc.event(() => {
|
|
625
|
-
|
|
626
|
-
gvc.closeDialog();
|
|
627
|
-
return;
|
|
628
|
-
}
|
|
629
|
-
else if (`${dd}`.includes(`fa-regular`)) {
|
|
630
|
-
c_vm.text = c_vm.text.substring(0, c_vm.text.length - 1);
|
|
631
|
-
gvc.notifyDataChange(c_vm.id);
|
|
632
|
-
return;
|
|
633
|
-
}
|
|
634
|
-
c_vm.text += dd;
|
|
635
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
636
|
-
if (c_vm.text.length === 6) {
|
|
637
|
-
if (memberDD.config.pin === c_vm.text) {
|
|
638
|
-
POSSetting.config.who = memberDD.config.member_id;
|
|
626
|
+
if (dd === '取消') {
|
|
639
627
|
gvc.closeDialog();
|
|
640
|
-
|
|
628
|
+
return;
|
|
641
629
|
}
|
|
642
|
-
else {
|
|
643
|
-
|
|
644
|
-
c_vm.
|
|
630
|
+
else if (`${dd}`.includes(`fa-regular`)) {
|
|
631
|
+
c_vm.text = c_vm.text.substring(0, c_vm.text.length - 1);
|
|
632
|
+
gvc.notifyDataChange(c_vm.id);
|
|
633
|
+
return;
|
|
645
634
|
}
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
635
|
+
c_vm.text += dd;
|
|
636
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
637
|
+
if (c_vm.text.length === 6) {
|
|
638
|
+
if (memberDD.config.pin === c_vm.text) {
|
|
639
|
+
POSSetting.config.who = memberDD.config.member_id;
|
|
640
|
+
gvc.closeDialog();
|
|
641
|
+
refreshUserBar();
|
|
642
|
+
}
|
|
643
|
+
else {
|
|
644
|
+
dialog.errorMessage({ text: '輸入錯誤' });
|
|
645
|
+
c_vm.text = '';
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
gvc.notifyDataChange(c_vm.id);
|
|
649
|
+
})}">${dd}</div>
|
|
649
650
|
</div>`;
|
|
650
|
-
|
|
651
|
+
}).join('<div class="" style="border-right: 1px #DDDDDD solid;height:56px;"></div>')}
|
|
651
652
|
</div>`;
|
|
652
|
-
|
|
653
|
+
}).join('<div class="" style="border-top: 1px #DDDDDD solid;height:1px; width: 100%;"></div>')}
|
|
653
654
|
|
|
654
655
|
</div>
|
|
655
656
|
</div>
|
|
656
657
|
</div>`;
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
658
|
+
},
|
|
659
|
+
divCreate: {
|
|
660
|
+
class: ``,
|
|
661
|
+
style: `width: 338px; padding-left: 20px; padding-right: 20px; padding-top: 25px; padding-bottom: 25px; background: white; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15); border-radius: 20px; overflow: hidden; justify-content: center; align-items: center; gap: 10px; display: inline-flex`
|
|
662
|
+
}
|
|
663
|
+
};
|
|
664
|
+
});
|
|
665
|
+
}, '');
|
|
666
|
+
})}">
|
|
666
667
|
${dd.config.title} / ${dd.config.name} / ${dd.config.member_id}
|
|
667
668
|
</a>
|
|
668
669
|
`;
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
670
|
+
});
|
|
671
|
+
if (POSSetting.config.who !== 'manager') {
|
|
672
|
+
view.push(html `<a
|
|
672
673
|
class="dropdown-item cursor_pointer d-flex flex-column ${POSSetting.config.who === 'manager' ? `d-none` : ``}"
|
|
673
674
|
onclick="${gvc.event(() => {
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
675
|
+
gvc.glitter.innerDialog((gvc) => {
|
|
676
|
+
return POSSetting.loginManager(gvc, 'switch', () => {
|
|
677
|
+
refreshUserBar();
|
|
678
|
+
gvc.closeDialog();
|
|
679
|
+
});
|
|
680
|
+
}, '');
|
|
681
|
+
})}">
|
|
681
682
|
切換至管理員
|
|
682
683
|
</a>`);
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
html `
|
|
684
|
+
}
|
|
685
|
+
return view;
|
|
686
|
+
})(),
|
|
687
|
+
...[
|
|
688
|
+
...((PayConfig.deviceType === 'pos') ? [
|
|
689
|
+
html `
|
|
690
690
|
<a class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
691
691
|
style="gap:10px;"
|
|
692
692
|
onclick="${gvc.event(() => {
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
693
|
+
ConnectionMode.main(gvc);
|
|
694
|
+
})}"><i class="fa-solid fa-plug d-flex align-items-center justify-content-center" style="width:20px;" ></i>連線模式</a>`,
|
|
695
|
+
] : []),
|
|
696
|
+
...((ConnectionMode.on_connected_device) ? [
|
|
697
|
+
`<a class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
698
698
|
style="gap:10px;"
|
|
699
699
|
onclick="${gvc.event(() => {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
700
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
701
|
+
dialog.checkYesOrNot({
|
|
702
|
+
text: '是否斷開與 IMIN 裝置的連線?',
|
|
703
|
+
callback: (response) => {
|
|
704
|
+
if (response) {
|
|
705
|
+
dialog.infoMessage({ text: '已斷開連線' });
|
|
706
|
+
ConnectionMode.last_connect_id = '';
|
|
707
|
+
ConnectionMode.on_connected_device = '';
|
|
708
|
+
ConnectionMode.socket.close();
|
|
709
|
+
}
|
|
709
710
|
}
|
|
710
|
-
}
|
|
711
|
-
});
|
|
712
|
-
|
|
713
|
-
]
|
|
714
|
-
|
|
715
|
-
return html `<a
|
|
711
|
+
});
|
|
712
|
+
})}"><i class="fa-solid fa-power-off d-flex align-items-center justify-content-center" style="width:20px;"></i>斷開裝置連線</a>`
|
|
713
|
+
] : [])
|
|
714
|
+
].concat(PayConfig.deviceType === 'pos' ? [] : ConnectionMode.device_list.map((dd) => {
|
|
715
|
+
return html `<a
|
|
716
716
|
class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
717
717
|
style="gap:10px;"
|
|
718
718
|
onclick="${gvc.event(() => {
|
|
719
|
-
|
|
720
|
-
|
|
719
|
+
ConnectionMode.connect(dd);
|
|
720
|
+
})}"><i
|
|
721
721
|
class="fa-solid fa-plug d-flex align-items-center justify-content-center" style="width:20px;"></i>連線至『 ${dd} 』</a>`;
|
|
722
|
-
|
|
722
|
+
}))
|
|
723
|
+
].join('<div class="dropdown-divider"></div>')}
|
|
723
724
|
${(POSSetting.config.who === 'manager') ? html `
|
|
724
725
|
<div class="dropdown-divider"></div>
|
|
725
726
|
<a class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
@@ -634,23 +634,24 @@ cursor: pointer;
|
|
|
634
634
|
</div>
|
|
635
635
|
<div class="dropdown-menu position-absolute"
|
|
636
636
|
style="top:50px; right: 0;">
|
|
637
|
-
${
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
637
|
+
${[
|
|
638
|
+
...(() => {
|
|
639
|
+
const view = member_auth.filter((dd: any) => {
|
|
640
|
+
return dd.config.member_id !== POSSetting.config.who
|
|
641
|
+
}).map((dd: any) => {
|
|
642
|
+
const memberDD = dd
|
|
643
|
+
return `
|
|
643
644
|
<a class="dropdown-item cursor_pointer d-flex flex-column" onclick="${gvc.event(() => {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
645
|
+
gvc.glitter.innerDialog((gvc) => {
|
|
646
|
+
const c_vm = {
|
|
647
|
+
text: '',
|
|
648
|
+
id: gvc.glitter.getUUID()
|
|
649
|
+
}
|
|
650
|
+
return gvc.bindView(() => {
|
|
651
|
+
return {
|
|
652
|
+
bind: c_vm.id,
|
|
653
|
+
view: () => {
|
|
654
|
+
return `<div style="flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 42px; display: inline-flex">
|
|
654
655
|
<div style="align-self: stretch; height: 100px; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: flex">
|
|
655
656
|
<div style="align-self: stretch; justify-content: center; align-items: flex-start; gap: 16px; display: inline-flex">
|
|
656
657
|
<div style="text-align: center"><span style="color: #FFB400; font-size: 42px; font-family: Lilita One; font-weight: 400; word-wrap: break-word">SHOPNE</span><span style="color: #FFB400; font-size: 42px; font-family: Lilita One; font-weight: 400; letter-spacing: 2.52px; word-wrap: break-word">X</span></div>
|
|
@@ -660,73 +661,73 @@ cursor: pointer;
|
|
|
660
661
|
</div>
|
|
661
662
|
<div style="align-self: stretch; justify-content: center; align-items: center; gap: 20px; display: inline-flex">
|
|
662
663
|
${(() => {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
664
|
+
let view: any = []
|
|
665
|
+
for (let a = 0; a < 6; a++) {
|
|
666
|
+
if (c_vm.text.length > a) {
|
|
667
|
+
view.push(`<div style="width: 18px; height: 18px; position: relative; background: #FFB400; border-radius: 30px"></div>`)
|
|
668
|
+
} else {
|
|
669
|
+
view.push(` <div style="width: 18px; height: 18px; position: relative; background: #B0B0B0; border-radius: 30px"></div>`)
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
return view.join('')
|
|
673
|
+
})()}
|
|
673
674
|
</div>
|
|
674
675
|
<div style="background: white; flex-direction: column; justify-content: flex-start; align-items: center; gap: 32px; display: flex">
|
|
675
676
|
<div style="align-self: stretch; border-radius: 10px; flex-direction: column; justify-content: flex-start; align-items: center; display: flex;border: 1px solid #DDD;">
|
|
676
677
|
${[[1, 2, 3], [4, 5, 6], [7, 8, 9], ['取消', 0, '<i class="fa-regular fa-delete-left"></i>']].map((dd) => {
|
|
677
678
|
|
|
678
|
-
|
|
679
|
+
return ` <div style="justify-content: flex-start; align-items: center; display: inline-flex">
|
|
679
680
|
${dd.map((dd) => {
|
|
680
|
-
|
|
681
|
+
return `<div style="height:56px;width:95px;flex-direction: column; justify-content: center; align-items: center; gap: 10px; display: inline-flex">
|
|
681
682
|
<div style="align-self: stretch; text-align: center; color: #393939; font-size: 20px; font-weight: 700; line-height: 28px; word-wrap: break-word" onclick="${
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
683
|
+
gvc.event(() => {
|
|
684
|
+
if (dd === '取消') {
|
|
685
|
+
gvc.closeDialog()
|
|
686
|
+
return
|
|
687
|
+
} else if (`${dd}`.includes(`fa-regular`)) {
|
|
688
|
+
c_vm.text = c_vm.text.substring(0, c_vm.text.length - 1)
|
|
689
|
+
gvc.notifyDataChange(c_vm.id)
|
|
690
|
+
return
|
|
691
|
+
}
|
|
692
|
+
c_vm.text += dd
|
|
693
|
+
const dialog = new ShareDialog(gvc.glitter)
|
|
694
|
+
if (c_vm.text.length === 6) {
|
|
695
|
+
if (memberDD.config.pin === c_vm.text) {
|
|
696
|
+
POSSetting.config.who = memberDD.config.member_id
|
|
697
|
+
gvc.closeDialog()
|
|
698
|
+
refreshUserBar()
|
|
699
|
+
} else {
|
|
700
|
+
dialog.errorMessage({text: '輸入錯誤'})
|
|
701
|
+
c_vm.text = ''
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
gvc.notifyDataChange(c_vm.id)
|
|
705
|
+
})
|
|
706
|
+
}">${dd}</div>
|
|
706
707
|
</div>`
|
|
707
|
-
|
|
708
|
+
}).join('<div class="" style="border-right: 1px #DDDDDD solid;height:56px;"></div>')}
|
|
708
709
|
</div>`
|
|
709
|
-
|
|
710
|
+
}).join('<div class="" style="border-top: 1px #DDDDDD solid;height:1px; width: 100%;"></div>')}
|
|
710
711
|
|
|
711
712
|
</div>
|
|
712
713
|
</div>
|
|
713
714
|
</div>`
|
|
714
715
|
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
716
|
+
},
|
|
717
|
+
divCreate: {
|
|
718
|
+
class: ``,
|
|
719
|
+
style: `width: 338px; padding-left: 20px; padding-right: 20px; padding-top: 25px; padding-bottom: 25px; background: white; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15); border-radius: 20px; overflow: hidden; justify-content: center; align-items: center; gap: 10px; display: inline-flex`
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
})
|
|
723
|
+
}, '')
|
|
724
|
+
})}">
|
|
724
725
|
${dd.config.title} / ${dd.config.name} / ${dd.config.member_id}
|
|
725
726
|
</a>
|
|
726
727
|
`
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
728
|
+
})
|
|
729
|
+
if (POSSetting.config.who !== 'manager') {
|
|
730
|
+
view.push(html`<a
|
|
730
731
|
class="dropdown-item cursor_pointer d-flex flex-column ${POSSetting.config.who === 'manager' ? `d-none` : ``}"
|
|
731
732
|
onclick="${gvc.event(() => {
|
|
732
733
|
gvc.glitter.innerDialog((gvc) => {
|
|
@@ -739,47 +740,47 @@ cursor: pointer;
|
|
|
739
740
|
})}">
|
|
740
741
|
切換至管理員
|
|
741
742
|
</a>`)
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
html`
|
|
743
|
+
}
|
|
744
|
+
return view
|
|
745
|
+
})(),
|
|
746
|
+
...[
|
|
747
|
+
...((PayConfig.deviceType==='pos') ? [
|
|
748
|
+
html`
|
|
749
749
|
<a class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
750
750
|
style="gap:10px;"
|
|
751
751
|
onclick="${gvc.event(() => {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
752
|
+
ConnectionMode.main(gvc)
|
|
753
|
+
})}"><i class="fa-solid fa-plug d-flex align-items-center justify-content-center" style="width:20px;" ></i>連線模式</a>`,
|
|
754
|
+
]:[]),
|
|
755
|
+
...((ConnectionMode.on_connected_device) ? [
|
|
756
|
+
`<a class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
757
757
|
style="gap:10px;"
|
|
758
758
|
onclick="${gvc.event(() => {
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
759
|
+
const dialog=new ShareDialog(gvc.glitter)
|
|
760
|
+
dialog.checkYesOrNot({
|
|
761
|
+
text:'是否斷開與 IMIN 裝置的連線?',
|
|
762
|
+
callback:(response)=>{
|
|
763
|
+
if(response){
|
|
764
|
+
dialog.infoMessage({text:'已斷開連線'})
|
|
765
|
+
ConnectionMode.last_connect_id='';
|
|
766
|
+
ConnectionMode.on_connected_device=''
|
|
767
|
+
ConnectionMode.socket.close()
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
})
|
|
771
|
+
|
|
772
|
+
})}"><i class="fa-solid fa-power-off d-flex align-items-center justify-content-center" style="width:20px;"></i>斷開裝置連線</a>`
|
|
773
|
+
]:[])
|
|
774
|
+
].concat(PayConfig.deviceType==='pos' ? []:ConnectionMode.device_list.map((dd) => {
|
|
775
|
+
return html`<a
|
|
776
776
|
class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
777
777
|
style="gap:10px;"
|
|
778
778
|
onclick="${gvc.event(() => {
|
|
779
779
|
ConnectionMode.connect(dd)
|
|
780
780
|
})}"><i
|
|
781
781
|
class="fa-solid fa-plug d-flex align-items-center justify-content-center" style="width:20px;"></i>連線至『 ${dd} 』</a>`
|
|
782
|
-
|
|
782
|
+
}))
|
|
783
|
+
].join('<div class="dropdown-divider"></div>')}
|
|
783
784
|
${(POSSetting.config.who === 'manager') ? html`
|
|
784
785
|
<div class="dropdown-divider"></div>
|
|
785
786
|
<a class="dropdown-item cursor_pointer d-flex align-items-center"
|