@@ -502,17 +502,18 @@ const RundownHeader = withTranslation()(
502
502
) ,
503
503
acceptOnly : false ,
504
504
warning : true ,
505
- yes : t ( 'Activate (Rehearsal)' ) ,
505
+ yes : t ( 'Activate "On Air"' ) ,
506
+ no : t ( 'Cancel' ) ,
506
507
actions : [
507
508
{
508
- label : t ( 'Activate (On-Air) ' ) ,
509
- classNames : 'btn-primary ' ,
509
+ label : t ( 'Activate "Rehearsal" ' ) ,
510
+ classNames : 'btn-secondary ' ,
510
511
on : ( e ) => {
511
512
doUserAction (
512
513
t ,
513
514
e ,
514
515
UserAction . DEACTIVATE_OTHER_RUNDOWN_PLAYLIST ,
515
- ( e , ts ) => MeteorCall . userAction . forceResetAndActivate ( e , ts , this . props . playlist . _id , false ) ,
516
+ ( e , ts ) => MeteorCall . userAction . forceResetAndActivate ( e , ts , this . props . playlist . _id , true ) ,
516
517
handleResult
517
518
)
518
519
} ,
@@ -524,7 +525,7 @@ const RundownHeader = withTranslation()(
524
525
t ,
525
526
e ,
526
527
UserAction . ACTIVATE_RUNDOWN_PLAYLIST ,
527
- ( e , ts ) => MeteorCall . userAction . activate ( e , ts , this . props . playlist . _id , true ) ,
528
+ ( e , ts ) => MeteorCall . userAction . activate ( e , ts , this . props . playlist . _id , false ) ,
528
529
handleResult
529
530
)
530
531
} ,
@@ -625,24 +626,24 @@ const RundownHeader = withTranslation()(
625
626
doModalDialog ( {
626
627
title : t ( 'Another Rundown is Already Active!' ) ,
627
628
message : t (
628
- 'The rundown "{{rundownName}}" will need to be deactivated in order to activate this one.\n\nAre you sure you want to activate this one anyway?' ,
629
+ 'The rundown: "{{rundownName}}" will need to be deactivated in order to activate this one.\n\nAre you sure you want to activate this one anyway?' ,
629
630
{
630
631
// TODO: this is a bit of a hack, could a better string sent from the server instead?
631
632
rundownName : err . message . args ?. names ?? '' ,
632
633
}
633
634
) ,
634
- yes : t ( 'Activate Anyway (Rehearsal) ' ) ,
635
+ yes : t ( 'Activate "On Air" ' ) ,
635
636
no : t ( 'Cancel' ) ,
636
637
actions : [
637
638
{
638
- label : t ( 'Activate Anyway (On-Air) ' ) ,
639
- classNames : 'btn-primary ' ,
639
+ label : t ( 'Activate "Rehearsal" ' ) ,
640
+ classNames : 'btn-secondary ' ,
640
641
on : ( e ) => {
641
642
doUserAction (
642
643
t ,
643
644
e ,
644
645
UserAction . DEACTIVATE_OTHER_RUNDOWN_PLAYLIST ,
645
- ( e , ts ) => MeteorCall . userAction . forceResetAndActivate ( e , ts , playlistId , false ) ,
646
+ ( e , ts ) => MeteorCall . userAction . forceResetAndActivate ( e , ts , playlistId , rehersal ) ,
646
647
handleResult
647
648
)
648
649
} ,
@@ -654,7 +655,7 @@ const RundownHeader = withTranslation()(
654
655
t ,
655
656
e ,
656
657
UserAction . DEACTIVATE_OTHER_RUNDOWN_PLAYLIST ,
657
- ( e , ts ) => MeteorCall . userAction . forceResetAndActivate ( e , ts , playlistId , rehersal ) ,
658
+ ( e , ts ) => MeteorCall . userAction . forceResetAndActivate ( e , ts , playlistId , false ) ,
658
659
handleResult
659
660
)
660
661
} ,
@@ -693,12 +694,33 @@ const RundownHeader = withTranslation()(
693
694
}
694
695
)
695
696
}
697
+
698
+ const doActivateAndReset = ( ) => {
699
+ this . rewindSegments ( )
700
+ doUserAction (
701
+ t ,
702
+ e ,
703
+ UserAction . RESET_AND_ACTIVATE_RUNDOWN_PLAYLIST ,
704
+ ( e , ts ) => MeteorCall . userAction . resetAndActivate ( e , ts , this . props . playlist . _id ) ,
705
+ ( err ) => {
706
+ if ( ! err ) {
707
+ onSuccess ( )
708
+ } else if ( ClientAPI . isClientResponseError ( err ) ) {
709
+ if ( err . error . key === UserErrorMessage . RundownAlreadyActiveNames ) {
710
+ this . handleAnotherPlaylistActive ( this . props . playlist . _id , false , err . error , onSuccess )
711
+ return false
712
+ }
713
+ }
714
+ }
715
+ )
716
+ }
717
+
696
718
if ( ! this . rundownShouldHaveStarted ( ) ) {
697
719
// The broadcast hasn't started yet
698
720
doModalDialog ( {
699
- title : this . props . playlist . name ,
721
+ title : 'Activate "On Air"' ,
700
722
message : t ( 'Do you want to activate this Rundown?' ) ,
701
- yes : 'Activate (On- Air) ' ,
723
+ yes : 'Activate "On Air" ' ,
702
724
onAccept : ( ) => {
703
725
this . rewindSegments ( )
704
726
doUserAction (
@@ -725,11 +747,21 @@ const RundownHeader = withTranslation()(
725
747
} else {
726
748
// The broadcast has ended, going into active mode is probably not what you want to do
727
749
doModalDialog ( {
728
- title : this . props . playlist . name ,
750
+ title : 'Activate "On Air"' ,
729
751
message : t ( 'The planned end time has passed, are you sure you want to activate this Rundown?' ) ,
730
- yes : 'Activate (On-Air)' ,
752
+ yes : 'Activate "On Air"' ,
753
+ actions : [
754
+ {
755
+ label : 'Reset and Activate "On Air"' ,
756
+ classNames : 'btn-secondary' ,
757
+ on : ( ) => {
758
+ doActivateAndReset ( )
759
+ } ,
760
+ } ,
761
+ ] ,
762
+ acceptOnly : false ,
731
763
onAccept : ( ) => {
732
- doActivate ( )
764
+ doActivate ( ) // this one should activate without resetting
733
765
} ,
734
766
} )
735
767
}
@@ -787,9 +819,9 @@ const RundownHeader = withTranslation()(
787
819
} else if ( ! this . props . playlist . rehearsal ) {
788
820
// Active, and not in rehearsal
789
821
doModalDialog ( {
790
- title : this . props . playlist . name ,
822
+ title : 'Activate "Rehearsal"' ,
791
823
message : t ( 'Are you sure you want to activate Rehearsal Mode?' ) ,
792
- yes : 'Activate ( Rehearsal) ' ,
824
+ yes : 'Activate " Rehearsal" ' ,
793
825
onAccept : ( ) => {
794
826
doActivateRehersal ( )
795
827
} ,
@@ -802,9 +834,9 @@ const RundownHeader = withTranslation()(
802
834
if ( ! this . rundownShouldHaveEnded ( ) ) {
803
835
// We are in the broadcast
804
836
doModalDialog ( {
805
- title : this . props . playlist . name ,
837
+ title : 'Activate "Rehearsal"' ,
806
838
message : t ( 'Are you sure you want to activate Rehearsal Mode?' ) ,
807
- yes : 'Activate ( Rehearsal) ' ,
839
+ yes : 'Activate " Rehearsal" ' ,
808
840
onAccept : ( ) => {
809
841
doActivateRehersal ( )
810
842
} ,
@@ -829,7 +861,7 @@ const RundownHeader = withTranslation()(
829
861
)
830
862
} else {
831
863
doModalDialog ( {
832
- title : this . props . playlist . name ,
864
+ title : 'Deactivate "On Air"' ,
833
865
message : t ( 'Are you sure you want to deactivate this Rundown?\n(This will clear the outputs)' ) ,
834
866
warning : true ,
835
867
onAccept : ( ) => {
@@ -887,7 +919,7 @@ const RundownHeader = withTranslation()(
887
919
) {
888
920
// The rundown is active and not in rehersal
889
921
doModalDialog ( {
890
- title : this . props . playlist . name ,
922
+ title : 'Reset Rundown' ,
891
923
message : t ( 'The rundown can not be reset while it is active' ) ,
892
924
onAccept : ( ) => {
893
925
// nothing
@@ -3480,7 +3512,7 @@ export function handleRundownReloadResponse(
3480
3512
doModalDialog ( {
3481
3513
title : t ( 'Remove rundown' ) ,
3482
3514
message : t (
3483
- 'Do you really want to remove just the rundown "{{rundownName}}" in the playlist {{playlistName}} from Sofie? This cannot be undone!' ,
3515
+ 'Do you really want to remove just the rundown "{{rundownName}}" in the playlist {{playlistName}} from Sofie? \n\nThis cannot be undone!' ,
3484
3516
{
3485
3517
rundownName : rundown ?. name || 'N/A' ,
3486
3518
playlistName : playlist ?. name || 'N/A' ,
0 commit comments