Skip to content

Commit 2427710

Browse files
author
wenhuxian
committed
feat: add copy id+title button and modernize icons
1 parent 0bf5ad2 commit 2427710

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "redmine-desktop",
33
"productName": "Redmine Desktop",
4-
"version": "1.0.27",
4+
"version": "1.0.28",
55
"author": "wenhuxian",
66
"license": "MIT",
77
"description": "Cross-platform Redmine client",

src/renderer/App.tsx

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,8 @@ const App: React.FC = () => {
17871787
onClick={() => setShowSettings(true)}
17881788
style={{ margin: 0, padding: 0, flex: 1, height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center', background: 'var(--input-bg)', borderRadius: 8, fontSize: 13 }}
17891789
>
1790-
⚙️ Settings
1790+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" style={{ marginRight: 6 }}><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
1791+
Settings
17911792
</div>
17921793
</div>
17931794
</aside>
@@ -1804,7 +1805,9 @@ const App: React.FC = () => {
18041805
<section className="issue-list-pane" style={{ width: listWidth, minWidth: 300, maxWidth: 800, flexShrink: 0 }}>
18051806
<div style={{ padding: '40px 15px 10px', display: 'flex', gap: 10, alignItems: 'center' }}>
18061807
<div style={{ flex: 1, position: 'relative' }}>
1807-
<span style={{ position: 'absolute', left: 10, top: 10, color: 'var(--text-secondary)' }}>🔍</span>
1808+
<span style={{ position: 'absolute', left: 10, top: '48%', transform: 'translateY(-50%)', display: 'flex', alignItems: 'center', color: 'var(--text-secondary)' }}>
1809+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
1810+
</span>
18081811
<input type="text" placeholder="Search" value={vm.searchQuery} onChange={e => vm.setSearchQuery(e.target.value)} style={{ width: '100%', padding: '10px 10px 10px 35px', background: 'var(--input-bg)', border: '1px solid var(--input-border)', borderRadius: 8, color: 'var(--text-primary)' }} />
18091812
</div>
18101813
</div>
@@ -2123,17 +2126,30 @@ const App: React.FC = () => {
21232126
}}
21242127
title="复制链接"
21252128
className="icon-button"
2126-
style={{ background: 'none', border: 'none', cursor: 'pointer', fontSize: 12, opacity: 0.6, padding: 2, display: 'flex', alignItems: 'center' }}
2129+
style={{ background: 'none', border: 'none', cursor: 'pointer', fontSize: 12, opacity: 0.6, padding: 2, display: 'flex', alignItems: 'center', color: 'var(--text-primary)' }}
21272130
>
2128-
🔗
2131+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
2132+
</button>
2133+
<button
2134+
onClick={() => {
2135+
const text = `#${selectedIssue.id}: ${selectedIssue.subject}`;
2136+
navigator.clipboard.writeText(text);
2137+
}}
2138+
title="复制 ID+标题 (#id: title)"
2139+
className="icon-button"
2140+
style={{ background: 'none', border: 'none', cursor: 'pointer', fontSize: 12, opacity: 0.6, padding: 2, display: 'flex', alignItems: 'center', color: 'var(--text-primary)' }}
2141+
>
2142+
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg>
21292143
</button>
21302144
</div>
21312145
<div style={{ display: 'flex', gap: 10, alignItems: 'center' }}>
21322146
<button
21332147
onClick={() => setDeleteIssueConfirm(selectedIssue.id)}
2134-
style={{ background: 'none', border: 'none', cursor: 'pointer', color: '#ff453a', fontSize: 14 }}
2148+
style={{ background: 'none', border: 'none', cursor: 'pointer', color: '#ff453a', fontSize: 14, display: 'flex', alignItems: 'center' }}
21352149
title="删除任务"
2136-
>🗑️</button>
2150+
>
2151+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>
2152+
</button>
21372153
</div>
21382154
</div>
21392155
{/* Title row */}
@@ -2335,8 +2351,10 @@ const App: React.FC = () => {
23352351
{!editingDescription && (
23362352
<button
23372353
onClick={() => { setEditDescriptionValue(selectedIssue.description || ''); setEditingDescription(true); }}
2338-
style={{ background: 'none', border: 'none', color: '#0c66ff', fontSize: 18, cursor: 'pointer' }}
2339-
></button>
2354+
style={{ background: 'none', border: 'none', color: '#0c66ff', fontSize: 18, cursor: 'pointer', display: 'flex', alignItems: 'center' }}
2355+
>
2356+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>
2357+
</button>
23402358
)}
23412359
</div>
23422360
{editingDescription ? (

0 commit comments

Comments
 (0)