From ded261734c203356fd0ca71b5ef34c904a08e5cd Mon Sep 17 00:00:00 2001 From: Natsumi Date: Fri, 29 Jul 2022 02:13:59 +1200 Subject: [PATCH] Remove steam login button & add private server option & fixes --- html/src/app.js | 37 ++++++++++--------------------------- html/src/index.pug | 5 ++--- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 80bb2d12..7e6fb21a 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -15,7 +15,6 @@ import locale from 'element-ui/lib/locale/lang/en'; import {v4 as uuidv4} from 'uuid'; import * as workerTimers from 'worker-timers'; import 'default-passive-events'; -import Konami from 'konami'; import {appVersion} from './constants.js'; import configRepository from './repository/config.js'; @@ -81,10 +80,6 @@ speechSynthesis.getVoices(); } }); - Konami(() => { - $app.toggleCustomEndpoint(); - }); - VRCXStorage.GetArray = function (key) { try { var array = JSON.parse(this.Get(key)); @@ -10071,7 +10066,9 @@ speechSynthesis.getVoices(); case 'ask me': L.statusName = 'Ask Me'; L.statusImage = 'askme'; - hidePrivate = true; + if (this.discordHideInvite) { + hidePrivate = true; + } break; case 'busy': L.statusName = 'Do Not Disturb'; @@ -13370,12 +13367,8 @@ speechSynthesis.getVoices(); var users = []; var pushUser = function (ref) { var photonId = ''; - var masterId = 0; var isFriend = false; $app.photonLobbyCurrent.forEach((ref1, id) => { - if (masterId === 0 || masterId > id) { - masterId = id; - } if (typeof ref1 !== 'undefined') { if ( (typeof ref.id !== 'undefined' && @@ -13390,11 +13383,10 @@ speechSynthesis.getVoices(); } }); var isMaster = false; - if ($app.photonLobbyMaster !== 0) { - if (photonId === $app.photonLobbyMaster) { - isMaster = true; - } - } else if (photonId === masterId) { + if ( + $app.photonLobbyMaster !== 0 && + photonId === $app.photonLobbyMaster + ) { isMaster = true; } var inVrMode = $app.photonLobbyInVrMode.get(photonId); @@ -13552,6 +13544,7 @@ speechSynthesis.getVoices(); this.currentInstanceWorld.fileSize = fileSize; } ); + return args; }); } else { API.getCachedWorld({ @@ -19444,22 +19437,12 @@ speechSynthesis.getVoices(); 'VRCX_enableCustomEndpoint' ); $app.methods.toggleCustomEndpoint = function () { - this.enableCustomEndpoint = !this.enableCustomEndpoint; - if (this.enableCustomEndpoint) { - this.$message({ - message: 'Custom endpoint option enabled', - type: 'success' - }); - } else { - this.$message({ - message: 'Custom endpoint option disabled', - type: 'success' - }); - } configRepository.setBool( 'VRCX_enableCustomEndpoint', this.enableCustomEndpoint ); + this.loginForm.endpoint = ''; + this.loginForm.websocket = ''; }; $app.data.mouseDownClass = []; diff --git a/html/src/index.pug b/html/src/index.pug index d81e5b8d..d94cf14a 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -33,15 +33,14 @@ html el-input(v-model="loginForm.username" name="username" placeholder="Username or Email" clearable) el-form-item(label="Password" prop="password" required style="margin-top:10px") el-input(type="password" v-model="loginForm.password" name="password" placeholder="Password" clearable show-password) + el-checkbox(v-model="loginForm.saveCredentials" style="margin-top:15px") Save Credentials + el-checkbox(v-model="enableCustomEndpoint" @change="toggleCustomEndpoint" style="margin-top:10px") Private Server el-form-item(v-if="enableCustomEndpoint" label="Endpont" prop="endpoint" style="margin-top:10px") el-input(v-model="loginForm.endpoint" name="endpoint" :placeholder="API.endpointDomainVrchat" clearable) el-form-item(v-if="enableCustomEndpoint" label="WebSocket" prop="endpoint" style="margin-top:10px") el-input(v-model="loginForm.websocket" name="websocket" :placeholder="API.websocketDomainVrchat" clearable) - el-checkbox(v-model="loginForm.saveCredentials" style="margin-top:15px") Save Credentials el-form-item(style="margin-top:15px") el-button(native-type="submit" type="primary" :loading="loginForm.loading" style="width:100%") Login - el-form-item - el-button(:loading="loginForm.loading" style="width:100%" @click="loginWithSteam()") Login with Steam div(style="text-align:center;font-size:12px") p © 2019-2022 #[a(@click="openExternalLink('https://github.com/pypy-vrc')") pypy] (mina#5656) & #[a(@click="openExternalLink('https://github.com/Natsumi-sama')") Natsumi] p VRCX is an assistant application for provide information about manage friendship. this application uses unofficial VRChat API (VRCSDK).