File tree Expand file tree Collapse file tree 3 files changed +25
-15
lines changed
src/packages/frontend/course Expand file tree Collapse file tree 3 files changed +25
-15
lines changed Original file line number Diff line number Diff line change @@ -457,10 +457,10 @@ export function Assignment({
457
457
) {
458
458
type = "primary" ;
459
459
} else {
460
- type = "dashed " ;
460
+ type = "default " ;
461
461
}
462
462
if ( status . assignment > 0 && status . not_assignment === 0 ) {
463
- type = "default " ;
463
+ type = "dashed " ;
464
464
}
465
465
466
466
return [
@@ -831,12 +831,12 @@ export function Assignment({
831
831
if ( status . collect > 0 ) {
832
832
// Have already collected something
833
833
if ( status . not_collect === 0 ) {
834
- type = "primary" ;
835
- } else {
836
834
type = "dashed" ;
835
+ } else {
836
+ type = "default" ;
837
837
}
838
838
} else {
839
- type = "default " ;
839
+ type = "primary " ;
840
840
}
841
841
return [
842
842
< Button
@@ -898,13 +898,12 @@ export function Assignment({
898
898
if ( status . peer_assignment > 0 ) {
899
899
// haven't peer-assigned anything yet
900
900
if ( status . not_peer_assignment === 0 ) {
901
- type = "primary " ;
901
+ type = "dashed " ;
902
902
} else {
903
903
type = "default" ;
904
904
}
905
905
} else {
906
- // we have assigned already and this may overwrite
907
- type = "dashed" ;
906
+ type = "primary" ;
908
907
}
909
908
return [
910
909
< Button
@@ -962,13 +961,13 @@ export function Assignment({
962
961
if ( status . peer_collect > 0 ) {
963
962
// haven't peer-collected anything yet
964
963
if ( status . not_peer_collect === 0 ) {
965
- type = "primary " ;
964
+ type = "dashed " ;
966
965
} else {
967
966
type = "default" ;
968
967
}
969
968
} else {
970
969
// warning, since we have already collected and this may overwrite
971
- type = "dashed " ;
970
+ type = "primary " ;
972
971
}
973
972
return [
974
973
< Button
@@ -1065,12 +1064,12 @@ export function Assignment({
1065
1064
if ( status . return_graded > 0 ) {
1066
1065
// Have already returned some
1067
1066
if ( status . not_return_graded === 0 ) {
1068
- type = "primary" ;
1069
- } else {
1070
1067
type = "dashed" ;
1068
+ } else {
1069
+ type = "default" ;
1071
1070
}
1072
1071
} else {
1073
- type = "default " ;
1072
+ type = "primary " ;
1074
1073
}
1075
1074
return [
1076
1075
< Button
Original file line number Diff line number Diff line change @@ -383,10 +383,21 @@ export function Handout({
383
383
384
384
function render_handout_button ( status ) {
385
385
const handout_count = status . handout ;
386
+ const { not_handout } = status ;
387
+ let type ;
388
+ if ( handout_count === 0 ) {
389
+ type = "primary" ;
390
+ } else {
391
+ if ( not_handout === 0 ) {
392
+ type = "dashed" ;
393
+ } else {
394
+ type = "default" ;
395
+ }
396
+ }
386
397
return (
387
398
< Button
388
399
key = "handout"
389
- type = { handout_count === 0 ? "primary" : undefined }
400
+ type = { type }
390
401
onClick = { ( ) => {
391
402
set_copy_confirm_handout ( true ) ;
392
403
set_copy_confirm ( true ) ;
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export function StudentHandoutInfo({
69
69
return < Space > { v } </ Space > ;
70
70
} else {
71
71
return (
72
- < Button key = "copy" onClick = { ( ) => setRecopy ( true ) } >
72
+ < Button type = "dashed" key = "copy" onClick = { ( ) => setRecopy ( true ) } >
73
73
< Tip title = { name } tip = { < span > { copy_tip } </ span > } >
74
74
< Icon name = "share-square" /> { name } ...
75
75
</ Tip >
You can’t perform that action at this time.
0 commit comments