update
This commit is contained in:
@@ -36,6 +36,14 @@ function shouldShowMessagingField(setting: SystemSetting, settings: SystemSettin
|
||||
const provider = getSettingValue(settings, 'SMS_PROVIDER');
|
||||
if (setting.key === 'SMS_API_KEY') return provider === 'smsru';
|
||||
if (setting.key === 'SMS_LOGIN' || setting.key === 'SMS_PASSWORD') return provider === 'smsc';
|
||||
if (
|
||||
setting.key === 'SMS_GATEWAY_URL' ||
|
||||
setting.key === 'SMS_GATEWAY_USERNAME' ||
|
||||
setting.key === 'SMS_GATEWAY_PASSWORD' ||
|
||||
setting.key === 'SMS_GATEWAY_MESSAGE_TEMPLATE'
|
||||
) {
|
||||
return provider === 'huawei_modem';
|
||||
}
|
||||
|
||||
const emailProvider = getSettingValue(settings, 'EMAIL_PROVIDER');
|
||||
if (setting.key.startsWith('EMAIL_SMTP_') || setting.key.startsWith('EMAIL_FROM_')) {
|
||||
@@ -180,7 +188,7 @@ export function MessagingSettingsSection({
|
||||
|
||||
<MessagingBlock
|
||||
title="SMS"
|
||||
description="Отправка OTP-кодов по SMS через sms.ru или smsc.ru."
|
||||
description="Отправка OTP-кодов по SMS через sms.ru, smsc.ru или локальный модем Huawei."
|
||||
groupKey="messaging-sms"
|
||||
blockSettings={smsSettings}
|
||||
allSettings={settings}
|
||||
@@ -222,6 +230,7 @@ export function MessagingSettingsSection({
|
||||
</p>
|
||||
<div className="mt-4">
|
||||
<PhoneInput
|
||||
variant="light"
|
||||
country={testPhoneCountry}
|
||||
value={testPhone}
|
||||
onCountryChange={setTestPhoneCountry}
|
||||
|
||||
@@ -51,6 +51,13 @@ export function SettingsFieldRow({ setting, onChange }: SettingsFieldRowProps) {
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
) : type === 'textarea' ? (
|
||||
<textarea
|
||||
value={setting.value}
|
||||
rows={3}
|
||||
className="min-h-[88px] w-full min-w-[280px] resize-y rounded-xl border border-[#e4e7ec] bg-white px-3 py-2 text-sm outline-none focus:border-[#98a2b3] md:w-[360px]"
|
||||
onChange={(event) => onChange(event.target.value)}
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
<Input
|
||||
|
||||
Reference in New Issue
Block a user