rename VRCX to AppApi

This commit is contained in:
pypy
2020-11-08 15:15:12 +09:00
parent 16fdca179b
commit 3bb78cc858
5 changed files with 20 additions and 19 deletions

View File

@@ -18,8 +18,8 @@ import gameLogService from './service/gamelog.js'
(async function () {
await CefSharp.BindObjectAsync(
'AppApi',
'WebApi',
'VRCX',
'SharedVariable',
'VRCXStorage',
'SQLite',
@@ -59,7 +59,7 @@ import gameLogService from './service/gamelog.js'
document.addEventListener('keyup', function (e) {
if (e.ctrlKey) {
if (e.shiftKey && e.code === 'KeyI') {
VRCX.ShowDevTools();
AppApi.ShowDevTools();
} else if (e.code === 'KeyR') {
location.reload();
}
@@ -3138,6 +3138,7 @@ import gameLogService from './service/gamelog.js'
try {
var json = JSON.parse(data);
json.content = JSON.parse(json.content);
console.log('WebSocket', json);
this.$emit('PIPELINE', {
json
});
@@ -3323,7 +3324,7 @@ import gameLogService from './service/gamelog.js'
type: 'info',
callback: (action) => {
if (action === 'confirm') {
VRCX.OpenLink(link);
AppApi.OpenLink(link);
}
}
});
@@ -3357,7 +3358,7 @@ import gameLogService from './service/gamelog.js'
text: `Update available!!<br>${this.latestAppVersion}`,
timeout: 60000,
callbacks: {
onClick: () => VRCX.OpenLink('https://github.com/pypy-vrc/VRCX/releases')
onClick: () => AppApi.OpenLink('https://github.com/pypy-vrc/VRCX/releases')
}
}).show();
this.notifyMenu('more');
@@ -3391,7 +3392,7 @@ import gameLogService from './service/gamelog.js'
});
}
this.checkActiveFriends();
VRCX.CheckGameRunning().then(([isGameRunning, isGameNoVR]) => {
AppApi.CheckGameRunning().then(([isGameRunning, isGameNoVR]) => {
if (isGameRunning !== this.isGameRunning) {
this.isGameRunning = isGameRunning;
Discord.SetTimestamps(Date.now(), 0);
@@ -3637,7 +3638,7 @@ import gameLogService from './service/gamelog.js'
$app.methods.loginWithSteam = function () {
if (!this.loginForm.loading) {
this.loginForm.loading = true;
VRCX.LoginWithSteam().catch((err) => {
AppApi.LoginWithSteam().catch((err) => {
this.loginForm.loading = false;
throw err;
}).then((steamTicket) => {
@@ -5576,7 +5577,7 @@ import gameLogService from './service/gamelog.js'
configRepository.setBool('VRCX_StartAtWindowsStartup', this.isStartAtWindowsStartup);
configRepository.setBool('VRCX_StartAsMinimizedState', this.isStartAsMinimizedState);
configRepository.setBool('VRCX_CloseToTray', this.isCloseToTray);
VRCX.SetStartup(this.isStartAtWindowsStartup);
AppApi.SetStartup(this.isStartAtWindowsStartup);
};
$app.watch.isStartAtWindowsStartup = saveVRCXWindowOption;
$app.watch.isStartAsMinimizedState = saveVRCXWindowOption;
@@ -5635,9 +5636,9 @@ import gameLogService from './service/gamelog.js'
if (this.openVR &&
this.isGameNoVR === false &&
(this.isGameRunning || this.openVRAlways)) {
VRCX.StartVR();
AppApi.StartVR();
} else {
VRCX.StopVR();
AppApi.StopVR();
}
};
@@ -7337,7 +7338,7 @@ import gameLogService from './service/gamelog.js'
if (D.desktop === true) {
args.push('--no-vr');
}
VRCX.StartGame(args.join(' '));
AppApi.StartGame(args.join(' '));
D.visible = false;
};