整合自定义 json
This commit is contained in:
@@ -507,6 +507,12 @@ const RelayStationManager: React.FC<RelayStationManagerProps> = ({ onBack }) =>
|
|||||||
</Button>
|
</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent className="sm:max-w-[900px] max-h-[90vh] overflow-y-auto">
|
<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
|
<CreateStationDialog
|
||||||
onSuccess={() => {
|
onSuccess={() => {
|
||||||
setShowCreateDialog(false);
|
setShowCreateDialog(false);
|
||||||
@@ -766,6 +772,12 @@ const RelayStationManager: React.FC<RelayStationManagerProps> = ({ onBack }) =>
|
|||||||
{selectedStation && (
|
{selectedStation && (
|
||||||
<Dialog open={showEditDialog} onOpenChange={setShowEditDialog}>
|
<Dialog open={showEditDialog} onOpenChange={setShowEditDialog}>
|
||||||
<DialogContent className="sm:max-w-[900px] max-h-[90vh] overflow-y-auto">
|
<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
|
<EditStationDialog
|
||||||
station={selectedStation}
|
station={selectedStation}
|
||||||
onSuccess={() => {
|
onSuccess={() => {
|
||||||
|
|||||||
@@ -20,16 +20,14 @@ try {
|
|||||||
// 全局捕获未处理的Promise拒绝,防止Monaco Editor错误
|
// 全局捕获未处理的Promise拒绝,防止Monaco Editor错误
|
||||||
window.addEventListener('unhandledrejection', (event) => {
|
window.addEventListener('unhandledrejection', (event) => {
|
||||||
const error = event.reason;
|
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();
|
event.preventDefault();
|
||||||
console.warn('[Monaco] Suppressed URL validation error:', error);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 全局捕获window.onerror
|
// 全局捕获window.onerror
|
||||||
window.addEventListener('error', (event) => {
|
window.addEventListener('error', (event) => {
|
||||||
if (event.error && event.error.message && event.error.message.includes('URL is not valid')) {
|
if (event.error && (event.error.message || event.error.toString()).includes('URL is not valid')) {
|
||||||
console.warn('[Monaco] Suppressed URL validation error:', event.error);
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user