linguabot commited on
Commit
f7025cc
·
verified ·
1 Parent(s): f29c9d3

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. client/src/pages/WeeklyPractice.tsx +16 -16
client/src/pages/WeeklyPractice.tsx CHANGED
@@ -1432,7 +1432,7 @@ const WeeklyPractice: React.FC = () => {
1432
  onClick={() => handleWeekChange(week)}
1433
  className={`px-4 py-2 rounded-lg font-medium whitespace-nowrap transition-all duration-200 ease-in-out ${
1434
  selectedWeek === week
1435
- ? 'bg-ui-neonBlue text-white'
1436
  : 'bg-ui-panel text-ui-text hover:bg-white border border-ui-border'
1437
  }`}
1438
  >
@@ -1445,9 +1445,9 @@ const WeeklyPractice: React.FC = () => {
1445
  {/* Week Transition Loading Spinner */}
1446
  {isWeekTransitioning && (
1447
  <div className="fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-50">
1448
- <div className="bg-white rounded-lg shadow-lg p-4 flex items-center space-x-3">
1449
  <div className="animate-spin rounded-full h-6 w-6 border-b-2 border-ui-neonBlue"></div>
1450
- <span className="text-gray-700 font-medium">Loading...</span>
1451
  </div>
1452
  </div>
1453
  )}
@@ -1506,15 +1506,15 @@ const WeeklyPractice: React.FC = () => {
1506
  {editingBrief[selectedWeek] ? (
1507
  <div>
1508
  <div className="flex items-center justify-end space-x-2 mb-2">
1509
- <button onClick={() => applyInlineFormat('weekly-brief-input', editForm.translationBrief, v => setEditForm({ ...editForm, translationBrief: v }), '**')} className="px-2 py-1 text-xs bg-blue-100 text-blue-800 rounded">B</button>
1510
- <button onClick={() => applyInlineFormat('weekly-brief-input', editForm.translationBrief, v => setEditForm({ ...editForm, translationBrief: v }), '*')} className="px-2 py-1 text-xs bg-blue-100 text-blue-800 rounded italic">I</button>
1511
- <button onClick={() => applyLinkFormat('weekly-brief-input', editForm.translationBrief || '', v => setEditForm({ ...editForm, translationBrief: v }))} className="px-2 py-1 text-xs bg-blue-100 text-blue-800 rounded">Link</button>
1512
  </div>
1513
  <textarea
1514
  id="weekly-brief-input"
1515
  value={editForm.translationBrief}
1516
  onChange={(e) => setEditForm({ ...editForm, translationBrief: e.target.value })}
1517
- className="w-full p-4 border border-blue-300 rounded-lg text-blue-800 leading-relaxed text-lg bg-white"
1518
  rows={6}
1519
  placeholder="Enter translation brief..."
1520
  />
@@ -1526,17 +1526,17 @@ const WeeklyPractice: React.FC = () => {
1526
  ) : (
1527
  // Show add brief button when no brief exists
1528
  JSON.parse(localStorage.getItem('user') || '{}').role === 'admin' && (
1529
- <div className="bg-gradient-to-r from-blue-50 to-indigo-50 rounded-xl p-8 mb-8 border border-blue-200 border-dashed">
1530
  <div className="flex items-center justify-between mb-4">
1531
  <div className="flex items-center space-x-2">
1532
- <div className="bg-blue-100 rounded-full p-2">
1533
- <BookOpenIcon className="h-5 w-5 text-blue-600" />
1534
  </div>
1535
- <h3 className="text-blue-900 font-semibold text-xl">Translation Brief</h3>
1536
  </div>
1537
  <button
1538
  onClick={startAddingBrief}
1539
- className="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition-colors duration-200 flex items-center space-x-2"
1540
  >
1541
  <PlusIcon className="h-4 w-4" />
1542
  <span>Add Translation Brief</span>
@@ -1545,14 +1545,14 @@ const WeeklyPractice: React.FC = () => {
1545
  {editingBrief[selectedWeek] && (
1546
  <div className="space-y-4">
1547
  <div className="flex items-center justify-end space-x-2">
1548
- <button onClick={() => applyInlineFormat('weekly-brief-input', editForm.translationBrief, v => setEditForm({ ...editForm, translationBrief: v }), '**')} className="px-2 py-1 text-xs bg-blue-100 text-blue-800 rounded">B</button>
1549
- <button onClick={() => applyInlineFormat('weekly-brief-input', editForm.translationBrief, v => setEditForm({ ...editForm, translationBrief: v }), '*')} className="px-2 py-1 text-xs bg-blue-100 text-blue-800 rounded italic">I</button>
1550
- <button onClick={() => applyLinkFormat('weekly-brief-input', editForm.translationBrief || '', v => setEditForm({ ...editForm, translationBrief: v }))} className="px-2 py-1 text-xs bg-blue-100 text-blue-800 rounded">Link</button>
1551
  </div>
1552
  <textarea
1553
  value={editForm.translationBrief}
1554
  onChange={(e) => setEditForm({ ...editForm, translationBrief: e.target.value })}
1555
- className="w-full p-4 border border-blue-300 rounded-lg text-blue-800 leading-relaxed text-lg bg-white"
1556
  rows={6}
1557
  placeholder="Enter translation brief..."
1558
  />
 
1432
  onClick={() => handleWeekChange(week)}
1433
  className={`px-4 py-2 rounded-lg font-medium whitespace-nowrap transition-all duration-200 ease-in-out ${
1434
  selectedWeek === week
1435
+ ? 'bg-ui-neonPink text-white' // differentiate from Tutorial (blue)
1436
  : 'bg-ui-panel text-ui-text hover:bg-white border border-ui-border'
1437
  }`}
1438
  >
 
1445
  {/* Week Transition Loading Spinner */}
1446
  {isWeekTransitioning && (
1447
  <div className="fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-50">
1448
+ <div className="bg-ui-panel rounded-lg shadow-lg p-4 flex items-center space-x-3 border border-ui-border">
1449
  <div className="animate-spin rounded-full h-6 w-6 border-b-2 border-ui-neonBlue"></div>
1450
+ <span className="text-ui-text font-medium">Loading...</span>
1451
  </div>
1452
  </div>
1453
  )}
 
1506
  {editingBrief[selectedWeek] ? (
1507
  <div>
1508
  <div className="flex items-center justify-end space-x-2 mb-2">
1509
+ <button onClick={() => applyInlineFormat('weekly-brief-input', editForm.translationBrief, v => setEditForm({ ...editForm, translationBrief: v }), '**')} className="px-2 py-1 text-xs bg-ui-bg text-ui-text rounded">B</button>
1510
+ <button onClick={() => applyInlineFormat('weekly-brief-input', editForm.translationBrief, v => setEditForm({ ...editForm, translationBrief: v }), '*')} className="px-2 py-1 text-xs bg-ui-bg text-ui-text rounded italic">I</button>
1511
+ <button onClick={() => applyLinkFormat('weekly-brief-input', editForm.translationBrief || '', v => setEditForm({ ...editForm, translationBrief: v }))} className="px-2 py-1 text-xs bg-ui-bg text-ui-text rounded">Link</button>
1512
  </div>
1513
  <textarea
1514
  id="weekly-brief-input"
1515
  value={editForm.translationBrief}
1516
  onChange={(e) => setEditForm({ ...editForm, translationBrief: e.target.value })}
1517
+ className="w-full p-4 border border-ui-border rounded-lg text-ui-text leading-relaxed text-lg bg-white"
1518
  rows={6}
1519
  placeholder="Enter translation brief..."
1520
  />
 
1526
  ) : (
1527
  // Show add brief button when no brief exists
1528
  JSON.parse(localStorage.getItem('user') || '{}').role === 'admin' && (
1529
+ <div className="bg-ui-panel rounded-xl p-8 mb-8 border border-ui-border border-dashed">
1530
  <div className="flex items-center justify-between mb-4">
1531
  <div className="flex items-center space-x-2">
1532
+ <div className="bg-ui-bg rounded-full p-2">
1533
+ <BookOpenIcon className="h-5 w-5 text-ui-neonBlue" />
1534
  </div>
1535
+ <h3 className="text-ui-text font-semibold text-xl">Translation Brief</h3>
1536
  </div>
1537
  <button
1538
  onClick={startAddingBrief}
1539
+ className="bg-ui-neonBlue hover:bg-ui-neonBlue/90 text-white px-4 py-2 rounded-lg transition-colors duration-200 flex items-center space-x-2"
1540
  >
1541
  <PlusIcon className="h-4 w-4" />
1542
  <span>Add Translation Brief</span>
 
1545
  {editingBrief[selectedWeek] && (
1546
  <div className="space-y-4">
1547
  <div className="flex items-center justify-end space-x-2">
1548
+ <button onClick={() => applyInlineFormat('weekly-brief-input', editForm.translationBrief, v => setEditForm({ ...editForm, translationBrief: v }), '**')} className="px-2 py-1 text-xs bg-ui-bg text-ui-text rounded">B</button>
1549
+ <button onClick={() => applyInlineFormat('weekly-brief-input', editForm.translationBrief, v => setEditForm({ ...editForm, translationBrief: v }), '*')} className="px-2 py-1 text-xs bg-ui-bg text-ui-text rounded italic">I</button>
1550
+ <button onClick={() => applyLinkFormat('weekly-brief-input', editForm.translationBrief || '', v => setEditForm({ ...editForm, translationBrief: v }))} className="px-2 py-1 text-xs bg-ui-bg text-ui-text rounded">Link</button>
1551
  </div>
1552
  <textarea
1553
  value={editForm.translationBrief}
1554
  onChange={(e) => setEditForm({ ...editForm, translationBrief: e.target.value })}
1555
+ className="w-full p-4 border border-ui-border rounded-lg text-ui-text leading-relaxed text-lg bg-white"
1556
  rows={6}
1557
  placeholder="Enter translation brief..."
1558
  />