整合自定义 json
This commit is contained in:
@@ -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={() => {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user