diff --git a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java index 57e01f1acf..b1f4bad071 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java @@ -55,8 +55,9 @@ public class AboutPane extends JPanel { JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); centerPane.add(contentPane, BorderLayout.NORTH); + contentPane.add(new BoxCenterAligmentPane(getBuildTitle())); BoxCenterAlignmentCopyablePane buildCopyPane = new BoxCenterAlignmentCopyablePane( - getBuildTitle(), + StringUtils.EMPTY, getVersionBuildNO(), new String[]{ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Copy_Build_NO"), @@ -204,7 +205,7 @@ public class AboutPane extends JPanel { private String getBuildTitle() { return append(ProductConstants.APP_NAME, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_About_Version"), - StringUtils.BLANK, ProductConstants.RELEASE_VERSION, BUILD_PREFIX); + StringUtils.BLANK, ProductConstants.VERSION, BUILD_PREFIX); } private JPanel getEmailActionPane(final String desc, final String mailTo) { diff --git a/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateDialog.java b/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateDialog.java index d35b1dd543..e37877a4bb 100644 --- a/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateDialog.java +++ b/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateDialog.java @@ -79,7 +79,7 @@ class DesignerPushUpdateDialog extends UIDialog { private Model createModel(DesignerUpdateInfo updateInfo) { Model model = new Model(); - model.setVersion(updateInfo.getLatestVersion()); + model.setVersion(updateInfo.getLatestFullVersion()); model.setContent(updateInfo.getPushContent()); model.setMoreInfoUrl(updateInfo.getMoreInfoUrl()); model.setBackgroundUrl(updateInfo.getBackgroundUrl()); diff --git a/designer-base/src/main/java/com/fr/design/update/push/DesignerUpdateInfo.java b/designer-base/src/main/java/com/fr/design/update/push/DesignerUpdateInfo.java index 5d5e02a47f..fda62cab29 100644 --- a/designer-base/src/main/java/com/fr/design/update/push/DesignerUpdateInfo.java +++ b/designer-base/src/main/java/com/fr/design/update/push/DesignerUpdateInfo.java @@ -1,7 +1,10 @@ package com.fr.design.update.push; +import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; +import com.fr.general.http.HttpToolbox; import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; import java.security.InvalidParameterException; @@ -58,6 +61,25 @@ class DesignerUpdateInfo { return latestVersion; } + String getLatestFullVersion() { + try { + String url = CloudCenter.getInstance().acquireUrlByKind("jar10.newupdate"); + if (StringUtils.isBlank(url)) { + return StringUtils.EMPTY; + } + String res = HttpToolbox.get(url); + if (StringUtils.isBlank(res)) { + return StringUtils.EMPTY; + } + String version = new JSONObject(res).optString("version"); + String build = new JSONObject(res).optString("build"); + return version + "-" + build; + } catch (Throwable e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + return StringUtils.EMPTY; + } + String getLastIgnoredVersion() { return lastIgnoredVersion; }