Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
575 changes: 575 additions & 0 deletions client/src/com/mirth/connect/client/ui/DefaultLoginPanel.java

Large diffs are not rendered by default.

36 changes: 15 additions & 21 deletions client/src/com/mirth/connect/client/ui/Frame.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/*
* Copyright (c) Mirth Corporation. All rights reserved.
*
* http://www.mirthcorp.com
*
* The software in this package is published under the terms of the MPL license a copy of which has
* been included with this distribution in the LICENSE.txt file.
*/
// SPDX-License-Identifier: MPL-2.0
// SPDX-FileCopyrightText: Mirth Corporation
// SPDX-FileCopyrightText: 2025-2026 Open Integration Engine Contributors

package com.mirth.connect.client.ui;

Expand Down Expand Up @@ -57,6 +52,7 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.function.Consumer;
import java.util.prefs.Preferences;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand Down Expand Up @@ -541,15 +537,13 @@ public void eventDispatched(AWTEvent e)
/**
* Called to set up this main window frame.
*/
public void setupFrame(Client mirthClient) throws ClientException {

LoginPanel login = LoginPanel.getInstance();
public void setupFrame(Client mirthClient, Consumer<String> statusCallback) throws ClientException {

// Initialize the send message dialog
editMessageDialog = new EditMessageDialog();

this.mirthClient = mirthClient;
login.setStatus("Loading extensions...");
statusCallback.accept("Loading extensions...");
try {
loadExtensionMetaData();
} catch (ClientException e) {
Expand Down Expand Up @@ -589,10 +583,10 @@ public void setupFrame(Client mirthClient) throws ClientException {
}

setInitialVisibleTasks();
login.setStatus("Loading preferences...");
statusCallback.accept("Loading preferences...");
userPreferences = Preferences.userNodeForPackage(Mirth.class);
userPreferences.put("defaultServer", PlatformUI.SERVER_URL);
login.setStatus("Loading GUI components...");
statusCallback.accept("Loading GUI components...");
splitPane.setDividerSize(0);
splitPane.setBorder(BorderFactory.createEmptyBorder());

Expand Down Expand Up @@ -661,15 +655,15 @@ public void setupFrame(Client mirthClient) throws ClientException {
}

setCurrentTaskPaneContainer(taskPaneContainer);
login.setStatus("Loading dashboard...");
statusCallback.accept("Loading dashboard...");
doShowDashboard();
login.setStatus("Loading channel editor...");
statusCallback.accept("Loading channel editor...");
channelEditPanel = new ChannelSetup();
login.setStatus("Loading alert editor...");
statusCallback.accept("Loading alert editor...");
if (alertEditPanel == null) {
alertEditPanel = new DefaultAlertEditPanel();
}
login.setStatus("Loading message browser...");
statusCallback.accept("Loading message browser...");
messageBrowser = new MessageBrowser();

// Refresh code templates after extensions have been loaded
Expand Down Expand Up @@ -1524,7 +1518,7 @@ public void alertThrowable(Component parentComponent, Throwable t, String custom
}
mirthClient.close();
this.dispose();
LoginPanel.getInstance().initialize(PlatformUI.SERVER_URL, PlatformUI.CLIENT_VERSION, "", "");
Mirth.showLogin();
return;
} else if (t.getCause() != null && t.getCause() instanceof HttpHostConnectException && (StringUtils.contains(t.getCause().getMessage(), "Connection refused") || StringUtils.contains(t.getCause().getMessage(), "Host is down"))) {
connectionError = true;
Expand All @@ -1542,7 +1536,7 @@ public void alertThrowable(Component parentComponent, Throwable t, String custom
}
mirthClient.close();
this.dispose();
LoginPanel.getInstance().initialize(PlatformUI.SERVER_URL, PlatformUI.CLIENT_VERSION, "", "");
Mirth.showLogin();
return;
}
}
Expand Down Expand Up @@ -2292,7 +2286,7 @@ public boolean logout(boolean quit, boolean confirmFirst) {
this.dispose();

if (!quit) {
LoginPanel.getInstance().initialize(PlatformUI.SERVER_URL, PlatformUI.CLIENT_VERSION, "", "");
Mirth.showLogin();
}

return true;
Expand Down
Loading
Loading