feat(subscribe): Add unit time

This commit is contained in:
web@ppanel 2024-12-20 18:52:30 +07:00
parent d8b0bd9c2d
commit 39d07ecee5
80 changed files with 553 additions and 165 deletions

View File

@ -15,7 +15,6 @@ import {
SheetTrigger,
} from '@shadcn/ui/sheet';
import { useTranslations } from 'next-intl';
import { useTheme } from 'next-themes';
import { useEffect, useState } from 'react';
const formSchema = z.object({
@ -39,7 +38,6 @@ export default function AnnouncementForm<T extends Record<string, any>>({
title,
}: AnnouncementFormProps<T>) {
const t = useTranslations('announcement');
const { resolvedTheme } = useTheme();
const [open, setOpen] = useState(false);
const form = useForm({
resolver: zodResolver(formSchema),

View File

@ -16,7 +16,6 @@ import {
SheetTrigger,
} from '@shadcn/ui/sheet';
import { useTranslations } from 'next-intl';
import { useTheme } from 'next-themes';
import { useEffect, useState } from 'react';
const formSchema = z.object({
@ -41,7 +40,6 @@ export default function DocumentForm<T extends Record<string, any>>({
title,
}: DocumentFormProps<T>) {
const t = useTranslations('document');
const { resolvedTheme } = useTheme();
const [open, setOpen] = useState(false);
const form = useForm({
resolver: zodResolver(formSchema),

View File

@ -32,7 +32,6 @@ import {
} from '@shadcn/ui/sheet';
import { useQuery } from '@tanstack/react-query';
import { useTranslations } from 'next-intl';
import { useTheme } from 'next-themes';
import { assign, shake } from 'radash';
import { useEffect, useState } from 'react';
@ -53,6 +52,7 @@ const defaultValues = {
discount: [],
server_group: [],
server: [],
unit_time: 'Month',
};
export default function SubscribeForm<T extends Record<string, any>>({
@ -63,7 +63,6 @@ export default function SubscribeForm<T extends Record<string, any>>({
title,
}: SubscribeFormProps<T>) {
const t = useTranslations('subscribe');
const { resolvedTheme } = useTheme();
const [open, setOpen] = useState(false);
@ -71,11 +70,12 @@ export default function SubscribeForm<T extends Record<string, any>>({
name: z.string(),
description: z.string().optional(),
unit_price: z.number(),
unit_time: z.string().default('Month'),
replacement: z.number().optional(),
discount: z
.array(
z.object({
months: z.number(),
quantity: z.number(),
discount: z.number(),
}),
)
@ -135,6 +135,7 @@ export default function SubscribeForm<T extends Record<string, any>>({
},
});
const unit_time = form.watch('unit_time');
return (
<Sheet open={open} onOpenChange={setOpen}>
<SheetTrigger asChild>
@ -255,7 +256,7 @@ export default function SubscribeForm<T extends Record<string, any>>({
name='unit_price'
render={({ field }) => (
<FormItem>
<FormLabel>{t('form.unit_price')}</FormLabel>
<FormLabel>{t('form.unitPrice')}</FormLabel>
<FormControl>
<EnhancedInput
type='number'
@ -272,6 +273,34 @@ export default function SubscribeForm<T extends Record<string, any>>({
</FormItem>
)}
/>
<FormField
control={form.control}
name='unit_time'
render={({ field }) => (
<FormItem>
<FormLabel>{t('form.unitTime')}</FormLabel>
<FormControl>
<Combobox
placeholder={t('form.selectUnitTime')}
{...field}
onChange={(value) => {
if (value) {
form.setValue(field.name, value);
}
}}
options={[
{ label: t('form.Year'), value: 'Year' },
{ label: t('form.Month'), value: 'Month' },
{ label: t('form.Day'), value: 'Day' },
{ label: t('form.Hour'), value: 'Hour' },
{ label: t('form.Minute'), value: 'Minute' },
]}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name='replacement'
@ -436,10 +465,10 @@ export default function SubscribeForm<T extends Record<string, any>>({
<ArrayInput<API.SubscribeDiscount>
fields={[
{
name: 'months',
name: 'quantity',
type: 'number',
min: 1,
suffix: t('form.discountMonths'),
suffix: unit_time && t(`form.${unit_time}`),
},
{
name: 'discount',
@ -453,7 +482,7 @@ export default function SubscribeForm<T extends Record<string, any>>({
return {
...data,
price: evaluateWithPrecision(
`${unit_price} * ${data.months} * ${data.discount} / 100`,
`${unit_price} * ${data.quantity} * ${data.discount} / 100`,
),
};
},
@ -471,7 +500,7 @@ export default function SubscribeForm<T extends Record<string, any>>({
return {
...data,
discount: evaluateWithPrecision(
`${data.price} / ${data.months} / ${unit_price} * 100`,
`${data.price} / ${data.quantity} / ${unit_price} * 100`,
),
};
},

View File

@ -13,6 +13,11 @@
"edit": "Upravit",
"editSubscribe": "Upravit odběr",
"form": {
"Day": "Den",
"Hour": "Hodina",
"Minute": "Minuta",
"Month": "Měsíc",
"Year": "Rok",
"cancel": "Zrušit",
"confirm": "Potvrdit",
"description": "Popis",
@ -29,12 +34,14 @@
"quota": "Limit nákupu",
"replacement": "Cena za reset (za každý)",
"selectSubscribeGroup": "Vyberte prosím skupinu předplatného",
"selectUnitTime": "Vyberte jednotku času",
"server": "Server",
"serverGroup": "Skupina serverů",
"speedLimit": "Omezení rychlosti (Mbps)",
"subscribeGroup": "Skupina předplatného",
"traffic": "Přenos dat",
"unit_price": "Cena za měsíc"
"unitPrice": "Jednotková cena",
"unitTime": "Jednotka času"
},
"group": {
"actions": "Akce",

View File

@ -13,6 +13,11 @@
"edit": "Bearbeiten",
"editSubscribe": "Abonnement bearbeiten",
"form": {
"Day": "Tag",
"Hour": "Stunde",
"Minute": "Minute",
"Month": "Monat",
"Year": "Jahr",
"cancel": "Abbrechen",
"confirm": "Bestätigen",
"description": "Beschreibung",
@ -29,12 +34,14 @@
"quota": "Kaufbeschränkung",
"replacement": "Ersatzpreis (pro Mal)",
"selectSubscribeGroup": "Bitte Abonnementgruppe auswählen",
"selectUnitTime": "Bitte wählen Sie eine Zeiteinheit",
"server": "Dienst",
"serverGroup": "Dienstgruppe",
"speedLimit": "Geschwindigkeitsbegrenzung (Mbps)",
"subscribeGroup": "Abonnementgruppe",
"traffic": "Datenvolumen",
"unit_price": "Monatspreis"
"unitPrice": "Einheitspreis",
"unitTime": "Zeiteinheit"
},
"group": {
"actions": "Aktionen",

View File

@ -13,6 +13,11 @@
"edit": "Edit",
"editSubscribe": "Edit Subscription",
"form": {
"Day": "Day",
"Hour": "Hour",
"Minute": "Minute",
"Month": "Month",
"Year": "Year",
"cancel": "Cancel",
"confirm": "Confirm",
"description": "Description",
@ -29,12 +34,14 @@
"quota": "Purchase Limit",
"replacement": "Reset Price (per time)",
"selectSubscribeGroup": "Select Subscription Group",
"selectUnitTime": "Please select a unit of time",
"server": "Server",
"serverGroup": "Server Group",
"speedLimit": "Speed Limit (Mbps)",
"subscribeGroup": "Subscription Group",
"traffic": "Traffic",
"unit_price": "Monthly Price"
"unitPrice": "Unit Price",
"unitTime": "Unit Time"
},
"group": {
"actions": "Actions",

View File

@ -13,6 +13,11 @@
"edit": "editar",
"editSubscribe": "Editar suscripción",
"form": {
"Day": "Día",
"Hour": "Hora",
"Minute": "Minuto",
"Month": "Mes",
"Year": "Año",
"cancel": "Cancelar",
"confirm": "Confirmar",
"description": "Descripción",
@ -29,12 +34,14 @@
"quota": "Cantidad de compra limitada",
"replacement": "Precio de reposición (cada vez)",
"selectSubscribeGroup": "Por favor, seleccione un grupo de suscripción",
"selectUnitTime": "Por favor, seleccione la unidad de tiempo",
"server": "Servidor",
"serverGroup": "Grupo de servidores",
"speedLimit": "Límite de velocidad (Mbps)",
"subscribeGroup": "Grupo de suscripción",
"traffic": "Tráfico",
"unit_price": "Precio mensual"
"unitPrice": "Precio unitario",
"unitTime": "Unidad de tiempo"
},
"group": {
"actions": "Acciones",

View File

@ -13,6 +13,11 @@
"edit": "editar",
"editSubscribe": "Editar suscripción",
"form": {
"Day": "Día",
"Hour": "Hora",
"Minute": "Minuto",
"Month": "Mes",
"Year": "Año",
"cancel": "Cancelar",
"confirm": "Confirmar",
"description": "Descripción",
@ -29,12 +34,14 @@
"quota": "Cantidad máxima de compra",
"replacement": "Precio de reposición (cada vez)",
"selectSubscribeGroup": "Por favor seleccione un grupo de suscripción",
"selectUnitTime": "Por favor seleccione la unidad de tiempo",
"server": "Servidor",
"serverGroup": "Grupo de servidores",
"speedLimit": "Límite de velocidad (Mbps)",
"subscribeGroup": "Grupo de suscripción",
"traffic": "Tráfico",
"unit_price": "Precio mensual"
"unitPrice": "Precio unitario",
"unitTime": "Unidad de tiempo"
},
"group": {
"actions": "Acciones",

View File

@ -13,6 +13,11 @@
"edit": "muokkaa",
"editSubscribe": "Muokkaa tilausta",
"form": {
"Day": "Päivä",
"Hour": "Tunti",
"Minute": "Minuutti",
"Month": "Kuukausi",
"Year": "Vuosi",
"cancel": "Peruuta",
"confirm": "Vahvista",
"description": "Kuvaus",
@ -29,12 +34,14 @@
"quota": "Ostorajoitus",
"replacement": "Uudelleenhinnan asetus (kerta)",
"selectSubscribeGroup": "Valitse tilausryhmä",
"selectUnitTime": "Valitse aikayksikkö",
"server": "Palvelin",
"serverGroup": "Palvelinryhmä",
"speedLimit": "Nopeusrajoitus (Mbps)",
"subscribeGroup": "Tilausryhmä",
"traffic": "Liikenne",
"unit_price": "Kuukausihinta"
"unitPrice": "Yksikköhinta",
"unitTime": "Aikayksikkö"
},
"group": {
"actions": "Toiminnot",

View File

@ -13,6 +13,11 @@
"edit": "Éditer",
"editSubscribe": "Modifier l'abonnement",
"form": {
"Day": "Jour",
"Hour": "Heure",
"Minute": "Minute",
"Month": "Mois",
"Year": "Année",
"cancel": "Annuler",
"confirm": "Confirmer",
"description": "Description",
@ -29,12 +34,14 @@
"quota": "Quantité d'achat limitée",
"replacement": "Prix de réinitialisation (par fois)",
"selectSubscribeGroup": "Veuillez sélectionner un groupe d'abonnement",
"selectUnitTime": "Veuillez sélectionner l'unité de temps",
"server": "Serveur",
"serverGroup": "Groupe de serveurs",
"speedLimit": "Limite de vitesse (Mbps)",
"subscribeGroup": "Groupe d'abonnement",
"traffic": "Trafic",
"unit_price": "Prix mensuel unitaire"
"unitPrice": "Prix unitaire",
"unitTime": "Unité de temps"
},
"group": {
"actions": "Actions",

View File

@ -13,6 +13,11 @@
"edit": "संपादित करें",
"editSubscribe": "संपादन सदस्यता",
"form": {
"Day": "दिन",
"Hour": "घंटा",
"Minute": "मिनट",
"Month": "महीना",
"Year": "वर्ष",
"cancel": "रद्द करें",
"confirm": "पुष्टि करें",
"description": "विवरण",
@ -29,12 +34,14 @@
"quota": "खरीद सीमा",
"replacement": "पुनःस्थापना मूल्य (प्रति बार)",
"selectSubscribeGroup": "कृपया सदस्यता समूह चुनें",
"selectUnitTime": "कृपया इकाई समय चुनें",
"server": "सर्वर",
"serverGroup": "सर्वर समूह",
"speedLimit": "गति सीमा (Mbps)",
"subscribeGroup": "सदस्यता समूह",
"traffic": "ट्रैफिक",
"unit_price": "प्रति माह मूल्य"
"unitPrice": "इकाई मूल्य",
"unitTime": "इकाई समय"
},
"group": {
"actions": "क्रियाएँ",

View File

@ -13,6 +13,11 @@
"edit": "szerkesztés",
"editSubscribe": "Előfizetés szerkesztése",
"form": {
"Day": "Nap",
"Hour": "Óra",
"Minute": "Perc",
"Month": "Hónap",
"Year": "Év",
"cancel": "Mégse",
"confirm": "Megerősít",
"description": "Leírás",
@ -29,12 +34,14 @@
"quota": "Vásárlási korlát",
"replacement": "Csere ára (alkalmanként)",
"selectSubscribeGroup": "Kérjük, válassza ki az előfizetési csoportot",
"selectUnitTime": "Kérjük, válassza ki az időegységet",
"server": "Szolgáltatás",
"serverGroup": "Szolgáltatáscsoport",
"speedLimit": "Sebességkorlát (Mbps)",
"subscribeGroup": "Előfizetési csoport",
"traffic": "Forgalom",
"unit_price": "Havi ár"
"unitPrice": "Egységár",
"unitTime": "Időegység"
},
"group": {
"actions": "Műveletek",

View File

@ -13,6 +13,11 @@
"edit": "編集",
"editSubscribe": "サブスクリプションを編集",
"form": {
"Day": "日",
"Hour": "時",
"Minute": "分",
"Month": "月",
"Year": "年",
"cancel": "キャンセル",
"confirm": "確認",
"description": "説明",
@ -29,12 +34,14 @@
"quota": "購入制限数",
"replacement": "リセット価格(毎回)",
"selectSubscribeGroup": "サブスクリプショングループを選択してください",
"selectUnitTime": "単位時間を選択してください",
"server": "サーバー",
"serverGroup": "サーバーグループ",
"speedLimit": "速度制限Mbps",
"subscribeGroup": "サブスクリプショングループ",
"traffic": "トラフィック",
"unit_price": "月額価格"
"unitPrice": "単価",
"unitTime": "単位時間"
},
"group": {
"actions": "操作",

View File

@ -13,6 +13,11 @@
"edit": "편집",
"editSubscribe": "구독 편집",
"form": {
"Day": "일",
"Hour": "시",
"Minute": "분",
"Month": "월",
"Year": "년",
"cancel": "취소",
"confirm": "확인",
"description": "설명",
@ -29,12 +34,14 @@
"quota": "구매 한도",
"replacement": "재설정 가격 (매회)",
"selectSubscribeGroup": "구독 그룹을 선택하세요",
"selectUnitTime": "단위 시간을 선택하세요",
"server": "서버",
"serverGroup": "서버 그룹",
"speedLimit": "속도 제한 (Mbps)",
"subscribeGroup": "구독 그룹",
"traffic": "트래픽",
"unit_price": "월 단위 가격"
"unitPrice": "단가",
"unitTime": "단위 시간"
},
"group": {
"actions": "작업",

View File

@ -13,6 +13,11 @@
"edit": "rediger",
"editSubscribe": "Rediger abonnement",
"form": {
"Day": "Dag",
"Hour": "Time",
"Minute": "Minutt",
"Month": "Måned",
"Year": "År",
"cancel": "Avbryt",
"confirm": "Bekreft",
"description": "Beskrivelse",
@ -29,12 +34,14 @@
"quota": "Kjøpskvote",
"replacement": "Erstatningspris (per gang)",
"selectSubscribeGroup": "Vennligst velg abonnementsgruppe",
"selectUnitTime": "Vennligst velg enhetstid",
"server": "Tjeneste",
"serverGroup": "Tjenestegruppe",
"speedLimit": "Hastighetsbegrensning (Mbps)",
"subscribeGroup": "Abonnementsgruppe",
"traffic": "Trafikk",
"unit_price": "Pris per måned"
"unitPrice": "Enhetspris",
"unitTime": "Enhetstid"
},
"group": {
"actions": "Handlinger",

View File

@ -13,6 +13,11 @@
"edit": "edytuj",
"editSubscribe": "Edytuj subskrypcję",
"form": {
"Day": "Dzień",
"Hour": "Godzina",
"Minute": "Minuta",
"Month": "Miesiąc",
"Year": "Rok",
"cancel": "Anuluj",
"confirm": "Potwierdź",
"description": "Opis",
@ -29,12 +34,14 @@
"quota": "Limit zakupu",
"replacement": "Cena wymiany (za każdym razem)",
"selectSubscribeGroup": "Wybierz grupę subskrypcji",
"selectUnitTime": "Proszę wybrać jednostkę czasu",
"server": "Serwer",
"serverGroup": "Grupa serwerów",
"speedLimit": "Limit prędkości (Mbps)",
"subscribeGroup": "Grupa subskrypcji",
"traffic": "Ruch",
"unit_price": "Cena za miesiąc"
"unitPrice": "Cena jednostkowa",
"unitTime": "Jednostka czasu"
},
"group": {
"actions": "Działania",

View File

@ -13,6 +13,11 @@
"edit": "editar",
"editSubscribe": "Editar Assinatura",
"form": {
"Day": "Dia",
"Hour": "Hora",
"Minute": "Minuto",
"Month": "Mês",
"Year": "Ano",
"cancel": "Cancelar",
"confirm": "Confirmar",
"description": "Descrição",
@ -29,12 +34,14 @@
"quota": "Quantidade limitada",
"replacement": "Preço de reposição (cada vez)",
"selectSubscribeGroup": "Por favor, selecione o grupo de assinatura",
"selectUnitTime": "Por favor, selecione a unidade de tempo",
"server": "Servidor",
"serverGroup": "Grupo de servidores",
"speedLimit": "Limite de velocidade (Mbps)",
"subscribeGroup": "Grupo de assinatura",
"traffic": "Tráfego",
"unit_price": "Preço mensal"
"unitPrice": "Preço unitário",
"unitTime": "Unidade de tempo"
},
"group": {
"actions": "Ações",

View File

@ -13,6 +13,11 @@
"edit": "editează",
"editSubscribe": "Editează abonamentul",
"form": {
"Day": "Zi",
"Hour": "Oră",
"Minute": "Minut",
"Month": "Lună",
"Year": "An",
"cancel": "Anulează",
"confirm": "Confirmă",
"description": "Descriere",
@ -29,12 +34,14 @@
"quota": "Limită de achiziție",
"replacement": "Preț de înlocuire (per dată)",
"selectSubscribeGroup": "Vă rugăm să selectați grupul de abonament",
"selectUnitTime": "Vă rugăm să selectați unitatea de timp",
"server": "Server",
"serverGroup": "Grup server",
"speedLimit": "Limită de viteză (Mbps)",
"subscribeGroup": "Grup de abonament",
"traffic": "Trafic",
"unit_price": "Preț lunar unitar"
"unitPrice": "Preț unitar",
"unitTime": "Unitate de timp"
},
"group": {
"actions": "Acțiuni",

View File

@ -13,6 +13,11 @@
"edit": "редактировать",
"editSubscribe": "Редактировать подписку",
"form": {
"Day": "День",
"Hour": "Час",
"Minute": "Минута",
"Month": "Месяц",
"Year": "Год",
"cancel": "Отмена",
"confirm": "Подтвердить",
"description": "Описание",
@ -29,12 +34,14 @@
"quota": "Лимит покупки",
"replacement": "Цена замены (за раз)",
"selectSubscribeGroup": "Пожалуйста, выберите группу подписки",
"selectUnitTime": "Пожалуйста, выберите единицу времени",
"server": "Сервер",
"serverGroup": "Группа серверов",
"speedLimit": "Ограничение скорости (Мбит/с)",
"subscribeGroup": "Группа подписки",
"traffic": "Трафик",
"unit_price": "Цена за месяц"
"unitPrice": "Цена за единицу",
"unitTime": "Единица времени"
},
"group": {
"actions": "Действия",

View File

@ -13,6 +13,11 @@
"edit": "แก้ไข",
"editSubscribe": "แก้ไขการสมัครสมาชิก",
"form": {
"Day": "วัน",
"Hour": "ชั่วโมง",
"Minute": "นาที",
"Month": "เดือน",
"Year": "ปี",
"cancel": "ยกเลิก",
"confirm": "ยืนยัน",
"description": "คำอธิบาย",
@ -29,12 +34,14 @@
"quota": "จำนวนจำกัดการซื้อ",
"replacement": "ราคารีเซ็ต (ต่อครั้ง)",
"selectSubscribeGroup": "กรุณาเลือกกลุ่มการสมัครสมาชิก",
"selectUnitTime": "กรุณาเลือกหน่วยเวลา",
"server": "เซิร์ฟเวอร์",
"serverGroup": "กลุ่มเซิร์ฟเวอร์",
"speedLimit": "จำกัดความเร็ว (Mbps)",
"subscribeGroup": "กลุ่มการสมัครสมาชิก",
"traffic": "ปริมาณข้อมูล",
"unit_price": "ราคาต่อเดือน"
"unitPrice": "ราคาต่อหน่วย",
"unitTime": "หน่วยเวลา"
},
"group": {
"actions": "การดำเนินการ",

View File

@ -13,6 +13,11 @@
"edit": "düzenle",
"editSubscribe": "Aboneliği Düzenle",
"form": {
"Day": "Gün",
"Hour": "Saat",
"Minute": "Dakika",
"Month": "Ay",
"Year": "Yıl",
"cancel": "İptal",
"confirm": "Onayla",
"description": "Açıklama",
@ -29,12 +34,14 @@
"quota": "Satın Alma Limiti",
"replacement": "Yenileme Ücreti (her seferinde)",
"selectSubscribeGroup": "Abonelik Grubunu Seçiniz",
"selectUnitTime": "Lütfen birim zamanı seçin",
"server": "Sunucu",
"serverGroup": "Sunucu Grubu",
"speedLimit": "Hız Sınırı (Mbps)",
"subscribeGroup": "Abonelik Grubu",
"traffic": "Trafik",
"unit_price": "Aylık Fiyat"
"unitPrice": "Birim fiyatı",
"unitTime": "Birim zamanı"
},
"group": {
"actions": "Eylemler",

View File

@ -13,6 +13,11 @@
"edit": "редагувати",
"editSubscribe": "Редагувати підписку",
"form": {
"Day": "День",
"Hour": "Година",
"Minute": "Хвилина",
"Month": "Місяць",
"Year": "Рік",
"cancel": "Скасувати",
"confirm": "Підтвердити",
"description": "Опис",
@ -29,12 +34,14 @@
"quota": "Ліміт покупки",
"replacement": "Ціна заміни (за раз)",
"selectSubscribeGroup": "Будь ласка, виберіть групу підписки",
"selectUnitTime": "Будь ласка, виберіть одиницю часу",
"server": "Сервер",
"serverGroup": "Група серверів",
"speedLimit": "Обмеження швидкості (Мбіт/с)",
"subscribeGroup": "Група підписки",
"traffic": "Трафік",
"unit_price": "Ціна за місяць"
"unitPrice": "Ціна за одиницю",
"unitTime": "Одиниця часу"
},
"group": {
"actions": "Дії",

View File

@ -13,6 +13,11 @@
"edit": "Chỉnh sửa",
"editSubscribe": "Chỉnh sửa đăng ký",
"form": {
"Day": "Ngày",
"Hour": "Giờ",
"Minute": "Phút",
"Month": "Tháng",
"Year": "Năm",
"cancel": "Hủy",
"confirm": "Xác nhận",
"description": "Mô tả",
@ -29,12 +34,14 @@
"quota": "Số lượng mua giới hạn",
"replacement": "Giá thay thế (mỗi lần)",
"selectSubscribeGroup": "Vui lòng chọn nhóm đăng ký",
"selectUnitTime": "Vui lòng chọn đơn vị thời gian",
"server": "Dịch vụ",
"serverGroup": "Nhóm dịch vụ",
"speedLimit": "Giới hạn tốc độ (Mbps)",
"subscribeGroup": "Nhóm đăng ký",
"traffic": "Lưu lượng",
"unit_price": "Giá mỗi tháng"
"unitPrice": "Đơn giá",
"unitTime": "Đơn vị thời gian"
},
"group": {
"actions": "Hành động",

View File

@ -13,6 +13,11 @@
"edit": "编辑",
"editSubscribe": "编辑订阅",
"form": {
"Day": "天",
"Hour": "时",
"Minute": "分",
"Month": "月",
"Year": "年",
"cancel": "取消",
"confirm": "确认",
"description": "描述",
@ -29,12 +34,14 @@
"quota": "限购数量",
"replacement": "重置价格(每次)",
"selectSubscribeGroup": "请选择订阅组",
"selectUnitTime": "请选择单位时间",
"server": "服务",
"serverGroup": "服务组",
"speedLimit": "速度限制Mbps",
"subscribeGroup": "订阅组",
"traffic": "流量",
"unit_price": "单月价格"
"unitPrice": "单价",
"unitTime": "单位时间"
},
"group": {
"actions": "操作",

View File

@ -13,6 +13,11 @@
"edit": "編輯",
"editSubscribe": "編輯訂閱",
"form": {
"Day": "日",
"Hour": "小時",
"Minute": "分鐘",
"Month": "月",
"Year": "年",
"cancel": "取消",
"confirm": "確認",
"description": "描述",
@ -29,12 +34,14 @@
"quota": "限購數量",
"replacement": "重置價格(每次)",
"selectSubscribeGroup": "請選擇訂閱組",
"selectUnitTime": "請選擇單位時間",
"server": "服務",
"serverGroup": "服務組",
"speedLimit": "速度限制Mbps",
"subscribeGroup": "訂閱組",
"traffic": "流量",
"unit_price": "單月價格"
"unitPrice": "單價",
"unitTime": "單位時間"
},
"group": {
"actions": "操作",

View File

@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as announcement from './announcement';

View File

@ -153,3 +153,15 @@ export async function getNodeList(
...(options || {}),
});
}
/** Node sort POST /v1/admin/server/sort */
export async function nodeSort(body: API.NodeSortRequest, options?: { [key: string]: any }) {
return request<API.Response & { data?: any }>('/v1/admin/server/sort', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}

View File

@ -165,3 +165,18 @@ export async function getSubscribeList(
},
);
}
/** Subscribe sort POST /v1/admin/subscribe/sort */
export async function subscribeSort(
body: API.SubscribeSortRequest,
options?: { [key: string]: any },
) {
return request<API.Response & { data?: any }>('/v1/admin/subscribe/sort', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}

View File

@ -12,6 +12,7 @@ declare namespace API {
title: string;
content: string;
enable: boolean;
type: number;
created_at: number;
updated_at: number;
};
@ -81,6 +82,7 @@ declare namespace API {
type CreateAnnouncementRequest = {
title: string;
content: string;
type: number;
};
type CreateApplicationRequest = {
@ -156,6 +158,7 @@ declare namespace API {
name: string;
description: string;
unit_price: number;
unit_time: string;
discount: SubscribeDiscount[];
replacement: number;
inventory: number;
@ -504,6 +507,10 @@ declare namespace API {
node_push_interval: number;
};
type NodeSortRequest = {
sort: SortItem[];
};
type NodeStatus = {
online_users: OnlineUser[];
status: ServerStatus;
@ -630,6 +637,7 @@ declare namespace API {
created_at: number;
updated_at: number;
status: NodeStatus;
sort: number;
};
type ServerGroup = {
@ -682,6 +690,11 @@ declare namespace API {
site_logo: string;
};
type SortItem = {
id: number;
sort: number;
};
type StripeConfig = {
public_key: string;
secret_key: string;
@ -694,6 +707,7 @@ declare namespace API {
name: string;
description: string;
unit_price: number;
unit_time: string;
discount: SubscribeDiscount[];
replacement: number;
inventory: number;
@ -718,7 +732,7 @@ declare namespace API {
};
type SubscribeDiscount = {
months: number;
quantity: number;
discount: number;
};
@ -730,6 +744,10 @@ declare namespace API {
updated_at: number;
};
type SubscribeSortRequest = {
sort: SortItem[];
};
type SubscribeType = {
subscribe_types: string[];
};
@ -805,6 +823,7 @@ declare namespace API {
title: string;
content: string;
enable: boolean;
type: number;
};
type UpdateApplicationRequest = {
@ -903,6 +922,7 @@ declare namespace API {
name: string;
description: string;
unit_price: number;
unit_time: string;
discount: SubscribeDiscount[];
replacement: number;
inventory: number;
@ -915,6 +935,7 @@ declare namespace API {
server: number[];
show: boolean;
sell: boolean;
sort: number;
};
type UpdateTicketStatusRequest = {

View File

@ -4,6 +4,7 @@ declare namespace API {
title: string;
content: string;
enable: boolean;
type: number;
created_at: number;
updated_at: number;
};
@ -266,6 +267,7 @@ declare namespace API {
created_at: number;
updated_at: number;
status: NodeStatus;
sort: number;
};
type ServerGroup = {
@ -296,11 +298,17 @@ declare namespace API {
site_logo: string;
};
type SortItem = {
id: number;
sort: number;
};
type Subscribe = {
id: number;
name: string;
description: string;
unit_price: number;
unit_time: string;
discount: SubscribeDiscount[];
replacement: number;
inventory: number;
@ -325,7 +333,7 @@ declare namespace API {
};
type SubscribeDiscount = {
months: number;
quantity: number;
discount: number;
};

View File

@ -112,27 +112,29 @@ export default function Purchase({
}}
className='flex flex-wrap gap-0.5 *:w-20 md:gap-2'
>
<div className='relative'>
<RadioGroupItem value='1' id='1' className='peer sr-only' />
<Label
htmlFor='1'
className='border-muted bg-popover hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary relative flex h-full flex-col items-center justify-center gap-2 rounded-md border-2 p-2'
>
1 {t('month')}
</Label>
</div>
{subscribe?.unit_time !== 'Minute' && (
<div className='relative'>
<RadioGroupItem value='1' id='1' className='peer sr-only' />
<Label
htmlFor='1'
className='border-muted bg-popover hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary relative flex h-full flex-col items-center justify-center gap-2 rounded-md border-2 p-2'
>
1 / {t(subscribe?.unit_time || 'Month')}
</Label>
</div>
)}
{subscribe?.discount?.map((item) => (
<div key={item.months}>
<div key={item.quantity}>
<RadioGroupItem
value={String(item.months)}
id={String(item.months)}
value={String(item.quantity)}
id={String(item.quantity)}
className='peer sr-only'
/>
<Label
htmlFor={String(item.months)}
htmlFor={String(item.quantity)}
className='border-muted bg-popover hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary relative flex h-full flex-col items-center justify-center gap-2 rounded-md border-2 p-2'
>
{item.months} {t('months')}
{item.quantity} / {t(subscribe?.unit_time || 'Month')}
{item.discount < 100 && (
<Badge variant='destructive'>-{100 - item.discount}%</Badge>
)}

View File

@ -107,27 +107,29 @@ export default function Renewal({ token, subscribe }: { token: string; subscribe
}}
className='flex flex-wrap gap-2'
>
<div className='relative'>
<RadioGroupItem value='1' id='1' className='peer sr-only' />
<Label
htmlFor='1'
className='border-muted bg-popover hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary relative flex h-full flex-col items-center justify-center gap-2 rounded-md border-2 p-2'
>
1 {t('month')}
</Label>
</div>
{subscribe?.unit_time !== 'Minute' && (
<div className='relative'>
<RadioGroupItem value='1' id='1' className='peer sr-only' />
<Label
htmlFor='1'
className='border-muted bg-popover hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary relative flex h-full flex-col items-center justify-center gap-2 rounded-md border-2 p-2'
>
1 / {t(subscribe?.unit_time || 'Month')}
</Label>
</div>
)}
{subscribe?.discount?.map((item) => (
<div key={item.months}>
<div key={item.quantity}>
<RadioGroupItem
value={String(item.months)}
id={String(item.months)}
value={String(item.quantity)}
id={String(item.quantity)}
className='peer sr-only'
/>
<Label
htmlFor={String(item.months)}
htmlFor={String(item.quantity)}
className='border-muted bg-popover hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary relative flex h-full flex-col items-center justify-center gap-2 rounded-md border-2 p-2'
>
{item.months} {t('months')}
{item.quantity} / {t(subscribe?.unit_time || 'Month')}
{item.discount < 100 && (
<Badge variant='destructive'>-{100 - item.discount}%</Badge>
)}

View File

@ -15,44 +15,45 @@ interface SubscribeBillingProps {
fee_amount?: number;
amount?: number;
unit_price?: number;
unit_time?: number;
};
}
export function SubscribeBilling({ order }: SubscribeBillingProps) {
const t = useTranslations('subscribe.billing');
const t = useTranslations('subscribe');
return (
<>
<div className='font-semibold'>{t('billingTitle')}</div>
<div className='font-semibold'>{t('billing.billingTitle')}</div>
<ul className='grid grid-cols-2 gap-3 *:flex *:items-center *:justify-between lg:grid-cols-1'>
{order?.type && [1, 2].includes(order?.type) && (
<li>
<span className='text-muted-foreground'>{t('duration')}</span>
<span className='text-muted-foreground'>{t('billing.duration')}</span>
<span>
{order?.quantity || 1} {t('months')}
{order?.quantity || 1} {t(order?.unit_time || 'Month')}
</span>
</li>
)}
<li>
<span className='text-muted-foreground'>{t('price')}</span>
<span className='text-muted-foreground'>{t('billing.price')}</span>
<span>
<Display type='currency' value={order?.price || order?.unit_price} />
</span>
</li>
<li>
<span className='text-muted-foreground'>{t('productDiscount')}</span>
<span className='text-muted-foreground'>{t('billing.productDiscount')}</span>
<span>
<Display type='currency' value={order?.discount} />
</span>
</li>
<li>
<span className='text-muted-foreground'>{t('couponDiscount')}</span>
<span className='text-muted-foreground'>{t('billing.couponDiscount')}</span>
<span>
<Display type='currency' value={order?.coupon_discount} />
</span>
</li>
<li>
<span className='text-muted-foreground'>{t('fee')}</span>
<span className='text-muted-foreground'>{t('billing.fee')}</span>
<span>
<Display type='currency' value={order?.fee_amount} />
</span>
@ -60,7 +61,7 @@ export function SubscribeBilling({ order }: SubscribeBillingProps) {
</ul>
<Separator />
<div className='flex items-center justify-between font-semibold'>
<span className='text-muted-foreground'>{t('total')}</span>
<span className='text-muted-foreground'>{t('billing.total')}</span>
<span>
<Display type='currency' value={order?.amount} />
</span>

View File

@ -120,7 +120,7 @@ export default function Page() {
<CardFooter className='relative mt-2 flex flex-col gap-2'>
<h2 className='pb-5 text-2xl font-semibold sm:text-3xl'>
<Display type='currency' value={item.unit_price} />
<span className='text-base font-medium'>/{t('perMonth')}</span>
<span className='text-base font-medium'>/{t(item.unit_time || 'Month')}</span>
</h2>
<Button
className='absolute bottom-0 w-full rounded-b-xl rounded-t-none'

View File

@ -1,4 +1,9 @@
{
"Day": "Den",
"Hour": "Hodina",
"Minute": "Minuta",
"Month": "Měsíc",
"Year": "Rok",
"balanceRecharge": "Doplnění zůstatku",
"buyNow": "Koupit nyní",
"buySubscription": "Koupit předplatné",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "měsíc",
"months": "měsíce",
"name": "Název",
"orderClosed": "Objednávka byla uzavřena",
"orderList": "Seznam objednávek",

View File

@ -1,11 +1,15 @@
{
"Day": "Den",
"Hour": "Hodina",
"Minute": "Minuta",
"Month": "Měsíc",
"Year": "Rok",
"all": "Vše",
"billing": {
"billingTitle": "Faktura za zboží",
"couponDiscount": "Sleva z kupónu",
"duration": "Doba trvání balíčku",
"fee": "Poplatek",
"months": "měsíce",
"price": "Cena",
"productDiscount": "Sleva na zboží",
"total": "Celková cena"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "měsíc",
"productDescription": "Popis produktu",
"products": "Produkty"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Tag",
"Hour": "Stunde",
"Minute": "Minute",
"Month": "Monat",
"Year": "Jahr",
"balanceRecharge": "Guthaben aufladen",
"buyNow": "Jetzt kaufen",
"buySubscription": "Abonnement kaufen",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "Monat",
"months": "Monate",
"name": "Name",
"orderClosed": "Bestellung wurde geschlossen",
"orderList": "Bestellliste",

View File

@ -1,11 +1,15 @@
{
"Day": "Tag",
"Hour": "Stunde",
"Minute": "Minute",
"Month": "Monat",
"Year": "Jahr",
"all": "Alle",
"billing": {
"billingTitle": "Produktrechnung",
"couponDiscount": "Rabattcode-Rabatt",
"duration": "Paketdauer",
"fee": "Bearbeitungsgebühr",
"months": "Monate",
"price": "Preis",
"productDiscount": "Produktrabatt",
"total": "Gesamtpreis"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "Monat",
"productDescription": "Produktbeschreibung",
"products": "Produkte"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Day",
"Hour": "Hour",
"Minute": "Minute",
"Month": "Month",
"Year": "Year",
"balanceRecharge": "Balance Recharge",
"buyNow": "Buy Now",
"buySubscription": "Buy Subscription",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "month",
"months": "months",
"name": "Name",
"orderClosed": "Order Closed",
"orderList": "Order List",

View File

@ -1,11 +1,15 @@
{
"Day": "Day",
"Hour": "Hour",
"Minute": "Minute",
"Month": "Month",
"Year": "Year",
"all": "All",
"billing": {
"billingTitle": "Product Billing",
"couponDiscount": "Coupon Discount",
"duration": "Duration",
"fee": "Fee",
"months": "months",
"price": "Price",
"productDiscount": "Product Discount",
"total": "Total"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "Per Month",
"productDescription": "Product Description",
"products": "Products"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Día",
"Hour": "Hora",
"Minute": "Minuto",
"Month": "Mes",
"Year": "Año",
"balanceRecharge": "Recarga de saldo",
"buyNow": "Comprar ahora",
"buySubscription": "Comprar suscripción",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "mes",
"months": "meses",
"name": "nombre",
"orderClosed": "Pedido cerrado",
"orderList": "Lista de pedidos",

View File

@ -1,11 +1,15 @@
{
"Day": "Día",
"Hour": "Hora",
"Minute": "Minuto",
"Month": "Mes",
"Year": "Año",
"all": "todo",
"billing": {
"billingTitle": "Factura de productos",
"couponDiscount": "Descuento por cupón",
"duration": "Duración del paquete",
"fee": "Tarifa de servicio",
"months": "meses",
"price": "Precio",
"productDiscount": "Descuento de producto",
"total": "Precio total"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "mes",
"productDescription": "Descripción del producto",
"products": "productos"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Día",
"Hour": "Hora",
"Minute": "Minuto",
"Month": "Mes",
"Year": "Año",
"balanceRecharge": "Recarga de saldo",
"buyNow": "Compra ahora",
"buySubscription": "Comprar suscripción",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "mes",
"months": "meses",
"name": "Nombre",
"orderClosed": "Pedido cerrado",
"orderList": "Lista de pedidos",

View File

@ -1,11 +1,15 @@
{
"Day": "Día",
"Hour": "Hora",
"Minute": "Minuto",
"Month": "Mes",
"Year": "Año",
"all": "Todo",
"billing": {
"billingTitle": "Factura de Producto",
"couponDiscount": "Descuento de Cupón",
"duration": "Duración del Paquete",
"fee": "Tarifa",
"months": "meses",
"price": "Precio",
"productDiscount": "Descuento de Producto",
"total": "Total"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "mes",
"productDescription": "Descripción del producto",
"products": "productos"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Päivä",
"Hour": "Tunti",
"Minute": "Minuutti",
"Month": "Kuukausi",
"Year": "Vuosi",
"balanceRecharge": "Saldon lataus",
"buyNow": "Osta nyt",
"buySubscription": "Osta tilaus",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "kuukausi",
"months": "kuukautta",
"name": "Nimi",
"orderClosed": "Tilaus on suljettu",
"orderList": "Tilauslista",

View File

@ -1,11 +1,15 @@
{
"Day": "Päivä",
"Hour": "Tunti",
"Minute": "Minuutti",
"Month": "Kuukausi",
"Year": "Vuosi",
"all": "kaikki",
"billing": {
"billingTitle": "Tuotelasku",
"couponDiscount": "Alennuskoodin alennus",
"duration": "Paketin kesto",
"fee": "Käsittelymaksu",
"months": "kuukautta",
"price": "Hinta",
"productDiscount": "Tuotealennus",
"total": "Kokonaishinta"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "kuukausi",
"productDescription": "Tuotteen kuvaus",
"products": "tuotteet"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Jour",
"Hour": "Heure",
"Minute": "Minute",
"Month": "Mois",
"Year": "Année",
"balanceRecharge": "Recharge de solde",
"buyNow": "Acheter maintenant",
"buySubscription": "Acheter un abonnement",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "mois",
"months": "mois",
"name": "Nom",
"orderClosed": "Commande fermée",
"orderList": "Liste des commandes",

View File

@ -1,11 +1,15 @@
{
"Day": "Jour",
"Hour": "Heure",
"Minute": "Minute",
"Month": "Mois",
"Year": "Année",
"all": "Tout",
"billing": {
"billingTitle": "Facture des produits",
"couponDiscount": "Réduction du code promo",
"duration": "Durée du forfait",
"fee": "Frais de service",
"months": "mois",
"price": "Prix",
"productDiscount": "Réduction sur le produit",
"total": "Prix total"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "mois",
"productDescription": "Description du produit",
"products": "produits"
}

View File

@ -1,4 +1,9 @@
{
"Day": "दिन",
"Hour": "घंटा",
"Minute": "मिनट",
"Month": "महीना",
"Year": "वर्ष",
"balanceRecharge": "शेष राशि रिचार्ज",
"buyNow": "अभी खरीदें",
"buySubscription": "सदस्यता खरीदें",
@ -16,8 +21,6 @@
"stripe_alipay": "स्ट्राइप (अलीपे)",
"stripe_wechat_pay": "स्ट्राइप (वीचैट)"
},
"month": "महीना",
"months": "महीने",
"name": "नाम",
"orderClosed": "आदेश बंद कर दिया गया है",
"orderList": "आदेश सूची",

View File

@ -1,11 +1,15 @@
{
"Day": "दिन",
"Hour": "घंटा",
"Minute": "मिनट",
"Month": "महीना",
"Year": "वर्ष",
"all": "सभी",
"billing": {
"billingTitle": "उत्पाद बिल",
"couponDiscount": "कूपन छूट",
"duration": "पैकेज अवधि",
"fee": "शुल्क",
"months": "महीने",
"price": "मूल्य",
"productDiscount": "उत्पाद छूट",
"total": "कुल मूल्य"
@ -25,7 +29,6 @@
"stripe_alipay": "स्ट्राइप (अलीपे)",
"stripe_wechat_pay": "स्ट्राइप (वीचैट)"
},
"perMonth": "महीना",
"productDescription": "उत्पाद विवरण",
"products": "उत्पाद"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Nap",
"Hour": "Óra",
"Minute": "Perc",
"Month": "Hónap",
"Year": "Év",
"balanceRecharge": "Egyenleg feltöltése",
"buyNow": "Vásároljon most",
"buySubscription": "Előfizetés vásárlása",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "hónap",
"months": "hónapok",
"name": "Név",
"orderClosed": "A rendelés lezárva",
"orderList": "Rendelési lista",

View File

@ -1,11 +1,15 @@
{
"Day": "Nap",
"Hour": "Óra",
"Minute": "Perc",
"Month": "Hónap",
"Year": "Év",
"all": "Összes",
"billing": {
"billingTitle": "Termékszámla",
"couponDiscount": "Kuponkedvezmény",
"duration": "Csomag időtartama",
"fee": "Kezelési díj",
"months": "hónapok",
"price": "Ár",
"productDiscount": "Termékkedvezmény",
"total": "Teljes ár"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "hónap",
"productDescription": "Termékleírás",
"products": "termékek"
}

View File

@ -1,4 +1,9 @@
{
"Day": "日",
"Hour": "時",
"Minute": "分",
"Month": "月",
"Year": "年",
"balanceRecharge": "残高チャージ",
"buyNow": "今すぐ購入",
"buySubscription": "サブスクリプションを購入",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe(支付宝)",
"stripe_wechat_pay": "Stripe(微信)"
},
"month": "ヶ月",
"months": "ヶ月",
"name": "名前",
"orderClosed": "注文は締め切られました",
"orderList": "注文リスト",

View File

@ -1,11 +1,15 @@
{
"Day": "日",
"Hour": "時",
"Minute": "分",
"Month": "月",
"Year": "年",
"all": "すべて",
"billing": {
"billingTitle": "商品請求書",
"couponDiscount": "クーポン割引",
"duration": "プラン期間",
"fee": "手数料",
"months": "ヶ月",
"price": "価格",
"productDiscount": "商品割引",
"total": "合計"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe(支付宝)",
"stripe_wechat_pay": "Stripe(微信)"
},
"perMonth": "月",
"productDescription": "商品説明",
"products": "商品"
}

View File

@ -1,4 +1,9 @@
{
"Day": "일",
"Hour": "시",
"Minute": "분",
"Month": "월",
"Year": "년",
"balanceRecharge": "잔액 충전",
"buyNow": "지금 구매",
"buySubscription": "구독 구매",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe(알리페이)",
"stripe_wechat_pay": "Stripe(위챗)"
},
"month": "개월",
"months": "개월",
"name": "이름",
"orderClosed": "주문이 종료되었습니다",
"orderList": "주문 목록",

View File

@ -1,11 +1,15 @@
{
"Day": "일",
"Hour": "시",
"Minute": "분",
"Month": "월",
"Year": "년",
"all": "전체",
"billing": {
"billingTitle": "상품 청구서",
"couponDiscount": "할인 코드 혜택",
"duration": "패키지 기간",
"fee": "수수료",
"months": "개월",
"price": "가격",
"productDiscount": "상품 할인",
"total": "총액"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe(알리페이)",
"stripe_wechat_pay": "Stripe(위챗)"
},
"perMonth": "월",
"productDescription": "제품 설명",
"products": "상품"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Dag",
"Hour": "Time",
"Minute": "Minutt",
"Month": "Måned",
"Year": "År",
"balanceRecharge": "Saldoopplading",
"buyNow": "Kjøp nå",
"buySubscription": "Kjøp abonnement",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "måned",
"months": "måneder",
"name": "Navn",
"orderClosed": "Bestillingen er stengt",
"orderList": "Bestillingsliste",

View File

@ -1,11 +1,15 @@
{
"Day": "Dag",
"Hour": "Time",
"Minute": "Minutt",
"Month": "Måned",
"Year": "År",
"all": "Alle",
"billing": {
"billingTitle": "Varefaktura",
"couponDiscount": "Rabattkode rabatt",
"duration": "Pakketid",
"fee": "Gebyr",
"months": "Måneder",
"price": "Pris",
"productDiscount": "Produkt rabatt",
"total": "Totalpris"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "måned",
"productDescription": "Produktbeskrivelse",
"products": "Produkter"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Dzień",
"Hour": "Godzina",
"Minute": "Minuta",
"Month": "Miesiąc",
"Year": "Rok",
"balanceRecharge": "Doładowanie salda",
"buyNow": "Kup teraz",
"buySubscription": "Kup subskrypcję",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "miesiąc",
"months": "miesięcy",
"name": "Nazwa",
"orderClosed": "Zamówienie zostało zamknięte",
"orderList": "Lista zamówień",

View File

@ -1,11 +1,15 @@
{
"Day": "Dzień",
"Hour": "Godzina",
"Minute": "Minuta",
"Month": "Miesiąc",
"Year": "Rok",
"all": "Wszystko",
"billing": {
"billingTitle": "Rachunek za produkt",
"couponDiscount": "Zniżka z kodu rabatowego",
"duration": "Czas trwania pakietu",
"fee": "Opłata manipulacyjna",
"months": "miesiące",
"price": "Cena",
"productDiscount": "Zniżka na produkt",
"total": "Suma"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "miesiąc",
"productDescription": "Opis produktu",
"products": "Produkty"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Dia",
"Hour": "Hora",
"Minute": "Minuto",
"Month": "Mês",
"Year": "Ano",
"balanceRecharge": "Recarga de Saldo",
"buyNow": "Compre Agora",
"buySubscription": "Comprar Assinatura",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "mês",
"months": "meses",
"name": "nome",
"orderClosed": "Pedido encerrado",
"orderList": "Lista de Pedidos",

View File

@ -1,11 +1,15 @@
{
"Day": "Dia",
"Hour": "Hora",
"Minute": "Minuto",
"Month": "Mês",
"Year": "Ano",
"all": "todos",
"billing": {
"billingTitle": "Fatura do Produto",
"couponDiscount": "Desconto do Cupom",
"duration": "Duração do Pacote",
"fee": "Taxa de Serviço",
"months": "meses",
"price": "Preço",
"productDiscount": "Desconto do Produto",
"total": "Preço Total"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "mês",
"productDescription": "Descrição do produto",
"products": "produtos"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Zi",
"Hour": "Oră",
"Minute": "Minută",
"Month": "Lună",
"Year": "An",
"balanceRecharge": "Reîncărcare sold",
"buyNow": "Cumpără acum",
"buySubscription": "Cumpără abonament",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "lună",
"months": "luni",
"name": "Nume",
"orderClosed": "Comanda a fost închisă",
"orderList": "Listă de comenzi",

View File

@ -1,11 +1,15 @@
{
"Day": "Zi",
"Hour": "Oră",
"Minute": "Minut",
"Month": "Lună",
"Year": "An",
"all": "Toate",
"billing": {
"billingTitle": "Factură produs",
"couponDiscount": "Reducere cupon",
"duration": "Durata pachetului",
"fee": "Taxă de procesare",
"months": "luni",
"price": "Preț",
"productDiscount": "Reducere produs",
"total": "Total"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "lună",
"productDescription": "Descrierea produsului",
"products": "produse"
}

View File

@ -1,4 +1,9 @@
{
"Day": "День",
"Hour": "Час",
"Minute": "минута",
"Month": "Месяц",
"Year": "Год",
"balanceRecharge": "Пополнение баланса",
"buyNow": "Купить сейчас",
"buySubscription": "Купить подписку",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "месяц",
"months": "месяцы",
"name": "название",
"orderClosed": "Заказ закрыт",
"orderList": "Список заказов",

View File

@ -1,11 +1,15 @@
{
"Day": "День",
"Hour": "Час",
"Minute": "минута",
"Month": "Месяц",
"Year": "Год",
"all": "все",
"billing": {
"billingTitle": "Счет за товар",
"couponDiscount": "Скидка по промокоду",
"duration": "Продолжительность пакета",
"fee": "Комиссия",
"months": "месяцев",
"price": "Цена",
"productDiscount": "Скидка на товар",
"total": "Итоговая цена"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe(Alipay)",
"stripe_wechat_pay": "Stripe(WeChat)"
},
"perMonth": "месяц",
"productDescription": "Описание товара",
"products": "товары"
}

View File

@ -1,4 +1,9 @@
{
"Day": "วัน",
"Hour": "ชั่วโมง",
"Minute": "นาที",
"Month": "เดือน",
"Year": "ปี",
"balanceRecharge": "เติมเงินยอดคงเหลือ",
"buyNow": "ซื้อทันที",
"buySubscription": "ซื้อการสมัครสมาชิก",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (อาลีเพย์)",
"stripe_wechat_pay": "Stripe (วีแชท)"
},
"month": "เดือน",
"months": "เดือน",
"name": "ชื่อ",
"orderClosed": "คำสั่งซื้อถูกปิดแล้ว",
"orderList": "รายการสั่งซื้อ",

View File

@ -1,11 +1,15 @@
{
"Day": "วัน",
"Hour": "ชั่วโมง",
"Minute": "นาที",
"Month": "เดือน",
"Year": "ปี",
"all": "ทั้งหมด",
"billing": {
"billingTitle": "ใบแจ้งหนี้สินค้า",
"couponDiscount": "ส่วนลดคูปอง",
"duration": "ระยะเวลาแพ็กเกจ",
"fee": "ค่าธรรมเนียม",
"months": "เดือน",
"price": "ราคา",
"productDiscount": "ส่วนลดสินค้า",
"total": "ราคารวม"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (อาลีเพย์)",
"stripe_wechat_pay": "Stripe (วีแชท)"
},
"perMonth": "เดือน",
"productDescription": "รายละเอียดสินค้า",
"products": "สินค้า"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Gün",
"Hour": "Saat",
"Minute": "Dakika",
"Month": "Ay",
"Year": "Yıl",
"balanceRecharge": "Bakiye Yükleme",
"buyNow": "Şimdi Satın Al",
"buySubscription": "Abonelik Satın Al",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe(Alipay)",
"stripe_wechat_pay": "Stripe(WeChat)"
},
"month": "ay",
"months": "aylar",
"name": "Adı",
"orderClosed": "Sipariş kapatıldı",
"orderList": "Sipariş Listesi",

View File

@ -1,11 +1,15 @@
{
"Day": "Gün",
"Hour": "Saat",
"Minute": "Dakika",
"Month": "Ay",
"Year": "Yıl",
"all": "Tümü",
"billing": {
"billingTitle": "Ürün Faturası",
"couponDiscount": "Kupon İndirimi",
"duration": "Paket Süresi",
"fee": "İşlem Ücreti",
"months": "Ay",
"price": "Fiyat",
"productDiscount": "Ürün İndirimi",
"total": "Toplam Fiyat"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe(Alipay)",
"stripe_wechat_pay": "Stripe(WeChat)"
},
"perMonth": "ay",
"productDescription": "Ürün Açıklaması",
"products": "ürünler"
}

View File

@ -1,4 +1,9 @@
{
"Day": "День",
"Hour": "Година",
"Minute": "Хвилина",
"Month": "Місяць",
"Year": "Рік",
"balanceRecharge": "Поповнення балансу",
"buyNow": "Купити зараз",
"buySubscription": "Придбати підписку",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe(Alipay)",
"stripe_wechat_pay": "Stripe(WeChat)"
},
"month": "місяць",
"months": "місяців",
"name": "Назва",
"orderClosed": "Замовлення закрито",
"orderList": "Список замовлень",

View File

@ -1,11 +1,15 @@
{
"Day": "День",
"Hour": "Година",
"Minute": "хвилина",
"Month": "Місяць",
"Year": "Рік",
"all": "всі",
"billing": {
"billingTitle": "Рахунок за товар",
"couponDiscount": "Знижка за промокодом",
"duration": "Тривалість пакету",
"fee": "Комісія",
"months": "місяців",
"price": "Ціна",
"productDiscount": "Знижка на товар",
"total": "Загальна сума"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "місяць",
"productDescription": "Опис товару",
"products": "товари"
}

View File

@ -1,4 +1,9 @@
{
"Day": "Ngày",
"Hour": "Giờ",
"Minute": "Phút",
"Month": "Tháng",
"Year": "Năm",
"balanceRecharge": "Nạp tiền số dư",
"buyNow": "Mua ngay",
"buySubscription": "Mua đăng ký",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"month": "tháng",
"months": "tháng",
"name": "Tên",
"orderClosed": "Đơn hàng đã đóng",
"orderList": "Danh sách đơn hàng",

View File

@ -1,11 +1,15 @@
{
"Day": "Ngày",
"Hour": "Giờ",
"Minute": "Phút",
"Month": "Tháng",
"Year": "Năm",
"all": "Tất cả",
"billing": {
"billingTitle": "Hóa đơn sản phẩm",
"couponDiscount": "Ưu đãi mã giảm giá",
"duration": "Thời gian gói",
"fee": "Phí dịch vụ",
"months": "tháng",
"price": "Giá",
"productDiscount": "Giảm giá sản phẩm",
"total": "Tổng giá"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe (Alipay)",
"stripe_wechat_pay": "Stripe (WeChat)"
},
"perMonth": "tháng",
"productDescription": "Mô tả sản phẩm",
"products": "Sản phẩm"
}

View File

@ -1,4 +1,9 @@
{
"Day": "天",
"Hour": "时",
"Minute": "分",
"Month": "月",
"Year": "年",
"balanceRecharge": "余额充值",
"buyNow": "立即购买",
"buySubscription": "购买订阅",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe(支付宝)",
"stripe_wechat_pay": "Stripe(微信)"
},
"month": "个月",
"months": "个月",
"name": "名称",
"orderClosed": "订单已关闭",
"orderList": "订单列表",

View File

@ -1,11 +1,15 @@
{
"Day": "天",
"Hour": "时",
"Minute": "分",
"Month": "月",
"Year": "年",
"all": "全部",
"billing": {
"billingTitle": "商品账单",
"couponDiscount": "折扣码优惠",
"duration": "套餐时长",
"fee": "手续费",
"months": "个月",
"price": "价格",
"productDiscount": "商品折扣",
"total": "总价"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe(支付宝)",
"stripe_wechat_pay": "Stripe(微信)"
},
"perMonth": "月",
"productDescription": "商品描述",
"products": "商品"
}

View File

@ -1,4 +1,9 @@
{
"Day": "日",
"Hour": "時",
"Minute": "分鐘",
"Month": "月",
"Year": "年",
"balanceRecharge": "餘額儲值",
"buyNow": "立即購買",
"buySubscription": "購買訂閱",
@ -16,8 +21,6 @@
"stripe_alipay": "Stripe(支付寶)",
"stripe_wechat_pay": "Stripe(微信)"
},
"month": "個月",
"months": "個月",
"name": "名稱",
"orderClosed": "訂單已關閉",
"orderList": "訂單列表",

View File

@ -1,11 +1,15 @@
{
"Day": "日",
"Hour": "時",
"Minute": "分鐘",
"Month": "月",
"Year": "年",
"all": "全部",
"billing": {
"billingTitle": "商品帳單",
"couponDiscount": "折扣碼優惠",
"duration": "方案時長",
"fee": "手續費",
"months": "個月",
"price": "價格",
"productDiscount": "商品折扣",
"total": "總價"
@ -25,7 +29,6 @@
"stripe_alipay": "Stripe(支付寶)",
"stripe_wechat_pay": "Stripe(微信)"
},
"perMonth": "每月",
"productDescription": "商品描述",
"products": "產品"
}

View File

@ -4,6 +4,7 @@ declare namespace API {
title: string;
content: string;
enable: boolean;
type: number;
created_at: number;
updated_at: number;
};
@ -266,6 +267,7 @@ declare namespace API {
created_at: number;
updated_at: number;
status: NodeStatus;
sort: number;
};
type ServerGroup = {
@ -296,11 +298,17 @@ declare namespace API {
site_logo: string;
};
type SortItem = {
id: number;
sort: number;
};
type Subscribe = {
id: number;
name: string;
description: string;
unit_price: number;
unit_time: string;
discount: SubscribeDiscount[];
replacement: number;
inventory: number;
@ -325,7 +333,7 @@ declare namespace API {
};
type SubscribeDiscount = {
months: number;
quantity: number;
discount: number;
};

View File

@ -4,6 +4,7 @@ declare namespace API {
title: string;
content: string;
enable: boolean;
type: number;
created_at: number;
updated_at: number;
};
@ -399,6 +400,7 @@ declare namespace API {
created_at: number;
updated_at: number;
status: NodeStatus;
sort: number;
};
type ServerGroup = {
@ -429,6 +431,11 @@ declare namespace API {
site_logo: string;
};
type SortItem = {
id: number;
sort: number;
};
type StripePayment = {
method: string;
client_secret: string;
@ -440,6 +447,7 @@ declare namespace API {
name: string;
description: string;
unit_price: number;
unit_time: string;
discount: SubscribeDiscount[];
replacement: number;
inventory: number;
@ -464,7 +472,7 @@ declare namespace API {
};
type SubscribeDiscount = {
months: number;
quantity: number;
discount: number;
};