Replace usage of getDeviceInfo with isMobile

We were using getDeviceInfo to check whether we were on a desktop or a
mobile device. This can be done more simply with isMobile, which means
we can stop exporting getDeviceInfo.
This commit is contained in:
valadaptive
2023-12-14 18:03:10 -05:00
parent 0f42bd4a95
commit fbdfa05f81
5 changed files with 12 additions and 18 deletions

View File

@@ -9,7 +9,7 @@ import {
} from '../script.js';
import { SECRET_KEYS, writeSecret } from './secrets.js';
import { delay } from './utils.js';
import { getDeviceInfo } from './RossAscends-mods.js';
import { isMobile } from './RossAscends-mods.js';
import { autoSelectInstructPreset } from './instruct-mode.js';
export {
@@ -303,8 +303,7 @@ jQuery(function () {
$('#horde_kudos').on('click', showKudos);
// Not needed on mobile
const deviceInfo = getDeviceInfo();
if (deviceInfo && deviceInfo.device.type === 'desktop') {
if (!isMobile()) {
$('#horde_model').select2({
width: '100%',
placeholder: 'Select Horde models',