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