From f2e7401bda33cb554f70899d4acd72ee5b7050d9 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 5 Jul 2021 14:17:03 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-54716=20=E5=86=B3=E7=AD=96=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E4=B8=AD=E4=BF=AE=E6=94=B9=E7=BB=84=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E4=B8=BA=E5=A4=A7=E5=86=99=EF=BC=8C=E6=8F=90=E7=A4=BA=E9=87=8D?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/widget/ui/FormWidgetCardPane.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 4ab3fdb74a..debc5ae875 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -86,7 +86,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { return null; } else if (xLayoutContainer.acceptType(XWAbsoluteLayout.class)) { return new WidgetAbsoluteBoundPane(xCreator); - } else if(xCreator.acceptType(XWCardTagLayout.class)){ + } else if (xCreator.acceptType(XWCardTagLayout.class)) { return new WidgetCardTagBoundPane(xCreator); } return new WidgetBoundPane(xCreator); @@ -231,7 +231,14 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { UITextField widgetNameField = widgetPropertyPane.getWidgetNameField(); String toSetWidgetName = widgetNameField.getText(); String currentWidgetName = widget.getWidgetName(); - boolean exist = designer.getTarget().isNameExist(toSetWidgetName) && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName); + boolean isNameExist = false; + Widget tempWidget = designer.getTarget().getWidgetByName(toSetWidgetName); + if (!ComparatorUtils.equals(widget, tempWidget)) { + isNameExist = true; + } else if (ComparatorUtils.equals(toSetWidgetName, tempWidget.getWidgetName())) { + isNameExist = true; + } + boolean exist = isNameExist && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName); if (toSetWidgetName.isEmpty()) { widgetNameField.setText(currentWidgetName); return; From f4e67a6b149c91406aa40ee8ba43a9228cd6a38c Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 5 Jul 2021 14:36:59 +0800 Subject: [PATCH 2/5] =?UTF-8?q?REPORT-54716=20=E5=86=B3=E7=AD=96=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E4=B8=AD=E4=BF=AE=E6=94=B9=E7=BB=84=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E4=B8=BA=E5=A4=A7=E5=86=99=EF=BC=8C=E6=8F=90=E7=A4=BA=E9=87=8D?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/widget/ui/FormWidgetCardPane.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index debc5ae875..2fc161fc0a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -231,14 +231,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { UITextField widgetNameField = widgetPropertyPane.getWidgetNameField(); String toSetWidgetName = widgetNameField.getText(); String currentWidgetName = widget.getWidgetName(); - boolean isNameExist = false; - Widget tempWidget = designer.getTarget().getWidgetByName(toSetWidgetName); - if (!ComparatorUtils.equals(widget, tempWidget)) { - isNameExist = true; - } else if (ComparatorUtils.equals(toSetWidgetName, tempWidget.getWidgetName())) { - isNameExist = true; - } - boolean exist = isNameExist && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName); + boolean exist = designer.getTarget().isNameExist(toSetWidgetName, widget) && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName); if (toSetWidgetName.isEmpty()) { widgetNameField.setText(currentWidgetName); return; From 5b1ef2ab2f8860c2e027379f77ceb0c3927ba785 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 5 Jul 2021 17:13:40 +0800 Subject: [PATCH 3/5] =?UTF-8?q?REPORT-54438=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E8=AE=BE=E7=BD=AE=E9=9D=A2=E6=9D=BF=20?= =?UTF-8?q?=E5=9C=A8=E5=88=87=E6=8D=A2=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=90=8E=20=E9=9D=A2=E6=9D=BF=E6=9C=AA?= =?UTF-8?q?=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 2fc161fc0a..e0c6073238 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -24,6 +24,7 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.JForm; +import com.fr.design.mainframe.JTemplate; import com.fr.design.widget.DataModify; import com.fr.design.widget.FormWidgetDefinePaneFactoryBase; import com.fr.design.widget.Operator; @@ -164,7 +165,8 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { } private static void freshPropertyMode(XCreator xCreator) { - if (!(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() instanceof JForm)) { + JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + if (!(jTemplate instanceof JForm) && jTemplate.isUpMode()) { if (xCreator instanceof XWParameterLayout) { EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA); } else { From 4563e2e7817e2649f279a2b8685b14022b0da45d Mon Sep 17 00:00:00 2001 From: Lanlan Date: Tue, 6 Jul 2021 10:32:43 +0800 Subject: [PATCH 4/5] =?UTF-8?q?REPORT-54817=20=E5=86=85=E7=BD=91=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=8B=E8=AF=A5=E8=BF=AD=E4=BB=A3=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=BA=94=E5=BD=93=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/login/AbstractDesignerSSO.java | 4 ++++ .../login/guide/DesignerGuideHelper.java | 6 +++++- .../login/message/DesignerMessageHelper.java | 3 +++ .../login/utils/DesignerLoginUtils.java | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java b/designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java index 6fc3c817b4..2662198bbc 100644 --- a/designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java +++ b/designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java @@ -20,6 +20,10 @@ public abstract class AbstractDesignerSSO extends UpdateAction { @Override public void actionPerformed(ActionEvent event) { String url = getJumpUrl(); + if (!DesignerLoginUtils.isOnline()) { + BrowseUtils.browser(url); + return; + } DesignerEnvManager manager = DesignerEnvManager.getEnvManager(); int uid = manager.getDesignerLoginUid(); if (uid > 0) { diff --git a/designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java b/designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java index 8adebba4f1..92e4171460 100644 --- a/designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java +++ b/designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java @@ -4,9 +4,13 @@ import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.dialog.UIDialog; import com.fr.design.event.DesignerOpenedListener; +import com.fr.design.login.utils.DesignerLoginUtils; import com.fr.design.mainframe.DesignerContext; import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.update.push.DesignerPushUpdateManager; +import com.fr.general.CloudCenter; +import com.fr.general.CloudCenterConfig; +import com.fr.general.http.HttpToolbox; import com.fr.stable.StringUtils; import javax.swing.WindowConstants; @@ -35,7 +39,7 @@ public class DesignerGuideHelper { public static void prepareShowGuideDialog() { // 如果存在更新升级的弹窗,则不显示引导页面 - if (!SupportOSImpl.DESIGNER_LOGIN.support() || !FRContext.isChineseEnv() || DesignerPushUpdateManager.getInstance().isShouldPopUp()) { + if (!DesignerLoginUtils.isOnline() || !SupportOSImpl.DESIGNER_LOGIN.support() || !FRContext.isChineseEnv() || DesignerPushUpdateManager.getInstance().isShouldPopUp()) { return; } if (isActivatedForOneWeek()) { diff --git a/designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java b/designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java index c053fc0e50..f3768629b4 100644 --- a/designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java +++ b/designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java @@ -51,6 +51,9 @@ public class DesignerMessageHelper { } public void prepareShowMessage() { + if (!DesignerLoginUtils.isOnline()) { + return; + } DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() { @Override public void designerOpened() { diff --git a/designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java b/designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java index 26e095df6a..a39a0be4bf 100644 --- a/designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java +++ b/designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java @@ -3,10 +3,13 @@ package com.fr.design.login.utils; import com.fr.design.DesignerEnvManager; import com.fr.design.mainframe.toast.DesignerToastMsgUtil; import com.fr.general.CloudCenter; +import com.fr.general.CloudCenterConfig; import com.fr.general.GeneralContext; +import com.fr.general.http.HttpToolbox; import com.fr.general.log.MessageFormatter; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; +import com.fr.stable.StringUtils; import com.fr.third.org.bouncycastle.util.encoders.Hex; import java.awt.Window; import java.security.SecureRandom; @@ -49,6 +52,9 @@ public class DesignerLoginUtils { } public static String generateDesignerSSOUrl(String referrer) { + if (!DesignerLoginUtils.isOnline()) { + return referrer; + } String ssoTemplate = CloudCenter.getInstance().acquireUrlByKind("designer.sso.api", "https://id.fanruan.com/api/app/?code={}&referrer={}"); try { String code = generateLoginCode(); @@ -60,6 +66,19 @@ public class DesignerLoginUtils { return referrer; } + public static boolean isOnline() { + if (CloudCenterConfig.getInstance().isOnline()) { + String ping = CloudCenter.getInstance().acquireConf("ping", StringUtils.EMPTY); + if (StringUtils.isNotEmpty(ping)) { + try { + return StringUtils.isEmpty(HttpToolbox.get(ping)); + } catch (Exception ignore) { + } + } + } + return false; + } + private static String generateLoginCode() throws Exception { DesignerEnvManager manager = DesignerEnvManager.getEnvManager(); JSONObject jo = JSONObject.create(); From d4fc5e23cfb342e1e04d08dddc119bd91034ddbb Mon Sep 17 00:00:00 2001 From: pengda Date: Tue, 6 Jul 2021 11:11:48 +0800 Subject: [PATCH 5/5] =?UTF-8?q?REPORT-54844=20jar=E5=8C=85=E7=9B=B8?= =?UTF-8?q?=E5=90=8C=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E6=97=B6=E5=90=8C=E6=AD=A5=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E4=B8=80=E7=9B=B4=E6=B2=A1=E7=81=B0=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/main/java/com/fr/env/CheckServiceDialog.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java index 185268e79c..fb1adae6fe 100644 --- a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java +++ b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java @@ -309,6 +309,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener { @Override public void mouseClicked(MouseEvent e) { ignoreButton.setEnabled(false); + syncButton.setEnabled(false); String[] option = {Toolkit.i18nText("Fine-Design_Report_Yes"), Toolkit.i18nText("Fine-Design_Report_No")}; if (!jarConsistency) { int a = FineJOptionPane.showOptionDialog(getParent(), Toolkit.i18nText("Fine-Design_Basic_Sync_Info_Information"), @@ -350,6 +351,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener { @Override protected JSONArray doInBackground() { + progressBar.setVisible(true); progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); progressBar.setValue(0); return VersionCheckUtils.syncPlugins(differentPlugins);