|
495 | 495 | channelMenuOptions() { |
496 | 496 | const options = []; |
497 | 497 |
|
| 498 | + // On small screens, prepend the actions that are hidden from the toolbar |
498 | 499 | if (this.windowIsSmall) { |
499 | 500 | if (this.canManage) { |
500 | 501 | options.push({ |
|
503 | 504 | disabled: this.disablePublish, |
504 | 505 | }); |
505 | 506 | } |
506 | | - if (this.currentChannel && this.currentChannel.draft_token) { |
507 | | - options.push({ |
508 | | - label: this.getDraftTokenAction$(), |
509 | | - value: ChannelMenuOptions.PREVIEW_DRAFT, |
510 | | - }); |
511 | | - } |
512 | 507 | options.push({ |
513 | 508 | label: this.$tr('channelDetails'), |
514 | 509 | value: ChannelMenuOptions.VIEW_DETAILS, |
|
523 | 518 | } |
524 | 519 | options.push(editOption); |
525 | 520 | } |
526 | | -
|
527 | | - if (this.canSubmitToCommunityLibrary) { |
528 | | - options.push({ |
529 | | - label: this.$tr('submitToCommunityLibrary'), |
530 | | - value: ShareMenuOptions.SUBMIT_TO_LIBRARY, |
531 | | - }); |
532 | | - } |
533 | | - if (this.canManage) { |
534 | | - options.push({ |
535 | | - label: this.$tr('inviteCollaborators'), |
536 | | - value: ShareMenuOptions.INVITE_COLLABORATORS, |
537 | | - }); |
538 | | - } |
539 | | - if (this.isPublished) { |
540 | | - options.push({ |
541 | | - label: this.$tr('shareToken'), |
542 | | - value: ShareMenuOptions.SHARE_TOKEN, |
543 | | - }); |
544 | | - } |
545 | | - } else { |
546 | | - // Desktop view - show different options |
547 | | - if (this.currentChannel && this.currentChannel.draft_token) { |
548 | | - options.push({ |
549 | | - label: this.getDraftTokenAction$(), |
550 | | - value: ChannelMenuOptions.PREVIEW_DRAFT, |
551 | | - }); |
552 | | - } |
553 | | - if (this.isPublished) { |
554 | | - options.push({ |
555 | | - label: this.$tr('getToken'), |
556 | | - value: ChannelMenuOptions.GET_TOKEN, |
557 | | - }); |
558 | | - } |
559 | | - if (this.canManage) { |
560 | | - options.push({ |
561 | | - label: this.$tr('shareChannel'), |
562 | | - value: ChannelMenuOptions.SHARE_CHANNEL, |
563 | | - }); |
564 | | - } |
565 | 521 | } |
566 | 522 |
|
| 523 | + // Common options shown on all screen sizes |
| 524 | + if (this.currentChannel && this.currentChannel.draft_token) { |
| 525 | + options.push({ |
| 526 | + label: this.getDraftTokenAction$(), |
| 527 | + value: ChannelMenuOptions.PREVIEW_DRAFT, |
| 528 | + }); |
| 529 | + } |
| 530 | + if (this.isPublished) { |
| 531 | + options.push({ |
| 532 | + label: this.$tr('getToken'), |
| 533 | + value: ChannelMenuOptions.GET_TOKEN, |
| 534 | + }); |
| 535 | + } |
| 536 | + if (this.canManage) { |
| 537 | + options.push({ |
| 538 | + label: this.$tr('shareChannel'), |
| 539 | + value: ChannelMenuOptions.SHARE_CHANNEL, |
| 540 | + }); |
| 541 | + } |
567 | 542 | if (this.canEdit) { |
568 | 543 | options.push({ |
569 | 544 | label: this.$tr('syncChannel'), |
|
0 commit comments