Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

Add upload disclaimer modal, custom banner, and improve admin settings UI

Murtaza Nasiref57ac1dfd87
diff --git a/docs/admin-guide/system-settings.md b/docs/admin-guide/system-settings.md
index 4d106068..d9e7ee07 100644
--- a/docs/admin-guide/system-settings.md
+++ b/docs/admin-guide/system-settings.md
@@ -61,6 +61,46 @@ Organizations often use this for compliance requirements - reminding users about
Keep disclaimers concise and relevant. Users see this message frequently, so lengthy legal text becomes an ignored click-through. Focus on the most important points, and link to detailed policies if needed. The markdown support lets you format the message clearly for better readability and comprehension.
+## Upload Disclaimer
+
+The upload disclaimer works just like the recording disclaimer, but it appears when users upload files rather than when they start recording. Every time a user drags and drops files or selects files for upload, they'll see this notice and must accept it before the files are queued for processing.
+
+This is useful when uploaded files may contain third-party content or when your organization needs to remind users about data handling before they submit files to the system. The disclaimer supports full markdown formatting, just like the recording disclaimer.
+
+!!! example "Example upload disclaimer"
+ ```markdown
+ ## Upload Policy
+
+ By uploading files, you confirm that:
+
+ - You have the right to share this content
+ - No sensitive personal data is included without authorization
+ - Files will be processed by external transcription services
+
+ > See our [data handling policy](https://example.com/policy) for details.
+ ```
+
+Leave this field empty to disable the upload disclaimer entirely. When empty, file uploads proceed immediately without any prompt.
+
+## Custom Banner
+
+The custom banner displays a persistent message across the top of the main content area for all users. It's useful for announcements, maintenance notices, compliance reminders, or any message you want everyone to see when they use Speakr.
+
+The banner appears below the header and above the main content. Users can dismiss it by clicking the X button, but it reappears on page refresh, ensuring the message stays visible as long as you have it configured.
+
+Like the disclaimers, the banner supports full markdown formatting, so you can include bold text, links, and other formatting. Keep banner text short and to the point since it takes up screen space.
+
+!!! example "Example banners"
+ ```markdown
+ **System update** — Speakr will be briefly unavailable on Sunday 10pm-12am for maintenance.
+ ```
+
+ ```markdown
+ All recordings are subject to our [acceptable use policy](https://example.com/aup). Contact IT with questions.
+ ```
+
+Leave this field empty to hide the banner completely.
+
## System-Wide Impact
Every setting on this page affects all users immediately. Changes take effect as soon as you save them, without requiring system restarts or user logouts. This immediate application means you should test changes carefully and communicate significant modifications to your users.
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md
index 20404620..f41bf3ed 100644
--- a/docs/troubleshooting.md
+++ b/docs/troubleshooting.md
@@ -223,6 +223,8 @@ Query formulation matters enormously. [Inquire Mode](user-guide/inquire-mode.md)
In many jurisdictions, you must inform participants they're being recorded. Enable a recording disclaimer in [System Settings](admin-guide/system-settings.md#recording-disclaimer). Check the [FAQ on recording compliance](faq.md#do-i-need-to-inform-people-theyre-being-recorded). Set custom text that appears before any recording starts, such as legal notices about consent requirements. This feature is particularly important in regions with strict recording laws like Australia or California.
+A separate [upload disclaimer](admin-guide/system-settings.md#upload-disclaimer) can be configured to show a notice before file uploads. You can also display a persistent [custom banner](admin-guide/system-settings.md#custom-banner) at the top of the page for announcements or policy reminders.
+
### Offline Deployment
Speakr can run completely offline as all dependencies are built into the Docker image. For offline deployments, use local models via Ollama for [text generation](features.md#automatic-summarization) and ensure your ASR endpoint is hosted locally. The system will work without internet access once properly configured.
diff --git a/src/api/system.py b/src/api/system.py
index 5a2fe87c..046aa783 100644
--- a/src/api/system.py
+++ b/src/api/system.py
@@ -239,6 +239,8 @@ def get_config():
return jsonify({
'max_file_size_mb': max_file_size_mb,
'recording_disclaimer': SystemSetting.get_setting('recording_disclaimer', ''),
+ 'upload_disclaimer': SystemSetting.get_setting('upload_disclaimer', ''),
+ 'custom_banner': SystemSetting.get_setting('custom_banner', ''),
'use_asr_endpoint': asr_enabled, # Derived from connector or legacy env var
'connector_supports_diarization': connector_supports_diarization, # Connector capability
'connector_supports_speaker_count': connector_supports_speaker_count, # Min/max speakers
diff --git a/src/init_db.py b/src/init_db.py
index ab81ee83..d91217e5 100644
--- a/src/init_db.py
+++ b/src/init_db.py
@@ -600,6 +600,24 @@ def initialize_database(app):
)
app.logger.info("Initialized recording_disclaimer setting")
+ if not SystemSetting.query.filter_by(key='upload_disclaimer').first():
+ SystemSetting.set_setting(
+ key='upload_disclaimer',
+ value='',
+ description='Legal disclaimer shown before file uploads. Supports Markdown. Leave empty to disable.',
+ setting_type='string'
+ )
+ app.logger.info("Initialized upload_disclaimer setting")
+
+ if not SystemSetting.query.filter_by(key='custom_banner').first():
+ SystemSetting.set_setting(
+ key='custom_banner',
+ value='',
+ description='Custom banner shown at the top of the page. Supports Markdown. Leave empty to disable.',
+ setting_type='string'
+ )
+ app.logger.info("Initialized custom_banner setting")
+
if not SystemSetting.query.filter_by(key='disable_auto_summarization').first():
SystemSetting.set_setting(
key='disable_auto_summarization',
diff --git a/static/js/app.modular.js b/static/js/app.modular.js
index 4db834b2..6af4c973 100644
--- a/static/js/app.modular.js
+++ b/static/js/app.modular.js
@@ -315,6 +315,11 @@ document.addEventListener('DOMContentLoaded', async () => {
const recordingDisclaimer = ref('');
const showRecordingDisclaimerModal = ref(false);
const pendingRecordingMode = ref(null);
+ const uploadDisclaimer = ref('');
+ const showUploadDisclaimerModal = ref(false);
+ const pendingUploadFiles = ref([]);
+ const customBanner = ref('');
+ const showBanner = ref(true);
// --- Audio Recording State ---
const isRecording = ref(false);
@@ -649,6 +654,8 @@ document.addEventListener('DOMContentLoaded', async () => {
isProcessingActive, pollInterval, progressPopupMinimized, progressPopupClosed,
maxFileSizeMB, chunkingEnabled, chunkingMode, chunkingLimit, chunkingLimitDisplay,
maxConcurrentUploads, recordingDisclaimer, showRecordingDisclaimerModal, pendingRecordingMode,
+ uploadDisclaimer, showUploadDisclaimerModal, pendingUploadFiles,
+ customBanner, showBanner,
showAdvancedOptions, uploadLanguage, uploadMinSpeakers, uploadMaxSpeakers, uploadHotwords, uploadInitialPrompt,
availableTags, selectedTagIds, uploadTagSearchFilter,
availableFolders, selectedFolderId, foldersEnabled, filterFolder,
@@ -1252,6 +1259,23 @@ document.addEventListener('DOMContentLoaded', async () => {
const recordingsComposable = useRecordings(state, utils, reprocessComposable);
const uploadComposable = useUpload(state, utils);
+ // Upload disclaimer handlers
+ const acceptUploadDisclaimer = () => {
+ showUploadDisclaimerModal.value = false;
+ const files = pendingUploadFiles.value;
+ pendingUploadFiles.value = [];
+ // Temporarily clear disclaimer to prevent re-trigger, then re-queue
+ const saved = uploadDisclaimer.value;
+ uploadDisclaimer.value = '';
+ uploadComposable.addFilesToQueue(files);
+ uploadDisclaimer.value = saved;
+ };
+
+ const cancelUploadDisclaimer = () => {
+ showUploadDisclaimerModal.value = false;
+ pendingUploadFiles.value = [];
+ };
+
// Add startUpload to utils for audio composable to use
utils.startUploadQueue = uploadComposable.startUpload;
@@ -1998,6 +2022,22 @@ document.addEventListener('DOMContentLoaded', async () => {
return marked.parse(recordingDisclaimer.value);
});
+ // Upload disclaimer parsed as markdown
+ const uploadDisclaimerHtml = computed(() => {
+ if (!uploadDisclaimer.value || uploadDisclaimer.value.trim() === '') {
+ return '';
+ }
+ return marked.parse(uploadDisclaimer.value);
+ });
+
+ // Custom banner parsed as markdown
+ const customBannerHtml = computed(() => {
+ if (!customBanner.value || customBanner.value.trim() === '') {
+ return '';
+ }
+ return marked.parse(customBanner.value);
+ });
+
// Get tag prompt preview
const getTagPromptPreview = (tagId) => {
const tag = availableTags.value.find(t => t.id == tagId);
@@ -2237,6 +2277,8 @@ document.addEventListener('DOMContentLoaded', async () => {
chunkingMode.value = config.chunking_mode || 'size';
chunkingLimit.value = config.chunking_limit || 20;
recordingDisclaimer.value = config.recording_disclaimer || '';
+ uploadDisclaimer.value = config.upload_disclaimer || '';
+ customBanner.value = config.custom_banner || '';
canDeleteRecordings.value = config.can_delete_recordings !== false;
enableInternalSharing.value = config.enable_internal_sharing === true;
enableArchiveToggle.value = config.enable_archive_toggle === true;
@@ -2443,6 +2485,10 @@ document.addEventListener('DOMContentLoaded', async () => {
navigateToDuplicate,
tagsWithCustomPrompts,
recordingDisclaimerHtml,
+ uploadDisclaimerHtml,
+ customBannerHtml,
+ acceptUploadDisclaimer,
+ cancelUploadDisclaimer,
getTagPromptPreview,
// Utilities
diff --git a/static/js/modules/composables/upload.js b/static/js/modules/composables/upload.js
index 45b5d7df..0ba23c16 100644
--- a/static/js/modules/composables/upload.js
+++ b/static/js/modules/composables/upload.js
@@ -42,7 +42,9 @@ export function useUpload(state, utils) {
// Incognito mode state
incognitoMode, incognitoRecording, incognitoProcessing,
// View state
- currentView
+ currentView,
+ // Upload disclaimer state
+ uploadDisclaimer, showUploadDisclaimerModal, pendingUploadFiles
} = state;
const { computed, nextTick, ref } = Vue;
@@ -154,6 +156,12 @@ export function useUpload(state, utils) {
// Add files to the upload queue
const addFilesToQueue = (files) => {
+ // If upload disclaimer is set, show modal before queuing
+ if (uploadDisclaimer.value && uploadDisclaimer.value.trim() !== '') {
+ pendingUploadFiles.value = Array.from(files);
+ showUploadDisclaimerModal.value = true;
+ return;
+ }
let filesAdded = 0;
for (const file of files) {
const fileObject = file.file ? file.file : file;
diff --git a/static/locales/de.json b/static/locales/de.json
index 1ab0cfa9..9e876051 100644
--- a/static/locales/de.json
+++ b/static/locales/de.json
@@ -247,6 +247,8 @@
"defaultSummaryPromptDesc": "Standard-Zusammenfassungsprompt, der verwendet wird, wenn Benutzer keinen eigenen Prompt festgelegt haben. Dies dient als Basis-Prompt für alle Benutzer.",
"maxFileSizeDesc": "Maximale Dateigröße für Audio-Uploads in Megabyte (MB).",
"recordingDisclaimerDesc": "Rechtlicher Hinweis, der Benutzern vor Beginn der Aufnahme angezeigt wird. Unterstützt Markdown-Formatierung. Leer lassen zum Deaktivieren.",
+ "uploadDisclaimerDesc": "Rechtlicher Hinweis, der vor dem Hochladen von Dateien angezeigt wird. Unterstützt Markdown. Leer lassen zum Deaktivieren.",
+ "customBannerDesc": "Benutzerdefiniertes Banner oben auf der Seite. Unterstützt Markdown. Leer lassen zum Deaktivieren.",
"transcriptLengthLimitDesc": "Maximale Anzahl von Zeichen, die vom Transkript an das LLM für Zusammenfassung und Chat gesendet werden. Verwenden Sie -1 für kein Limit."
},
"storageUsed": "GENUTZTER SPEICHER",
@@ -842,6 +844,8 @@
"editTranscription": "Transkription bearbeiten",
"identifySpeakers": "Sprecher identifizieren",
"recordingNotice": "Aufnahme-Hinweis",
+ "uploadNotice": "Upload-Hinweis",
+ "uploadFiles": "Dateien hochladen",
"reprocessSummary": "Zusammenfassung neu verarbeiten",
"reprocessTranscription": "Transkription neu verarbeiten",
"resetStatus": "Aufnahme-Status zurücksetzen?",
diff --git a/static/locales/en.json b/static/locales/en.json
index 8f0026a0..630eed1c 100644
--- a/static/locales/en.json
+++ b/static/locales/en.json
@@ -263,6 +263,8 @@
"defaultSummaryPromptDesc": "Default summarization prompt used when users have not set their own prompt. This serves as the base prompt for all users.",
"maxFileSizeDesc": "Maximum file size allowed for audio uploads in megabytes (MB).",
"recordingDisclaimerDesc": "Legal disclaimer shown to users before recording starts. Supports Markdown formatting. Leave empty to disable.",
+ "uploadDisclaimerDesc": "Legal disclaimer shown before file uploads. Supports Markdown. Leave empty to disable.",
+ "customBannerDesc": "Custom banner shown at the top of the page. Supports Markdown. Leave empty to disable.",
"transcriptLengthLimitDesc": "Maximum number of characters to send from transcript to LLM for summarization and chat. Use -1 for no limit."
},
"storageUsed": "STORAGE USED",
@@ -858,6 +860,8 @@
"editTranscription": "Edit Transcription",
"identifySpeakers": "Identify Speakers",
"recordingNotice": "Recording Notice",
+ "uploadNotice": "Upload Notice",
+ "uploadFiles": "Upload Files",
"reprocessSummary": "Reprocess Summary",
"reprocessTranscription": "Reprocess Transcription",
"resetStatus": "Reset Recording Status?",
diff --git a/static/locales/es.json b/static/locales/es.json
index 3ecc6ade..ce68a8b1 100644
--- a/static/locales/es.json
+++ b/static/locales/es.json
@@ -247,6 +247,8 @@
"defaultSummaryPromptDesc": "Indicación de resumen predeterminada utilizada cuando los usuarios no han establecido su propia indicación. Esto sirve como la indicación base para todos los usuarios.",
"maxFileSizeDesc": "Tamaño máximo de archivo permitido para cargas de audio en megabytes (MB).",
"recordingDisclaimerDesc": "Aviso legal mostrado a los usuarios antes de comenzar la grabación. Admite formato Markdown. Dejar vacío para desactivar.",
+ "uploadDisclaimerDesc": "Aviso legal mostrado antes de subir archivos. Admite Markdown. Dejar vacío para desactivar.",
+ "customBannerDesc": "Banner personalizado mostrado en la parte superior de la página. Admite Markdown. Dejar vacío para desactivar.",
"transcriptLengthLimitDesc": "Número máximo de caracteres a enviar desde la transcripción al LLM para resumen y chat. Use -1 para sin límite."
},
"storageUsed": "ALMACENAMIENTO USADO",
@@ -842,6 +844,8 @@
"editTranscription": "Editar Transcripción",
"identifySpeakers": "Identificar Hablantes",
"recordingNotice": "Aviso de Grabación",
+ "uploadNotice": "Aviso de Carga",
+ "uploadFiles": "Subir Archivos",
"reprocessSummary": "Reprocesar Resumen",
"reprocessTranscription": "Reprocesar Transcripción",
"resetStatus": "¿Restablecer Estado de Grabación?",
diff --git a/static/locales/fr.json b/static/locales/fr.json
index 37f37f00..88911f05 100644
--- a/static/locales/fr.json
+++ b/static/locales/fr.json
@@ -241,6 +241,8 @@
"defaultSummaryPromptDesc": "Invite de résumé par défaut utilisée lorsque les utilisateurs n'ont pas défini leur propre invite. Cela sert d'invite de base pour tous les utilisateurs.",
"maxFileSizeDesc": "Taille maximale de fichier autorisée pour les téléchargements audio en mégaoctets (Mo).",
"recordingDisclaimerDesc": "Avis légal affiché aux utilisateurs avant le début de l'enregistrement. Prend en charge le formatage Markdown. Laisser vide pour désactiver.",
+ "uploadDisclaimerDesc": "Avis légal affiché avant le téléchargement de fichiers. Prend en charge Markdown. Laisser vide pour désactiver.",
+ "customBannerDesc": "Bannière personnalisée affichée en haut de la page. Prend en charge Markdown. Laisser vide pour désactiver.",
"transcriptLengthLimitDesc": "Nombre maximal de caractères à envoyer de la transcription au LLM pour le résumé et le chat. Utilisez -1 pour aucune limite."
},
"storageUsed": "STOCKAGE UTILISÉ",
@@ -836,6 +838,8 @@
"editTranscription": "Modifier la Transcription",
"identifySpeakers": "Identifier les Orateurs",
"recordingNotice": "Avis d'Enregistrement",
+ "uploadNotice": "Avis de Téléchargement",
+ "uploadFiles": "Télécharger les fichiers",
"reprocessSummary": "Retraiter le Résumé",
"reprocessTranscription": "Retraiter la Transcription",
"resetStatus": "Réinitialiser le Statut de l'Enregistrement?",
diff --git a/static/locales/ru.json b/static/locales/ru.json
index 871226ae..f559ba54 100644
--- a/static/locales/ru.json
+++ b/static/locales/ru.json
@@ -263,6 +263,8 @@
"defaultSummaryPromptDesc": "Запрос резюмирования по умолчанию, используемый когда пользователи не установили свой собственный. Служит базовым запросом для всех пользователей.",
"maxFileSizeDesc": "Максимальный допустимый размер файла для загрузки аудио в мегабайтах (МБ).",
"recordingDisclaimerDesc": "Юридическое предупреждение, показываемое пользователям перед началом записи. Поддерживает форматирование Markdown. Оставьте пустым, чтобы отключить.",
+ "uploadDisclaimerDesc": "Юридическое предупреждение, показываемое перед загрузкой файлов. Поддерживает Markdown. Оставьте пустым, чтобы отключить.",
+ "customBannerDesc": "Пользовательский баннер в верхней части страницы. Поддерживает Markdown. Оставьте пустым, чтобы отключить.",
"transcriptLengthLimitDesc": "Максимальное количество символов транскрипта для отправки в LLM для резюмирования и чата. Используйте -1 для отсутствия ограничений."
},
"storageUsed": "ИСПОЛЬЗОВАНО ХРАНИЛИЩА",
@@ -858,6 +860,8 @@
"editTranscription": "Редактировать транскрипцию",
"identifySpeakers": "Определить спикеров",
"recordingNotice": "Уведомление о записи",
+ "uploadNotice": "Уведомление о загрузке",
+ "uploadFiles": "Загрузить файлы",
"reprocessSummary": "Перегенерировать резюме",
"reprocessTranscription": "Перегенерировать транскрипцию",
"resetStatus": "Сбросить статус записи?",
diff --git a/static/locales/zh.json b/static/locales/zh.json
index b4d1df2a..7398830e 100644
--- a/static/locales/zh.json
+++ b/static/locales/zh.json
@@ -266,6 +266,8 @@
"defaultSummaryPromptDesc": "用户未设置自己的提示时使用的默认摘要提示。这作为所有用户的基础提示。",
"maxFileSizeDesc": "允许的音频上传最大文件大小(兆字节)。",
"recordingDisclaimerDesc": "录音开始前向用户显示的法律免责声明。支持 Markdown 格式。留空以禁用。",
+ "uploadDisclaimerDesc": "文件上传前显示的法律免责声明。支持 Markdown。留空以禁用。",
+ "customBannerDesc": "页面顶部显示的自定义横幅。支持 Markdown。留空以禁用。",
"transcriptLengthLimitDesc": "从转录发送到 LLM 进行摘要和聊天的最大字符数。使用 -1 表示无限制。"
},
"storageUsed": "已用存储",
@@ -923,6 +925,8 @@
"editTranscription": "编辑转录",
"identifySpeakers": "识别发言人",
"recordingNotice": "录音提示",
+ "uploadNotice": "上传提示",
+ "uploadFiles": "上传文件",
"reprocessSummary": "重新处理摘要",
"reprocessTranscription": "重新处理转录",
"resetStatus": "重置录音状态?",
diff --git a/templates/admin.html b/templates/admin.html
index 3d519e5a..16235ca9 100644
--- a/templates/admin.html
+++ b/templates/admin.html
@@ -673,6 +673,7 @@
<span v-else-if="setting.key === 'asr_timeout_seconds'" class="text-[var(--text-primary)]">
${ Number(setting.value).toLocaleString() } ${t('adminDashboard.seconds')}
</span>
+ <span v-else-if="setting.value && setting.value.length > 80" class="text-[var(--text-muted)] italic">${ setting.value.substring(0, 80) }...</span>
<span v-else>${ setting.value || t('adminDashboard.notSet') }</span>
</div>
</div>
@@ -1189,13 +1190,13 @@ Summarization Instructions:
<!-- Edit System Setting Modal -->
<div v-if="showEditSettingModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4">
- <div class="bg-[var(--bg-secondary)] p-6 rounded-lg shadow-xl w-full max-w-lg">
- <div class="flex justify-between items-center mb-4">
+ <div class="bg-[var(--bg-secondary)] rounded-lg shadow-xl w-full max-w-lg max-h-[85vh] flex flex-col overflow-hidden">
+ <div class="flex-shrink-0 flex justify-between items-center p-6 pb-4">
<h3 class="text-xl font-semibold text-[var(--text-primary)]">Edit System Setting</h3>
<button @click="showEditSettingModal = false" class="text-[var(--text-muted)] hover:text-[var(--text-secondary)] text-2xl leading-none">&times;</button>
</div>
-
- <div v-if="editingSetting" class="space-y-4">
+
+ <div v-if="editingSetting" class="flex-1 overflow-y-auto px-6 pb-6 space-y-4">
<div>
<label class="block text-sm font-medium text-[var(--text-secondary)] mb-1">Setting Key</label>
<div class="px-3 py-2 bg-[var(--bg-tertiary)] text-[var(--text-muted)] rounded-md font-mono text-sm">
@@ -1219,7 +1220,7 @@ Summarization Instructions:
<div>
<label class="block text-sm font-medium text-[var(--text-secondary)] mb-1">Current Value</label>
- <div class="px-3 py-2 bg-[var(--bg-tertiary)] text-[var(--text-muted)] rounded-md">
+ <div class="px-3 py-2 bg-[var(--bg-tertiary)] text-[var(--text-muted)] rounded-md max-h-24 overflow-y-auto text-sm break-words">
<span v-if="editingSetting.key === 'transcript_length_limit' && editingSetting.value === '-1'">
${t('adminDashboard.noLimit')}
</span>
@@ -1311,13 +1312,13 @@ Summarization Instructions:
${ settingError }
</div>
</div>
-
- <div class="flex justify-end space-x-3 mt-6">
- <button @click="showEditSettingModal = false"
+
+ <div class="flex-shrink-0 flex justify-end space-x-3 p-6 border-t border-[var(--border-primary)] bg-[var(--bg-tertiary)] rounded-b-lg">
+ <button @click="showEditSettingModal = false"
class="px-4 py-2 border border-[var(--border-secondary)] text-[var(--text-secondary)] rounded-md hover:bg-[var(--bg-tertiary)]">
Cancel
</button>
- <button @click="saveSettingValue"
+ <button @click="saveSettingValue"
class="px-4 py-2 bg-[var(--bg-button)] text-[var(--text-button)] rounded-md hover:bg-[var(--bg-button-hover)]">
${t('buttons.saveChanges')}
</button>
@@ -1882,6 +1883,26 @@ Summarization Instructions:
if (!response.ok) throw new Error('Failed to load settings');
const data = await response.json();
+ // Sort so related settings are grouped together
+ const settingOrder = [
+ 'transcript_length_limit',
+ 'max_file_size_mb',
+ 'asr_timeout_seconds',
+ 'admin_default_summary_prompt',
+ 'recording_disclaimer',
+ 'upload_disclaimer',
+ 'custom_banner',
+ 'disable_auto_summarization',
+ 'enable_folders'
+ ];
+ data.sort((a, b) => {
+ const ai = settingOrder.indexOf(a.key);
+ const bi = settingOrder.indexOf(b.key);
+ // Unknown keys go to the end in original order
+ const aOrder = ai === -1 ? settingOrder.length : ai;
+ const bOrder = bi === -1 ? settingOrder.length : bi;
+ return aOrder - bOrder;
+ });
settings.value = data;
} catch (error) {
console.error('Error loading settings:', error);
@@ -2206,7 +2227,9 @@ Summarization Instructions:
'max_file_size_mb': 'adminDashboard.settings.maxFileSizeDesc',
'asr_timeout_seconds': 'adminDashboard.settings.asrTimeoutDesc',
'admin_default_summary_prompt': 'adminDashboard.settings.defaultSummaryPromptDesc',
- 'recording_disclaimer': 'adminDashboard.settings.recordingDisclaimerDesc'
+ 'recording_disclaimer': 'adminDashboard.settings.recordingDisclaimerDesc',
+ 'upload_disclaimer': 'adminDashboard.settings.uploadDisclaimerDesc',
+ 'custom_banner': 'adminDashboard.settings.customBannerDesc'
};
const key = descriptionKeys[setting.key];
diff --git a/templates/components/banner.html b/templates/components/banner.html
new file mode 100644
index 00000000..25b6bcae
--- /dev/null
+++ b/templates/components/banner.html
@@ -0,0 +1,11 @@
+<!-- Custom Banner -->
+<div v-if="customBannerHtml && showBanner"
+ class="flex-shrink-0 bg-[var(--bg-accent)] bg-opacity-10 border-b border-[var(--border-accent)]
+ px-4 py-2 flex items-center gap-3 text-sm text-[var(--text-primary)]">
+ <i class="fas fa-bullhorn text-[var(--text-accent)] flex-shrink-0"></i>
+ <div class="flex-1 ai-message banner-content" v-html="customBannerHtml"></div>
+ <button @click="showBanner = false"
+ class="text-[var(--text-muted)] hover:text-[var(--text-primary)] flex-shrink-0">
+ <i class="fas fa-times"></i>
+ </button>
+</div>
diff --git a/templates/index.html b/templates/index.html
index f0ecb2b8..05277519 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -69,6 +69,8 @@
<!-- Main Content Area -->
<main :class="['flex-1 flex flex-col overflow-hidden main-content', !isSidebarCollapsed && !isMobileScreen ? 'sidebar-open' : '']">
+ <!-- Custom Banner -->
+ {% include 'components/banner.html' %}
<!-- Upload View -->
{% include 'components/upload-view.html' %}
@@ -101,6 +103,7 @@
{% include 'modals/color-scheme-modal.html' %}
{% include 'modals/system-audio-help-modal.html' %}
{% include 'modals/recording-disclaimer-modal.html' %}
+ {% include 'modals/upload-disclaimer-modal.html' %}
{% include 'modals/recording-recovery-modal.html' %}
{% include 'modals/unified-share-modal.html' %}
{% include 'modals/share-delete-modal.html' %}
diff --git a/templates/modals/upload-disclaimer-modal.html b/templates/modals/upload-disclaimer-modal.html
new file mode 100644
index 00000000..7c4c005d
--- /dev/null
+++ b/templates/modals/upload-disclaimer-modal.html
@@ -0,0 +1,36 @@
+<!-- Upload Disclaimer Modal -->
+<div v-if="showUploadDisclaimerModal" @click.self="cancelUploadDisclaimer" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 p-4 backdrop-blur-sm">
+ <div class="bg-[var(--bg-secondary)] rounded-lg shadow-xl w-full max-w-2xl max-h-[80vh] flex flex-col overflow-hidden">
+ <div class="flex-shrink-0 p-6 border-b border-[var(--border-primary)]">
+ <div class="flex items-center justify-between">
+ <div class="flex items-center gap-3">
+ <i class="fas fa-info-circle text-2xl text-[var(--text-accent)]"></i>
+ <h3 class="text-xl font-semibold text-[var(--text-primary)]" v-text="t('modal.uploadNotice')"></h3>
+ </div>
+ <button @click="cancelUploadDisclaimer" class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors">
+ <i class="fas fa-times text-xl"></i>
+ </button>
+ </div>
+ </div>
+ <div class="flex-1 overflow-y-auto p-6">
+ <!-- Render markdown content -->
+ <div class="ai-message text-[var(--text-secondary)]"
+ style="line-height: 1.6;">
+ <div v-html="uploadDisclaimerHtml"></div>
+ </div>
+ </div>
+ <div class="flex-shrink-0 p-6 border-t border-[var(--border-primary)] bg-[var(--bg-tertiary)] rounded-b-lg">
+ <div class="flex justify-end gap-3">
+ <button @click="cancelUploadDisclaimer"
+ class="px-6 py-2 text-[var(--text-secondary)] hover:bg-[var(--bg-secondary)] rounded-lg transition-colors border border-[var(--border-secondary)]">
+ Cancel
+ </button>
+ <button @click="acceptUploadDisclaimer"
+ class="px-6 py-2 bg-[var(--bg-accent)] text-white rounded-lg hover:bg-[var(--bg-accent-hover)] transition-colors">
+ <i class="fas fa-upload mr-2"></i>
+ <span v-text="t('modal.uploadFiles')"></span>
+ </button>
+ </div>
+ </div>
+ </div>
+</div>