mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-11 17:29:37 +02:00
Merge pull request #41 from R0m1k3/claude/fix-redirect-uri-mismatch-011CV41yPYKHVkiwiBSZ2sd3
Fix: Correction des erreurs TypeScript de build
This commit is contained in:
2 files changed
+26
-2
No files matched your search
+23
-2
@@ -54,7 +54,12 @@ const Index = () => {
|
||||
const [noteTags, setNoteTags] = useState<Tag[]>([]);
|
||||
const [openRouterModels, setOpenRouterModels] = useState<OpenRouterModel[]>([]);
|
||||
const [loadingModels, setLoadingModels] = useState(false);
|
||||
const [calendarAuthStatus, setCalendarAuthStatus] = useState({
|
||||
const [calendarAuthStatus, setCalendarAuthStatus] = useState<{
|
||||
isAuthenticated: boolean;
|
||||
isExpired: boolean;
|
||||
needsReauth: boolean;
|
||||
authType?: 'oauth2' | 'service_account';
|
||||
}>({
|
||||
isAuthenticated: false,
|
||||
isExpired: false,
|
||||
needsReauth: true
|
||||
@@ -1354,7 +1359,7 @@ const Index = () => {
|
||||
<Label htmlFor="google-auth-type">Méthode d'authentification</Label>
|
||||
<Select
|
||||
value={settings.google_auth_type || 'oauth2'}
|
||||
onValueChange={(value) => setSettings({ ...settings, google_auth_type: value })}
|
||||
onValueChange={(value) => setSettings({ ...settings, google_auth_type: value as 'oauth2' | 'service_account' })}
|
||||
>
|
||||
<SelectTrigger id="google-auth-type">
|
||||
<SelectValue placeholder="Sélectionnez une méthode" />
|
||||
@@ -1533,6 +1538,22 @@ const Index = () => {
|
||||
Déconnecter
|
||||
</Button>
|
||||
</>
|
||||
) : (
|
||||
<Button
|
||||
onClick={async () => {
|
||||
try {
|
||||
const result = await CalendarService.sync();
|
||||
showSuccess(`${result.syncedCount} événements synchronisés`);
|
||||
await loadCalendarEvents();
|
||||
} catch (error) {
|
||||
showError("Erreur lors de la synchronisation");
|
||||
}
|
||||
}}
|
||||
className="flex items-center gap-2"
|
||||
>
|
||||
<RefreshCw className="h-4 w-4" />
|
||||
Synchroniser
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
|
||||
@@ -7,6 +7,9 @@ export interface Settings {
|
||||
theme?: 'light' | 'dark' | 'auto';
|
||||
google_client_id?: string;
|
||||
google_client_secret?: string;
|
||||
google_auth_type?: 'oauth2' | 'service_account';
|
||||
google_service_account_key?: string;
|
||||
google_calendar_email?: string;
|
||||
// Legacy fields (kept for backward compatibility)
|
||||
google_calendar_api_key?: string;
|
||||
google_calendar_id?: string;
|
||||
|
||||
Reference in new issue
Block a user