From ecef4a272982d8b6b2c2ff95d9b5dd57f014c2c4 Mon Sep 17 00:00:00 2001 From: ErikrafT <139592038+erikraft@users.noreply.github.com> Date: Tue, 6 May 2025 20:14:11 -0300 Subject: [PATCH] Update content-moderation.js --- public/scripts/content-moderation.js | 140 +++++++++++++-------------- 1 file changed, 67 insertions(+), 73 deletions(-) diff --git a/public/scripts/content-moderation.js b/public/scripts/content-moderation.js index 2de7030..df96924 100644 --- a/public/scripts/content-moderation.js +++ b/public/scripts/content-moderation.js @@ -179,41 +179,42 @@ class ContentModeration { if (this.isMediaFile(file)) { const objectUrl = URL.createObjectURL(file); if (file.type.startsWith('image/')) { - mediaPreview = `
- Preview -
-
- - - -
+ mediaPreview = ` +
+ + +
-
`; +
+

Conteúdo Sensível

+

Este conteúdo pode ser impróprio ou conter golpes

+
+
+ Preview +
`; } else if (file.type.startsWith('video/')) { - mediaPreview = `
- -
-
- - - -
+ mediaPreview = ` +
+ + +
-
`; +
+

Conteúdo Sensível

+

Este conteúdo pode ser impróprio ou conter golpes

+
+
+ +
`; } } dialog.innerHTML = `
-

⚠️ Aviso de Conteúdo Sensível

${mediaPreview} -
-

Este conteúdo pode ser impróprio ou conter golpes.

-

Tem certeza que deseja visualizar?

-
- - -
+
+ +
`; @@ -278,21 +279,55 @@ style.textContent = ` .warning-content { background: #1a1a1a; - padding: 20px; + padding: 30px; border-radius: 12px; max-width: 500px; text-align: center; color: white; box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); + display: flex; + flex-direction: column; + align-items: center; + gap: 20px; + } + + .warning-icon { + width: 64px; + height: 64px; + display: flex; + justify-content: center; + align-items: center; + margin-bottom: 10px; + } + + .warning-icon svg { + filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5)); + } + + .warning-text { + text-align: center; + margin-bottom: 20px; + } + + .warning-text p:first-child { + font-size: 24px; + font-weight: bold; + margin-bottom: 10px; + color: #ff4444; + } + + .warning-text p:last-child { + font-size: 16px; + color: #e3e3e3; } .media-preview { position: relative; width: 100%; max-height: 300px; - margin: 20px 0; border-radius: 8px; overflow: hidden; + margin-top: 10px; } .media-preview img, @@ -307,55 +342,12 @@ style.textContent = ` filter: blur(20px); } - .warning-overlay { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: flex; - justify-content: center; - align-items: center; - background: rgba(0, 0, 0, 0.5); - } - - .warning-icon { - position: relative; - width: 64px; - height: 64px; - display: flex; - justify-content: center; - align-items: center; - } - - .warning-icon svg { - filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5)); - } - - .warning-slash { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%) rotate(-45deg); - font-size: 48px; - color: #ff4444; - font-weight: bold; - } - - .warning-message { - margin-top: 20px; - } - - .warning-message p { - margin: 10px 0; - font-size: 16px; - } - .warning-buttons { display: flex; justify-content: center; gap: 20px; margin-top: 20px; + width: 100%; } .warning-buttons button { @@ -366,6 +358,8 @@ style.textContent = ` font-size: 16px; font-weight: bold; transition: all 0.3s ease; + flex: 1; + max-width: 200px; } .btn-cancel { @@ -388,4 +382,4 @@ style.textContent = ` `; document.head.appendChild(style); -export default ContentModeration; \ No newline at end of file +export default ContentModeration;