Ghost/ghost/admin/app/components/gh-post-settings-menu/ctrl-or-cmd.js
Sanne de Vries 76c9f04013
Added keyboard shortcut section to post settings menu (#18409)
Refs https://github.com/TryGhost/Product/issues/3725

---------

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2023-10-02 14:24:54 +02:00

20 lines
445 B
JavaScript

import Component from '@glimmer/component';
import {htmlSafe} from '@ember/template';
const isMac = window.navigator.platform.startsWith('Mac');
export default class CtrlOrCmd extends Component {
get tooltip() {
return isMac ? 'Command' : '';
}
get character() {
const character = isMac ? '&#8984;' : 'Ctrl';
return htmlSafe(character);
}
get class() {
return isMac ? '' : 'mono';
}
}