Browse Source

Pull request #2040: REPORT-36778 【配合平台】版本号规范FR适配任务

Merge in DESIGN/design from ~HENRY.WANG/design:release/10.0 to release/10.0

* commit '81c21c6ee7ba9bc7cf1c5db96e4b06668ba3f50c':
  REPORT-36778 【配合平台】版本号规范FR适配任务
  REPORT-36778 【配合平台】版本号规范FR适配任务
  REPORT-36778 【配合平台】版本号规范FR适配任务
  REPORT-36778 【配合平台】版本号规范FR适配任务
  REPORT-36778 【配合平台】版本号规范FR适配任务
  REPORT-36200 【name63/user63】在控件右下方多次复制,并不会不断向右下复制
feature/big-screen
Henry.Wang 4 years ago
parent
commit
b642c782ed
  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. 27
      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());

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

@ -1,7 +1,12 @@
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.JSON;
import com.fr.json.JSONFactory;
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;
@ -14,6 +19,8 @@ class DesignerUpdateInfo {
private static final String KEY_CONTENT = "content"; private static final String KEY_CONTENT = "content";
private static final String KEY_BACKGROUND_URL = "background"; private static final String KEY_BACKGROUND_URL = "background";
private static final String KEY_MORE_INFO_URL = "more"; private static final String KEY_MORE_INFO_URL = "more";
private static final String SPLIT_CHAR = "-";
private final String currentVersion; // 当前版本 private final String currentVersion; // 当前版本
private final String latestVersion; // 最新版本 private final String latestVersion; // 最新版本
@ -58,6 +65,26 @@ class DesignerUpdateInfo {
return latestVersion; return latestVersion;
} }
String getLatestFullVersion() {
try {
String url = CloudCenter.getInstance().acquireUrlByKind("jar10.new.update");
if (StringUtils.isBlank(url)) {
return StringUtils.EMPTY;
}
String res = HttpToolbox.get(url);
if (StringUtils.isBlank(res)) {
return StringUtils.EMPTY;
}
JSONObject jsonObject = JSONFactory.createJSON(JSON.OBJECT, res);
String version = jsonObject.getString("version");
String build = jsonObject.getString("build");
return version + SPLIT_CHAR + build;
} catch (Throwable e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return StringUtils.EMPTY;
}
String getLastIgnoredVersion() { String getLastIgnoredVersion() {
return lastIgnoredVersion; return lastIgnoredVersion;
} }

Loading…
Cancel
Save