Browse Source

Pull request #10992: REPORT-87124 国际化设计器需要对服务平台做下隐藏 & REPORT-86482 更新日志获取时间范围问题

Merge in DESIGN/design from ~DESTINY.LIN/design:release/11.0 to release/11.0

* commit '42f9d5ee53dea2040500dff98449e32141cb0dbf':
  REPORT-86482 更新日志获取时间范围问题
  REPORT-87124 国际化设计器需要对服务平台做下隐藏
release/11.0
Destiny.Lin-林锦龙 2 years ago
parent
commit
9d99f4df92
  1. 7
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  2. 14
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

7
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -574,8 +574,11 @@ public abstract class ToolBarMenuDock {
}
shortCuts.add(new EnvDetectorAction());
//服务平台
shortCuts.add(new ServicePlatformAction());
//服务平台(仅针对中国大陆)
if (GeneralContext.getLocale().equals(Locale.CHINA)) {
shortCuts.add(new ServicePlatformAction());
}
shortCuts.add(SeparatorDef.DEFAULT);
if (DesignerEnvManager.getEnvManager().isOpenDebug()) {

14
designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

@ -488,7 +488,7 @@ public class UpdateMainDialog extends UIDialog {
continue;
}
}
if (isValidLogInfo(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]) && curJarDate != null) {
if (isValid(updateInfo, GeneralUtils.objectToString(curJarDate))) {
updateInfoList.add(new Object[]{UPDATELOG_FORMAT.format(updateTime), updateInfo[UpdateInfoTable.UPDATE_VERSION_INDEX], updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX], updateTime.after(curJarDate)});
}
}
@ -499,6 +499,11 @@ public class UpdateMainDialog extends UIDialog {
}
}
private boolean isValid(String[] updateInfo, String curJarDate) {
return isValidLogInfo(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]) && curJarDate != null && curJarDate.compareTo(updateInfo[UpdateInfoTable.UPDATE_DATE_INDEX]) <= 0;
}
private void updateCachedInfoFile(JSONArray jsonArray) throws Exception {
String cacheDirPath = StableUtils.pathJoin(WorkContext.getCurrent().getPath(), "resources", "offlineres");
File cacheFileDir = new File(cacheDirPath);
@ -554,13 +559,18 @@ public class UpdateMainDialog extends UIDialog {
continue;
}
}
if (isValidLogInfo(updateTitle)) {
Date curDate = UPDATE_INFO_TABLE_FORMAT.parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1));
if (isValid4GenerateInfo(updateTitle, GeneralUtils.objectToString(curDate), updateTimeStr)) {
updateInfoList.add(new Object[]{updateTimeStr, updateVersionStr, updateTitle, updateTime.after(curJarDate)});
}
}
return new ArrayList<>(updateInfoList);
}
private boolean isValid4GenerateInfo(String updateTitle, String curDate, String updateTimeStr) {
return isValidLogInfo(updateTitle) && curDate.compareTo(updateTimeStr) <= 0;
}
private boolean containsKeyword(String str, String keyword) {
return str.toUpperCase().contains(keyword.toUpperCase());
}

Loading…
Cancel
Save