Linter bracket spacing 1

This commit is contained in:
Natsumi
2023-05-10 17:11:14 +12:00
parent debaba13b0
commit b538d614e3
10 changed files with 77 additions and 72 deletions
+54 -49
View File
@@ -435,7 +435,7 @@ speechSynthesis.getVoices();
console.log(init, response.data); console.log(init, response.data);
} }
return response; return response;
} catch (e) { } } catch (e) {}
if (response.status === 200) { if (response.status === 200) {
this.$throw(0, 'Invalid JSON response'); this.$throw(0, 'Invalid JSON response');
} }
@@ -655,12 +655,12 @@ speechSynthesis.getVoices();
if ( if (
args.json.length > 0 && args.json.length > 0 &&
((options.params.offset += args.json.length), ((options.params.offset += args.json.length),
// eslint-disable-next-line no-nested-ternary // eslint-disable-next-line no-nested-ternary
options.N > 0 options.N > 0
? options.N > options.params.offset ? options.N > options.params.offset
: options.N < 0 : options.N < 0
? args.json.length ? args.json.length
: options.params.n === args.json.length) : options.params.n === args.json.length)
) { ) {
this.bulk(options); this.bulk(options);
} else if ('done' in options) { } else if ('done' in options) {
@@ -1032,7 +1032,7 @@ speechSynthesis.getVoices();
(this.worlddialogshortname && (this.worlddialogshortname &&
this.locationobject.shortName && this.locationobject.shortName &&
this.worlddialogshortname === this.worlddialogshortname ===
this.locationobject.shortName) || this.locationobject.shortName) ||
this.currentuserid === this.locationobject.userId this.currentuserid === this.locationobject.userId
) { ) {
this.isUnlocked = true; this.isUnlocked = true;
@@ -1114,7 +1114,7 @@ speechSynthesis.getVoices();
); );
this.avatarName = avatarInfo.avatarName; this.avatarName = avatarInfo.avatarName;
this.ownerId = avatarInfo.ownerId; this.ownerId = avatarInfo.ownerId;
} catch (err) { } } catch (err) {}
} }
if (typeof this.userid === 'undefined' || !this.ownerId) { if (typeof this.userid === 'undefined' || !this.ownerId) {
this.color = ''; this.color = '';
@@ -2902,7 +2902,7 @@ speechSynthesis.getVoices();
if (object === Object(object)) { if (object === Object(object)) {
details = object; details = object;
} }
} catch (err) { } } catch (err) {}
} }
ref.details = details; ref.details = details;
} }
@@ -4624,7 +4624,7 @@ speechSynthesis.getVoices();
} }
try { try {
socket.close(); socket.close();
} catch (err) { } } catch (err) {}
if ($app.debugWebSocket) { if ($app.debugWebSocket) {
console.log('WebSocket closed'); console.log('WebSocket closed');
} }
@@ -4644,7 +4644,7 @@ speechSynthesis.getVoices();
var json = JSON.parse(data); var json = JSON.parse(data);
try { try {
json.content = JSON.parse(json.content); json.content = JSON.parse(json.content);
} catch (err) { } } catch (err) {}
this.$emit('PIPELINE', { this.$emit('PIPELINE', {
json json
}); });
@@ -4677,7 +4677,7 @@ speechSynthesis.getVoices();
this.webSocket = null; this.webSocket = null;
try { try {
socket.close(); socket.close();
} catch (err) { } } catch (err) {}
}; };
// #endregion // #endregion
@@ -4698,8 +4698,6 @@ speechSynthesis.getVoices();
// #endregion // #endregion
// API // API
// #endregion // #endregion
// #region | Misc // #region | Misc
@@ -5256,7 +5254,7 @@ speechSynthesis.getVoices();
if (i > 0) { if (i > 0) {
if ( if (
data[i - 1].created_at === data[i - 1].created_at ===
this.sharedFeed.gameLog.lastEntryDate && this.sharedFeed.gameLog.lastEntryDate &&
forceUpdate === false forceUpdate === false
) { ) {
return; return;
@@ -5287,9 +5285,9 @@ speechSynthesis.getVoices();
if ( if (
feedItem.type === 'OnPlayerLeft' && feedItem.type === 'OnPlayerLeft' &&
Date.parse(feedItem.created_at) >= Date.parse(feedItem.created_at) >=
currentUserLeaveTime && currentUserLeaveTime &&
Date.parse(feedItem.created_at) <= Date.parse(feedItem.created_at) <=
currentUserLeaveTime + 5 * 1000 currentUserLeaveTime + 5 * 1000
) { ) {
wristArr.splice(k, 1); wristArr.splice(k, 1);
w--; w--;
@@ -5305,7 +5303,7 @@ speechSynthesis.getVoices();
feedItem.type === 'OnPlayerJoined' && feedItem.type === 'OnPlayerJoined' &&
Date.parse(feedItem.created_at) >= locationJoinTime && Date.parse(feedItem.created_at) >= locationJoinTime &&
Date.parse(feedItem.created_at) <= Date.parse(feedItem.created_at) <=
locationJoinTime + 20 * 1000 locationJoinTime + 20 * 1000
) { ) {
wristArr.splice(k, 1); wristArr.splice(k, 1);
w--; w--;
@@ -5458,7 +5456,7 @@ speechSynthesis.getVoices();
if (i > 0) { if (i > 0) {
if ( if (
data[i - 1].created_at === data[i - 1].created_at ===
this.sharedFeed.feedTable.lastEntryDate && this.sharedFeed.feedTable.lastEntryDate &&
forceUpdate === false forceUpdate === false
) { ) {
return; return;
@@ -5538,7 +5536,7 @@ speechSynthesis.getVoices();
if (i > 0) { if (i > 0) {
if ( if (
data[i - 1].created_at === data[i - 1].created_at ===
this.sharedFeed.notificationTable.lastEntryDate && this.sharedFeed.notificationTable.lastEntryDate &&
forceUpdate === false forceUpdate === false
) { ) {
return; return;
@@ -5604,7 +5602,7 @@ speechSynthesis.getVoices();
if (i > 0) { if (i > 0) {
if ( if (
data[i - 1].created_at === data[i - 1].created_at ===
this.sharedFeed.friendLogTable.lastEntryDate && this.sharedFeed.friendLogTable.lastEntryDate &&
forceUpdate === false forceUpdate === false
) { ) {
return; return;
@@ -5673,7 +5671,7 @@ speechSynthesis.getVoices();
if (i > 0) { if (i > 0) {
if ( if (
data[i - 1].created_at === data[i - 1].created_at ===
this.sharedFeed.moderationAgainstTable.lastEntryDate && this.sharedFeed.moderationAgainstTable.lastEntryDate &&
forceUpdate === false forceUpdate === false
) { ) {
return; return;
@@ -5967,7 +5965,8 @@ speechSynthesis.getVoices();
break; break;
case 'invite': case 'invite':
this.speak( this.speak(
`${noty.senderUsername `${
noty.senderUsername
} has invited you to ${this.displayLocation( } has invited you to ${this.displayLocation(
noty.details.worldId, noty.details.worldId,
noty.details.worldName noty.details.worldName
@@ -6025,7 +6024,8 @@ speechSynthesis.getVoices();
case 'PortalSpawn': case 'PortalSpawn':
if (noty.displayName) { if (noty.displayName) {
this.speak( this.speak(
`${noty.displayName `${
noty.displayName
} has spawned a portal to ${this.displayLocation( } has spawned a portal to ${this.displayLocation(
noty.instanceId, noty.instanceId,
noty.worldName noty.worldName
@@ -6148,7 +6148,8 @@ speechSynthesis.getVoices();
case 'invite': case 'invite':
AppApi.XSNotification( AppApi.XSNotification(
'VRCX', 'VRCX',
`${noty.senderUsername `${
noty.senderUsername
} has invited you to ${this.displayLocation( } has invited you to ${this.displayLocation(
noty.details.worldId, noty.details.worldId,
noty.details.worldName noty.details.worldName
@@ -6237,7 +6238,8 @@ speechSynthesis.getVoices();
if (noty.displayName) { if (noty.displayName) {
AppApi.XSNotification( AppApi.XSNotification(
'VRCX', 'VRCX',
`${noty.displayName `${
noty.displayName
} has spawned a portal to ${this.displayLocation( } has spawned a portal to ${this.displayLocation(
noty.instanceId, noty.instanceId,
noty.worldName noty.worldName
@@ -6759,7 +6761,7 @@ speechSynthesis.getVoices();
if (this.loginForm.lastUserLoggedIn) { if (this.loginForm.lastUserLoggedIn) {
var user = var user =
this.loginForm.savedCredentials[ this.loginForm.savedCredentials[
this.loginForm.lastUserLoggedIn this.loginForm.lastUserLoggedIn
]; ];
if (typeof user !== 'undefined') { if (typeof user !== 'undefined') {
webApiService.clearCookies(); webApiService.clearCookies();
@@ -7228,9 +7230,9 @@ speechSynthesis.getVoices();
.then(({ value }) => { .then(({ value }) => {
let saveCredential = let saveCredential =
this.loginForm.savedCredentials[ this.loginForm.savedCredentials[
Object.keys( Object.keys(
this.loginForm.savedCredentials this.loginForm.savedCredentials
)[0] )[0]
]; ];
security security
.decrypt( .decrypt(
@@ -7349,7 +7351,7 @@ speechSynthesis.getVoices();
$app.methods.getMemo = async function (userId) { $app.methods.getMemo = async function (userId) {
try { try {
return await database.getMemo(userId); return await database.getMemo(userId);
} catch (err) { } } catch (err) {}
return { return {
userId: '', userId: '',
editedAt: '', editedAt: '',
@@ -7996,7 +7998,7 @@ speechSynthesis.getVoices();
}); });
worldName = args.ref.name; worldName = args.ref.name;
} }
} catch (err) { } } catch (err) {}
} }
return worldName; return worldName;
}; };
@@ -8019,7 +8021,7 @@ speechSynthesis.getVoices();
groupId groupId
}); });
groupName = args.ref.name; groupName = args.ref.name;
} catch (err) { } } catch (err) {}
return groupName; return groupName;
}; };
@@ -8834,7 +8836,7 @@ speechSynthesis.getVoices();
}; };
try { try {
avatarInfo = await $app.getAvatarName(currentAvatarImageUrl); avatarInfo = await $app.getAvatarName(currentAvatarImageUrl);
} catch (err) { } } catch (err) {}
var feed = { var feed = {
created_at: new Date().toJSON(), created_at: new Date().toJSON(),
type: 'Avatar', type: 'Avatar',
@@ -9414,7 +9416,7 @@ speechSynthesis.getVoices();
if ( if (
ref.location !== this.lastLocation.location && ref.location !== this.lastLocation.location &&
ref.travelingToLocation !== ref.travelingToLocation !==
this.lastLocation.location this.lastLocation.location
) { ) {
// fix $location_at with private // fix $location_at with private
ref.$location_at = joinTime; ref.$location_at = joinTime;
@@ -10550,8 +10552,9 @@ speechSynthesis.getVoices();
} }
if (this.debugPhotonLogging) { if (this.debugPhotonLogging) {
var displayName = this.getDisplayNameFromPhotonId(senderId); var displayName = this.getDisplayNameFromPhotonId(senderId);
var feed = `RPC ${displayName} ${this.photonEventType[eventData.EventType] var feed = `RPC ${displayName} ${
}${eventName}`; this.photonEventType[eventData.EventType]
}${eventName}`;
console.log('VrcRpc:', feed); console.log('VrcRpc:', feed);
} }
} }
@@ -11580,8 +11583,8 @@ speechSynthesis.getVoices();
$app.methods.formatSeconds = function (duration) { $app.methods.formatSeconds = function (duration) {
var pad = function (num, size) { var pad = function (num, size) {
return `000${num}`.slice(size * -1); return `000${num}`.slice(size * -1);
}, },
time = parseFloat(duration).toFixed(3), time = parseFloat(duration).toFixed(3),
hours = Math.floor(time / 60 / 60), hours = Math.floor(time / 60 / 60),
minutes = Math.floor(time / 60) % 60, minutes = Math.floor(time / 60) % 60,
@@ -11798,7 +11801,7 @@ speechSynthesis.getVoices();
(this.nowPlaying.startTime - (this.nowPlaying.startTime -
this.nowPlaying.offset + this.nowPlaying.offset +
this.nowPlaying.length) * this.nowPlaying.length) *
1000 1000
); );
} }
} else if (!this.discordHideImage && L.thumbnailImageUrl) { } else if (!this.discordHideImage && L.thumbnailImageUrl) {
@@ -12611,7 +12614,7 @@ speechSynthesis.getVoices();
API.getUser({ API.getUser({
userId: id userId: id
}); });
} catch { } } catch {}
return; return;
} }
API.getFriendStatus({ API.getFriendStatus({
@@ -15764,8 +15767,9 @@ speechSynthesis.getVoices();
if (type === 'search') { if (type === 'search') {
try { try {
var response = await webApiService.execute({ var response = await webApiService.execute({
url: `${this.avatarRemoteDatabaseProvider url: `${
}?${type}=${encodeURIComponent(search)}&n=5000`, this.avatarRemoteDatabaseProvider
}?${type}=${encodeURIComponent(search)}&n=5000`,
method: 'GET', method: 'GET',
headers: { headers: {
Referer: 'https://vrcx.pypy.moe' Referer: 'https://vrcx.pypy.moe'
@@ -18088,7 +18092,8 @@ speechSynthesis.getVoices();
args.push(`vrchat://launch?id=${location}`); args.push(`vrchat://launch?id=${location}`);
} }
} }
var { launchArguments, vrcLaunchPathOverride } = this.launchOptionsDialog; var { launchArguments, vrcLaunchPathOverride } =
this.launchOptionsDialog;
if (launchArguments) { if (launchArguments) {
args.push(launchArguments); args.push(launchArguments);
} }
@@ -21299,7 +21304,7 @@ speechSynthesis.getVoices();
try { try {
var args = await API.getFavoriteWorlds(params); var args = await API.getFavoriteWorlds(params);
worldLists.push([list.displayName, list.visibility, args.json]); worldLists.push([list.displayName, list.visibility, args.json]);
} catch (err) { } } catch (err) {}
} }
this.userFavoriteWorlds = worldLists; this.userFavoriteWorlds = worldLists;
this.userDialog.isFavoriteWorldsLoading = false; this.userDialog.isFavoriteWorldsLoading = false;
@@ -21726,7 +21731,7 @@ speechSynthesis.getVoices();
if ( if (
(asset.content_type === 'application/x-msdownload' || (asset.content_type === 'application/x-msdownload' ||
asset.content_type === asset.content_type ===
'application/x-msdos-program') && 'application/x-msdos-program') &&
asset.state === 'uploaded' asset.state === 'uploaded'
) { ) {
var downloadUrl = asset.browser_download_url; var downloadUrl = asset.browser_download_url;
@@ -21857,7 +21862,7 @@ speechSynthesis.getVoices();
if ( if (
(asset.content_type === 'application/x-msdownload' || (asset.content_type === 'application/x-msdownload' ||
asset.content_type === asset.content_type ===
'application/x-msdos-program') && 'application/x-msdos-program') &&
asset.state === 'uploaded' asset.state === 'uploaded'
) { ) {
var downloadUrl = asset.browser_download_url; var downloadUrl = asset.browser_download_url;
@@ -25775,4 +25780,4 @@ speechSynthesis.getVoices();
$app = new Vue($app); $app = new Vue($app);
window.$app = $app; window.$app = $app;
})(); })();
// #endregion // #endregion
+10 -10
View File
@@ -1,23 +1,23 @@
import en from './strings/en.json' assert {type: 'JSON'}; import en from './strings/en.json' assert { type: 'JSON' };
import elements_en from 'element-ui/lib/locale/lang/en'; import elements_en from 'element-ui/lib/locale/lang/en';
import ja from './strings/ja.json' assert {type: 'JSON'}; import ja from './strings/ja.json' assert { type: 'JSON' };
import elements_ja from 'element-ui/lib/locale/lang/ja'; import elements_ja from 'element-ui/lib/locale/lang/ja';
import zh_TW from './strings/zh_TW.json' assert {type: 'JSON'}; import zh_TW from './strings/zh_TW.json' assert { type: 'JSON' };
import elements_zh_TW from 'element-ui/lib/locale/lang/zh-TW'; import elements_zh_TW from 'element-ui/lib/locale/lang/zh-TW';
import ko from './strings/ko.json' assert {type: 'JSON'}; import ko from './strings/ko.json' assert { type: 'JSON' };
import elements_ko from 'element-ui/lib/locale/lang/ko'; import elements_ko from 'element-ui/lib/locale/lang/ko';
import zh_CN from './strings/zh_CN.json' assert {type: 'JSON'}; import zh_CN from './strings/zh_CN.json' assert { type: 'JSON' };
import elements_zh_CN from 'element-ui/lib/locale/lang/zh-CN'; import elements_zh_CN from 'element-ui/lib/locale/lang/zh-CN';
const localized_en = {...en, ...elements_en}; const localized_en = { ...en, ...elements_en };
const localized_zh_TW = {...zh_TW, ...elements_zh_TW}; const localized_zh_TW = { ...zh_TW, ...elements_zh_TW };
const localized_zh_CN = {...zh_CN, ...elements_zh_CN}; const localized_zh_CN = { ...zh_CN, ...elements_zh_CN };
const localized_ko = {...ko, ...elements_ko}; const localized_ko = { ...ko, ...elements_ko };
const localized_ja = {...ja, ...elements_ja}; const localized_ja = { ...ja, ...elements_ja };
export { export {
localized_en as en, localized_en as en,
+2 -2
View File
@@ -1,5 +1,5 @@
import sqliteService from '../service/sqlite.js'; import sqliteService from '../service/sqlite.js';
import sharedRepository, {SharedRepository} from './shared.js'; import sharedRepository, { SharedRepository } from './shared.js';
var dirtyKeySet = new Set(); var dirtyKeySet = new Set();
@@ -76,4 +76,4 @@ class ConfigRepository extends SharedRepository {
var self = new ConfigRepository(); var self = new ConfigRepository();
window.configRepository = self; window.configRepository = self;
export {self as default, ConfigRepository}; export { self as default, ConfigRepository };
+1 -1
View File
@@ -1986,4 +1986,4 @@ class Database {
var self = new Database(); var self = new Database();
window.database = self; window.database = self;
export {self as default, Database}; export { self as default, Database };
+1 -1
View File
@@ -105,4 +105,4 @@ class SharedRepository {
var self = new SharedRepository(); var self = new SharedRepository();
window.sharedRepository = self; window.sharedRepository = self;
export {self as default, SharedRepository}; export { self as default, SharedRepository };
+4 -4
View File
@@ -27,12 +27,12 @@ async function encrypt(plaintext, key) {
let sharedKey = await window.crypto.subtle.importKey( let sharedKey = await window.crypto.subtle.importKey(
'raw', 'raw',
stdAESKey(key), stdAESKey(key),
{name: 'AES-GCM', length: 256}, { name: 'AES-GCM', length: 256 },
true, true,
['encrypt'] ['encrypt']
); );
let cipher = await window.crypto.subtle.encrypt( let cipher = await window.crypto.subtle.encrypt(
{name: 'AES-GCM', iv}, { name: 'AES-GCM', iv },
sharedKey, sharedKey,
new TextEncoder().encode(plaintext) new TextEncoder().encode(plaintext)
); );
@@ -49,12 +49,12 @@ async function decrypt(ciphertext, key) {
let sharedKey = await window.crypto.subtle.importKey( let sharedKey = await window.crypto.subtle.importKey(
'raw', 'raw',
stdAESKey(key), stdAESKey(key),
{name: 'AES-GCM', length: 256}, { name: 'AES-GCM', length: 256 },
true, true,
['decrypt'] ['decrypt']
); );
let plaintext = await window.crypto.subtle.decrypt( let plaintext = await window.crypto.subtle.decrypt(
{name: 'AES-GCM', iv: text.slice(0, 12)}, { name: 'AES-GCM', iv: text.slice(0, 12) },
sharedKey, sharedKey,
text.slice(12) text.slice(12)
); );
+1 -1
View File
@@ -116,4 +116,4 @@ class GameLogService {
var self = new GameLogService(); var self = new GameLogService();
window.gameLogService = self; window.gameLogService = self;
export {self as default, GameLogService as LogWatcherService}; export { self as default, GameLogService as LogWatcherService };
+1 -1
View File
@@ -27,4 +27,4 @@ class SQLiteService {
var self = new SQLiteService(); var self = new SQLiteService();
window.sqliteService = self; window.sqliteService = self;
export {self as default, SQLiteService}; export { self as default, SQLiteService };
+1 -1
View File
@@ -29,4 +29,4 @@ class WebApiService {
var self = new WebApiService(); var self = new WebApiService();
window.webApiService = self; window.webApiService = self;
export {self as default, WebApiService}; export { self as default, WebApiService };
+2 -2
View File
@@ -163,7 +163,7 @@ Vue.component('marquee-text', MarqueeText);
}); });
var removeFromArray = function (array, item) { var removeFromArray = function (array, item) {
var {length} = array; var { length } = array;
for (var i = 0; i < length; ++i) { for (var i = 0; i < length; ++i) {
if (array[i] === item) { if (array[i] === item) {
array.splice(i, 1); array.splice(i, 1);
@@ -479,7 +479,7 @@ Vue.component('marquee-text', MarqueeText);
}; };
$app.methods.playNoty = function (json) { $app.methods.playNoty = function (json) {
var {noty, message, image} = JSON.parse(json); var { noty, message, image } = JSON.parse(json);
var message = escapeTag(message); var message = escapeTag(message);
var text = ''; var text = '';
var img = ''; var img = '';