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

@@ -1,5 +1,5 @@
import { setGenerationParamsFromPreset } from '../script.js';
import { getDeviceInfo } from './RossAscends-mods.js';
import { isMobile } from './RossAscends-mods.js';
import { textgenerationwebui_settings as textgen_settings } from './textgen-settings.js';
let models = [];
@@ -52,8 +52,7 @@ function getMancerModelTemplate(option) {
jQuery(function () {
$('#mancer_model').on('change', onMancerModelSelect);
const deviceInfo = getDeviceInfo();
if (deviceInfo && deviceInfo.device.type === 'desktop') {
if (!isMobile()) {
$('#mancer_model').select2({
placeholder: 'Select a model',
searchInputPlaceholder: 'Search models...',