Skip to content

Commit 9470481

Browse files
authored
Merge pull request #193 from igapyon/tiga0313wah
Git 作業一覧の基準・作業表示を調整し、HEAD 状態を補助ラベル化
2 parents 01c77a2 + f0b04f9 commit 9470481

3 files changed

Lines changed: 68 additions & 6 deletions

File tree

docs/git/git-work-list.html

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,10 @@
11881188
max-width: 100%;
11891189
}
11901190

1191+
.md-entry-base-box .md-ref-value {
1192+
margin-left: 0;
1193+
}
1194+
11911195
.md-entry-title {
11921196
margin: 0;
11931197
display: inline-flex;
@@ -1332,14 +1336,38 @@
13321336
color: #6d28d9;
13331337
}
13341338

1339+
.md-head-badge {
1340+
display: inline-flex;
1341+
align-items: center;
1342+
border-radius: 999px;
1343+
padding: 0.2rem 0.5rem;
1344+
font-size: 0.68rem;
1345+
font-weight: 800;
1346+
letter-spacing: 0.02em;
1347+
background: #e7f8f5;
1348+
color: #0f766e;
1349+
line-height: 1;
1350+
}
1351+
13351352
.md-ref-value {
1336-
font-size: 0.89rem;
1353+
font-size: 0.96rem;
13371354
font-weight: 500;
13381355
color: #475569;
13391356
white-space: nowrap;
13401357
margin-left: 1.25rem;
13411358
}
13421359

1360+
.md-ref-value-row {
1361+
display: inline-flex;
1362+
align-items: center;
1363+
gap: 0.5rem;
1364+
min-width: 0;
1365+
}
1366+
1367+
.md-ref-value-row .md-ref-value {
1368+
margin-left: 0;
1369+
}
1370+
13431371
.md-work-row-list {
13441372
display: grid;
13451373
gap: 0.7rem;
@@ -4156,13 +4184,16 @@ <h3 class="md-entry-title">${escapeHtml(group.displayName)}</h3>
41564184
}
41574185

41584186
function renderWorkRow(entry) {
4159-
const workRef = entry.compareUseHead ? "HEAD" : buildRef(entry.compareBranch, entry.compareScope, entry.remoteName);
4187+
const workRef = buildRef(entry.compareBranch, entry.compareScope, entry.remoteName);
41604188
return `
41614189
<section class="md-work-row" data-entry-id="${escapeHtml(entry.id)}">
41624190
<div class="md-work-row__main">
41634191
<div class="md-ref-box md-ref-box--work">
41644192
<div class="md-ref-label">${entry.locked ? `<span class="md-entry-lock-icon" aria-label="ロック中">${getButtonIconSvg("lock")}</span>` : ""}作業 <span class="md-scope-badge" data-scope="${escapeHtml(entry.compareScope)}">${escapeHtml(entry.compareScope)}</span></div>
4165-
<div class="md-ref-value">${escapeHtml(workRef)}</div>
4193+
<div class="md-ref-value-row">
4194+
<div class="md-ref-value">${escapeHtml(workRef)}</div>
4195+
${entry.compareUseHead ? '<span class="md-head-badge">HEAD</span>' : ""}
4196+
</div>
41664197
</div>
41674198
</div>
41684199
<div class="md-entry-actions md-work-row__actions">

docs/git/src/git-work-list/css/app.css

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@
149149
max-width: 100%;
150150
}
151151

152+
.md-entry-base-box .md-ref-value {
153+
margin-left: 0;
154+
}
155+
152156
.md-entry-title {
153157
margin: 0;
154158
display: inline-flex;
@@ -293,14 +297,38 @@
293297
color: #6d28d9;
294298
}
295299

300+
.md-head-badge {
301+
display: inline-flex;
302+
align-items: center;
303+
border-radius: 999px;
304+
padding: 0.2rem 0.5rem;
305+
font-size: 0.68rem;
306+
font-weight: 800;
307+
letter-spacing: 0.02em;
308+
background: #e7f8f5;
309+
color: #0f766e;
310+
line-height: 1;
311+
}
312+
296313
.md-ref-value {
297-
font-size: 0.89rem;
314+
font-size: 0.96rem;
298315
font-weight: 500;
299316
color: #475569;
300317
white-space: nowrap;
301318
margin-left: 1.25rem;
302319
}
303320

321+
.md-ref-value-row {
322+
display: inline-flex;
323+
align-items: center;
324+
gap: 0.5rem;
325+
min-width: 0;
326+
}
327+
328+
.md-ref-value-row .md-ref-value {
329+
margin-left: 0;
330+
}
331+
304332
.md-work-row-list {
305333
display: grid;
306334
gap: 0.7rem;

docs/git/src/git-work-list/js/main.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,16 @@
438438
}
439439

440440
function renderWorkRow(entry) {
441-
const workRef = entry.compareUseHead ? "HEAD" : buildRef(entry.compareBranch, entry.compareScope, entry.remoteName);
441+
const workRef = buildRef(entry.compareBranch, entry.compareScope, entry.remoteName);
442442
return `
443443
<section class="md-work-row" data-entry-id="${escapeHtml(entry.id)}">
444444
<div class="md-work-row__main">
445445
<div class="md-ref-box md-ref-box--work">
446446
<div class="md-ref-label">${entry.locked ? `<span class="md-entry-lock-icon" aria-label="ロック中">${getButtonIconSvg("lock")}</span>` : ""}作業 <span class="md-scope-badge" data-scope="${escapeHtml(entry.compareScope)}">${escapeHtml(entry.compareScope)}</span></div>
447-
<div class="md-ref-value">${escapeHtml(workRef)}</div>
447+
<div class="md-ref-value-row">
448+
<div class="md-ref-value">${escapeHtml(workRef)}</div>
449+
${entry.compareUseHead ? '<span class="md-head-badge">HEAD</span>' : ""}
450+
</div>
448451
</div>
449452
</div>
450453
<div class="md-entry-actions md-work-row__actions">

0 commit comments

Comments
 (0)