Browse Source

REPORT-51360 设计器通行证和finedb里的区分开,对不支持jxbrowser的系统做兼容处理

feature/10.0
Lanlan 4 years ago
parent
commit
d727b8f424
  1. 8
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 1
      designer-base/src/main/java/com/fr/design/constants/UIConstants.java
  3. 23
      designer-base/src/main/java/com/fr/design/extra/LoginWebBridge.java
  4. 6
      designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java
  5. 5
      designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java
  6. 6
      designer-base/src/main/java/com/fr/design/extra/PluginUpdatePane.java
  7. 6
      designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
  8. 2
      designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java
  9. 7
      designer-base/src/main/java/com/fr/design/extra/exe/PluginLoginExecutor.java
  10. 7
      designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java
  11. 26
      designer-base/src/main/java/com/fr/design/login/DesignerLoginHelper.java
  12. 14
      designer-base/src/main/java/com/fr/design/login/DesignerLoginShowDialog.java
  13. 15
      designer-base/src/main/java/com/fr/design/login/config/DesignerLoginConfigManager.java
  14. 16
      designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java
  15. 5
      designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java
  16. 9
      designer-base/src/main/java/com/fr/design/upm/UpmBridge.java
  17. 2
      designer-base/src/main/java/com/fr/design/upm/UpmFinder.java
  18. 1
      designer-base/src/main/resources/com/fr/design/login/lib/locale/login_zh_CN.js
  19. 2
      designer-base/src/main/resources/com/fr/design/login/login.js
  20. 9
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/OnlineWidgetBlock.java
  21. 3
      designer-realize/src/main/java/com/fr/design/mainframe/ActiveKeyGenerator.java
  22. 3
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  23. 8
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java
  24. 2
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java
  25. 3
      designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/entity/FileEntityBuilder.java
  26. 4
      designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareLoginLabel.java
  27. 10
      designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java
  28. 4
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

8
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -841,6 +841,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
designerLoginConfigManager.setLoginRemindBeforeJumpBBS(loginRemindBeforeJumpBBS); designerLoginConfigManager.setLoginRemindBeforeJumpBBS(loginRemindBeforeJumpBBS);
} }
public boolean isPluginRemindOnFirstLaunch() {
return designerLoginConfigManager.isPluginRemindOnFirstLaunch();
}
public void setPluginRemindOnFirstLaunch(boolean pluginRemindOnFirstLaunch) {
designerLoginConfigManager.setPluginRemindOnFirstLaunch(pluginRemindOnFirstLaunch);
}
/** /**
* 内置服务器是否使用时启动 * 内置服务器是否使用时启动
* *

1
designer-base/src/main/java/com/fr/design/constants/UIConstants.java

@ -149,6 +149,7 @@ public interface UIConstants {
public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd); public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd);
public static final Color LIST_ITEM_SPLIT_LINE = new Color(0xf0f0f3); public static final Color LIST_ITEM_SPLIT_LINE = new Color(0xf0f0f3);
public static final Color DESIGNER_LOGIN_BACKGROUND = new Color(0xf1ad14); public static final Color DESIGNER_LOGIN_BACKGROUND = new Color(0xf1ad14);
public static final Color DESIGNER_LOGIN_BACKGROUND_ONCLICK = new Color(0xd89600);
public static final BufferedImage DRAG_BAR = IOUtils.readImage("com/fr/design/images/control/bar.png"); public static final BufferedImage DRAG_BAR = IOUtils.readImage("com/fr/design/images/control/bar.png");
public static final BufferedImage DRAG_BAR_LIGHT = IOUtils.readImage("com/fr/design/images/control/bar-light.png"); public static final BufferedImage DRAG_BAR_LIGHT = IOUtils.readImage("com/fr/design/images/control/bar-light.png");

23
designer-base/src/main/java/com/fr/design/extra/LoginWebBridge.java

@ -1,13 +1,15 @@
package com.fr.design.extra; package com.fr.design.extra;
import com.fr.base.passport.FinePassportManager;
import com.fr.concurrent.NamedThreadFactory; import com.fr.concurrent.NamedThreadFactory;
import com.fr.config.MarketConfig; import com.fr.config.MarketConfig;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.extra.exe.PluginLoginExecutor; import com.fr.design.extra.exe.PluginLoginExecutor;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.locale.impl.BbsRegisterMark; import com.fr.design.locale.impl.BbsRegisterMark;
import com.fr.design.locale.impl.BbsResetMark; import com.fr.design.locale.impl.BbsResetMark;
import com.fr.design.login.service.DesignerLoginClient;
import com.fr.design.login.service.DesignerLoginResult;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.general.locale.LocaleCenter; import com.fr.general.locale.LocaleCenter;
@ -80,12 +82,12 @@ public class LoginWebBridge {
*/ */
public void setMessageCount(int count) { public void setMessageCount(int count) {
if (count == MIN_MESSAGE_COUNT) { if (count == MIN_MESSAGE_COUNT) {
MarketConfig.getInstance().setInShowBBsName(MarketConfig.getInstance().getBbsUsername()); MarketConfig.getInstance().setInShowBBsName(DesignerEnvManager.getEnvManager().getDesignerLoginUsername());
return; return;
} }
this.messageCount = count; this.messageCount = count;
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(StringUtils.BLANK).append(MarketConfig.getInstance().getBbsUsername()) sb.append(StringUtils.BLANK).append(DesignerEnvManager.getEnvManager().getDesignerLoginUsername())
.append("(").append(this.messageCount) .append("(").append(this.messageCount)
.append(")").append(StringUtils.BLANK); .append(")").append(StringUtils.BLANK);
MarketConfig.getInstance().setInShowBBsName(sb.toString()); MarketConfig.getInstance().setInShowBBsName(sb.toString());
@ -161,18 +163,9 @@ public class LoginWebBridge {
* @return 登录信息标志 * @return 登录信息标志
*/ */
public String login(String userInfo, String password) { public String login(String userInfo, String password) {
if (!StringUtils.isNotBlank(userInfo) && !StringUtils.isNotBlank(password)) { DesignerLoginClient client = new DesignerLoginClient();
return LOGIN_INFO_EMPTY; DesignerLoginResult result = client.login(userInfo, password);
} int uid = result.getUid();
if (!testConnection()) {
return NET_FAILED;
}
int uid = 0;
try {
uid = FinePassportManager.getInstance().login(userInfo, password);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
if (uid > 0) { if (uid > 0) {
closeWindow(); closeWindow();
} }

6
designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java

@ -1,6 +1,6 @@
package com.fr.design.extra; package com.fr.design.extra;
import com.fr.config.MarketConfig; import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.tradition.callback.UpdateOnlineCallback; import com.fr.design.extra.tradition.callback.UpdateOnlineCallback;
import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.frpane.UITabbedPane;
@ -190,10 +190,10 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane<List<Plug
} }
private void doUpdateOnline(final PluginStatusCheckCompletePane pane) { private void doUpdateOnline(final PluginStatusCheckCompletePane pane) {
if (!StringUtils.isNotEmpty(MarketConfig.getInstance().getBbsUsername())) { if (!StringUtils.isNotEmpty(DesignerEnvManager.getEnvManager().getDesignerLoginUsername())) {
LoginCheckContext.fireLoginCheckListener(); LoginCheckContext.fireLoginCheckListener();
} }
if (StringUtils.isNotEmpty(MarketConfig.getInstance().getBbsUsername())) { if (StringUtils.isNotEmpty(DesignerEnvManager.getEnvManager().getDesignerLoginUsername())) {
PluginView plugin = controlPane.getSelectedPlugin(); PluginView plugin = controlPane.getSelectedPlugin();
if (plugin == null) { if (plugin == null) {
FineLoggerFactory.getLogger().error("selected plugin is null"); FineLoggerFactory.getLogger().error("selected plugin is null");

5
designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java

@ -1,6 +1,6 @@
package com.fr.design.extra; package com.fr.design.extra;
import com.fr.config.MarketConfig; import com.fr.design.DesignerEnvManager;
import com.fr.design.bridge.exec.JSCallback; import com.fr.design.bridge.exec.JSCallback;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.exe.callback.InstallFromDiskCallback; import com.fr.design.extra.exe.callback.InstallFromDiskCallback;
@ -9,7 +9,6 @@ import com.fr.design.extra.exe.callback.ModifyStatusCallback;
import com.fr.design.extra.exe.callback.UninstallPluginCallback; import com.fr.design.extra.exe.callback.UninstallPluginCallback;
import com.fr.design.extra.exe.callback.UpdateFromDiskCallback; import com.fr.design.extra.exe.callback.UpdateFromDiskCallback;
import com.fr.design.extra.exe.callback.UpdateOnlineCallback; import com.fr.design.extra.exe.callback.UpdateOnlineCallback;
import com.fr.design.gui.ilable.UILabel;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.json.JSONArray; import com.fr.json.JSONArray;
@ -194,7 +193,7 @@ public class PluginOperateUtils {
} }
public static void getLoginInfo(JSCallback jsCallback) { public static void getLoginInfo(JSCallback jsCallback) {
String username = MarketConfig.getInstance().getBbsUsername(); String username = DesignerEnvManager.getEnvManager().getDesignerLoginUsername();
if (StringUtils.isEmpty(username)) { if (StringUtils.isEmpty(username)) {
jsCallback.execute(StringUtils.EMPTY); jsCallback.execute(StringUtils.EMPTY);
} else { } else {

6
designer-base/src/main/java/com/fr/design/extra/PluginUpdatePane.java

@ -1,6 +1,6 @@
package com.fr.design.extra; package com.fr.design.extra;
import com.fr.config.MarketConfig; import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.tradition.callback.UpdateOnlineCallback; import com.fr.design.extra.tradition.callback.UpdateOnlineCallback;
import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.frpane.UITabbedPane;
@ -170,10 +170,10 @@ public class PluginUpdatePane extends PluginAbstractLoadingViewPane<List<PluginV
} }
private void doUpdateOnline(final PluginStatusCheckCompletePane pane) { private void doUpdateOnline(final PluginStatusCheckCompletePane pane) {
if (!StringUtils.isNotEmpty(MarketConfig.getInstance().getBbsUsername())) { if (!StringUtils.isNotEmpty(DesignerEnvManager.getEnvManager().getDesignerLoginUsername())) {
LoginCheckContext.fireLoginCheckListener(); LoginCheckContext.fireLoginCheckListener();
} }
if (StringUtils.isNotEmpty(MarketConfig.getInstance().getBbsUsername())) { if (StringUtils.isNotEmpty(DesignerEnvManager.getEnvManager().getDesignerLoginUsername())) {
try { try {
PluginView plugin = controlPane.getSelectedPlugin(); PluginView plugin = controlPane.getSelectedPlugin();
PluginMarker pluginMarker = PluginMarker.create(plugin.getID(), plugin.getVersion()); PluginMarker pluginMarker = PluginMarker.create(plugin.getID(), plugin.getVersion());

6
designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java

@ -1,7 +1,7 @@
package com.fr.design.extra; package com.fr.design.extra;
import com.fr.base.passport.FinePassportManager;
import com.fr.config.MarketConfig; import com.fr.config.MarketConfig;
import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper; import com.fr.design.RestartHelper;
import com.fr.design.bridge.exec.JSCallback; import com.fr.design.bridge.exec.JSCallback;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
@ -12,7 +12,6 @@ import com.fr.design.extra.exe.GetPluginPrefixExecutor;
import com.fr.design.extra.exe.PluginLoginExecutor; import com.fr.design.extra.exe.PluginLoginExecutor;
import com.fr.design.extra.exe.ReadUpdateOnlineExecutor; import com.fr.design.extra.exe.ReadUpdateOnlineExecutor;
import com.fr.design.extra.exe.SearchOnlineExecutor; import com.fr.design.extra.exe.SearchOnlineExecutor;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.locale.impl.BbsRegisterMark; import com.fr.design.locale.impl.BbsRegisterMark;
import com.fr.design.locale.impl.BbsResetMark; import com.fr.design.locale.impl.BbsResetMark;
import com.fr.design.locale.impl.BbsSpaceMark; import com.fr.design.locale.impl.BbsSpaceMark;
@ -421,7 +420,7 @@ public class PluginWebBridge {
*/ */
public String getLoginInfo(final JSObject callback) { public String getLoginInfo(final JSObject callback) {
registerLoginInfo(callback); registerLoginInfo(callback);
return MarketConfig.getInstance().getBbsUsername(); return DesignerEnvManager.getEnvManager().getDesignerLoginUsername();
} }
/** /**
@ -548,7 +547,6 @@ public class PluginWebBridge {
*/ */
public void clearUserInfo() { public void clearUserInfo() {
MarketConfig.getInstance().setInShowBBsName(StringUtils.EMPTY); MarketConfig.getInstance().setInShowBBsName(StringUtils.EMPTY);
FinePassportManager.getInstance().logout();
} }
public void getPackInfo(final JSObject callback){ public void getPackInfo(final JSObject callback){

2
designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java

@ -5,6 +5,7 @@ import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.login.utils.DesignerLoginUtils;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.CommonIOUtils; import com.fr.general.CommonIOUtils;
@ -206,6 +207,7 @@ public class WebViewDlgHelper {
UIDialog dlg = new ShopDialog(DesignerContext.getDesignerFrame(), managerPane); UIDialog dlg = new ShopDialog(DesignerContext.getDesignerFrame(), managerPane);
PluginWebBridge.getHelper().setDialogHandle(dlg); PluginWebBridge.getHelper().setDialogHandle(dlg);
dlg.setVisible(true); dlg.setVisible(true);
DesignerLoginUtils.showPluginRemindOnFirstLaunch();
} catch (Exception e) { } catch (Exception e) {
// ignored // ignored
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);

7
designer-base/src/main/java/com/fr/design/extra/exe/PluginLoginExecutor.java

@ -2,6 +2,7 @@ package com.fr.design.extra.exe;
import com.fr.design.extra.LoginWebBridge; import com.fr.design.extra.LoginWebBridge;
import com.fr.design.extra.Process; import com.fr.design.extra.Process;
import com.fr.design.login.service.DesignerPassportManager;
/** /**
* @author vito * @author vito
@ -34,7 +35,11 @@ public class PluginLoginExecutor implements Executor {
@Override @Override
public void run(Process<String> process) { public void run(Process<String> process) {
result = LoginWebBridge.getHelper().login(username, password); int uid = DesignerPassportManager.getInstance().login(username, password);
if (uid > 0) {
LoginWebBridge.getHelper().closeWindow();
}
result = String.valueOf(uid);
} }
} }
}; };

7
designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java

@ -2,6 +2,7 @@ package com.fr.design.login;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.utils.BrowseUtils; import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.log.MessageFormatter; import com.fr.general.log.MessageFormatter;
@ -31,7 +32,10 @@ public abstract class AbstractDesignerSSO extends UpdateAction {
@Override @Override
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
String url = getJumpUrl(); String url = getJumpUrl();
if (StringUtils.isNotEmpty(url)) { if (!SupportOSImpl.DESIGNER_LOGIN.support()) {
BrowseUtils.browser(url);
return;
}
DesignerEnvManager manager = DesignerEnvManager.getEnvManager(); DesignerEnvManager manager = DesignerEnvManager.getEnvManager();
int uid = manager.getDesignerLoginUid(); int uid = manager.getDesignerLoginUid();
if (uid > 0) { if (uid > 0) {
@ -56,7 +60,6 @@ public abstract class AbstractDesignerSSO extends UpdateAction {
} }
} }
} }
}
private String generateLoginCode() throws Exception { private String generateLoginCode() throws Exception {
DesignerEnvManager manager = DesignerEnvManager.getEnvManager(); DesignerEnvManager manager = DesignerEnvManager.getEnvManager();

26
designer-base/src/main/java/com/fr/design/login/DesignerLoginHelper.java

@ -2,10 +2,15 @@ package com.fr.design.login;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.extra.WebViewDlgHelper;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.update.ui.dialog.UpdateMainDialog; import com.fr.design.update.ui.dialog.UpdateMainDialog;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import java.awt.Dialog;
import java.awt.Frame;
import java.awt.Window;
import java.util.HashMap; import java.util.HashMap;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
@ -37,6 +42,14 @@ public class DesignerLoginHelper {
} }
public static void showLoginDialog(DesignerLoginSource source, Map<String, String> params) { public static void showLoginDialog(DesignerLoginSource source, Map<String, String> params) {
showLoginDialog(source, params, DesignerContext.getDesignerFrame());
}
public static void showLoginDialog(DesignerLoginSource source, Map<String, String> params, Window window) {
if (!SupportOSImpl.DESIGNER_LOGIN.support()) {
WebViewDlgHelper.createLoginDialog(window);
return;
}
boolean hasJxBrowser = true; boolean hasJxBrowser = true;
try { try {
Class.forName(JXBROWSER); Class.forName(JXBROWSER);
@ -44,16 +57,23 @@ public class DesignerLoginHelper {
hasJxBrowser = false; hasJxBrowser = false;
} }
if (hasJxBrowser) { if (hasJxBrowser) {
showLoginPane(source, params); showLoginPane(source, params, window);
} else { } else {
showUpdatePane(); showUpdatePane();
} }
} }
private static void showLoginPane(DesignerLoginSource source, Map<String, String> params) { private static void showLoginPane(DesignerLoginSource source, Map<String, String> params, Window window) {
DesignerLoginPane designerLoginPane = new DesignerLoginPane(source, params); DesignerLoginPane designerLoginPane = new DesignerLoginPane(source, params);
if (dialog == null) { if (dialog == null) {
dialog = new DesignerLoginShowDialog(DesignerContext.getDesignerFrame(), designerLoginPane); if (window instanceof Dialog) {
dialog = new DesignerLoginShowDialog((Dialog) window, designerLoginPane);
} else if (window instanceof Frame) {
dialog = new DesignerLoginShowDialog((Frame) window, designerLoginPane);
} else {
return;
}
} }
dialog.setVisible(true); dialog.setVisible(true);
} }

14
designer-base/src/main/java/com/fr/design/login/DesignerLoginShowDialog.java

@ -1,9 +1,10 @@
package com.fr.design.login; package com.fr.design.login;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Frame; import java.awt.Frame;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -17,8 +18,17 @@ public class DesignerLoginShowDialog extends UIDialog {
private static final Dimension DEFAULT = new Dimension(422, 478); private static final Dimension DEFAULT = new Dimension(422, 478);
public DesignerLoginShowDialog(Frame frame, BasicPane pane) { public DesignerLoginShowDialog(Frame frame, Component pane) {
super(frame); super(frame);
init(pane);
}
public DesignerLoginShowDialog(Dialog dialog, Component pane) {
super(dialog);
init(pane);
}
private void init(Component pane) {
setUndecorated(true); setUndecorated(true);
JPanel panel = (JPanel) getContentPane(); JPanel panel = (JPanel) getContentPane();
panel.setLayout(new BorderLayout()); panel.setLayout(new BorderLayout());

15
designer-base/src/main/java/com/fr/design/login/config/DesignerLoginConfigManager.java

@ -62,11 +62,14 @@ public class DesignerLoginConfigManager implements XMLReadable, XMLWriter {
* 当前版本第一次启动 * 当前版本第一次启动
*/ */
private boolean currentVersionFirstLaunch = true; private boolean currentVersionFirstLaunch = true;
/** /**
* bbs跳转前的登录提醒 * bbs跳转前的登录提醒
*/ */
private boolean loginRemindBeforeJumpBBS = true; private boolean loginRemindBeforeJumpBBS = true;
/**
* 插件管理第一次启动时的提醒
*/
private boolean pluginRemindOnFirstLaunch = true;
private DesignerLoginConfigManager() { private DesignerLoginConfigManager() {
@ -94,6 +97,7 @@ public class DesignerLoginConfigManager implements XMLReadable, XMLWriter {
this.setLastLoginType(DesignerLoginType.valueOf(reader.getAttrAsInt("lastLoginType", -1))); this.setLastLoginType(DesignerLoginType.valueOf(reader.getAttrAsInt("lastLoginType", -1)));
this.setLastLoginAccount(reader.getAttrAsString("lastLoginAccount", StringUtils.EMPTY)); this.setLastLoginAccount(reader.getAttrAsString("lastLoginAccount", StringUtils.EMPTY));
this.setLoginRemindBeforeJumpBBS(reader.getAttrAsBoolean("loginRemindBeforeJumpBBS", true)); this.setLoginRemindBeforeJumpBBS(reader.getAttrAsBoolean("loginRemindBeforeJumpBBS", true));
this.setPluginRemindOnFirstLaunch(reader.getAttrAsBoolean("pluginRemindOnFirstLaunch", true));
} }
} }
@ -112,6 +116,7 @@ public class DesignerLoginConfigManager implements XMLReadable, XMLWriter {
writer.attr("lastLoginType", lastLoginType.getType()); writer.attr("lastLoginType", lastLoginType.getType());
writer.attr("lastLoginAccount", lastLoginAccount); writer.attr("lastLoginAccount", lastLoginAccount);
writer.attr("loginRemindBeforeJumpBBS", loginRemindBeforeJumpBBS); writer.attr("loginRemindBeforeJumpBBS", loginRemindBeforeJumpBBS);
writer.attr("pluginRemindOnFirstLaunch", pluginRemindOnFirstLaunch);
writer.end(); writer.end();
} }
@ -210,4 +215,12 @@ public class DesignerLoginConfigManager implements XMLReadable, XMLWriter {
public void setLoginRemindBeforeJumpBBS(boolean loginRemindBeforeJumpBBS) { public void setLoginRemindBeforeJumpBBS(boolean loginRemindBeforeJumpBBS) {
this.loginRemindBeforeJumpBBS = loginRemindBeforeJumpBBS; this.loginRemindBeforeJumpBBS = loginRemindBeforeJumpBBS;
} }
public boolean isPluginRemindOnFirstLaunch() {
return pluginRemindOnFirstLaunch;
}
public void setPluginRemindOnFirstLaunch(boolean pluginRemindOnFirstLaunch) {
this.pluginRemindOnFirstLaunch = pluginRemindOnFirstLaunch;
}
} }

16
designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java

@ -1,5 +1,7 @@
package com.fr.design.login.utils; package com.fr.design.login.utils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.toast.DesignerToastMsgUtil;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -16,4 +18,18 @@ public class DesignerLoginUtils {
map4Tpl.put("language", GeneralContext.getLocale().toString()); map4Tpl.put("language", GeneralContext.getLocale().toString());
return map4Tpl; return map4Tpl;
} }
public static void showPluginRemindOnFirstLaunch() {
DesignerEnvManager manager = DesignerEnvManager.getEnvManager();
int uid = manager.getDesignerLoginUid();
if (uid > 0) {
boolean pluginRemindOnFirstLaunch = manager.isPluginRemindOnFirstLaunch();
if (pluginRemindOnFirstLaunch) {
DesignerToastMsgUtil.toastWarning(
com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Plugin_Tip")
);
manager.setPluginRemindOnFirstLaunch(false);
}
}
}
} }

5
designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java

@ -5,7 +5,6 @@ import com.fr.chartx.attr.ChartProvider;
import com.fr.chartx.config.info.AbstractConfig; import com.fr.chartx.config.info.AbstractConfig;
import com.fr.chartx.config.info.ChartConfigInfo; import com.fr.chartx.config.info.ChartConfigInfo;
import com.fr.chartx.config.info.constant.ConfigType; import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.config.MarketConfig;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
@ -132,8 +131,8 @@ public class ChartInfo extends AbstractPointInfo implements Comparable<ChartInfo
public static ChartInfo newInstance(ChartProvider chartProvider, String createTime, boolean isNew, boolean isReuse, boolean isAutoChart) { public static ChartInfo newInstance(ChartProvider chartProvider, String createTime, boolean isNew, boolean isReuse, boolean isAutoChart) {
HashMap<String, String> chartConsumingMap = new HashMap<>(); HashMap<String, String> chartConsumingMap = new HashMap<>();
String username = MarketConfig.getInstance().getBbsUsername(); String username = DesignerEnvManager.getEnvManager().getDesignerLoginUsername();
String userId = String.valueOf(MarketConfig.getInstance().getBbsUid()); String userId = String.valueOf(DesignerEnvManager.getEnvManager().getDesignerLoginUid());
String uuid = DesignerEnvManager.getEnvManager().getUUID(); String uuid = DesignerEnvManager.getEnvManager().getUUID();
String activityKey = DesignerEnvManager.getEnvManager().getActivationKey(); String activityKey = DesignerEnvManager.getEnvManager().getActivationKey();
String chartId = chartProvider.getChartUuid(); String chartId = chartProvider.getChartUuid();

9
designer-base/src/main/java/com/fr/design/upm/UpmBridge.java

@ -1,9 +1,8 @@
package com.fr.design.upm; package com.fr.design.upm;
import com.fr.base.passport.FinePassportManager;
import com.fr.config.MarketConfig;
import com.fr.config.ServerPreferenceConfig; import com.fr.config.ServerPreferenceConfig;
import com.fr.decision.webservice.v10.plugin.helper.category.impl.UpmResourceLoader; import com.fr.decision.webservice.v10.plugin.helper.category.impl.UpmResourceLoader;
import com.fr.design.DesignerEnvManager;
import com.fr.design.bridge.exec.JSBridge; import com.fr.design.bridge.exec.JSBridge;
import com.fr.design.bridge.exec.JSCallback; import com.fr.design.bridge.exec.JSCallback;
import com.fr.design.extra.PluginOperateUtils; import com.fr.design.extra.PluginOperateUtils;
@ -19,12 +18,10 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.locale.impl.BbsRegisterMark; import com.fr.design.locale.impl.BbsRegisterMark;
import com.fr.design.locale.impl.BbsResetMark; import com.fr.design.locale.impl.BbsResetMark;
import com.fr.design.locale.impl.BbsSpaceMark; import com.fr.design.locale.impl.BbsSpaceMark;
import com.fr.design.upm.event.CertificateEvent;
import com.fr.design.upm.event.DownloadEvent; import com.fr.design.upm.event.DownloadEvent;
import com.fr.design.upm.exec.UpmBrowserExecutor; import com.fr.design.upm.exec.UpmBrowserExecutor;
import com.fr.design.upm.task.UpmTaskWorker; import com.fr.design.upm.task.UpmTaskWorker;
import com.fr.event.EventDispatcher; import com.fr.event.EventDispatcher;
import com.fr.general.CloudCenter;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.general.locale.LocaleCenter; import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark; import com.fr.general.locale.LocaleMark;
@ -379,7 +376,7 @@ public class UpmBridge {
@JSBridge @JSBridge
public String getLoginInfo(final JSFunction callback) { public String getLoginInfo(final JSFunction callback) {
registerLoginInfo(callback); registerLoginInfo(callback);
return MarketConfig.getInstance().getBbsUsername(); return DesignerEnvManager.getEnvManager().getDesignerLoginUsername();
} }
/** /**
@ -390,7 +387,7 @@ public class UpmBridge {
@JSBridge @JSBridge
public void registerLoginInfo(final JSFunction callback) { public void registerLoginInfo(final JSFunction callback) {
JSCallback jsCallback = new JSCallback(UpmBrowserExecutor.create(window, callback)); JSCallback jsCallback = new JSCallback(UpmBrowserExecutor.create(window, callback));
String username = MarketConfig.getInstance().getBbsUsername(); String username = DesignerEnvManager.getEnvManager().getDesignerLoginUsername();
if (StringUtils.isEmpty(username)) { if (StringUtils.isEmpty(username)) {
jsCallback.execute(StringUtils.EMPTY); jsCallback.execute(StringUtils.EMPTY);
} else { } else {

2
designer-base/src/main/java/com/fr/design/upm/UpmFinder.java

@ -5,6 +5,7 @@ import com.fr.decision.webservice.v10.plugin.helper.category.impl.UpmResourceLoa
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.login.utils.DesignerLoginUtils;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.plugin.DesignerPluginContext; import com.fr.design.plugin.DesignerPluginContext;
import com.fr.design.update.ui.dialog.UpdateMainDialog; import com.fr.design.update.ui.dialog.UpdateMainDialog;
@ -97,6 +98,7 @@ public class UpmFinder {
dialog = new UpmShowDialog(DesignerContext.getDesignerFrame(), upmPane); dialog = new UpmShowDialog(DesignerContext.getDesignerFrame(), upmPane);
} }
dialog.setVisible(true); dialog.setVisible(true);
DesignerLoginUtils.showPluginRemindOnFirstLaunch();
} }
} }

1
designer-base/src/main/resources/com/fr/design/login/lib/locale/login_zh_CN.js

@ -52,6 +52,7 @@ var Store = {
'Designer-BBS_Username_Too_Short': '昵称长度太短', 'Designer-BBS_Username_Too_Short': '昵称长度太短',
'Designer-BBS_Username_Too_Long': '这个昵称长度已经达到了上限', 'Designer-BBS_Username_Too_Long': '这个昵称长度已经达到了上限',
'Designer-BBS_Username_Is_Register': '该用户已被注册', 'Designer-BBS_Username_Is_Register': '该用户已被注册',
'Designer-BBS_Please_Enter_Correct_Phone': '请输入正确的手机号',
'Designer-Login_Network_Connected_Failed': '网络连接失败', 'Designer-Login_Network_Connected_Failed': '网络连接失败',
}} }}

2
designer-base/src/main/resources/com/fr/design/login/login.js

File diff suppressed because one or more lines are too long

9
designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/OnlineWidgetBlock.java

@ -1,14 +1,15 @@
package com.fr.design.mainframe.share.ui.block; package com.fr.design.mainframe.share.ui.block;
import com.fr.base.iofile.attr.SharableAttrMark; import com.fr.base.iofile.attr.SharableAttrMark;
import com.fr.config.MarketConfig; import com.fr.design.DesignerEnvManager;
import com.fr.design.base.mode.DesignModeContext; import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.extra.WebViewDlgHelper;
import com.fr.design.form.util.XCreatorConstants; import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.login.DesignerLoginHelper;
import com.fr.design.login.DesignerLoginSource;
import com.fr.design.mainframe.WidgetToolBarPane; import com.fr.design.mainframe.WidgetToolBarPane;
import com.fr.design.mainframe.share.collect.ComponentCollector; import com.fr.design.mainframe.share.collect.ComponentCollector;
import com.fr.form.share.group.DefaultShareGroup; import com.fr.form.share.group.DefaultShareGroup;
@ -156,9 +157,9 @@ public class OnlineWidgetBlock extends AbstractOnlineWidgetBlock {
final WidgetDownloadProcess process = new WidgetDownloadProcess(); final WidgetDownloadProcess process = new WidgetDownloadProcess();
downloading = true; downloading = true;
process.process(0.0D); process.process(0.0D);
String userName = MarketConfig.getInstance().getBbsUsername(); String userName = DesignerEnvManager.getEnvManager().getDesignerLoginUsername();
if (StringUtils.isEmpty(userName)) { if (StringUtils.isEmpty(userName)) {
WebViewDlgHelper.createLoginDialog(); DesignerLoginHelper.showLoginDialog(DesignerLoginSource.NORMAL);
downloading = false; downloading = false;
return; return;
} }

3
designer-realize/src/main/java/com/fr/design/mainframe/ActiveKeyGenerator.java

@ -1,5 +1,4 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.config.MarketConfig;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
@ -101,7 +100,7 @@ public class ActiveKeyGenerator {
HashMap<String, String> para = new HashMap<String, String>(); HashMap<String, String> para = new HashMap<String, String>();
para.put("uuid", envManager.getUUID()); para.put("uuid", envManager.getUUID());
para.put("key", key); para.put("key", key);
para.put("username", MarketConfig.getInstance().getBbsUsername()); para.put("username", DesignerEnvManager.getEnvManager().getDesignerLoginUsername());
HttpClient hc = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("verify.code"), para); HttpClient hc = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("verify.code"), para);
if (timeout != -1) { if (timeout != -1) {
hc.setTimeout(timeout); hc.setTimeout(timeout);

3
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -1,7 +1,6 @@
package com.fr.design.mainframe.alphafine.component; package com.fr.design.mainframe.alphafine.component;
import com.bulenkov.iconloader.IconLoader; import com.bulenkov.iconloader.IconLoader;
import com.fr.config.MarketConfig;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.help.alphafine.AlphaFineConfigManager; import com.fr.design.actions.help.alphafine.AlphaFineConfigManager;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
@ -952,7 +951,7 @@ public class AlphaFineDialog extends UIDialog {
*/ */
private void sendDataToServer(String searchKey, AlphaCellModel cellModel) { private void sendDataToServer(String searchKey, AlphaCellModel cellModel) {
if (cellModel.isNeedToSendToServer()) { if (cellModel.isNeedToSendToServer()) {
String username = MarketConfig.getInstance().getBbsUsername(); String username = DesignerEnvManager.getEnvManager().getDesignerLoginUsername();
String uuid = DesignerEnvManager.getEnvManager().getUUID(); String uuid = DesignerEnvManager.getEnvManager().getUUID();
String activityKey = DesignerEnvManager.getEnvManager().getActivationKey(); String activityKey = DesignerEnvManager.getEnvManager().getActivationKey();
String createTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(Calendar.getInstance().getTime()); String createTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(Calendar.getInstance().getTime());

8
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java

@ -5,6 +5,7 @@ package com.fr.design.mainframe.bbs;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.bbs.BBSLoginUtils; import com.fr.design.bbs.BBSLoginUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.extra.LoginContextListener; import com.fr.design.extra.LoginContextListener;
import com.fr.design.extra.UserLoginContext; import com.fr.design.extra.UserLoginContext;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -30,6 +31,7 @@ import com.fr.general.locale.LocaleMark;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.EncodeConstants; import com.fr.stable.EncodeConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import java.awt.Color;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import java.awt.Cursor; import java.awt.Cursor;
import java.awt.Desktop; import java.awt.Desktop;
@ -78,6 +80,12 @@ public class UserInfoLabel extends UILabel {
@Override @Override
public void mouseEntered(MouseEvent e) { public void mouseEntered(MouseEvent e) {
UserInfoLabel.this.setCursor(new Cursor(Cursor.HAND_CURSOR)); UserInfoLabel.this.setCursor(new Cursor(Cursor.HAND_CURSOR));
UserInfoLabel.this.setBackground(UIConstants.DESIGNER_LOGIN_BACKGROUND_ONCLICK);
}
@Override
public void mouseExited(MouseEvent e) {
UserInfoLabel.this.setBackground(UIConstants.DESIGNER_LOGIN_BACKGROUND);
} }
@Override @Override

2
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java

@ -90,7 +90,7 @@ public class UserInfoPane extends BasicPane {
* 标志未登录状态, 面板设置为灰色 * 标志未登录状态, 面板设置为灰色
*/ */
public void markUnSignIn() { public void markUnSignIn() {
this.userInfoLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Login_Now")); this.userInfoLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Login_Onclick"));
this.userInfoLabel.setForeground(Color.WHITE); this.userInfoLabel.setForeground(Color.WHITE);
this.userInfoLabel.setOpaque(true); this.userInfoLabel.setOpaque(true);
this.userInfoLabel.setBackground(UN_LOGIN_BACKGROUND); this.userInfoLabel.setBackground(UN_LOGIN_BACKGROUND);

3
designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/entity/FileEntityBuilder.java

@ -1,6 +1,5 @@
package com.fr.design.mainframe.messagecollect.entity; package com.fr.design.mainframe.messagecollect.entity;
import com.fr.config.MarketConfig;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.general.CloudClient; import com.fr.general.CloudClient;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
@ -103,7 +102,7 @@ public class FileEntityBuilder {
CloudClient client = CloudClient.getInstance(); CloudClient client = CloudClient.getInstance();
String today = new JDateTime().toString("YYYY-MM-DD"); String today = new JDateTime().toString("YYYY-MM-DD");
String filePath = FOCUS_POINT_FILE_ROOT_PATH + CoreConstants.SEPARATOR + today + CoreConstants.SEPARATOR + keyFileName; String filePath = FOCUS_POINT_FILE_ROOT_PATH + CoreConstants.SEPARATOR + today + CoreConstants.SEPARATOR + keyFileName;
String bbsUserName = MarketConfig.getInstance().getBbsUsername(); String bbsUserName = DesignerEnvManager.getEnvManager().getDesignerLoginUsername();
String uuid = DesignerEnvManager.getEnvManager().getUUID(); String uuid = DesignerEnvManager.getEnvManager().getUUID();
String name = StringUtils.isEmpty(bbsUserName) ? uuid : bbsUserName; String name = StringUtils.isEmpty(bbsUserName) ? uuid : bbsUserName;

4
designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareLoginLabel.java

@ -1,6 +1,6 @@
package com.fr.design.share.ui.generate; package com.fr.design.share.ui.generate;
import com.fr.config.MarketConfig; import com.fr.design.DesignerEnvManager;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.bbs.UserInfoPane; import com.fr.design.mainframe.bbs.UserInfoPane;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -35,7 +35,7 @@ public class ShareLoginLabel extends UILabel {
private void tryGetLogin() { private void tryGetLogin() {
String bbsUsername = MarketConfig.getInstance().getBbsUsername(); String bbsUsername = DesignerEnvManager.getEnvManager().getDesignerLoginUsername();
if (StringUtils.isNotEmpty(bbsUsername)) { if (StringUtils.isNotEmpty(bbsUsername)) {
vendorPane.remove(unLoginLabel); vendorPane.remove(unLoginLabel);
loginLabel.setText(bbsUsername); loginLabel.setText(bbsUsername);

10
designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java

@ -1,12 +1,11 @@
package com.fr.design.share.ui.generate; package com.fr.design.share.ui.generate;
import com.fr.config.MarketConfig; import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.LoginWebBridge; import com.fr.design.extra.LoginWebBridge;
import com.fr.design.extra.WebViewDlgHelper;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
@ -18,6 +17,8 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.login.DesignerLoginHelper;
import com.fr.design.login.DesignerLoginSource;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.share.constants.ComponentType; import com.fr.design.mainframe.share.constants.ComponentType;
import com.fr.design.mainframe.share.constants.ComponentTypes; import com.fr.design.mainframe.share.constants.ComponentTypes;
@ -43,6 +44,7 @@ import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.collections.combination.Pair; import com.fr.stable.collections.combination.Pair;
import com.fr.stable.pinyin.PinyinHelper; import com.fr.stable.pinyin.PinyinHelper;
import java.util.HashMap;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -419,7 +421,7 @@ public class ShareMainPane extends JPanel {
final JPanel vendorPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); final JPanel vendorPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
String bbsUsername = MarketConfig.getInstance().getBbsUsername(); String bbsUsername = DesignerEnvManager.getEnvManager().getDesignerLoginUsername();
if (StringUtils.isEmpty(bbsUsername)) { if (StringUtils.isEmpty(bbsUsername)) {
UILabel unLoginLabel = ShareUIUtils.createHyperlinkLabel(Toolkit.i18nText("Fine-Design_Share_Click_Login")); UILabel unLoginLabel = ShareUIUtils.createHyperlinkLabel(Toolkit.i18nText("Fine-Design_Share_Click_Login"));
@ -431,7 +433,7 @@ public class ShareMainPane extends JPanel {
LoginWebBridge.getHelper().setUILabel(hidden); LoginWebBridge.getHelper().setUILabel(hidden);
Dialog shareDialog = ShareDialogUtils.getInstance().getShareDialog(); Dialog shareDialog = ShareDialogUtils.getInstance().getShareDialog();
//必须这样创建,不然窗口优先级不对 //必须这样创建,不然窗口优先级不对
WebViewDlgHelper.createLoginDialog(shareDialog); DesignerLoginHelper.showLoginDialog(DesignerLoginSource.NORMAL, new HashMap<>(), shareDialog);
} }
}); });
vendorPane.add(unLoginLabel); vendorPane.add(unLoginLabel);

4
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -415,11 +415,11 @@ public class DesignerActivator extends Activator implements Prepare {
} }
private static void storePassport() { private static void storePassport() {
FinePassportManager.getInstance().storePassport(MarketConfig.getInstance().getBbsUsername(), DesignerEnvManager.getEnvManager().getActivationKey()); FinePassportManager.getInstance().storePassport(DesignerEnvManager.getEnvManager().getDesignerLoginUsername(), DesignerEnvManager.getEnvManager().getActivationKey());
FinePassportManager.getInstance().addPassportListener(new FinePassportListenerAdapter() { FinePassportManager.getInstance().addPassportListener(new FinePassportListenerAdapter() {
@Override @Override
public void onLoginSuccess() { public void onLoginSuccess() {
FinePassportManager.getInstance().storePassport(MarketConfig.getInstance().getBbsUsername(), DesignerEnvManager.getEnvManager().getActivationKey()); FinePassportManager.getInstance().storePassport(DesignerEnvManager.getEnvManager().getDesignerLoginUsername(), DesignerEnvManager.getEnvManager().getActivationKey());
} }
}); });
} }

Loading…
Cancel
Save