Browse Source

REPORT-36778 【配合平台】版本号规范FR适配任务

feature/big-screen
Henry.Wang 4 years ago
parent
commit
b29ee8d713
  1. 5
      designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java
  2. 2
      designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateDialog.java
  3. 22
      designer-base/src/main/java/com/fr/design/update/push/DesignerUpdateInfo.java

5
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(); JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
centerPane.add(contentPane, BorderLayout.NORTH); centerPane.add(contentPane, BorderLayout.NORTH);
contentPane.add(new BoxCenterAligmentPane(getBuildTitle()));
BoxCenterAlignmentCopyablePane buildCopyPane = new BoxCenterAlignmentCopyablePane( BoxCenterAlignmentCopyablePane buildCopyPane = new BoxCenterAlignmentCopyablePane(
getBuildTitle(), StringUtils.EMPTY,
getVersionBuildNO(), getVersionBuildNO(),
new String[]{ new String[]{
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Copy_Build_NO"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Copy_Build_NO"),
@ -204,7 +205,7 @@ public class AboutPane extends JPanel {
private String getBuildTitle() { private String getBuildTitle() {
return append(ProductConstants.APP_NAME, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_About_Version"), 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) { private JPanel getEmailActionPane(final String desc, final String mailTo) {

2
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) { private Model createModel(DesignerUpdateInfo updateInfo) {
Model model = new Model(); Model model = new Model();
model.setVersion(updateInfo.getLatestVersion()); model.setVersion(updateInfo.getLatestFullVersion());
model.setContent(updateInfo.getPushContent()); model.setContent(updateInfo.getPushContent());
model.setMoreInfoUrl(updateInfo.getMoreInfoUrl()); model.setMoreInfoUrl(updateInfo.getMoreInfoUrl());
model.setBackgroundUrl(updateInfo.getBackgroundUrl()); model.setBackgroundUrl(updateInfo.getBackgroundUrl());

22
designer-base/src/main/java/com/fr/design/update/push/DesignerUpdateInfo.java

@ -1,7 +1,10 @@
package com.fr.design.update.push; package com.fr.design.update.push;
import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.http.HttpToolbox;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import java.security.InvalidParameterException; import java.security.InvalidParameterException;
@ -58,6 +61,25 @@ class DesignerUpdateInfo {
return latestVersion; 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() { String getLastIgnoredVersion() {
return lastIgnoredVersion; return lastIgnoredVersion;
} }

Loading…
Cancel
Save