Skip to content

Commit be69649

Browse files
authored
Merge pull request #12 from iDataRiver/support-license
Support license
2 parents 8219e90 + c04a9e9 commit be69649

23 files changed

Lines changed: 75 additions & 10 deletions

components/Home/Theme1.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const filterSkus = (projects, keyword = '') => {
1313
const showSkus = []
1414
1515
projects.forEach((project) => {
16-
if (!['DIGITAL', 'MANUAL', 'GROUP'].includes(project.type)) {
16+
if (!['DIGITAL', 'MANUAL', 'LICENSE', 'GROUP'].includes(project.type)) {
1717
return
1818
}
1919

components/Home/Theme2.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const siteSettings = merchant.value.website ? merchant.value.website.settings :
1212
const projects = merchant.value.projects
1313
1414
projects.forEach((project) => {
15-
if (!['DIGITAL', 'MANUAL', 'GROUP'].includes(project.type)) {
15+
if (!['DIGITAL', 'MANUAL', 'LICENSE', 'GROUP'].includes(project.type)) {
1616
return
1717
}
1818
cates.value.push({
@@ -91,7 +91,7 @@ onMounted(() => {
9191
<div class="space-y-4">
9292
<template v-for="project in projects">
9393
<template
94-
v-if="['DIGITAL', 'MANUAL', 'GROUP'].includes(project.type) && project.skus.length > 0 && ['all', project.slug].includes(selectedCate.code)">
94+
v-if="['DIGITAL', 'MANUAL', 'LICENSE', 'GROUP'].includes(project.type) && project.skus.length > 0 && ['all', project.slug].includes(selectedCate.code)">
9595

9696
<details
9797
class="group [&_summary::-webkit-details-marker]:hidden rounded-lg border1 border-gray-900 bg-gradient-to-b bg-white"

components/OrderDetailDigital.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ if (payStatus.value === 'WAIT') {
162162
<div class="border-t"></div>
163163

164164
<div id="digitalItems" class="grid grid-cols-1 space-y-2">
165-
<div class="pr-6 text-lg font-medium text-gray-500">{{ $t('order_digital_items') }}</div>
165+
<div class="flex items-center">
166+
<div class="pr-2 text-lg font-medium text-gray-500">{{ $t('order_digital_items') }}</div>
167+
<BtnCopy :text="order.digitalItemsStr" btn-size="small" />
168+
</div>
166169
<div>
167170
<textarea :value="order.digitalItemsStr" type="text" rows="5" maxlength="1000000"
168171
class="w-full px-3 py-2 border rounded-md border-gray-300 bg-gray-100 focus:bg-white text-gray-800 focus:ring-gray-900 focus:border-gray-900"

components/btn/Copy.vue

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<script setup>
2+
const props = defineProps(['copyStatus', 'text', 'btnSize'])
3+
const text = props.copyStatus ? useState(props.copyStatus, () => '') : props.text || ''
4+
const btnSize = props.btnSize || 'large'
5+
6+
const copied = ref(false)
7+
const clickCopyBtn = () => {
8+
navigator.clipboard.writeText(isRef(text) ? text.value : text)
9+
10+
if (copied.value) return
11+
copied.value = true
12+
setTimeout(() => {
13+
copied.value = false;
14+
}, 2000);
15+
}
16+
</script>
17+
18+
19+
<template>
20+
<div>
21+
<div class="relative">
22+
<button @click.stop="clickCopyBtn"
23+
class="text-gray-900 hover:bg-gray-100 rounded-md inline-flex items-center justify-center bg-white border-gray-200 border"
24+
:class="{ 'py-2 px-2.5 text-md': btnSize == 'large', 'py-1.5 px-1.5 text-sm': btnSize == 'medium', 'px-1 py-1 text-xs': btnSize == 'small' }">
25+
<span id="default-message" class="inline-flex items-center" :class="[copied ? 'hidden' : '']">
26+
<svg class="w-3 h-3 me-1.5" :aria-hidden="copied" xmlns="http://www.w3.org/2000/svg" fill="currentColor"
27+
viewBox="0 0 18 20">
28+
<path
29+
d="M16 1h-3.278A1.992 1.992 0 0 0 11 0H7a1.993 1.993 0 0 0-1.722 1H2a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2Zm-3 14H5a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2Zm0-4H5a1 1 0 0 1 0-2h8a1 1 0 1 1 0 2Zm0-5H5a1 1 0 0 1 0-2h2V2h4v2h2a1 1 0 1 1 0 2Z" />
30+
</svg>
31+
<span class="text-xs font-semibold">Copy</span>
32+
</span>
33+
<span id="success-message" class="inline-flex items-center" :class="[copied ? '' : 'hidden']">
34+
<svg class="w-3 h-3 text-gray-800 me-1.5" :aria-hidden="!copied" xmlns="http://www.w3.org/2000/svg"
35+
fill="none" viewBox="0 0 16 12">
36+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
37+
d="M1 5.917 5.724 10.5 15 1.5" />
38+
</svg>
39+
<span class="text-xs font-semibold text-gray-800">Copied</span>
40+
</span>
41+
</button>
42+
</div>
43+
</div>
44+
</template>

i18n/auto/ar.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default {
7979
automatic_delivery: "صفقة تلقائية",
8080
header_search_order: "أوامر البحث",
8181
Search_Order: "يبحث",
82-
search_order_input_placeholder: "الرجاء إدخال معلومات الاتصال أو OrderID",
82+
search_order_input_placeholder: "يرجى إدخال معلومات الاتصال أو orderid",
8383
txn_order_id: "معرف الطلب",
8484
Name: "اسم",
8585
Price: "سعر",
@@ -122,4 +122,5 @@ export default {
122122
GROUP: "عضوية المجموعة",
123123
MANUAL: "الخدمة اليدوية",
124124
Payment_fee: "رسوم الدفع",
125+
LICENSE: "خدمة الترخيص",
125126
};

i18n/auto/de.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default {
2323
server_order_payment_succ: "Zahlungszahlung erfolgreich",
2424
server_internal_exception: "Interne Ausnahme",
2525
server_order_wrong_payment_user: "Falscher Zahlungsbenutzer",
26-
server_order_pay_status_error: "Bestellung kann nicht puzentiert",
26+
server_order_pay_status_error: "Bestellung kann nicht puzentiert werden",
2727
server_order_expired: "Bestellung ist abgelaufen",
2828
server_insufficient_credits: "Unzureichende Credits",
2929
server_redeem_code_unknown: "Code einlösen nicht existiert nicht",
@@ -133,4 +133,5 @@ export default {
133133
GROUP: "Gruppenmitgliedschaft",
134134
MANUAL: "Manueller Service",
135135
Payment_fee: "Zahlungsgebühren",
136+
LICENSE: "Lizenzservice",
136137
};

i18n/auto/es.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,5 @@ export default {
133133
GROUP: "Membresía del grupo",
134134
MANUAL: "Servicio manual",
135135
Payment_fee: "Tarifas de pago",
136+
LICENSE: "Servicio de licencia",
136137
};

i18n/auto/fa.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,5 @@ export default {
127127
GROUP: "عضویت گروهی",
128128
MANUAL: "سرویس دستی",
129129
Payment_fee: "هزینه پرداخت",
130+
LICENSE: "سرویس مجوز",
130131
};

i18n/auto/fr.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,5 @@ export default {
131131
GROUP: "Appartenance à un groupe",
132132
MANUAL: "Service manuel",
133133
Payment_fee: "Frais de paiement",
134+
LICENSE: "Service de licence",
134135
};

i18n/auto/ja.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,5 @@ export default {
126126
GROUP: "グループメンバーシップ",
127127
MANUAL: "マニュアルサービス",
128128
Payment_fee: "支払い料",
129+
LICENSE: "ライセンスサービス",
129130
};

0 commit comments

Comments
 (0)