mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge pull request #1540 from valadaptive/refactor-device-check
Refactor mobile device check
This commit is contained in:
@ -3,7 +3,7 @@ import { download, debounce, initScrollHeight, resetScrollHeight, parseJsonFile,
|
||||
import { extension_settings, getContext } from './extensions.js';
|
||||
import { NOTE_MODULE_NAME, metadata_keys, shouldWIAddPrompt } from './authors-note.js';
|
||||
import { registerSlashCommand } from './slash-commands.js';
|
||||
import { getDeviceInfo } from './RossAscends-mods.js';
|
||||
import { isMobile } from './RossAscends-mods.js';
|
||||
import { FILTER_TYPES, FilterHelper } from './filters.js';
|
||||
import { getTokenCount } from './tokenizers.js';
|
||||
import { power_user } from './power-user.js';
|
||||
@ -896,8 +896,8 @@ function getWorldEntry(name, data, entry) {
|
||||
|
||||
const characterFilter = template.find('select[name="characterFilter"]');
|
||||
characterFilter.data('uid', entry.uid);
|
||||
const deviceInfo = getDeviceInfo();
|
||||
if (deviceInfo && deviceInfo.device.type === 'desktop') {
|
||||
|
||||
if (!isMobile()) {
|
||||
$(characterFilter).select2({
|
||||
width: '100%',
|
||||
placeholder: 'All characters will pull from this entry.',
|
||||
@ -2551,8 +2551,7 @@ jQuery(() => {
|
||||
$(document).on('click', '.chat_lorebook_button', assignLorebookToChat);
|
||||
|
||||
// Not needed on mobile
|
||||
const deviceInfo = getDeviceInfo();
|
||||
if (deviceInfo && deviceInfo.device.type === 'desktop') {
|
||||
if (!isMobile()) {
|
||||
$('#world_info').select2({
|
||||
width: '100%',
|
||||
placeholder: 'No Worlds active. Click here to select.',
|
||||
|
Reference in New Issue
Block a user