Browse Source

REPORT-62133 mac设计器安装包起不来

final/10.0
Lanlan 3 years ago
parent
commit
efc33deea7
  1. 8
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 2
      designer-base/src/main/java/com/fr/design/login/DesignerLoginHelper.java
  3. 14
      designer-base/src/main/java/com/fr/design/login/config/DesignerLoginConfigManager.java
  4. 14
      designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java

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

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

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

@ -47,7 +47,7 @@ public class DesignerLoginHelper {
} }
public static void showLoginDialog(DesignerLoginSource source, Map<String, String> params, Window window) { public static void showLoginDialog(DesignerLoginSource source, Map<String, String> params, Window window) {
if (!SupportOSImpl.DESIGNER_LOGIN.support()) { if (!SupportOSImpl.DESIGNER_LOGIN.support() || DesignerEnvManager.getEnvManager().isUseOldVersionLogin()) {
WebViewDlgHelper.createLoginDialog(window); WebViewDlgHelper.createLoginDialog(window);
return; return;
} }

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

@ -70,6 +70,10 @@ public class DesignerLoginConfigManager implements XMLReadable, XMLWriter {
* 插件管理第一次启动时的提醒 * 插件管理第一次启动时的提醒
*/ */
private boolean pluginRemindOnFirstLaunch = true; private boolean pluginRemindOnFirstLaunch = true;
/**
* 使用旧版登录
*/
private boolean useOldVersionLogin = false;
private DesignerLoginConfigManager() { private DesignerLoginConfigManager() {
@ -98,6 +102,7 @@ public class DesignerLoginConfigManager implements XMLReadable, XMLWriter {
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)); this.setPluginRemindOnFirstLaunch(reader.getAttrAsBoolean("pluginRemindOnFirstLaunch", true));
this.setUseOldVersionLogin(reader.getAttrAsBoolean("useOldVersionLogin", false));
} }
} }
@ -117,6 +122,7 @@ public class DesignerLoginConfigManager implements XMLReadable, XMLWriter {
writer.attr("lastLoginAccount", lastLoginAccount); writer.attr("lastLoginAccount", lastLoginAccount);
writer.attr("loginRemindBeforeJumpBBS", loginRemindBeforeJumpBBS); writer.attr("loginRemindBeforeJumpBBS", loginRemindBeforeJumpBBS);
writer.attr("pluginRemindOnFirstLaunch", pluginRemindOnFirstLaunch); writer.attr("pluginRemindOnFirstLaunch", pluginRemindOnFirstLaunch);
writer.attr("useOldVersionLogin", useOldVersionLogin);
writer.end(); writer.end();
} }
@ -223,4 +229,12 @@ public class DesignerLoginConfigManager implements XMLReadable, XMLWriter {
public void setPluginRemindOnFirstLaunch(boolean pluginRemindOnFirstLaunch) { public void setPluginRemindOnFirstLaunch(boolean pluginRemindOnFirstLaunch) {
this.pluginRemindOnFirstLaunch = pluginRemindOnFirstLaunch; this.pluginRemindOnFirstLaunch = pluginRemindOnFirstLaunch;
} }
public boolean isUseOldVersionLogin() {
return useOldVersionLogin;
}
public void setUseOldVersionLogin(boolean useOldVersionLogin) {
this.useOldVersionLogin = useOldVersionLogin;
}
} }

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

@ -8,9 +8,7 @@ import com.fr.design.login.utils.DesignerLoginUtils;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.update.push.DesignerPushUpdateManager; import com.fr.design.update.push.DesignerPushUpdateManager;
import com.fr.general.CloudCenter; import com.fr.log.FineLoggerFactory;
import com.fr.general.CloudCenterConfig;
import com.fr.general.http.HttpToolbox;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.WindowConstants; import javax.swing.WindowConstants;
@ -39,7 +37,11 @@ public class DesignerGuideHelper {
public static void prepareShowGuideDialog() { public static void prepareShowGuideDialog() {
// 如果存在更新升级的弹窗,则不显示引导页面 // 如果存在更新升级的弹窗,则不显示引导页面
if (!DesignerLoginUtils.isOnline() || !SupportOSImpl.DESIGNER_LOGIN.support() || !FRContext.isChineseEnv() || DesignerPushUpdateManager.getInstance().isShouldPopUp()) { if (!DesignerLoginUtils.isOnline()
|| !SupportOSImpl.DESIGNER_LOGIN.support()
|| !FRContext.isChineseEnv()
|| DesignerPushUpdateManager.getInstance().isShouldPopUp()
|| DesignerEnvManager.getEnvManager().isUseOldVersionLogin()) {
return; return;
} }
if (isActivatedForOneWeek()) { if (isActivatedForOneWeek()) {
@ -52,7 +54,11 @@ public class DesignerGuideHelper {
DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() { DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() {
@Override @Override
public void designerOpened() { public void designerOpened() {
try {
showGuideDialog(); showGuideDialog();
} catch (Throwable t) {
FineLoggerFactory.getLogger().warn(t.getMessage(), t);
}
} }
}); });
} }

Loading…
Cancel
Save