🐛 fix(payment): Update payment information
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
SheetTitle,
|
||||
SheetTrigger,
|
||||
} from '@workspace/ui/components/sheet';
|
||||
import { MarkdownEditor } from '@workspace/ui/custom-components/editor';
|
||||
import { EnhancedInput } from '@workspace/ui/custom-components/enhanced-input';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { unitConversion } from '@workspace/ui/utils';
|
||||
@@ -75,6 +76,7 @@ export default function PaymentForm<T>({
|
||||
fee_mode: z.coerce.number().min(0).max(2),
|
||||
fee_percent: z.coerce.number().optional(),
|
||||
fee_amount: z.coerce.number().optional(),
|
||||
description: z.string().optional(),
|
||||
});
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
@@ -376,6 +378,23 @@ export default function PaymentForm<T>({
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name='description'
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>{t('description')}</FormLabel>
|
||||
<FormControl>
|
||||
<MarkdownEditor
|
||||
value={field.value}
|
||||
onChange={(value) => form.setValue(field.name, value as string)}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
|
||||
@@ -63,6 +63,7 @@ export const useGlobalStore = create<GlobalStore>((set) => ({
|
||||
verify_code_interval: 60,
|
||||
},
|
||||
oauth_methods: [],
|
||||
web_ad: false,
|
||||
},
|
||||
user: undefined,
|
||||
setCommon: (common) =>
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Smazat",
|
||||
"deleteSuccess": "Úspěšně smazáno",
|
||||
"deleteWarning": "Opravdu chcete smazat tuto platební metodu? Tuto akci nelze vrátit zpět.",
|
||||
"description": "Popis",
|
||||
"descriptionPlaceholder": "Zadejte popis platební metody",
|
||||
"domain": "Doména",
|
||||
"domainPlaceholder": "volitelné, např. {example}",
|
||||
"edit": "Upravit",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Löschen",
|
||||
"deleteSuccess": "Erfolgreich gelöscht",
|
||||
"deleteWarning": "Sind Sie sicher, dass Sie diese Zahlungsmethode löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",
|
||||
"description": "Beschreibung",
|
||||
"descriptionPlaceholder": "Geben Sie die Beschreibung der Zahlungsmethode ein",
|
||||
"domain": "Domain",
|
||||
"domainPlaceholder": "optional, z.B. {example}",
|
||||
"edit": "Bearbeiten",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Delete",
|
||||
"deleteSuccess": "Deleted successfully",
|
||||
"deleteWarning": "Are you sure you want to delete this payment method? This action cannot be undone.",
|
||||
"description": "Description",
|
||||
"descriptionPlaceholder": "Enter payment method description",
|
||||
"domain": "Domain",
|
||||
"domainPlaceholder": "optional, e.g. {example}",
|
||||
"edit": "Edit",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Eliminar",
|
||||
"deleteSuccess": "Eliminado con éxito",
|
||||
"deleteWarning": "¿Está seguro de que desea eliminar este método de pago? Esta acción no se puede deshacer.",
|
||||
"description": "Descripción",
|
||||
"descriptionPlaceholder": "Ingrese la descripción del método de pago",
|
||||
"domain": "Dominio",
|
||||
"domainPlaceholder": "opcional, p. ej. {example}",
|
||||
"edit": "Editar",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Eliminar",
|
||||
"deleteSuccess": "Eliminado con éxito",
|
||||
"deleteWarning": "¿Está seguro de que desea eliminar este método de pago? Esta acción no se puede deshacer.",
|
||||
"description": "Descripción",
|
||||
"descriptionPlaceholder": "Ingresa la descripción del método de pago",
|
||||
"domain": "Dominio",
|
||||
"domainPlaceholder": "opcional, p. ej. {example}",
|
||||
"edit": "Editar",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "حذف",
|
||||
"deleteSuccess": "با موفقیت حذف شد",
|
||||
"deleteWarning": "آیا مطمئن هستید که میخواهید این روش پرداخت را حذف کنید؟ این عمل قابل بازگشت نیست.",
|
||||
"description": "توضیحات",
|
||||
"descriptionPlaceholder": "توضیحات روش پرداخت را وارد کنید",
|
||||
"domain": "دامنه",
|
||||
"domainPlaceholder": "اختیاری، به عنوان مثال {example}",
|
||||
"edit": "ویرایش",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Poista",
|
||||
"deleteSuccess": "Poisto onnistui",
|
||||
"deleteWarning": "Oletko varma, että haluat poistaa tämän maksutavan? Tätä toimintoa ei voi peruuttaa.",
|
||||
"description": "Kuvaus",
|
||||
"descriptionPlaceholder": "Syötä maksutavan kuvaus",
|
||||
"domain": "Verkkotunnus",
|
||||
"domainPlaceholder": "valinnainen, esim. {esimerkki}",
|
||||
"edit": "Muokkaa",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Supprimer",
|
||||
"deleteSuccess": "Supprimé avec succès",
|
||||
"deleteWarning": "Êtes-vous sûr de vouloir supprimer ce mode de paiement ? Cette action ne peut pas être annulée.",
|
||||
"description": "Description",
|
||||
"descriptionPlaceholder": "Entrez la description du mode de paiement",
|
||||
"domain": "Domaine",
|
||||
"domainPlaceholder": "facultatif, par exemple {exemple}",
|
||||
"edit": "Modifier",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "हटाएं",
|
||||
"deleteSuccess": "सफलता से हटाया गया",
|
||||
"deleteWarning": "क्या आप वास्तव में इस भुगतान विधि को हटाना चाहते हैं? यह क्रिया पूर्ववत नहीं की जा सकती।",
|
||||
"description": "विवरण",
|
||||
"descriptionPlaceholder": "भुगतान विधि का विवरण दर्ज करें",
|
||||
"domain": "डोमेन",
|
||||
"domainPlaceholder": "वैकल्पिक, जैसे कि {example}",
|
||||
"edit": "संपादित करें",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Törlés",
|
||||
"deleteSuccess": "Sikeresen törölve",
|
||||
"deleteWarning": "Biztosan törölni szeretné ezt a fizetési módot? Ez a művelet nem vonható vissza.",
|
||||
"description": "Leírás",
|
||||
"descriptionPlaceholder": "Írja be a fizetési mód leírását",
|
||||
"domain": "Domain",
|
||||
"domainPlaceholder": "opcionális, pl. {példa}",
|
||||
"edit": "Szerkesztés",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "削除",
|
||||
"deleteSuccess": "削除成功",
|
||||
"deleteWarning": "この支払い方法を削除してもよろしいですか?この操作は元に戻せません。",
|
||||
"description": "説明",
|
||||
"descriptionPlaceholder": "支払い方法の説明を入力してください",
|
||||
"domain": "ドメイン",
|
||||
"domainPlaceholder": "任意、例:{example}",
|
||||
"edit": "編集",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "삭제",
|
||||
"deleteSuccess": "삭제 성공",
|
||||
"deleteWarning": "이 결제 수단을 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",
|
||||
"description": "설명",
|
||||
"descriptionPlaceholder": "결제 수단 설명을 입력하세요",
|
||||
"domain": "도메인",
|
||||
"domainPlaceholder": "선택 사항, 예: {example}",
|
||||
"edit": "편집",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Slett",
|
||||
"deleteSuccess": "Slettet med suksess",
|
||||
"deleteWarning": "Er du sikker på at du vil slette denne betalingsmetoden? Denne handlingen kan ikke angres.",
|
||||
"description": "Beskrivelse",
|
||||
"descriptionPlaceholder": "Skriv inn beskrivelse av betalingsmetode",
|
||||
"domain": "Domene",
|
||||
"domainPlaceholder": "valgfritt, f.eks. {example}",
|
||||
"edit": "Rediger",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Usuń",
|
||||
"deleteSuccess": "Usunięto pomyślnie",
|
||||
"deleteWarning": "Czy na pewno chcesz usunąć tę metodę płatności? Ta akcja jest nieodwracalna.",
|
||||
"description": "Opis",
|
||||
"descriptionPlaceholder": "Wprowadź opis metody płatności",
|
||||
"domain": "Domena",
|
||||
"domainPlaceholder": "opcjonalnie, np. {example}",
|
||||
"edit": "Edytuj",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Excluir",
|
||||
"deleteSuccess": "Excluído com sucesso",
|
||||
"deleteWarning": "Você tem certeza de que deseja excluir este método de pagamento? Esta ação não pode ser desfeita.",
|
||||
"description": "Descrição",
|
||||
"descriptionPlaceholder": "Insira a descrição do método de pagamento",
|
||||
"domain": "Domínio",
|
||||
"domainPlaceholder": "opcional, por exemplo, {exemplo}",
|
||||
"edit": "Editar",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Șterge",
|
||||
"deleteSuccess": "Șters cu succes",
|
||||
"deleteWarning": "Ești sigur că vrei să ștergi această metodă de plată? Această acțiune nu poate fi anulată.",
|
||||
"description": "Descriere",
|
||||
"descriptionPlaceholder": "Introduceți descrierea metodei de plată",
|
||||
"domain": "Domeniu",
|
||||
"domainPlaceholder": "opțional, de exemplu {example}",
|
||||
"edit": "Editează",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Удалить",
|
||||
"deleteSuccess": "Успешно удалено",
|
||||
"deleteWarning": "Вы уверены, что хотите удалить этот способ оплаты? Это действие нельзя отменить.",
|
||||
"description": "Описание",
|
||||
"descriptionPlaceholder": "Введите описание метода оплаты",
|
||||
"domain": "Домен",
|
||||
"domainPlaceholder": "необязательно, например, {example}",
|
||||
"edit": "Редактировать",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "ลบ",
|
||||
"deleteSuccess": "ลบสำเร็จ",
|
||||
"deleteWarning": "คุณแน่ใจหรือไม่ว่าต้องการลบวิธีการชำระเงินนี้? การกระทำนี้ไม่สามารถย้อนกลับได้",
|
||||
"description": "คำอธิบาย",
|
||||
"descriptionPlaceholder": "กรอกคำอธิบายวิธีการชำระเงิน",
|
||||
"domain": "โดเมน",
|
||||
"domainPlaceholder": "ไม่บังคับ เช่น {example}",
|
||||
"edit": "แก้ไข",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Sil",
|
||||
"deleteSuccess": "Başarıyla silindi",
|
||||
"deleteWarning": "Bu ödeme yöntemini silmek istediğinize emin misiniz? Bu işlem geri alınamaz.",
|
||||
"description": "Açıklama",
|
||||
"descriptionPlaceholder": "Ödeme yöntemi açıklamasını girin",
|
||||
"domain": "Alan Adı",
|
||||
"domainPlaceholder": "isteğe bağlı, örn. {example}",
|
||||
"edit": "Düzenle",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Видалити",
|
||||
"deleteSuccess": "Успішно видалено",
|
||||
"deleteWarning": "Ви впевнені, що хочете видалити цей спосіб оплати? Цю дію не можна скасувати.",
|
||||
"description": "Опис",
|
||||
"descriptionPlaceholder": "Введіть опис способу оплати",
|
||||
"domain": "Домен",
|
||||
"domainPlaceholder": "необов'язково, наприклад, {example}",
|
||||
"edit": "Редагувати",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "Xóa",
|
||||
"deleteSuccess": "Xóa thành công",
|
||||
"deleteWarning": "Bạn có chắc chắn muốn xóa phương thức thanh toán này không? Hành động này không thể hoàn tác.",
|
||||
"description": "Mô tả",
|
||||
"descriptionPlaceholder": "Nhập mô tả phương thức thanh toán",
|
||||
"domain": "Miền",
|
||||
"domainPlaceholder": "tùy chọn, ví dụ: {example}",
|
||||
"edit": "Chỉnh Sửa",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "删除",
|
||||
"deleteSuccess": "删除成功",
|
||||
"deleteWarning": "您确定要删除此支付方式吗?此操作无法撤销。",
|
||||
"description": "描述",
|
||||
"descriptionPlaceholder": "输入支付方式描述",
|
||||
"domain": "域名",
|
||||
"domainPlaceholder": "可选,例如 {example}",
|
||||
"edit": "编辑",
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
"delete": "刪除",
|
||||
"deleteSuccess": "刪除成功",
|
||||
"deleteWarning": "您確定要刪除此付款方式嗎?此操作無法撤銷。",
|
||||
"description": "描述",
|
||||
"descriptionPlaceholder": "輸入付款方式描述",
|
||||
"domain": "域名",
|
||||
"domainPlaceholder": "可選,例如 {example}",
|
||||
"edit": "編輯",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @ts-ignore
|
||||
|
||||
|
||||
// API 更新时间:
|
||||
// API 唯一标识:
|
||||
import * as ads from './ads';
|
||||
|
||||
+5
@@ -233,6 +233,7 @@ declare namespace API {
|
||||
type CreatePaymentMethodRequest = {
|
||||
name: string;
|
||||
platform: string;
|
||||
description: string;
|
||||
icon?: string;
|
||||
domain?: string;
|
||||
config: Record<string, any>;
|
||||
@@ -964,6 +965,7 @@ declare namespace API {
|
||||
id: number;
|
||||
name: string;
|
||||
platform: string;
|
||||
description: string;
|
||||
icon: string;
|
||||
fee_mode: number;
|
||||
fee_percent: number;
|
||||
@@ -974,6 +976,7 @@ declare namespace API {
|
||||
id: number;
|
||||
name: string;
|
||||
platform: string;
|
||||
description: string;
|
||||
icon?: string;
|
||||
domain?: string;
|
||||
config: Record<string, any>;
|
||||
@@ -987,6 +990,7 @@ declare namespace API {
|
||||
id: number;
|
||||
name: string;
|
||||
platform: string;
|
||||
description: string;
|
||||
icon: string;
|
||||
domain: string;
|
||||
config: Record<string, any>;
|
||||
@@ -1524,6 +1528,7 @@ declare namespace API {
|
||||
id: number;
|
||||
name: string;
|
||||
platform: string;
|
||||
description: string;
|
||||
icon?: string;
|
||||
domain?: string;
|
||||
config: Record<string, any>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @ts-ignore
|
||||
|
||||
|
||||
// API 更新时间:
|
||||
// API 唯一标识:
|
||||
import * as auth from './auth';
|
||||
|
||||
+3
@@ -364,6 +364,7 @@ declare namespace API {
|
||||
id: number;
|
||||
name: string;
|
||||
platform: string;
|
||||
description: string;
|
||||
icon: string;
|
||||
fee_mode: number;
|
||||
fee_percent: number;
|
||||
@@ -374,6 +375,7 @@ declare namespace API {
|
||||
id: number;
|
||||
name: string;
|
||||
platform: string;
|
||||
description: string;
|
||||
icon?: string;
|
||||
domain?: string;
|
||||
config: Record<string, any>;
|
||||
@@ -387,6 +389,7 @@ declare namespace API {
|
||||
id: number;
|
||||
name: string;
|
||||
platform: string;
|
||||
description: string;
|
||||
icon: string;
|
||||
domain: string;
|
||||
config: Record<string, any>;
|
||||
|
||||
Reference in New Issue
Block a user