mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 06:38:17 +00:00
Use navigator platform to display separate for Linux OS - 4848 (#5115)
* Regex match the linux platform and display separate message * Added test for different alt test based on OS in userAgent * Simplify to use full navigator string instead of navigator.platform or userAgentData.platform * Use userAgent string * Test.skip depending on OS * Remove .only after confirming test * Adjust the skip logic * Fix Flake * halfbaked implementation * Updated test to use os specific hotkeys and check for correct text * Remove test.only * Delete old tests Co-authored-by: Shefali Joshi <simplyrender@gmail.com> Co-authored-by: unlikelyzero <jchill2@gmail.com>
This commit is contained in:
@ -55,7 +55,7 @@
|
||||
<div
|
||||
v-if="zoomFactor > 1"
|
||||
class="c-imagery__hints"
|
||||
>Alt-drag to pan</div>
|
||||
>{{formatImageAltText}}</div>
|
||||
<div
|
||||
ref="focusedImageWrapper"
|
||||
class="image-wrapper"
|
||||
@ -478,6 +478,16 @@ export default {
|
||||
width: this.sizedImageWidth,
|
||||
height: this.sizedImageHeight
|
||||
};
|
||||
},
|
||||
formatImageAltText() {
|
||||
const regexLinux = /Linux/;
|
||||
const navigator = window.navigator.userAgent;
|
||||
|
||||
if (regexLinux.test(navigator)) {
|
||||
return 'Ctrl+Alt drag to pan';
|
||||
}
|
||||
|
||||
return 'Alt drag to pan';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
Reference in New Issue
Block a user