Lashtw commited on
Commit
54ca71d
·
verified ·
1 Parent(s): ca3eed2

Upload 8 files

Browse files
Files changed (1) hide show
  1. src/views/InstructorView.js +20 -18
src/views/InstructorView.js CHANGED
@@ -864,17 +864,18 @@ export function setupInstructorEvents() {
864
 
865
  prompts.forEach(p => {
866
  const card = document.createElement('div');
867
- card.className = 'bg-gray-800 rounded-xl p-4 border border-gray-700 hover:border-cyan-500 transition-colors flex flex-col h-64';
 
868
  card.innerHTML = `
869
- <div class="flex justify-between items-start mb-2">
870
- <h3 class="font-bold text-white truncate w-3/4" title="${p.title}">${p.title}</h3>
871
- <!-- Checkbox Placeholder for Phase 2 -->
872
- <input type="checkbox" class="w-5 h-5 rounded border-gray-600 text-purple-600 focus:ring-purple-500 bg-gray-700 prompt-select-checkbox cursor-pointer"
873
  data-id="${p.id}"
874
  onchange="handlePromptSelection(this)">
875
  </div>
876
- <div class="bg-black/30 rounded p-3 flex-1 overflow-y-auto text-xs font-mono text-green-300 mb-2 whitespace-pre-wrap">${p.prompt}</div>
877
- <div class="text-[10px] text-gray-500 text-right">${p.time}</div>
878
  `;
879
  container.appendChild(card);
880
  });
@@ -948,24 +949,25 @@ export function setupInstructorEvents() {
948
  const modal = document.getElementById('comparison-modal');
949
  const grid = document.getElementById('comparison-grid');
950
 
951
- // Setup Grid Columns
952
- let colClass = 'grid-cols-1';
953
- if (items.length === 2) colClass = 'grid-cols-2';
954
- if (items.length === 3) colClass = 'grid-cols-3';
955
 
956
- grid.className = `absolute inset-0 grid ${colClass} gap-0 divide-x divide-gray-700`;
957
  grid.innerHTML = '';
958
 
959
  items.forEach(item => {
960
  const col = document.createElement('div');
961
- col.className = 'flex flex-col h-full bg-gray-900 p-6';
 
962
  col.innerHTML = `
963
- <div class="mb-4 border-b border-gray-700 pb-2">
964
- <h3 class="text-lg font-bold text-cyan-400">${item.author}</h3>
965
- <p class="text-sm text-gray-400 truncate">${item.title}</p>
966
  </div>
967
- <!-- Prompt Content: Large Text for reading -->
968
- <div class="flex-1 overflow-y-auto font-mono text-green-300 text-lg leading-relaxed whitespace-pre-wrap p-2 hover:bg-white/5 transition-colors rounded">
969
  ${item.prompt}
970
  </div>
971
  `;
 
864
 
865
  prompts.forEach(p => {
866
  const card = document.createElement('div');
867
+ // Reduced height (h-64 -> h-48) and padding, but larger text inside
868
+ card.className = 'bg-gray-800 rounded-xl p-3 border border-gray-700 hover:border-cyan-500 transition-colors flex flex-col h-48 group';
869
  card.innerHTML = `
870
+ <div class="flex justify-between items-start mb-1.5">
871
+ <h3 class="font-bold text-white text-base truncate w-3/4" title="${p.title}">${p.title}</h3>
872
+ <!-- Checkbox -->
873
+ <input type="checkbox" class="w-6 h-6 rounded border-gray-600 text-purple-600 focus:ring-purple-500 bg-gray-700 prompt-select-checkbox cursor-pointer transform scale-110"
874
  data-id="${p.id}"
875
  onchange="handlePromptSelection(this)">
876
  </div>
877
+ <div class="bg-black/30 rounded p-2 flex-1 overflow-y-auto font-mono text-green-300 whitespace-pre-wrap custom-scrollbar text-base leading-snug group-hover:text-green-200 transaction-colors">${p.prompt}</div>
878
+ <div class="text-[10px] text-gray-500 text-right mt-1">${p.time}</div>
879
  `;
880
  container.appendChild(card);
881
  });
 
949
  const modal = document.getElementById('comparison-modal');
950
  const grid = document.getElementById('comparison-grid');
951
 
952
+ // Setup Grid Rows (Vertical Stacking)
953
+ let rowClass = 'grid-rows-1';
954
+ if (items.length === 2) rowClass = 'grid-rows-2';
955
+ if (items.length === 3) rowClass = 'grid-rows-3';
956
 
957
+ grid.className = `absolute inset-0 grid ${rowClass} gap-0 divide-y divide-gray-600`;
958
  grid.innerHTML = '';
959
 
960
  items.forEach(item => {
961
  const col = document.createElement('div');
962
+ // Check overflow-hidden to keep it contained, use flex-row for compact header + content
963
+ col.className = 'flex flex-row h-full bg-gray-900 p-4 overflow-hidden';
964
  col.innerHTML = `
965
+ <div class="w-48 flex-shrink-0 border-r border-gray-700 pr-4 mr-4 flex flex-col justify-center">
966
+ <h3 class="text-xl font-bold text-cyan-400 mb-1">${item.author}</h3>
967
+ <p class="text-md text-gray-400 truncate" title="${item.title}">${item.title}</p>
968
  </div>
969
+ <!-- Prompt Content: Larger Text -->
970
+ <div class="flex-1 overflow-y-auto font-mono text-green-300 text-2xl leading-relaxed whitespace-pre-wrap p-2 hover:bg-white/5 transition-colors rounded custom-scrollbar">
971
  ${item.prompt}
972
  </div>
973
  `;