Skip to content

Commit fc89509

Browse files
fix: enhance button styles and update PAT instructions in settings page
1 parent e562011 commit fc89509

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

src/components/UI.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export const C = {
3939
border: 'none',
4040
transition: 'opacity .15s',
4141
...(v === 'primary' ? { background: 'var(--accent)', color: '#000' }
42-
: v === 'ghost' ? { background: 'transparent', color: 'var(--text)', border: '1px solid var(--border)' }
42+
: v === 'ghost' ? { background: 'transparent', color: 'var(--text)', border: '1px solid var(--border)' }
43+
: v === 'danger' ? { background: 'var(--red)', color: '#fff' }
4344
: { background: 'var(--surface2)', color: 'var(--text)', border: '1px solid var(--border)' }),
4445
}),
4546
input: {

src/pages/SettingsPage.jsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export default function SettingsPage() {
7575
<p>GitHub Authentication</p>
7676

7777
<button
78-
onClick={() => setOpen(prev => !prev)}
78+
onMouseEnter={()=> setOpen(true)}
79+
onMouseLeave={()=> setOpen(false)}
7980
className="p-2 rounded-full hover:bg-zinc-800 transition"
8081
>
8182
<BsFillInfoSquareFill className="text-white cursor-pointer" />
@@ -151,7 +152,7 @@ export default function SettingsPage() {
151152
</button>
152153
<button
153154
onClick={handleDelete}
154-
style={{ ...C.btn('ghost'), display: 'flex', alignItems: 'center', gap: 5, fontSize: 13 }}
155+
style={{ ...C.btn('danger'), display: 'flex', alignItems: 'center', gap: 5, fontSize: 13 }}
155156
>
156157
<FiTrash2 size={13} /> Delete
157158
</button>
@@ -163,10 +164,12 @@ export default function SettingsPage() {
163164
<div style={{ fontWeight: 600, fontSize: 15, marginBottom: 14 }}>How to create a PAT</div>
164165
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 10 }}>
165166
{[
166-
['01', 'Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)'],
167-
['02', 'Click "Generate new token (classic)"'],
168-
['03', 'Select scopes: read:org and public_repo'],
169-
['04', 'Copy the token and paste it above, then click Save'],
167+
['01', 'Go to GitHub Settings → Developer settings → Personal access tokens'],
168+
['02', 'Click "Generate new token" and choose "Fine-grained token"'],
169+
['03', 'Give your token a name(e.g. "OrgExplorer PAT"), select an expiration, and verify yourself'],
170+
['04', 'Choose "Public repositories" access and grant Read-only permissions'],
171+
['05', 'Generate the token and copy it'],
172+
['06', 'Paste the token above and click Save'],
170173
].map(([n, text]) => (
171174
<div key={n} style={{ background: 'var(--surface2)', borderRadius: 6, padding: '10px 12px' }}>
172175
<div style={{ color: 'var(--accent)', fontWeight: 700, fontSize: 15, marginBottom: 4 }}>{n}</div>
@@ -185,7 +188,7 @@ export default function SettingsPage() {
185188
</div>
186189
<button
187190
onClick={handleClear}
188-
style={{ ...C.btn('ghost'), fontSize: 12, display: 'flex', alignItems: 'center', gap: 5 }}
191+
style={{ ...C.btn('danger'), fontSize: 12, display: 'flex', alignItems: 'center', gap: 5 }}
189192
>
190193
<FiTrash2 size={13} /> {cleared ? 'Cleared' : 'Clear All'}
191194
</button>

0 commit comments

Comments
 (0)