Browse Source

Merge pull request #848 in DESIGN/design from ~PLOUGH/10-design:feature/10.0 to feature/10.0

* commit '7ff0be3a09669f35993f3b164b850671f4f3bb2f':
  REPORT-16458 设计器中更新日志推送弹框显示不全=>显示更多新特性
  REPORT-16458 设计器中更新日志推送弹框显示不全=>文字不全
  REPORT-14865 更新日志推送=>显示最新版本号
research/10.0
plough 6 years ago
parent
commit
0d17eddcfe
  1. 16
      designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateDialog.java
  2. 14
      designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.css
  3. 12
      designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.js

16
designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateDialog.java

@ -16,6 +16,7 @@ import com.fr.web.struct.category.StylePath;
import com.fr.web.struct.impl.FineUI; import com.fr.web.struct.impl.FineUI;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Frame; import java.awt.Frame;
@ -34,10 +35,15 @@ class DesignerPushUpdateDialog extends UIDialog {
initComponents(); initComponents();
} }
static void createAndShow(Frame parent, DesignerUpdateInfo updateInfo) { static void createAndShow(final Frame parent, final DesignerUpdateInfo updateInfo) {
DesignerPushUpdateDialog dialog = new DesignerPushUpdateDialog(parent); SwingUtilities.invokeLater(new Runnable() {
dialog.populate(updateInfo); public void run() {
dialog.showDialog(); DesignerPushUpdateDialog dialog = new DesignerPushUpdateDialog(parent);
dialog.populate(updateInfo);
dialog.showDialog();
}
});
} }
private void initComponents() { private void initComponents() {
@ -72,7 +78,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.getPushVersion()); model.setVersion(updateInfo.getLatestVersion());
model.setContent(updateInfo.getPushContent()); model.setContent(updateInfo.getPushContent());
model.setMoreInfoUrl(updateInfo.getMoreInfoUrl()); model.setMoreInfoUrl(updateInfo.getMoreInfoUrl());
model.setBackgroundUrl(updateInfo.getBackgroundUrl()); model.setBackgroundUrl(updateInfo.getBackgroundUrl());

14
designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.css

@ -4,6 +4,8 @@ body {
color: white; color: white;
background-size: 100% 100% !important; background-size: 100% 100% !important;
-moz-background-size: 100% 100% !important; -moz-background-size: 100% 100% !important;
font-family: PingFangSC-Regular, Georgia, "Nimbus Roman No9 L", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif !important;
} }
.close-btn { .close-btn {
@ -24,15 +26,17 @@ body {
color: white !important; color: white !important;
} }
.font-bold {
font-weight: bold;
}
.title { .title {
font-family: PingFangSC-Semibold;
font-size: 24px; font-size: 24px;
letter-spacing: 1.5px; letter-spacing: 1.5px;
line-height: 24px; line-height: 24px;
} }
.version { .version {
font-family: PingFangSC-Semibold;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
margin-top: 6px; margin-top: 6px;
@ -40,9 +44,8 @@ body {
.desc { .desc {
margin-top: 40px; margin-top: 40px;
font-family: PingFangSC-Regular;
font-size: 13px; font-size: 13px;
width: 540px; width: 82%;
margin-left: 19px; margin-left: 19px;
text-indent: -19px; text-indent: -19px;
overflow: visible !important; overflow: visible !important;
@ -54,7 +57,6 @@ body {
.moreInfo { .moreInfo {
margin-top: 20px; margin-top: 20px;
font-family: PingFangSC-Regular;
font-size: 13px; font-size: 13px;
text-decoration: underline; text-decoration: underline;
} }
@ -65,7 +67,7 @@ body {
} }
.buttonGroup .bi-button { .buttonGroup .bi-button {
font-family: PingFangSC-Medium; font-weight: 600;
font-size: 11px; font-size: 11px;
text-align: center; text-align: center;
line-height: 12px; line-height: 12px;

12
designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.js

@ -33,13 +33,13 @@ function getTitleArea() {
{ {
type: "bi.label", type: "bi.label",
text: i18nText("Fine-Design_Find_New_Version"), text: i18nText("Fine-Design_Find_New_Version"),
cls: "title", cls: "title font-bold",
textAlign: "left" textAlign: "left"
}, },
{ {
type: "bi.label", type: "bi.label",
text: Pool.data.getVersion(), text: Pool.data.getVersion(),
cls: "version", cls: "version font-bold",
textAlign: "left" textAlign: "left"
} }
] ]
@ -126,13 +126,7 @@ function getShowItems() {
var buttonGroup = getButtonGroup(); var buttonGroup = getButtonGroup();
var showItems = [title, closeButton, descArea]; return [title, closeButton, descArea, moreInfo, buttonGroup];
if (descList.length > MAX_DESC_NUM) {
showItems.push(moreInfo);
}
showItems.push(buttonGroup);
return showItems;
} }
window.addEventListener("load", function (ev) { window.addEventListener("load", function (ev) {

Loading…
Cancel
Save