diff --git a/src/interface/web/app/settings/page.tsx b/src/interface/web/app/settings/page.tsx index 5b28e455..534a87a7 100644 --- a/src/interface/web/app/settings/page.tsx +++ b/src/interface/web/app/settings/page.tsx @@ -348,7 +348,7 @@ enum PhoneNumberValidationState { export default function SettingsView() { const [title, setTitle] = useState("Settings"); const [isMobileWidth, setIsMobileWidth] = useState(false); - const { apiKeys, generateAPIKey, copyAPIKey, deleteAPIKey } = useApiKeys(); + const {apiKeys, generateAPIKey, copyAPIKey, deleteAPIKey} = useApiKeys(); const {userConfig: initialUserConfig} = useUserConfig(true); const [userConfig, setUserConfig] = useState(null); const [name, setName] = useState(undefined); @@ -845,6 +845,7 @@ export default function SettingsView() {
Clients
+ {!userConfig.anonymous_mode && ( @@ -868,8 +869,22 @@ export default function SettingsView() { {`${key.token.slice(0, 6)}...${key.token.slice(-4)}`}
- copyAPIKey(key.token)}/> - deleteAPIKey(key.token)}/> + { + toast({title: `🔑 Copied API Key: ${key.name}`, description: `Set this API key in the Khoj apps you want to connect to this Khoj account`}); + copyAPIKey(key.token); + }} + /> + { + toast({title: `🔑 Deleted API Key: ${key.name}`, description: `Apps using this API key will no longer connect to this Khoj account`}); + deleteAPIKey(key.token); + }} + />
@@ -880,6 +895,7 @@ export default function SettingsView() {
+ )}