整合自定义 json

This commit is contained in:
2025-10-26 02:36:51 +08:00
parent b38c5d451d
commit e16b47c2bc
2 changed files with 14 additions and 4 deletions

View File

@@ -507,6 +507,12 @@ const RelayStationManager: React.FC<RelayStationManagerProps> = ({ onBack }) =>
</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-[900px] max-h-[90vh] overflow-y-auto">
<DialogHeader>
<DialogTitle>{t('relayStation.createTitle')}</DialogTitle>
<DialogDescription>
{t('relayStation.description')}
</DialogDescription>
</DialogHeader>
<CreateStationDialog
onSuccess={() => {
setShowCreateDialog(false);
@@ -766,6 +772,12 @@ const RelayStationManager: React.FC<RelayStationManagerProps> = ({ onBack }) =>
{selectedStation && (
<Dialog open={showEditDialog} onOpenChange={setShowEditDialog}>
<DialogContent className="sm:max-w-[900px] max-h-[90vh] overflow-y-auto">
<DialogHeader>
<DialogTitle>{t('relayStation.editTitle')}</DialogTitle>
<DialogDescription>
{t('relayStation.description')}
</DialogDescription>
</DialogHeader>
<EditStationDialog
station={selectedStation}
onSuccess={() => {

View File

@@ -20,16 +20,14 @@ try {
// 全局捕获未处理的Promise拒绝防止Monaco Editor错误
window.addEventListener('unhandledrejection', (event) => {
const error = event.reason;
if (error && error.message && error.message.includes('URL is not valid')) {
if (error && (error.message || error.toString()).includes('URL is not valid')) {
event.preventDefault();
console.warn('[Monaco] Suppressed URL validation error:', error);
}
});
// 全局捕获window.onerror
window.addEventListener('error', (event) => {
if (event.error && event.error.message && event.error.message.includes('URL is not valid')) {
console.warn('[Monaco] Suppressed URL validation error:', event.error);
if (event.error && (event.error.message || event.error.toString()).includes('URL is not valid')) {
event.preventDefault();
return true;
}