@qzsy/dsh-yunxiao-panel 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/client.js +188 -10
- package/package.json +1 -1
- package/test/render-test.mjs +27 -2
package/README.md
CHANGED
|
@@ -45,6 +45,7 @@ and a repository chip row for its merge requests.
|
|
|
45
45
|
full-width swipe page and a tap opens the detail pane instead,
|
|
46
46
|
- merge requests waiting for review (all open ones in organization scope), with
|
|
47
47
|
a direct link to Yunxiao when the list is empty.
|
|
48
|
+
- **Detail sheet** — opening a work item slides in a right-hand sheet (up to 820 px wide, always on top of a dimmed panel) so descriptions, images, comments and the footer actions get room; Esc, the close button or a click on the dimmed area dismisses it, and it stays full-width on phones.
|
|
48
49
|
- **Change status from the detail pane** — the pane shows the current status, a
|
|
49
50
|
dropdown of the whole workflow for that work item type, and a **标记完成**
|
|
50
51
|
button that picks the type's own done status (缺陷 → 已修复, 需求 → 已完成, else
|
package/dist/client.js
CHANGED
|
@@ -375,6 +375,9 @@ window.__ModuleLoader__.load({
|
|
|
375
375
|
viewList: '列表',
|
|
376
376
|
viewBoard: '看板',
|
|
377
377
|
boardEmpty: '暂无工作项',
|
|
378
|
+
moveTo: '移动状态',
|
|
379
|
+
moveTitle: '把 {serial} 移到',
|
|
380
|
+
moveEmpty: '没有可用的状态',
|
|
378
381
|
boardDropHint: '拖到这里改状态',
|
|
379
382
|
statusUnavailable: '这个工作项类型里没有该状态',
|
|
380
383
|
scopeMine: '我的',
|
|
@@ -580,6 +583,9 @@ window.__ModuleLoader__.load({
|
|
|
580
583
|
viewList: 'List',
|
|
581
584
|
viewBoard: 'Board',
|
|
582
585
|
boardEmpty: 'No items',
|
|
586
|
+
moveTo: 'Change status',
|
|
587
|
+
moveTitle: 'Move {serial} to',
|
|
588
|
+
moveEmpty: 'No status available',
|
|
583
589
|
boardDropHint: 'Drop here to change status',
|
|
584
590
|
statusUnavailable: 'That status is not part of this work item type',
|
|
585
591
|
scopeMine: 'Mine',
|
|
@@ -659,7 +665,7 @@ window.__ModuleLoader__.load({
|
|
|
659
665
|
.yx-badge--button{cursor:pointer;font:inherit;font-size:11px}
|
|
660
666
|
.yx-badge--button:hover{border-color:var(--dsw-alias-border-l4);color:var(--dsw-alias-label-primary)}
|
|
661
667
|
.yx-footer{padding:8px 14px;border-top:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-tertiary);font-size:11px;display:flex;justify-content:space-between;gap:8px}
|
|
662
|
-
.yx-main{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0}
|
|
668
|
+
.yx-main{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0;position:relative}
|
|
663
669
|
.yx-head{display:flex;align-items:center;gap:10px;padding:14px 20px 10px;border-bottom:1px solid var(--dsw-alias-border-l1);flex-wrap:wrap}
|
|
664
670
|
.yx-head-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
|
|
665
671
|
.yx-head-name{font-size:16px;font-weight:600;line-height:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
@@ -702,10 +708,15 @@ window.__ModuleLoader__.load({
|
|
|
702
708
|
.yx-btn[data-primary="true"]{background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-brand-primary));border-color:transparent;color:var(--dsw-alias-label-primary-foreground,#fff)}
|
|
703
709
|
.yx-btn[data-primary="true"]:hover{background:var(--dsw-alias-button-primary-hover,var(--dsw-alias-brand-primary))}
|
|
704
710
|
.yx-btn:disabled{opacity:.55;cursor:default}
|
|
705
|
-
.yx-detail{
|
|
706
|
-
|
|
711
|
+
.yx-detail{position:absolute;top:0;right:0;bottom:0;z-index:30;width:min(820px,80vw);max-width:none;display:flex;flex-direction:column;min-height:0;border-left:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);box-shadow:-18px 0 44px rgba(0,0,0,.18);animation:yx-sheet-in .22s cubic-bezier(.2,.8,.2,1)}
|
|
712
|
+
@keyframes yx-sheet-in{from{transform:translateX(30px);opacity:0}to{transform:none;opacity:1}}
|
|
713
|
+
.yx-sheet-scrim{position:absolute;inset:0;z-index:29;background:rgba(0,0,0,.26);animation:yx-fade-in .18s ease}
|
|
714
|
+
@keyframes yx-fade-in{from{opacity:0}to{opacity:1}}
|
|
715
|
+
.yx-detail-facts{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 20px}
|
|
716
|
+
@media (prefers-reduced-motion:reduce){.yx-detail,.yx-sheet-scrim{animation:none}}
|
|
717
|
+
.yx-detail-head{display:flex;align-items:flex-start;gap:10px;padding:16px 22px 12px;border-bottom:1px solid var(--dsw-alias-border-l1)}
|
|
707
718
|
.yx-detail-title{flex:1;min-width:0;font-size:14px;font-weight:600;line-height:20px;overflow-wrap:anywhere}
|
|
708
|
-
.yx-detail-body{flex:1;min-height:0;overflow:auto;padding:
|
|
719
|
+
.yx-detail-body{flex:1;min-height:0;overflow:auto;padding:16px 22px 28px;display:flex;flex-direction:column;gap:14px}
|
|
709
720
|
.yx-fact{display:flex;gap:10px;font-size:12px;line-height:18px}
|
|
710
721
|
.yx-fact dt{color:var(--dsw-alias-label-tertiary);width:64px;flex:none}
|
|
711
722
|
.yx-fact dd{margin:0;min-width:0;overflow-wrap:anywhere}
|
|
@@ -714,7 +725,7 @@ window.__ModuleLoader__.load({
|
|
|
714
725
|
.yx-comment{border-top:1px solid var(--dsw-alias-border-l2);padding-top:8px;display:flex;flex-direction:column;gap:4px}
|
|
715
726
|
.yx-comment-head{display:flex;gap:8px;font-size:11.5px;color:var(--dsw-alias-label-tertiary)}
|
|
716
727
|
.yx-comment-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12.5px;line-height:19px}
|
|
717
|
-
.yx-detail-foot{display:flex;gap:8px;padding:
|
|
728
|
+
.yx-detail-foot{display:flex;gap:8px;padding:12px 22px 16px;background:var(--dsw-alias-bg-layer-1);border-top:1px solid var(--dsw-alias-border-l1);flex-wrap:wrap}
|
|
718
729
|
.yx-pop{position:absolute;top:30px;right:0;z-index:40;width:280px;max-height:320px;overflow:auto;background:var(--dsw-alias-bg-overlay);border:1px solid var(--dsw-alias-border-l2);border-radius:10px;box-shadow:var(--dsw-elevation-prominent,0 8px 28px rgba(0,0,0,.18));padding:6px}
|
|
719
730
|
.yx-pop-item{display:flex;flex-direction:column;gap:2px;width:100%;border:0;background:transparent;color:inherit;text-align:left;border-radius:7px;padding:7px 9px;cursor:pointer;font:inherit}
|
|
720
731
|
.yx-pop-item:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
@@ -1047,6 +1058,21 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
1047
1058
|
.yx-board-drop{display:flex;align-items:center;justify-content:center;border:1px dashed var(--dsw-alias-border-l3);border-radius:9px;color:var(--dsw-alias-label-tertiary);font-size:11px;padding:10px 6px}
|
|
1048
1059
|
.yx-board-drop-touch{display:none}
|
|
1049
1060
|
@media (max-width:760px){.yx-board{scroll-snap-type:x mandatory;padding-bottom:12px}.yx-board-col{flex:0 0 84%;min-width:0;max-width:84%;scroll-snap-align:start}.yx-board-drop-drag{display:none}.yx-board-drop-touch{display:inline}}
|
|
1061
|
+
.yx-board-top{display:flex;align-items:center;gap:6px;min-width:0}
|
|
1062
|
+
.yx-board-move{flex:none;margin-left:auto;width:22px;height:22px;border-radius:6px;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0}
|
|
1063
|
+
.yx-board-move:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l4)}
|
|
1064
|
+
.yx-board-tabs{display:none}
|
|
1065
|
+
.yx-board-tabs .yx-chip{flex:none}
|
|
1066
|
+
@media (max-width:760px){
|
|
1067
|
+
.yx-board-tabs{display:flex;gap:6px;overflow-x:auto;padding:2px 2px 8px;margin:0 -2px}
|
|
1068
|
+
.yx-board-move{width:30px;height:30px;font-size:14px}
|
|
1069
|
+
}
|
|
1070
|
+
.yx-move-list{display:flex;flex-direction:column;gap:4px;max-height:min(60vh,420px);overflow:auto}
|
|
1071
|
+
.yx-move-row{display:flex;align-items:center;gap:8px;width:100%;min-height:40px;padding:8px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:9px;background:var(--dsw-alias-bg-layer-1);color:inherit;font:inherit;font-size:13px;text-align:left;cursor:pointer}
|
|
1072
|
+
.yx-move-row:hover:not(:disabled){border-color:var(--dsw-alias-border-l4);background:var(--dsw-alias-interactive-bg-hover)}
|
|
1073
|
+
.yx-move-row[data-current="true"]{border-color:var(--dsw-alias-brand-primary);background:color-mix(in srgb,var(--dsw-alias-brand-primary) 8%,var(--dsw-alias-bg-layer-1))}
|
|
1074
|
+
.yx-move-row:disabled{opacity:.55;cursor:default}
|
|
1075
|
+
.yx-move-dot{width:8px;height:8px;border-radius:50%;flex:none}
|
|
1050
1076
|
@media (max-width:1100px){.yx-detail{position:absolute;right:0;top:0;bottom:0;width:min(440px,92vw);box-shadow:var(--dsw-elevation-prominent,-8px 0 24px rgba(0,0,0,.16));z-index:30}.yx-main{position:relative}}
|
|
1051
1077
|
@media (max-width:760px){
|
|
1052
1078
|
.yx-aside{position:absolute;left:0;top:0;bottom:0;z-index:40;width:min(300px,86vw);flex:0 0 auto;transform:translateX(-100%);transition:transform .2s ease;box-shadow:none}
|
|
@@ -1083,7 +1109,7 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
1083
1109
|
.yx-charts{grid-template-columns:1fr}
|
|
1084
1110
|
.yx-work-lists{grid-template-columns:1fr}
|
|
1085
1111
|
.yx-work-list{max-height:340px}
|
|
1086
|
-
.yx-detail{width:100%;
|
|
1112
|
+
.yx-detail{width:100%;max-width:none;left:0;right:0}.yx-detail-facts{grid-template-columns:1fr}
|
|
1087
1113
|
.yx-modal{padding:12px}
|
|
1088
1114
|
.yx-modal-card{width:100%;max-width:100%;max-height:88vh;overflow:auto}
|
|
1089
1115
|
.yx-md table{display:block;overflow-x:auto}
|
|
@@ -2065,13 +2091,41 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
2065
2091
|
})
|
|
2066
2092
|
}
|
|
2067
2093
|
|
|
2068
|
-
function WorkbenchPage({ t, state, data, error, onRetry, onRefresh, onOpenItem, refreshing, scope = 'mine', onScope, onMoveStatus }) {
|
|
2094
|
+
function WorkbenchPage({ t, state, data, error, onRetry, onRefresh, onOpenItem, refreshing, scope = 'mine', onScope, onMoveStatus, onLoadStatuses }) {
|
|
2069
2095
|
const isOrg = scope === 'org'
|
|
2070
2096
|
const [layout, setLayout] = useState(() =>
|
|
2071
2097
|
readStringStorage(WORKBENCH_VIEW_KEY) === 'board' ? 'board' : 'list',
|
|
2072
2098
|
)
|
|
2073
2099
|
const [dragId, setDragId] = useState('')
|
|
2074
2100
|
const [overColumn, setOverColumn] = useState('')
|
|
2101
|
+
const [moveTarget, setMoveTarget] = useState(null)
|
|
2102
|
+
const [moveList, setMoveList] = useState([])
|
|
2103
|
+
const [moveBusy, setMoveBusy] = useState(false)
|
|
2104
|
+
const [columnTab, setColumnTab] = useState('')
|
|
2105
|
+
const columnRefs = useRef({})
|
|
2106
|
+
const openMove = useCallback(
|
|
2107
|
+
async (item) => {
|
|
2108
|
+
setMoveTarget(item)
|
|
2109
|
+
setMoveList([])
|
|
2110
|
+
if (!onLoadStatuses) return
|
|
2111
|
+
setMoveBusy(true)
|
|
2112
|
+
try {
|
|
2113
|
+
setMoveList(await onLoadStatuses(item))
|
|
2114
|
+
} catch {
|
|
2115
|
+
setMoveList([])
|
|
2116
|
+
} finally {
|
|
2117
|
+
setMoveBusy(false)
|
|
2118
|
+
}
|
|
2119
|
+
},
|
|
2120
|
+
[onLoadStatuses],
|
|
2121
|
+
)
|
|
2122
|
+
const jumpToColumn = useCallback((name) => {
|
|
2123
|
+
setColumnTab(name)
|
|
2124
|
+
const node = columnRefs.current?.[name]
|
|
2125
|
+
if (node && typeof node.scrollIntoView === 'function') {
|
|
2126
|
+
node.scrollIntoView({ behavior: 'smooth', inline: 'start', block: 'nearest' })
|
|
2127
|
+
}
|
|
2128
|
+
}, [])
|
|
2075
2129
|
const switchLayout = useCallback((next) => {
|
|
2076
2130
|
setLayout(next === 'board' ? 'board' : 'list')
|
|
2077
2131
|
try {
|
|
@@ -2603,6 +2657,25 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
2603
2657
|
),
|
|
2604
2658
|
hasFilter ? h('button', { className: 'yx-link-btn', onClick: clearFilters }, t('filterClear')) : null,
|
|
2605
2659
|
),
|
|
2660
|
+
filteredItems.length && layout === 'board'
|
|
2661
|
+
? h(
|
|
2662
|
+
'div',
|
|
2663
|
+
{ className: 'yx-board-tabs' },
|
|
2664
|
+
boardColumns.map((column) =>
|
|
2665
|
+
h(
|
|
2666
|
+
'button',
|
|
2667
|
+
{
|
|
2668
|
+
key: column.name,
|
|
2669
|
+
type: 'button',
|
|
2670
|
+
className: 'yx-chip',
|
|
2671
|
+
'data-active': String(columnTab === column.name),
|
|
2672
|
+
onClick: () => jumpToColumn(column.name),
|
|
2673
|
+
},
|
|
2674
|
+
`${column.name} ${column.rows.length}`,
|
|
2675
|
+
),
|
|
2676
|
+
),
|
|
2677
|
+
)
|
|
2678
|
+
: null,
|
|
2606
2679
|
filteredItems.length && layout === 'board'
|
|
2607
2680
|
? h(
|
|
2608
2681
|
'div',
|
|
@@ -2612,6 +2685,9 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
2612
2685
|
'section',
|
|
2613
2686
|
{
|
|
2614
2687
|
key: column.name,
|
|
2688
|
+
ref: (node) => {
|
|
2689
|
+
columnRefs.current[column.name] = node
|
|
2690
|
+
},
|
|
2615
2691
|
className: 'yx-board-col',
|
|
2616
2692
|
'data-over': String(overColumn === column.name),
|
|
2617
2693
|
style: { '--tone': TONE_COLOR[column.tone] },
|
|
@@ -2670,7 +2746,7 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
2670
2746
|
},
|
|
2671
2747
|
h(
|
|
2672
2748
|
'span',
|
|
2673
|
-
{ className: 'yx-board-card-top' },
|
|
2749
|
+
{ className: 'yx-board-card-top yx-board-top' },
|
|
2674
2750
|
h('span', { className: 'yx-serial' }, item.serialNumber),
|
|
2675
2751
|
item.workitemType
|
|
2676
2752
|
? h(
|
|
@@ -2682,6 +2758,22 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
2682
2758
|
item.workitemType,
|
|
2683
2759
|
)
|
|
2684
2760
|
: null,
|
|
2761
|
+
onMoveStatus || onLoadStatuses
|
|
2762
|
+
? h(
|
|
2763
|
+
'button',
|
|
2764
|
+
{
|
|
2765
|
+
type: 'button',
|
|
2766
|
+
className: 'yx-board-move',
|
|
2767
|
+
title: t('moveTo'),
|
|
2768
|
+
'aria-label': t('moveTo'),
|
|
2769
|
+
onClick: (event) => {
|
|
2770
|
+
event.stopPropagation()
|
|
2771
|
+
openMove(item)
|
|
2772
|
+
},
|
|
2773
|
+
},
|
|
2774
|
+
'⇄',
|
|
2775
|
+
)
|
|
2776
|
+
: null,
|
|
2685
2777
|
),
|
|
2686
2778
|
h('span', { className: 'yx-board-subject' }, item.subject || '-'),
|
|
2687
2779
|
h(
|
|
@@ -2868,6 +2960,72 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
2868
2960
|
),
|
|
2869
2961
|
),
|
|
2870
2962
|
),
|
|
2963
|
+
moveTarget
|
|
2964
|
+
? h(
|
|
2965
|
+
'div',
|
|
2966
|
+
{
|
|
2967
|
+
className: 'yx-modal',
|
|
2968
|
+
role: 'dialog',
|
|
2969
|
+
'aria-modal': 'true',
|
|
2970
|
+
onMouseDown: (event) => {
|
|
2971
|
+
if (event.target === event.currentTarget) setMoveTarget(null)
|
|
2972
|
+
},
|
|
2973
|
+
},
|
|
2974
|
+
h(
|
|
2975
|
+
'div',
|
|
2976
|
+
{ className: 'yx-modal-card' },
|
|
2977
|
+
h(
|
|
2978
|
+
'div',
|
|
2979
|
+
{ className: 'yx-modal-head' },
|
|
2980
|
+
h(
|
|
2981
|
+
'div',
|
|
2982
|
+
{ className: 'yx-modal-title' },
|
|
2983
|
+
t('moveTitle').replace('{serial}', moveTarget.serialNumber || ''),
|
|
2984
|
+
),
|
|
2985
|
+
h(
|
|
2986
|
+
'button',
|
|
2987
|
+
{ className: 'yx-icon-btn', onClick: () => setMoveTarget(null), 'aria-label': t('close') },
|
|
2988
|
+
'✕',
|
|
2989
|
+
),
|
|
2990
|
+
),
|
|
2991
|
+
moveBusy
|
|
2992
|
+
? h('p', { className: 'yx-muted' }, t('loading'))
|
|
2993
|
+
: moveList.length
|
|
2994
|
+
? h(
|
|
2995
|
+
'div',
|
|
2996
|
+
{ className: 'yx-move-list' },
|
|
2997
|
+
moveList.map((status) =>
|
|
2998
|
+
h(
|
|
2999
|
+
'button',
|
|
3000
|
+
{
|
|
3001
|
+
key: status.id,
|
|
3002
|
+
type: 'button',
|
|
3003
|
+
className: 'yx-move-row',
|
|
3004
|
+
'data-current': String(status.name === moveTarget.status),
|
|
3005
|
+
disabled: status.name === moveTarget.status,
|
|
3006
|
+
onClick: () => {
|
|
3007
|
+
const item = moveTarget
|
|
3008
|
+
setMoveTarget(null)
|
|
3009
|
+
if (onMoveStatus) onMoveStatus(item, status.name)
|
|
3010
|
+
},
|
|
3011
|
+
},
|
|
3012
|
+
h('span', {
|
|
3013
|
+
className: 'yx-move-dot',
|
|
3014
|
+
style: { background: TONE_COLOR[workTone(status.name)] },
|
|
3015
|
+
}),
|
|
3016
|
+
status.name,
|
|
3017
|
+
),
|
|
3018
|
+
),
|
|
3019
|
+
)
|
|
3020
|
+
: h('p', { className: 'yx-muted' }, t('moveEmpty')),
|
|
3021
|
+
h(
|
|
3022
|
+
'div',
|
|
3023
|
+
{ className: 'yx-modal-actions' },
|
|
3024
|
+
h('button', { className: 'yx-btn', onClick: () => setMoveTarget(null) }, t('cancel')),
|
|
3025
|
+
),
|
|
3026
|
+
),
|
|
3027
|
+
)
|
|
3028
|
+
: null,
|
|
2871
3029
|
)
|
|
2872
3030
|
}
|
|
2873
3031
|
|
|
@@ -3315,6 +3473,24 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
3315
3473
|
[showToast, statusMutation, t],
|
|
3316
3474
|
)
|
|
3317
3475
|
|
|
3476
|
+
const loadStatusesFor = useCallback(
|
|
3477
|
+
async (item) => {
|
|
3478
|
+
const spaceId = item?.spaceId || item?.projectId || ''
|
|
3479
|
+
const typeId = item?.workitemTypeId || ''
|
|
3480
|
+
if (!spaceId || !typeId) return []
|
|
3481
|
+
const workflow = await queryClient.fetchQuery({
|
|
3482
|
+
queryKey: ['workflow', spaceId, typeId],
|
|
3483
|
+
queryFn: () =>
|
|
3484
|
+
getJson(
|
|
3485
|
+
`${API}/workflow?spaceId=${encodeURIComponent(spaceId)}&typeId=${encodeURIComponent(typeId)}`,
|
|
3486
|
+
),
|
|
3487
|
+
staleTime: 10 * 60_000,
|
|
3488
|
+
})
|
|
3489
|
+
return (workflow?.statuses ?? []).map((entry) => ({ id: entry.id, name: entry.name }))
|
|
3490
|
+
},
|
|
3491
|
+
[queryClient],
|
|
3492
|
+
)
|
|
3493
|
+
|
|
3318
3494
|
const moveStatusByName = useCallback(
|
|
3319
3495
|
async (item, statusName) => {
|
|
3320
3496
|
const spaceId = item?.spaceId || item?.projectId || ''
|
|
@@ -3848,7 +4024,7 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
3848
4024
|
isIssue
|
|
3849
4025
|
? h(
|
|
3850
4026
|
'dl',
|
|
3851
|
-
{ key: 'facts',
|
|
4027
|
+
{ key: 'facts', className: 'yx-detail-facts' },
|
|
3852
4028
|
h('div', { className: 'yx-fact' }, h('dt', null, t('project')), h('dd', null, detailProject ? `${projectCode(detailProject)} ${detailProject.name}` : t('unbound'))),
|
|
3853
4029
|
h('div', { className: 'yx-fact' }, h('dt', null, t('promptType')), h('dd', null, full.workitemType || full.categoryId || '-')),
|
|
3854
4030
|
h('div', { className: 'yx-fact' }, h('dt', null, t('promptStatus')), h('dd', null, full.status || '-')),
|
|
@@ -3858,7 +4034,7 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
3858
4034
|
)
|
|
3859
4035
|
: h(
|
|
3860
4036
|
'dl',
|
|
3861
|
-
{ key: 'facts',
|
|
4037
|
+
{ key: 'facts', className: 'yx-detail-facts' },
|
|
3862
4038
|
h('div', { className: 'yx-fact' }, h('dt', null, t('promptStatus')), h('dd', null, statusLabel(t, full.state))),
|
|
3863
4039
|
h('div', { className: 'yx-fact' }, h('dt', null, t('author')), h('dd', null, full.author || '-')),
|
|
3864
4040
|
h('div', { className: 'yx-fact' }, h('dt', null, t('branches')), h('dd', { className: 'yx-branch' }, `${full.sourceBranch} → ${full.targetBranch}`)),
|
|
@@ -5244,6 +5420,7 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
5244
5420
|
scope: workScope,
|
|
5245
5421
|
onScope: switchWorkScope,
|
|
5246
5422
|
onMoveStatus: moveStatusByName,
|
|
5423
|
+
onLoadStatuses: loadStatusesFor,
|
|
5247
5424
|
onOpenItem: (item) => openIssue(item, item.projectId),
|
|
5248
5425
|
})
|
|
5249
5426
|
: view === 'repo'
|
|
@@ -5267,6 +5444,7 @@ button.yx-bar-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
|
5267
5444
|
h('div', { className: 'yx-empty-body' }, t('selectProjectHint')),
|
|
5268
5445
|
),
|
|
5269
5446
|
),
|
|
5447
|
+
detail ? h('div', { className: 'yx-sheet-scrim', onClick: () => setDetail(null) }) : null,
|
|
5270
5448
|
renderDetail(),
|
|
5271
5449
|
convert ? renderConvert() : null,
|
|
5272
5450
|
renderBinding(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qzsy/dsh-yunxiao-panel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Yunxiao (阿里云云效) panel for the DeepSeek Harness Web client: a cross-project workbench with charts, project/repository navigation, Projex work items, Codeup commits and merge requests.",
|
|
6
6
|
"license": "MIT",
|
package/test/render-test.mjs
CHANGED
|
@@ -54,7 +54,7 @@ const dict = {
|
|
|
54
54
|
kpiCompletion: '完成率', kpiShare: '占比', kpiOpenBugs: '{n} 个未关闭', kpiReviewHint: '点击定位到评审列表',
|
|
55
55
|
changeStatus: '改为其他状态…', markDone: '标记完成', statusSaving: '更新中…', statusFinished: '已完成',
|
|
56
56
|
statusChanged: '已改为「{name}」',
|
|
57
|
-
kpiReviewClear: '暂无待评审', viewList: '列表', viewBoard: '看板', boardDropHint: '拖到这里改状态', statusUnavailable: '这个类型没有该状态', scopeMine: '我的', scopeOrg: '组织', orgReviews: '组织待评审', byAssignee: '按负责人', assigneesUnit: '位负责人', heroSummary: '还有 {open} 项未完成,{bugs} 个缺陷待处理,{reviews} 个合并请求等你评审',
|
|
57
|
+
kpiReviewClear: '暂无待评审', viewList: '列表', viewBoard: '看板', boardDropHint: '拖到这里改状态', statusUnavailable: '这个类型没有该状态', moveTo: '移动状态', moveTitle: '把 {serial} 移到', moveEmpty: '没有可用的状态', scopeMine: '我的', scopeOrg: '组织', orgReviews: '组织待评审', byAssignee: '按负责人', assigneesUnit: '位负责人', heroSummary: '还有 {open} 项未完成,{bugs} 个缺陷待处理,{reviews} 个合并请求等你评审',
|
|
58
58
|
doneSection: '已完成 / 已关闭', statusUnit: '种状态', projectsUnit: '个项目', typesUnit: '种类型',
|
|
59
59
|
trendTotal: '合计 ', trendPeak: '峰值 ', trendLatest: '最近 ', toneTodo: '待处理', toneConfirm: '待确认',
|
|
60
60
|
toneDoing: '处理中', toneDone: '已完成', toneClosed: '已关闭',
|
|
@@ -221,7 +221,9 @@ global.fetch = async (input, init) => {
|
|
|
221
221
|
if (url.includes('/workitem-status') && method === 'POST') {
|
|
222
222
|
statusBody = JSON.parse(init.body)
|
|
223
223
|
const STATUS_NAMES = { '28': '待确认', '100010': '处理中', '29': '已修复', '100085': '已关闭' }
|
|
224
|
-
|
|
224
|
+
if (statusBody.id === 'w1') {
|
|
225
|
+
w1Status = { id: statusBody.statusId, name: STATUS_NAMES[statusBody.statusId] || '已修复' }
|
|
226
|
+
}
|
|
225
227
|
return json({ ...issues[0], workitemTypeId: 'type-bug', spaceId: 'space-1', statusId: w1Status.id, status: w1Status.name, comments: [] })
|
|
226
228
|
}
|
|
227
229
|
if (url.includes('/workitem?')) {
|
|
@@ -405,6 +407,29 @@ await flush()
|
|
|
405
407
|
if (!statusBody || statusBody.id !== 'w1' || statusBody.statusId !== '100010') {
|
|
406
408
|
throw new Error(`board drop sent the wrong status: ${JSON.stringify(statusBody)}`)
|
|
407
409
|
}
|
|
410
|
+
// touch screens use the per-card move dialog instead of dragging
|
|
411
|
+
if (!container.querySelector('.yx-board-tabs')) throw new Error('board column tabs missing for narrow screens')
|
|
412
|
+
const w2Card = [...board.querySelectorAll('.yx-board-card')].find((card) => card.textContent.includes('QXERP-62'))
|
|
413
|
+
if (!w2Card) throw new Error('second board card missing')
|
|
414
|
+
const moveButton = w2Card.querySelector('.yx-board-move')
|
|
415
|
+
if (!moveButton) throw new Error('per-card move button missing')
|
|
416
|
+
await act(async () => {
|
|
417
|
+
moveButton.dispatchEvent(new dom.window.MouseEvent('click', { bubbles: true }))
|
|
418
|
+
})
|
|
419
|
+
await flush()
|
|
420
|
+
const moveDialog = container.querySelector('.yx-modal')
|
|
421
|
+
if (!moveDialog) throw new Error('move dialog did not open')
|
|
422
|
+
const moveRow = [...moveDialog.querySelectorAll('.yx-move-row')].find((row) =>
|
|
423
|
+
row.textContent.includes('已修复'),
|
|
424
|
+
)
|
|
425
|
+
if (!moveRow) throw new Error('move dialog did not list workflow statuses')
|
|
426
|
+
await act(async () => {
|
|
427
|
+
moveRow.dispatchEvent(new dom.window.MouseEvent('click', { bubbles: true }))
|
|
428
|
+
})
|
|
429
|
+
await flush()
|
|
430
|
+
if (!statusBody || statusBody.id !== 'w2' || statusBody.statusId !== '29') {
|
|
431
|
+
throw new Error(`move dialog sent the wrong status: ${JSON.stringify(statusBody)}`)
|
|
432
|
+
}
|
|
408
433
|
const listButton = [...container.querySelectorAll('.yx-viewswitch-btn')].find((button) =>
|
|
409
434
|
button.textContent === '列表',
|
|
410
435
|
)
|