Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShanoirUploader optimizations #2588

Merged
merged 5 commits into from
Jan 28, 2025
Merged
Changes from 1 commit
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
Next Next commit
LoginPanel: fix for Offline mode (in case username set)
michaelkain committed Jan 17, 2025
commit efd948a4b641ad2aa2abb862aed460363d83d8f9
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.shanoir.uploader.ShUpConfig;
import org.shanoir.uploader.gui.LoginConfigurationPanel;
import org.shanoir.uploader.gui.ShUpStartupDialog;

@Component
@@ -18,6 +19,9 @@ public class AuthenticationManualConfigurationState implements State {
@Autowired
private LoginPanelActionListener loginPanelActionListener;

@Autowired
public LoginConfigurationPanel loginPanel;

public void load(StartupStateContext context) {
if(ShUpConfig.username == null) {
ShUpStartupDialog shUpStartupDialog = context.getShUpStartupDialog();
@@ -26,7 +30,7 @@ public void load(StartupStateContext context) {
} else {
logger.info("Credentials found in basic.properties. Username: " + ShUpConfig.username);
context.getShUpStartupDialog().updateStartupText("\nUsername: " + ShUpConfig.username);
loginPanelActionListener.configure(null, context);
loginPanelActionListener.configure(loginPanel, context);
loginPanelActionListener.login(ShUpConfig.username, ShUpConfig.password);
}
}