@@ -20,7 +20,6 @@ import {
2020 ChevronDown ,
2121 Settings ,
2222 Users ,
23- Shield ,
2423 Globe ,
2524 RotateCcw ,
2625 UserCog ,
@@ -321,7 +320,6 @@ export default function NotificationSettings() {
321320 notify_discord : false ,
322321 telegram_api_token : '' ,
323322 telegram_chat_id : undefined ,
324- telegram_channel_id : undefined ,
325323 telegram_topic_id : undefined ,
326324 discord_webhook_url : '' ,
327325 proxy_url : '' ,
@@ -386,7 +384,6 @@ export default function NotificationSettings() {
386384 notify_discord : settings . notification_settings ?. notify_discord || false ,
387385 telegram_api_token : settings . notification_settings ?. telegram_api_token || '' ,
388386 telegram_chat_id : settings . notification_settings ?. telegram_chat_id || undefined ,
389- telegram_channel_id : settings . notification_settings ?. telegram_channel_id || undefined ,
390387 telegram_topic_id : settings . notification_settings ?. telegram_topic_id || undefined ,
391388 discord_webhook_url : settings . notification_settings ?. discord_webhook_url || '' ,
392389 proxy_url : settings . notification_settings ?. proxy_url || '' ,
@@ -430,13 +427,11 @@ export default function NotificationSettings() {
430427 ? {
431428 telegram_api_token : data . notification_settings ?. telegram_api_token || '' ,
432429 telegram_chat_id : data . notification_settings ?. telegram_chat_id ?? null ,
433- telegram_channel_id : data . notification_settings ?. telegram_channel_id ?? null ,
434430 telegram_topic_id : data . notification_settings ?. telegram_topic_id ?? null ,
435431 }
436432 : {
437433 telegram_api_token : null ,
438434 telegram_chat_id : null ,
439- telegram_channel_id : null ,
440435 telegram_topic_id : null ,
441436 } ) ,
442437 // Only include Discord settings if Discord is enabled
@@ -486,7 +481,6 @@ export default function NotificationSettings() {
486481 notify_discord : settings . notification_settings ?. notify_discord || false ,
487482 telegram_api_token : settings . notification_settings ?. telegram_api_token || '' ,
488483 telegram_chat_id : settings . notification_settings ?. telegram_chat_id || undefined ,
489- telegram_channel_id : settings . notification_settings ?. telegram_channel_id || undefined ,
490484 telegram_topic_id : settings . notification_settings ?. telegram_topic_id || undefined ,
491485 discord_webhook_url : settings . notification_settings ?. discord_webhook_url || '' ,
492486 proxy_url : settings . notification_settings ?. proxy_url || '' ,
@@ -726,11 +720,11 @@ export default function NotificationSettings() {
726720 />
727721 </ div >
728722
729- < div className = "grid grid-cols-1 gap-3 sm:grid-cols-3 " >
723+ < div className = "grid grid-cols-1 gap-3 sm:grid-cols-2 " >
730724 < div className = "space-y-1.5" >
731725 < Label className = "flex items-center gap-1.5 text-xs font-medium sm:text-sm" >
732- < Shield className = "h-3.5 w-3.5" />
733- { t ( 'settings.notifications.telegram.adminId ' ) }
726+ < MessageSquare className = "h-3.5 w-3.5" />
727+ { t ( 'settings.notifications.telegram.chatId ' ) }
734728 </ Label >
735729 < FormField
736730 control = { form . control }
@@ -773,52 +767,6 @@ export default function NotificationSettings() {
773767 />
774768 </ div >
775769
776- < div className = "space-y-1.5" >
777- < Label className = "flex items-center gap-1.5 text-xs font-medium sm:text-sm" >
778- < MessageSquare className = "h-3.5 w-3.5" />
779- { t ( 'settings.notifications.telegram.channelId' ) }
780- </ Label >
781- < FormField
782- control = { form . control }
783- name = "notification_settings.telegram_channel_id"
784- render = { ( { field } ) => {
785- const [ inputValue , setInputValue ] = useState ( field . value ?. toString ( ) ?? '' )
786-
787- useEffect ( ( ) => {
788- setInputValue ( field . value ?. toString ( ) ?? '' )
789- } , [ field . value ] )
790-
791- return (
792- < FormControl >
793- < Input
794- type = "text"
795- name = { field . name }
796- ref = { field . ref }
797- value = { inputValue }
798- onChange = { e => {
799- const value = e . target . value
800- setInputValue ( value )
801- if ( value === '' ) {
802- field . onChange ( undefined )
803- } else if ( / ^ - ? \d + $ / . test ( value ) ) {
804- field . onChange ( parseInt ( value ) )
805- }
806- } }
807- onBlur = { ( ) => {
808- if ( inputValue !== '' && ! / ^ - ? \d + $ / . test ( inputValue ) ) {
809- setInputValue ( field . value ?. toString ( ) ?? '' )
810- }
811- field . onBlur ( )
812- } }
813- className = "h-9 text-xs sm:text-sm"
814- placeholder = "-1001234567890"
815- />
816- </ FormControl >
817- )
818- } }
819- />
820- </ div >
821-
822770 < div className = "space-y-1.5" >
823771 < Label className = "flex items-center gap-1.5 text-xs font-medium sm:text-sm" >
824772 < FileText className = "h-3.5 w-3.5" />
0 commit comments