Browse Source

REPORT-58009 【主题切换】远程设置模板主题页面的,模板主题管理入口没有屏蔽

【问题原因】
链接至远程工作目录且无权限时,屏蔽主题管理对话框入口

【改动思路】
同上
research/11.0
Starryi 3 years ago
parent
commit
5b4553eabf
  1. 11
      designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java

11
designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java

@ -12,6 +12,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.theme.TemplateThemeListPane; import com.fr.design.mainframe.theme.TemplateThemeListPane;
import com.fr.design.mainframe.theme.ui.BorderUtils; import com.fr.design.mainframe.theme.ui.BorderUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -26,7 +27,8 @@ import java.awt.event.ActionListener;
* @version 1.0 * @version 1.0
* Created by Starryi on 2021/8/13 * Created by Starryi on 2021/8/13
*/ */
public class TemplateThemeUsingDialog<T extends TemplateTheme> extends TemplateThemeDialog { public class
TemplateThemeUsingDialog<T extends TemplateTheme> extends TemplateThemeDialog {
public static final int CONTENT_WIDTH = 660; public static final int CONTENT_WIDTH = 660;
public static final int CONTENT_HEIGHT = 515; public static final int CONTENT_HEIGHT = 515;
@ -107,10 +109,7 @@ public class TemplateThemeUsingDialog<T extends TemplateTheme> extends TemplateT
} }
private UIButton createOpenThemeManagerButton() { private UIButton createOpenThemeManagerButton() {
if (DesignModeContext.isAuthorityEditing()) { if (WorkContext.getCurrent().isRoot()) {
// 权限编辑模式下,不显示打开主题管理对话框的按钮
return null;
}
UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Title")); UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Title"));
button.addActionListener(new ActionListener() { button.addActionListener(new ActionListener() {
@Override @Override
@ -121,6 +120,8 @@ public class TemplateThemeUsingDialog<T extends TemplateTheme> extends TemplateT
}); });
return button; return button;
} }
return null;
}
private UIButton createUsingCurrentThemeButton() { private UIButton createUsingCurrentThemeButton() {
UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Using_Dialog_Use")); UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Using_Dialog_Use"));

Loading…
Cancel
Save