refactor(ui): implement design tokens and eliminate hardcoded hex colors
This commit is contained in:
@@ -114,7 +114,7 @@ public final class MainAppView {
|
||||
brandFooter.setAlignment(Pos.CENTER);
|
||||
Node smallLogo = SvgIcons.cyberShieldLogo(16);
|
||||
Label lblBrandFoot = new Label("CyberCore");
|
||||
lblBrandFoot.setStyle("-fx-font-weight: bold; -fx-font-size: 11.5px;");
|
||||
lblBrandFoot.getStyleClass().addAll("cyber-version-label", "text-bold");
|
||||
brandFooter.getChildren().addAll(smallLogo, lblBrandFoot);
|
||||
|
||||
Label lblVersion = new Label("v" + CyberCoreUiConstants.APP_VERSION);
|
||||
@@ -174,15 +174,13 @@ public final class MainAppView {
|
||||
brandRow.setAlignment(Pos.CENTER_LEFT);
|
||||
|
||||
Label lblAssinador = new Label("ASSINADOR");
|
||||
lblAssinador.getStyleClass().addAll("cyber-brand-title", "serpro-header-title");
|
||||
lblAssinador.setStyle("-fx-font-weight: 300; -fx-opacity: 0.85;");
|
||||
lblAssinador.getStyleClass().addAll("cyber-brand-title", "serpro-header-title", "cyber-brand-prefix");
|
||||
|
||||
Label lblSep = new Label("|");
|
||||
lblSep.setStyle("-fx-font-size: 16px; -fx-opacity: 0.4;");
|
||||
lblSep.getStyleClass().add("cyber-brand-separator");
|
||||
|
||||
Label lblBrand = new Label("CyberCore");
|
||||
lblBrand.getStyleClass().addAll("cyber-brand-title", "serpro-header-brand");
|
||||
lblBrand.setStyle("-fx-font-weight: bold;");
|
||||
lblBrand.getStyleClass().addAll("cyber-brand-title", "serpro-header-brand", "text-bold");
|
||||
|
||||
brandRow.getChildren().addAll(lblAssinador, lblSep, lblBrand);
|
||||
|
||||
@@ -225,7 +223,7 @@ public final class MainAppView {
|
||||
iconBox.setAlignment(Pos.CENTER);
|
||||
|
||||
Label label = new Label(dark ? "Modo Claro" : "Modo Escuro");
|
||||
label.setStyle("-fx-font-size: 11.5px; -fx-font-weight: bold;");
|
||||
label.getStyleClass().add("text-bold");
|
||||
|
||||
content.getChildren().addAll(iconBox, label);
|
||||
themeToggleBtn.setGraphic(content);
|
||||
|
||||
+12
-13
@@ -167,15 +167,15 @@ public final class PdfCertificateSignDialog {
|
||||
summaryGrid.setVgap(6);
|
||||
|
||||
Label lblDocTitle = new Label("Arquivo:");
|
||||
lblDocTitle.setStyle("-fx-font-weight: bold; -fx-text-fill: -fx-text-secondary; -fx-font-size: 11.5px;");
|
||||
lblDocTitle.getStyleClass().addAll("form-label-muted", "text-bold");
|
||||
Label lblDocValue = new Label(sourcePdfFile.getName() + " (" + (sourcePdfFile.length() / 1024) + " KB)");
|
||||
lblDocValue.setStyle("-fx-font-weight: bold; -fx-text-fill: -fx-text-primary; -fx-font-size: 11.5px;");
|
||||
lblDocValue.getStyleClass().addAll("form-label", "text-bold");
|
||||
lblDocValue.setWrapText(true);
|
||||
|
||||
Label lblSealTitle = new Label("Selo Visual:");
|
||||
lblSealTitle.setStyle("-fx-font-weight: bold; -fx-text-fill: -fx-text-secondary; -fx-font-size: 11.5px;");
|
||||
lblSealTitle.getStyleClass().addAll("form-label-muted", "text-bold");
|
||||
Label lblSealValue = new Label(sealSummaryText);
|
||||
lblSealValue.setStyle("-fx-text-fill: #0284c7; -fx-font-weight: bold; -fx-font-size: 11.5px;");
|
||||
lblSealValue.getStyleClass().addAll("text-primary", "text-bold");
|
||||
lblSealValue.setWrapText(true);
|
||||
|
||||
summaryGrid.add(lblDocTitle, 0, 0);
|
||||
@@ -237,13 +237,12 @@ public final class PdfCertificateSignDialog {
|
||||
}
|
||||
});
|
||||
|
||||
// Banner informativo para certificados da Loja do Windows (sem PIN)
|
||||
windowsStoreBox = new HBox(8);
|
||||
windowsStoreBox.setAlignment(Pos.CENTER_LEFT);
|
||||
windowsStoreBox.setPadding(new Insets(10, 12, 10, 12));
|
||||
windowsStoreBox.setStyle("-fx-background-color: #ecfdf5; -fx-border-color: #a7f3d0; -fx-border-radius: 6px; -fx-background-radius: 6px;");
|
||||
windowsStoreBox.getStyleClass().add("status-badge-valid");
|
||||
Label lblWinNotice = new Label("✓ Certificado instalado no computador — Gerenciado nativamente pelo Windows (PIN não necessário)");
|
||||
lblWinNotice.setStyle("-fx-text-fill: #065f46; -fx-font-weight: bold; -fx-font-size: 11.5px;");
|
||||
lblWinNotice.getStyleClass().addAll("text-success", "text-bold");
|
||||
lblWinNotice.setWrapText(true);
|
||||
HBox.setHgrow(lblWinNotice, Priority.ALWAYS);
|
||||
windowsStoreBox.getChildren().add(lblWinNotice);
|
||||
@@ -282,9 +281,9 @@ public final class PdfCertificateSignDialog {
|
||||
|
||||
VBox tipBox = new VBox(2);
|
||||
tipBox.setPadding(new Insets(8, 10, 8, 10));
|
||||
tipBox.setStyle("-fx-background-color: -fx-bg-primary; -fx-border-color: -fx-border-light; -fx-border-radius: 6px; -fx-background-radius: 6px;");
|
||||
tipBox.getStyleClass().add("dialog-box");
|
||||
Label lblTip = new Label("🔒 Segurança: O PIN é criptografado localmente com AES-256-GCM vinculado à máquina e nunca é transmitido na rede.");
|
||||
lblTip.setStyle("-fx-font-size: 11px; -fx-text-fill: -fx-text-secondary;");
|
||||
lblTip.getStyleClass().add("text-muted");
|
||||
lblTip.setWrapText(true);
|
||||
lblTip.setMaxWidth(Double.MAX_VALUE);
|
||||
tipBox.getChildren().add(lblTip);
|
||||
@@ -381,7 +380,7 @@ public final class PdfCertificateSignDialog {
|
||||
chkRememberPin.setManaged(false);
|
||||
btnClearRememberedPin.setVisible(true);
|
||||
lblPinNotice.setText("✓ PIN lembrado com segurança neste computador");
|
||||
lblPinNotice.setStyle("-fx-text-fill: #10b981; -fx-font-weight: bold; -fx-font-size: 11.5px;");
|
||||
lblPinNotice.getStyleClass().setAll("label", "text-success", "text-bold");
|
||||
} else {
|
||||
pinField.clear();
|
||||
pinField.setDisable(false);
|
||||
@@ -390,7 +389,7 @@ public final class PdfCertificateSignDialog {
|
||||
btnClearRememberedPin.setVisible(false);
|
||||
boolean isA3 = cert.type() == CertificateType.A3;
|
||||
lblPinNotice.setText(isA3 ? "Requer PIN do token" : "Requer senha do certificado");
|
||||
lblPinNotice.setStyle("-fx-text-fill: -fx-text-secondary; -fx-font-size: 11.5px;");
|
||||
lblPinNotice.getStyleClass().setAll("label", "text-muted");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -483,7 +482,7 @@ public final class PdfCertificateSignDialog {
|
||||
setFormDisabled(false);
|
||||
progressIndicator.setVisible(false);
|
||||
lblStatus.setText("✓ Documento assinado com sucesso!");
|
||||
lblStatus.setStyle("-fx-text-fill: #10b981; -fx-font-weight: bold;");
|
||||
lblStatus.getStyleClass().setAll("label", "text-success", "text-bold");
|
||||
|
||||
// Salva o PIN de forma segura se solicitado pelo usuário
|
||||
if (!isWindowsStore && chkRememberPin.isSelected() && enteredPin != null && enteredPin.length > 0) {
|
||||
@@ -508,7 +507,7 @@ public final class PdfCertificateSignDialog {
|
||||
}
|
||||
|
||||
lblStatus.setText("✕ Falha na assinatura");
|
||||
lblStatus.setStyle("-fx-text-fill: #ef4444; -fx-font-weight: bold;");
|
||||
lblStatus.getStyleClass().setAll("label", "text-danger", "text-bold");
|
||||
|
||||
showAlert(Alert.AlertType.ERROR, "Erro na Assinatura do PDF",
|
||||
"Não foi possível concluir a assinatura digital:\n" + (ex != null ? ex.getMessage() : "Erro desconhecido"));
|
||||
|
||||
+6
-7
@@ -276,7 +276,7 @@ public final class PdfSignDialog {
|
||||
HBox btnNextContent = new HBox(8);
|
||||
btnNextContent.setAlignment(Pos.CENTER);
|
||||
Label lblBtnNextText = new Label("Avançar");
|
||||
lblBtnNextText.setStyle("-fx-font-weight: bold; -fx-font-size: 12px; -fx-text-fill: #ffffff;");
|
||||
lblBtnNextText.getStyleClass().add("text-bold");
|
||||
btnNextContent.getChildren().addAll(lblBtnNextText, SvgIcons.arrowRightIcon(12));
|
||||
|
||||
btnNextToCert = new Button();
|
||||
@@ -325,11 +325,10 @@ public final class PdfSignDialog {
|
||||
HBox themeHeader = new HBox(8);
|
||||
themeHeader.setAlignment(Pos.CENTER_LEFT);
|
||||
Label lblDefaultBadge = new Label("★ PADRÃO");
|
||||
lblDefaultBadge.setStyle("-fx-background-color: #0284c7; -fx-text-fill: #ffffff; -fx-padding: 2px 6px; -fx-background-radius: 4px; -fx-font-weight: bold; -fx-font-size: 10px;");
|
||||
lblDefaultBadge.getStyleClass().add("badge-primary");
|
||||
|
||||
lblSealThemeName = new Label();
|
||||
lblSealThemeName.getStyleClass().add("cert-title");
|
||||
lblSealThemeName.setStyle("-fx-font-size: 12.5px; -fx-font-weight: bold;");
|
||||
lblSealThemeName.getStyleClass().addAll("cert-title", "text-bold");
|
||||
themeHeader.getChildren().addAll(lblDefaultBadge, lblSealThemeName);
|
||||
|
||||
lblSealThemeDesc = new Label();
|
||||
@@ -538,7 +537,7 @@ public final class PdfSignDialog {
|
||||
|
||||
pageSheetContainer = new StackPane();
|
||||
pageSheetContainer.setAlignment(Pos.TOP_LEFT);
|
||||
pageSheetContainer.setStyle("-fx-background-color: #ffffff; -fx-border-color: #94a3b8; -fx-border-width: 1px;");
|
||||
pageSheetContainer.getStyleClass().add("preview-box");
|
||||
DropShadow sheetShadow = new DropShadow(16, 0, 4, Color.rgb(0, 0, 0, 0.30));
|
||||
pageSheetContainer.setEffect(sheetShadow);
|
||||
updateContainerZoomDimensions();
|
||||
@@ -684,11 +683,11 @@ public final class PdfSignDialog {
|
||||
if (btnToggleResize != null) {
|
||||
if (isResizeModeActive) {
|
||||
btnToggleResize.setText("✓ Concluir");
|
||||
btnToggleResize.setStyle("-fx-background-color: #0284c7; -fx-text-fill: white; -fx-font-weight: bold;");
|
||||
btnToggleResize.getStyleClass().setAll("btn-primary");
|
||||
lblPositionFeedback.setText("👉 Puxe a alça azul no canto do selo para ajustar o tamanho");
|
||||
} else {
|
||||
btnToggleResize.setText("📏 Redimensionar");
|
||||
btnToggleResize.setStyle("");
|
||||
btnToggleResize.getStyleClass().setAll("btn-secondary");
|
||||
updateFeedbackLabel();
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -276,7 +276,7 @@ public final class SealDesignerDialog {
|
||||
logoBtnRow.setAlignment(Pos.CENTER_LEFT);
|
||||
|
||||
lblLogoStatus = new Label("Nenhum logotipo carregado (usando emblema vetorial)");
|
||||
lblLogoStatus.setStyle("-fx-font-size: 11px; -fx-text-fill: #64748b;");
|
||||
lblLogoStatus.getStyleClass().add("text-muted");
|
||||
|
||||
Label lblFallbackIcon = new Label("Emblema Vetorial Alternativo (caso sem logo própria):");
|
||||
lblFallbackIcon.getStyleClass().add("form-label");
|
||||
@@ -341,7 +341,7 @@ public final class SealDesignerDialog {
|
||||
lblPreviewTitle.getStyleClass().add("dialog-field-title");
|
||||
|
||||
Label lblPreviewNotice = new Label("O selo sempre exibe o nome completo do signatário com destaque e máxima legibilidade.");
|
||||
lblPreviewNotice.setStyle("-fx-font-size: 11px; -fx-text-fill: #94a3b8;");
|
||||
lblPreviewNotice.getStyleClass().add("text-muted");
|
||||
lblPreviewNotice.setWrapText(true);
|
||||
|
||||
previewImageView = new ImageView();
|
||||
@@ -351,7 +351,7 @@ public final class SealDesignerDialog {
|
||||
HBox previewContainer = new HBox(previewImageView);
|
||||
previewContainer.setAlignment(Pos.CENTER);
|
||||
previewContainer.setPadding(new Insets(16, 8, 16, 8));
|
||||
previewContainer.setStyle("-fx-background-color: #090d16; -fx-background-radius: 8px; -fx-border-color: #334155; -fx-border-radius: 8px;");
|
||||
previewContainer.getStyleClass().add("preview-box");
|
||||
|
||||
VBox previewContentBox = new VBox(10);
|
||||
previewContentBox.setAlignment(Pos.CENTER);
|
||||
@@ -442,7 +442,7 @@ public final class SealDesignerDialog {
|
||||
byte[] bytes = Files.readAllBytes(file.toPath());
|
||||
customLogoBase64 = Base64.getEncoder().encodeToString(bytes);
|
||||
lblLogoStatus.setText("✓ Imagem carregada: " + file.getName());
|
||||
lblLogoStatus.setStyle("-fx-font-size: 11px; -fx-text-fill: #16a34a; -fx-font-weight: bold;");
|
||||
lblLogoStatus.getStyleClass().setAll("label", "text-success", "text-bold");
|
||||
btnClearLogo.setDisable(false);
|
||||
updatePreview();
|
||||
} catch (Exception ex) {
|
||||
@@ -454,7 +454,7 @@ public final class SealDesignerDialog {
|
||||
private void handleClearLogo() {
|
||||
customLogoBase64 = null;
|
||||
lblLogoStatus.setText("Nenhum logotipo carregado (usando emblema vetorial)");
|
||||
lblLogoStatus.setStyle("-fx-font-size: 11px; -fx-text-fill: #64748b;");
|
||||
lblLogoStatus.getStyleClass().setAll("label", "text-muted");
|
||||
btnClearLogo.setDisable(true);
|
||||
updatePreview();
|
||||
}
|
||||
@@ -524,12 +524,12 @@ public final class SealDesignerDialog {
|
||||
if (theme.customLogoBase64() != null && !theme.customLogoBase64().isBlank()) {
|
||||
this.customLogoBase64 = theme.customLogoBase64();
|
||||
lblLogoStatus.setText("✓ Logotipo carregado com sucesso!");
|
||||
lblLogoStatus.setStyle("-fx-font-size: 11px; -fx-text-fill: #16a34a; -fx-font-weight: bold;");
|
||||
lblLogoStatus.getStyleClass().setAll("label", "text-success", "text-bold");
|
||||
btnClearLogo.setDisable(false);
|
||||
} else {
|
||||
this.customLogoBase64 = null;
|
||||
lblLogoStatus.setText("Nenhum logotipo carregado (usando emblema vetorial)");
|
||||
lblLogoStatus.setStyle("-fx-font-size: 11px; -fx-text-fill: #64748b;");
|
||||
lblLogoStatus.getStyleClass().setAll("label", "text-muted");
|
||||
btnClearLogo.setDisable(true);
|
||||
}
|
||||
|
||||
|
||||
+12
-16
@@ -118,7 +118,7 @@ public final class SealManagementDialog {
|
||||
|
||||
listViewSeals = new ListView<>();
|
||||
VBox.setVgrow(listViewSeals, Priority.ALWAYS);
|
||||
listViewSeals.setStyle("-fx-background-color: transparent; -fx-background-radius: 6px;");
|
||||
listViewSeals.getStyleClass().add("cyber-scroll-pane");
|
||||
listViewSeals.setCellFactory(lv -> new SealListCell());
|
||||
listViewSeals.getSelectionModel().selectedItemProperty().addListener((obs, oldV, newV) -> onThemeSelected(newV));
|
||||
|
||||
@@ -153,10 +153,10 @@ public final class SealManagementDialog {
|
||||
lblPreviewHeader.getStyleClass().add("dialog-field-title");
|
||||
|
||||
lblSelectedName = new Label("Selecione um selo para visualizar");
|
||||
lblSelectedName.setStyle("-fx-font-weight: bold; -fx-font-size: 14px;");
|
||||
lblSelectedName.getStyleClass().add("dialog-header-title");
|
||||
|
||||
lblSelectedDesc = new Label("");
|
||||
lblSelectedDesc.setStyle("-fx-font-size: 11.5px; -fx-text-fill: #64748b;");
|
||||
lblSelectedDesc.getStyleClass().add("text-muted");
|
||||
lblSelectedDesc.setWrapText(true);
|
||||
|
||||
previewImageView = new ImageView();
|
||||
@@ -166,14 +166,14 @@ public final class SealManagementDialog {
|
||||
HBox previewContainer = new HBox(previewImageView);
|
||||
previewContainer.setAlignment(Pos.CENTER);
|
||||
previewContainer.setPadding(new Insets(14, 10, 14, 10));
|
||||
previewContainer.setStyle("-fx-background-color: #090d16; -fx-background-radius: 8px; -fx-border-color: #334155; -fx-border-radius: 8px;");
|
||||
previewContainer.getStyleClass().add("preview-box");
|
||||
VBox.setVgrow(previewContainer, Priority.ALWAYS);
|
||||
|
||||
lblActiveBadge = new Label("");
|
||||
lblActiveBadge.setStyle("-fx-font-weight: bold; -fx-font-size: 12px;");
|
||||
lblActiveBadge.getStyleClass().add("text-bold");
|
||||
|
||||
lblFeedback = new Label("");
|
||||
lblFeedback.setStyle("-fx-font-size: 12px; -fx-font-weight: bold; -fx-text-fill: #16a34a;");
|
||||
lblFeedback.getStyleClass().addAll("text-success", "text-bold");
|
||||
|
||||
// Botões de Ação do Selo Selecionado
|
||||
VBox sealActions = new VBox(8);
|
||||
@@ -271,16 +271,14 @@ public final class SealManagementDialog {
|
||||
boolean isDefault = theme.id().equalsIgnoreCase(currentDefaultThemeId);
|
||||
if (isDefault) {
|
||||
lblActiveBadge.setText("★ ESTE É O SELO PADRÃO ATIVO PARA TODAS AS ASSINATURAS");
|
||||
lblActiveBadge.setStyle("-fx-text-fill: #38bdf8; -fx-font-weight: bold; -fx-font-size: 11.5px;");
|
||||
lblActiveBadge.getStyleClass().setAll("label", "text-primary", "text-bold");
|
||||
btnSetDefault.setText("★ Selo Padrão Ativo no Sistema");
|
||||
btnSetDefault.setDisable(true);
|
||||
btnSetDefault.setStyle("-fx-opacity: 0.95; -fx-background-color: #0369a1; -fx-text-fill: #ffffff; -fx-font-weight: bold;");
|
||||
} else {
|
||||
lblActiveBadge.setText("Selo disponível para uso.");
|
||||
lblActiveBadge.setStyle("-fx-text-fill: #94a3b8; -fx-font-size: 11.5px;");
|
||||
lblActiveBadge.getStyleClass().setAll("label", "text-muted");
|
||||
btnSetDefault.setText("✔ Definir como Selo Padrão Ativo");
|
||||
btnSetDefault.setDisable(false);
|
||||
btnSetDefault.setStyle("");
|
||||
}
|
||||
|
||||
btnEditClone.setDisable(false);
|
||||
@@ -460,14 +458,14 @@ public final class SealManagementDialog {
|
||||
|
||||
VBox textBox = new VBox(2);
|
||||
Label lblName = new Label(item.name());
|
||||
lblName.setStyle("-fx-font-weight: bold; -fx-font-size: 12.5px;");
|
||||
lblName.getStyleClass().add("cert-title");
|
||||
lblName.maxWidthProperty().bind(listViewSeals.widthProperty().subtract(120));
|
||||
lblName.setWrapText(true);
|
||||
|
||||
String desc = (item.description() != null && !item.description().isBlank())
|
||||
? item.description() : "Identidade visual de assinatura";
|
||||
Label lblDesc = new Label(desc);
|
||||
lblDesc.setStyle("-fx-font-size: 11px; -fx-text-fill: #64748b;");
|
||||
lblDesc.getStyleClass().add("cert-detail");
|
||||
lblDesc.maxWidthProperty().bind(listViewSeals.widthProperty().subtract(120));
|
||||
lblDesc.setWrapText(true);
|
||||
|
||||
@@ -480,14 +478,12 @@ public final class SealManagementDialog {
|
||||
boolean isDefault = item.id().equalsIgnoreCase(currentDefaultThemeId);
|
||||
if (isDefault) {
|
||||
Label badgeDefault = new Label("★ PADRÃO");
|
||||
badgeDefault.setStyle("-fx-background-color: #0284c7; -fx-text-fill: #ffffff; -fx-font-size: 9.5px; -fx-font-weight: bold; -fx-padding: 2px 6px; -fx-background-radius: 4px;");
|
||||
badgeDefault.getStyleClass().add("badge-primary");
|
||||
badgesBox.getChildren().add(badgeDefault);
|
||||
}
|
||||
|
||||
Label badgeType = new Label(item.isCustom() ? "Personalizado" : "Sistema");
|
||||
badgeType.setStyle(item.isCustom()
|
||||
? "-fx-background-color: #fef3c7; -fx-text-fill: #b45309; -fx-font-size: 9.5px; -fx-padding: 2px 6px; -fx-background-radius: 4px;"
|
||||
: "-fx-background-color: #e0f2fe; -fx-text-fill: #0369a1; -fx-font-size: 9.5px; -fx-padding: 2px 6px; -fx-background-radius: 4px;");
|
||||
badgeType.getStyleClass().add(item.isCustom() ? "cert-badge-a3" : "cert-badge-a1");
|
||||
badgesBox.getChildren().add(badgeType);
|
||||
|
||||
card.getChildren().addAll(textBox, badgesBox);
|
||||
|
||||
+7
-12
@@ -53,7 +53,7 @@ public final class SettingsView extends VBox {
|
||||
Label subtitleLabel = new Label("Parâmetros de segurança local, identidade visual dos selos e aplicações autorizadas.");
|
||||
subtitleLabel.getStyleClass().add("brand-subtitle");
|
||||
|
||||
saveFeedbackLabel.setStyle("-fx-text-fill: #10b981; -fx-font-size: 11.5px; -fx-font-weight: bold;");
|
||||
saveFeedbackLabel.getStyleClass().addAll("text-success", "text-bold");
|
||||
|
||||
headerBox.getChildren().addAll(titleLabel, subtitleLabel, saveFeedbackLabel);
|
||||
|
||||
@@ -126,10 +126,9 @@ public final class SettingsView extends VBox {
|
||||
|
||||
Button btnClearPins = new Button("Limpar PINs Salvos (Sessão e Computador)");
|
||||
btnClearPins.getStyleClass().add("btn-secondary");
|
||||
btnClearPins.setStyle("-fx-padding: 6px 14px; -fx-font-size: 12px;");
|
||||
|
||||
Label pinStatusLabel = new Label();
|
||||
pinStatusLabel.setStyle("-fx-text-fill: #34d399; -fx-font-size: 12px;");
|
||||
pinStatusLabel.getStyleClass().add("text-success");
|
||||
|
||||
btnClearPins.setOnAction(e -> {
|
||||
PinSessionManager.getInstance().clearAll();
|
||||
@@ -152,12 +151,11 @@ public final class SettingsView extends VBox {
|
||||
sealHeaderRow.setAlignment(Pos.CENTER_LEFT);
|
||||
|
||||
Label lblSealsDesc = new Label("Gerencie os temas e identidades gráficas instaladas para assinaturas PDF:");
|
||||
lblSealsDesc.setStyle("-fx-text-fill: #94a3b8; -fx-font-size: 12px;");
|
||||
lblSealsDesc.getStyleClass().add("text-muted");
|
||||
HBox.setHgrow(lblSealsDesc, Priority.ALWAYS);
|
||||
|
||||
Button btnCreateSeal = new Button("🎨 Criar ou Instalar Selo...");
|
||||
btnCreateSeal.getStyleClass().add("btn-primary");
|
||||
btnCreateSeal.setStyle("-fx-padding: 6px 14px; -fx-font-size: 12px;");
|
||||
btnCreateSeal.setOnAction(e -> openSealDesigner());
|
||||
|
||||
sealHeaderRow.getChildren().addAll(lblSealsDesc, btnCreateSeal);
|
||||
@@ -176,7 +174,7 @@ public final class SettingsView extends VBox {
|
||||
ScrollPane scrollApps = new ScrollPane(appsContainer);
|
||||
scrollApps.setFitToWidth(true);
|
||||
scrollApps.setPrefHeight(150);
|
||||
scrollApps.setStyle("-fx-background: transparent; -fx-background-color: transparent;");
|
||||
scrollApps.getStyleClass().add("cyber-scroll-pane");
|
||||
|
||||
appsBox.getChildren().addAll(appsTitle, scrollApps);
|
||||
|
||||
@@ -222,12 +220,11 @@ public final class SettingsView extends VBox {
|
||||
|
||||
if (isDefault) {
|
||||
Label badgeDefault = new Label("★ PADRÃO");
|
||||
badgeDefault.setStyle("-fx-background-color: #0284c7; -fx-text-fill: #ffffff; -fx-padding: 3px 8px; -fx-background-radius: 4px; -fx-font-weight: bold; -fx-font-size: 11px;");
|
||||
badgeDefault.getStyleClass().add("badge-primary");
|
||||
item.getChildren().add(badgeDefault);
|
||||
} else {
|
||||
Button btnSetDefault = new Button("★ Definir Padrão");
|
||||
btnSetDefault.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||
btnSetDefault.setStyle("-fx-padding: 3px 8px; -fx-font-size: 11px;");
|
||||
btnSetDefault.setOnAction(e -> {
|
||||
AgentConfiguration current = configService.getConfig();
|
||||
configService.updateConfig(new AgentConfiguration(
|
||||
@@ -247,8 +244,7 @@ public final class SettingsView extends VBox {
|
||||
|
||||
if (theme.isCustom()) {
|
||||
Button btnDelete = new Button("Excluir");
|
||||
btnDelete.getStyleClass().add("btn-secondary");
|
||||
btnDelete.setStyle("-fx-padding: 3px 8px; -fx-font-size: 11px; -fx-text-fill: #f87171;");
|
||||
btnDelete.getStyleClass().add("btn-danger-sm");
|
||||
btnDelete.setOnAction(e -> {
|
||||
try {
|
||||
PdfSealThemeRegistry.uninstallCustomTheme(theme.id());
|
||||
@@ -310,8 +306,7 @@ public final class SettingsView extends VBox {
|
||||
statusLabel.getStyleClass().add(app.enabled() ? "diagnostic-value-ok" : "diagnostic-value-warn");
|
||||
|
||||
Button btnRevoke = new Button("Revogar");
|
||||
btnRevoke.getStyleClass().add("btn-secondary");
|
||||
btnRevoke.setStyle("-fx-padding: 4px 10px; -fx-font-size: 11px; -fx-text-fill: #f87171;");
|
||||
btnRevoke.getStyleClass().add("btn-danger-sm");
|
||||
btnRevoke.setOnAction(e -> {
|
||||
if (onRevokeApplication != null) {
|
||||
onRevokeApplication.accept(app.applicationId());
|
||||
|
||||
+2
-4
@@ -194,11 +194,10 @@ public class SignaturePromptDialog {
|
||||
rememberedBox.setAlignment(Pos.CENTER_LEFT);
|
||||
|
||||
Label rememberedBadge = new Label("● PIN salvo nesta sessão ativa");
|
||||
rememberedBadge.setStyle("-fx-text-fill: #10b981; -fx-font-weight: bold; -fx-font-size: 12px;");
|
||||
rememberedBadge.getStyleClass().addAll("text-success", "text-bold");
|
||||
|
||||
Button btnChangePin = new Button("Alterar PIN");
|
||||
btnChangePin.getStyleClass().add("btn-secondary");
|
||||
btnChangePin.setStyle("-fx-padding: 4px 10px; -fx-font-size: 11px;");
|
||||
|
||||
VBox inputWrapper = new VBox(8);
|
||||
inputWrapper.setVisible(false);
|
||||
@@ -222,7 +221,6 @@ public class SignaturePromptDialog {
|
||||
VBox inputWrapper = new VBox(8);
|
||||
Label pinPromptLabel = new Label("Informe o PIN do dispositivo para autorizar a chave privada:");
|
||||
pinPromptLabel.getStyleClass().add("dialog-subtitle");
|
||||
pinPromptLabel.setStyle("-fx-font-size: 12px;");
|
||||
|
||||
cbSavePin.setSelected(false);
|
||||
inputWrapper.getChildren().addAll(pinPromptLabel, pinField, cbSavePin);
|
||||
@@ -233,7 +231,7 @@ public class SignaturePromptDialog {
|
||||
|
||||
// Label de Alerta de Validação
|
||||
Label validationLabel = new Label();
|
||||
validationLabel.setStyle("-fx-text-fill: #f87171; -fx-font-size: 12px;");
|
||||
validationLabel.getStyleClass().addAll("text-danger", "text-bold");
|
||||
validationLabel.setVisible(false);
|
||||
validationLabel.setManaged(false);
|
||||
|
||||
|
||||
+10
-11
@@ -152,7 +152,7 @@ public final class SignatureValidationDialog {
|
||||
|
||||
ScrollPane scrollResult = new ScrollPane(resultBox);
|
||||
scrollResult.setFitToWidth(true);
|
||||
scrollResult.setStyle("-fx-background: transparent; -fx-background-color: transparent;");
|
||||
scrollResult.getStyleClass().add("cyber-scroll-pane");
|
||||
VBox.setVgrow(scrollResult, Priority.ALWAYS);
|
||||
|
||||
// Rodapé
|
||||
@@ -277,27 +277,26 @@ public final class SignatureValidationDialog {
|
||||
statusBadge.setPadding(new Insets(10, 14, 10, 14));
|
||||
|
||||
Label lblBadge = new Label(result.status().getDescription());
|
||||
lblBadge.setStyle("-fx-font-weight: bold; -fx-font-size: 14px;");
|
||||
|
||||
if (result.status() == ValidationStatus.VALID) {
|
||||
statusBadge.setStyle("-fx-background-color: rgba(16, 185, 129, 0.15); -fx-background-radius: 6px; -fx-border-color: #10b981; -fx-border-radius: 6px;");
|
||||
lblBadge.setStyle(lblBadge.getStyle() + " -fx-text-fill: #10b981;");
|
||||
statusBadge.getStyleClass().add("status-badge-valid");
|
||||
lblBadge.getStyleClass().addAll("text-success", "text-bold");
|
||||
} else if (result.status() == ValidationStatus.INVALID) {
|
||||
statusBadge.setStyle("-fx-background-color: rgba(239, 68, 68, 0.15); -fx-background-radius: 6px; -fx-border-color: #ef4444; -fx-border-radius: 6px;");
|
||||
lblBadge.setStyle(lblBadge.getStyle() + " -fx-text-fill: #ef4444;");
|
||||
statusBadge.getStyleClass().add("status-badge-invalid");
|
||||
lblBadge.getStyleClass().addAll("text-danger", "text-bold");
|
||||
} else {
|
||||
statusBadge.setStyle("-fx-background-color: rgba(245, 158, 11, 0.15); -fx-background-radius: 6px; -fx-border-color: #f59e0b; -fx-border-radius: 6px;");
|
||||
lblBadge.setStyle(lblBadge.getStyle() + " -fx-text-fill: #f59e0b;");
|
||||
statusBadge.getStyleClass().add("status-badge-warning");
|
||||
lblBadge.getStyleClass().addAll("text-warning", "text-bold");
|
||||
}
|
||||
|
||||
Label lblType = new Label("• Formato: " + result.type().getDescription());
|
||||
lblType.setStyle("-fx-font-size: 12px; -fx-text-fill: #cbd5e1;");
|
||||
lblType.getStyleClass().add("text-muted");
|
||||
|
||||
statusBadge.getChildren().addAll(lblBadge, lblType);
|
||||
|
||||
Label lblMsg = new Label(result.summaryMessage());
|
||||
lblMsg.setWrapText(true);
|
||||
lblMsg.setStyle("-fx-font-size: 12.5px; -fx-font-weight: bold;");
|
||||
lblMsg.getStyleClass().add("text-bold");
|
||||
|
||||
resultBox.getChildren().addAll(statusBadge, lblMsg);
|
||||
|
||||
@@ -324,7 +323,7 @@ public final class SignatureValidationDialog {
|
||||
lblTime.getStyleClass().add("cert-detail");
|
||||
|
||||
Label lblIntegrity = new Label(s.isValid() ? "✓ Assinatura íntegra e chave pública conferida." : "✗ Falha na integridade da assinatura.");
|
||||
lblIntegrity.setStyle(s.isValid() ? "-fx-text-fill: #10b981; -fx-font-weight: bold; -fx-font-size: 11.5px;" : "-fx-text-fill: #ef4444; -fx-font-weight: bold; -fx-font-size: 11.5px;");
|
||||
lblIntegrity.getStyleClass().addAll(s.isValid() ? "text-success" : "text-danger", "text-bold");
|
||||
|
||||
card.getChildren().addAll(lblSignerName, lblCert, lblTime, lblIntegrity);
|
||||
resultBox.getChildren().add(card);
|
||||
|
||||
+7
-7
@@ -125,7 +125,7 @@ public final class XmlSignDialog {
|
||||
// ScrollPane
|
||||
ScrollPane scrollPane = new ScrollPane();
|
||||
scrollPane.setFitToWidth(true);
|
||||
scrollPane.setStyle("-fx-background-color: transparent; -fx-background: transparent; -fx-border-color: transparent;");
|
||||
scrollPane.getStyleClass().add("cyber-scroll-pane");
|
||||
|
||||
VBox formContent = new VBox(16);
|
||||
formContent.setPadding(new Insets(4, 8, 4, 0));
|
||||
@@ -340,16 +340,16 @@ public final class XmlSignDialog {
|
||||
pinField.setDisable(true);
|
||||
pinField.clear();
|
||||
lblPinNotice.setText("✓ PIN memorizado na sessão segura");
|
||||
lblPinNotice.setStyle("-fx-text-fill: #10b981; -fx-font-weight: bold;");
|
||||
lblPinNotice.getStyleClass().setAll("label", "text-success", "text-bold");
|
||||
} else if (isA3 && "provider-win-store".equalsIgnoreCase(cert.providerId())) {
|
||||
pinField.setDisable(true);
|
||||
pinField.clear();
|
||||
lblPinNotice.setText("Autenticação nativa pelo Windows/Driver");
|
||||
lblPinNotice.setStyle("-fx-text-fill: -fx-accent;");
|
||||
lblPinNotice.getStyleClass().setAll("label", "text-primary");
|
||||
} else {
|
||||
pinField.setDisable(false);
|
||||
lblPinNotice.setText(isA3 ? "Requer PIN do Smart Card" : "Requer senha do certificado A1");
|
||||
lblPinNotice.setStyle("-fx-text-fill: -fx-text-secondary;");
|
||||
lblPinNotice.getStyleClass().setAll("label", "text-muted");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ public final class XmlSignDialog {
|
||||
setFormDisabled(true);
|
||||
progressIndicator.setVisible(true);
|
||||
lblStatus.setText("Assinando documento XML (" + profile.getDisplayName() + ")...");
|
||||
lblStatus.setStyle("-fx-text-fill: -fx-accent;");
|
||||
lblStatus.getStyleClass().setAll("label", "text-primary");
|
||||
|
||||
boolean validate = chkValidateAfter.isSelected();
|
||||
|
||||
@@ -459,7 +459,7 @@ public final class XmlSignDialog {
|
||||
setFormDisabled(false);
|
||||
progressIndicator.setVisible(false);
|
||||
lblStatus.setText("✓ Documento XML assinado e validado com sucesso!");
|
||||
lblStatus.setStyle("-fx-text-fill: #10b981; -fx-font-weight: bold;");
|
||||
lblStatus.getStyleClass().setAll("label", "text-success", "text-bold");
|
||||
|
||||
showSuccessDialog(targetFile);
|
||||
});
|
||||
@@ -470,7 +470,7 @@ public final class XmlSignDialog {
|
||||
Throwable ex = signTask.getException();
|
||||
logger.error("Falha ao assinar XML", ex);
|
||||
lblStatus.setText("✕ Falha na assinatura");
|
||||
lblStatus.setStyle("-fx-text-fill: #ef4444; -fx-font-weight: bold;");
|
||||
lblStatus.getStyleClass().setAll("label", "text-danger", "text-bold");
|
||||
|
||||
showAlert(Alert.AlertType.ERROR, "Erro na Assinatura do XML",
|
||||
"Não foi possível concluir a assinatura XMLDSig:\n" + (ex != null ? ex.getMessage() : "Erro desconhecido"));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user