mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-03 00:17:47 +00:00
feat(ui): add Settings link to control panel key hint
Adds a gear icon link next to the masked key hint that navigates to Settings > Auth, improving UX for users who need to manage their auth tokens.
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { useState, useEffect, useRef, useCallback, useMemo } from 'react';
|
import { useState, useEffect, useRef, useCallback, useMemo } from 'react';
|
||||||
import { RefreshCw, AlertCircle, Key, X, Gauge, Globe } from 'lucide-react';
|
import { RefreshCw, AlertCircle, Key, X, Gauge, Globe, Settings } from 'lucide-react';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { api } from '@/lib/api-client';
|
import { api } from '@/lib/api-client';
|
||||||
import type { CliproxyServerConfig } from '@/lib/api-client';
|
import type { CliproxyServerConfig } from '@/lib/api-client';
|
||||||
@@ -233,6 +233,13 @@ export function ControlPanelEmbed({ port = CLIPROXY_DEFAULT_PORT }: ControlPanel
|
|||||||
: authToken || 'ccs'}
|
: authToken || 'ccs'}
|
||||||
</code>
|
</code>
|
||||||
</span>
|
</span>
|
||||||
|
<a
|
||||||
|
href="/settings?tab=auth"
|
||||||
|
className="text-blue-600 hover:text-blue-800 dark:hover:text-blue-400"
|
||||||
|
title="Manage auth tokens"
|
||||||
|
>
|
||||||
|
<Settings className="h-3.5 w-3.5" />
|
||||||
|
</a>
|
||||||
<button
|
<button
|
||||||
className="text-blue-600 hover:text-blue-800 dark:hover:text-blue-400"
|
className="text-blue-600 hover:text-blue-800 dark:hover:text-blue-400"
|
||||||
onClick={() => setShowLoginHint(false)}
|
onClick={() => setShowLoginHint(false)}
|
||||||
|
|||||||
Reference in New Issue
Block a user