Implement AI consent gating, user preference settings, and Ko-fi hint

This commit is contained in:
2026-06-06 12:08:46 +02:00
parent b1e17be7fd
commit 3eaf59e2b3
11 changed files with 150 additions and 21 deletions
+8
View File
@@ -50,6 +50,7 @@ import {
TravelDaySummaryApiError
} from '../services/aiSummary.js'
import { tryDecryptEntryPayload } from '../services/quickEventLog.js'
import { getAiAuthorized } from '../services/userPreferences.js'
import {
getDecryptedTrack,
saveUploadedTrack,
@@ -1209,6 +1210,13 @@ export default function LogEntryEditor({
const handleGenerateAiSummary = async () => {
if (!canSignSkipper || readOnly || aiSummaryLoading) return
if (!getAiAuthorized()) {
void showAlert(
t('profile.ai_unauthorized_alert_desc'),
t('profile.ai_unauthorized_alert_title')
)
return
}
if (!isOnline) {
setAiSummaryError(t('logs.ai_summary_offline'))
return