mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Add GitSettingsDialog
This commit is contained in:
9 files changed
+775
-3
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
export interface GitCredential {
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface GitSettings {
|
||||
credentials: Record<string, GitCredential>; // keyed by origin
|
||||
}
|
||||
|
||||
export interface GitSettingsContextType {
|
||||
settings: GitSettings;
|
||||
updateSettings: (settings: Partial<GitSettings>) => void;
|
||||
addCredential: (origin: string, credential: GitCredential) => void;
|
||||
removeCredential: (origin: string) => void;
|
||||
updateCredential: (origin: string, credential: Partial<GitCredential>) => void;
|
||||
isConfigured: boolean;
|
||||
}
|
||||
|
||||
export const GitSettingsContext = createContext<GitSettingsContextType | undefined>(undefined);
|
||||
Reference in new issue
Block a user