diff --git a/app/components/feature/CpSessionTrackTable.vue b/app/components/feature/CpSessionTrackTable.vue index 2a9cf4a..86e4a76 100644 --- a/app/components/feature/CpSessionTrackTable.vue +++ b/app/components/feature/CpSessionTrackTable.vue @@ -244,6 +244,7 @@ const sessions = computed(() => return { id: session.id, + key, title: session[locale.value].title, speaker: session.speakers?.map((s) => s[locale.value].name).join(', '), start: session.start!.slice(11, 16).replace(/^0/, ''), @@ -256,6 +257,19 @@ const sessions = computed(() => }), ) +const sessionsByKey = computed(() => { + const result = new Map() + for (const session of sessions.value) { + const list = result.get(session.key) + if (list) { + list.push(session) + } else { + result.set(session.key, [session]) + } + } + return result +}) + // Header ruler is 47px (46px content + 1px bottom border) to match the Figma time-axis row. const HEADER_HEIGHT = 47 @@ -267,7 +281,7 @@ const HEADER_HEIGHT = 47 :class="isDragging ? 'cursor-grabbing select-none' : 'cursor-grab'" :style="{ gridTemplateColumns: `${LABEL_WIDTH}px repeat(${totalGridCols}, ${columnWidth}px)`, - gridTemplateRows: `${HEADER_HEIGHT}px repeat(${tracks.length}, ${rowHeight}px)`, + gridTemplateRows: `${HEADER_HEIGHT}px ${tracks.map(() => `minmax(${rowHeight}px, auto)`).join(' ')}`, }" > @@ -306,156 +320,171 @@ const HEADER_HEIGHT = 47 - + - -
-
-
- +
+
+
+ + {{ track.name }} + + {{ track.name }} +
+
- {{ track.name }} - - {{ track.name }} + + {{ track.room }} +
-
- - {{ track.room }} +
+ +
-
- - - - -
-
- -
+
-
- - - - - -
-

- {{ session.title }} -

-

- {{ session.speaker || '\u00A0' }} -

- + +
+ + + + + +
+

+ {{ session.title }} +

+

+ {{ session.speaker || '\u00A0' }} +

+ +
+ + + +
- - -
-
+ @@ -493,3 +522,28 @@ const HEADER_HEIGHT = 47 add: '加入收藏' remove: '取消收藏' + +