mirror of
https://github.com/responsively-org/responsively-app
synced 2024-11-10 06:44:13 +00:00
Merge pull request #1187 from surajbobade/mod-key-issue-#1185
fix: show ctrl as mod button in shortcut modal for windows devices
This commit is contained in:
commit
ba4dd5e314
1 changed files with 8 additions and 1 deletions
|
@ -5,8 +5,15 @@ interface Props {
|
|||
const ShortcutButton = ({ text }: Props) => {
|
||||
const btnText = text[0].split('+');
|
||||
const btnTextLength = btnText.length - 1;
|
||||
|
||||
const formatText = (value: string) => {
|
||||
if (value === 'mod') return `⌘`;
|
||||
if (value === 'mod') {
|
||||
if (navigator?.userAgent?.includes('Windows')) {
|
||||
return `Ctrl`;
|
||||
}
|
||||
return `⌘`;
|
||||
}
|
||||
|
||||
if (value.length === 1) return value.toUpperCase();
|
||||
return value;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue