chore: reformat new code

2ab59f5a7a157a98ab7bcc83b319b6e740f84f3e

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +6 -6Ignore whitespace
public/script.js+6 -6
@@ -8856,8 +8856,8 @@ export async function processDroppedFiles(files, data = new Map()) {
88568856 const extension = file.name.split('.').pop().toLowerCase();
88578857 if (allowedMimeTypes.some(x => file.type.startsWith(x)) || allowedExtensions.includes(extension)) {
88588858 const preservedName = data instanceof Map && data.get(file);
88598859 const avatarFileName = await importCharacter(file, { preserveFileName: preservedName });
88608860 if (avatarFileName !== undefined) {
88618861 avatarFileNames.push(avatarFileName);
88628862 }
88638863 } else {
@@ -8865,7 +8865,7 @@ export async function processDroppedFiles(files, data = new Map()) {
88658865 }
88668866 }
88678867
88688868 if (avatarFileNames.length > 0) {
88698869 await importCharactersTags(avatarFileNames);
88708870 selectImportedChar(avatarFileNames[avatarFileNames.length - 1]);
88718871 }
@@ -8905,7 +8905,7 @@ function selectImportedChar(charId) {
89058905 * @param {Boolean} [options.importTags=false] Whether to import tags
89068906 * @returns {Promise<string>}
89078907 */
89088908async function importCharacter(file, { preserveFileName = '', importTags = false } = {}) {
89098909 if (is_group_generating || is_send_press) {
89108910 toastr.error(t`Cannot import characters while generating. Stop the request and try again.`, t`Import aborted`);
89118911 throw new Error('Cannot import character while generating');
@@ -10830,12 +10830,12 @@ jQuery(async function () {
1083010830 const avatarFileNames = [];
1083110831 for (const file of e.target.files) {
1083210832 const avatarFileName = await importCharacter(file);
1083310833 if (avatarFileName !== undefined) {
1083410834 avatarFileNames.push(avatarFileName);
1083510835 }
1083610836 }
1083710837
1083810838 if (avatarFileNames.length > 0) {
1083910839 await importCharactersTags(avatarFileNames);
1084010840 selectImportedChar(avatarFileNames[avatarFileNames.length - 1]);
1084110841 }