diff options
author | Maksim Sukharev <antreesy.web@gmail.com> | 2023-02-14 10:00:58 +0100 |
---|---|---|
committer | Maksim Sukharev <antreesy.web@gmail.com> | 2023-02-15 17:45:38 +0100 |
commit | 65502404b6d8c7a7c00299d3a842823a5b6879a2 (patch) | |
tree | 6776de47c759dede0f7c6075ea4e8e90261966a2 | |
parent | 1ce42a25e7e58e294f23337899f8b45181f36e4c (diff) |
fix code style for computed labels
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
-rw-r--r-- | src/components/CallView/shared/LocalMediaControls.vue | 60 |
1 files changed, 28 insertions, 32 deletions
diff --git a/src/components/CallView/shared/LocalMediaControls.vue b/src/components/CallView/shared/LocalMediaControls.vue index 33ccccad4..d3ae048b2 100644 --- a/src/components/CallView/shared/LocalMediaControls.vue +++ b/src/components/CallView/shared/LocalMediaControls.vue @@ -280,10 +280,9 @@ export default { }, toggleVirtualBackgroundButtonLabel() { - if (!this.isVirtualBackgroundEnabled) { - return t('spreed', 'Blur background') - } - return t('spreed', 'Disable background blur') + return this.isVirtualBackgroundEnabled + ? t('spreed', 'Disable background blur') + : t('spreed', 'Blur background') }, conversation() { @@ -334,17 +333,13 @@ export default { let content = '' if (this.model.attributes.audioEnabled) { - if (this.disableKeyboardShortcuts) { - content = t('spreed', 'Mute audio') - } else { - content = t('spreed', 'Mute audio (M)') - } + content = this.disableKeyboardShortcuts + ? t('spreed', 'Mute audio') + : t('spreed', 'Mute audio (M)') } else { - if (this.disableKeyboardShortcuts) { - content = t('spreed', 'Unmute audio') - } else { - content = t('spreed', 'Unmute audio (M)') - } + content = this.disableKeyboardShortcuts + ? t('spreed', 'Unmute audio') + : t('spreed', 'Unmute audio (M)') } return { @@ -357,7 +352,10 @@ export default { if (!this.model.attributes.audioAvailable) { return t('spreed', 'No audio') } - return this.model.attributes.audioEnabled ? t('spreed', 'Mute audio') : t('spreed', 'Unmute audio') + + return this.model.attributes.audioEnabled + ? t('spreed', 'Mute audio') + : t('spreed', 'Unmute audio') }, videoButtonClass() { @@ -387,26 +385,20 @@ export default { } if (this.model.attributes.videoEnabled) { - if (this.disableKeyboardShortcuts) { - return t('spreed', 'Disable video') - } - - return t('spreed', 'Disable video (V)') + return this.disableKeyboardShortcuts + ? t('spreed', 'Disable video') + : t('spreed', 'Disable video (V)') } if (!this.model.getWebRtc() || !this.model.getWebRtc().connection || this.model.getWebRtc().connection.getSendVideoIfAvailable()) { - if (this.disableKeyboardShortcuts) { - return t('spreed', 'Enable video') - } - - return t('spreed', 'Enable video (V)') - } - - if (this.disableKeyboardShortcuts) { - return t('spreed', 'Enable video - Your connection will be briefly interrupted when enabling the video for the first time') + return this.disableKeyboardShortcuts + ? t('spreed', 'Enable video') + : t('spreed', 'Enable video (V)') } - return t('spreed', 'Enable video (V) - Your connection will be briefly interrupted when enabling the video for the first time') + return this.disableKeyboardShortcuts + ? t('spreed', 'Enable video - Your connection will be briefly interrupted when enabling the video for the first time') + : t('spreed', 'Enable video (V) - Your connection will be briefly interrupted when enabling the video for the first time') }, videoButtonAriaLabel() { @@ -445,7 +437,9 @@ export default { return t('spreed', 'No screensharing') } - return this.model.attributes.localScreen ? t('spreed', 'Screensharing options') : t('spreed', 'Enable screensharing') + return this.model.attributes.localScreen + ? t('spreed', 'Screensharing options') + : t('spreed', 'Enable screensharing') }, screenSharingButtonAriaLabel() { @@ -453,7 +447,9 @@ export default { return '' } - return this.model.attributes.localScreen ? t('spreed', 'Screensharing options') : t('spreed', 'Enable screensharing') + return this.model.attributes.localScreen + ? t('spreed', 'Screensharing options') + : t('spreed', 'Enable screensharing') }, container() { |