mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Hide cpu usage
This commit is contained in:
106
html/src/app.js
106
html/src/app.js
@@ -9351,7 +9351,9 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
var response = await webApiService.execute({
|
var response = await webApiService.execute({
|
||||||
url: `https://www.googleapis.com/youtube/v3/videos?id=${encodeURIComponent(videoId)}&part=snippet,contentDetails&key=${apiKey}`,
|
url: `https://www.googleapis.com/youtube/v3/videos?id=${encodeURIComponent(
|
||||||
|
videoId
|
||||||
|
)}&part=snippet,contentDetails&key=${apiKey}`,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': appVersion,
|
'User-Agent': appVersion,
|
||||||
@@ -10374,7 +10376,10 @@ speechSynthesis.getVoices();
|
|||||||
this.addFriendship(id);
|
this.addFriendship(id);
|
||||||
}
|
}
|
||||||
for (var id of this.friendLog.keys()) {
|
for (var id of this.friendLog.keys()) {
|
||||||
if (!set.has(id)) {
|
if (id === API.currentUser.id) {
|
||||||
|
this.friendLog.delete(id);
|
||||||
|
database.deleteFriendLogCurrent(id);
|
||||||
|
} else if (!set.has(id)) {
|
||||||
this.deleteFriendship(id);
|
this.deleteFriendship(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10869,6 +10874,9 @@ speechSynthesis.getVoices();
|
|||||||
$app.data.hideDevicesFromFeed = configRepository.getBool(
|
$app.data.hideDevicesFromFeed = configRepository.getBool(
|
||||||
'VRCX_hideDevicesFromFeed'
|
'VRCX_hideDevicesFromFeed'
|
||||||
);
|
);
|
||||||
|
$app.data.hideCpuUsageFromFeed = configRepository.getBool(
|
||||||
|
'VRCX_hideCpuUsageFromFeed'
|
||||||
|
);
|
||||||
$app.data.overlayNotifications = configRepository.getBool(
|
$app.data.overlayNotifications = configRepository.getBool(
|
||||||
'VRCX_overlayNotifications'
|
'VRCX_overlayNotifications'
|
||||||
);
|
);
|
||||||
@@ -10940,6 +10948,10 @@ speechSynthesis.getVoices();
|
|||||||
'VRCX_hideDevicesFromFeed',
|
'VRCX_hideDevicesFromFeed',
|
||||||
this.hideDevicesFromFeed
|
this.hideDevicesFromFeed
|
||||||
);
|
);
|
||||||
|
configRepository.setBool(
|
||||||
|
'VRCX_hideCpuUsageFromFeed',
|
||||||
|
this.hideCpuUsageFromFeed
|
||||||
|
);
|
||||||
configRepository.setBool(
|
configRepository.setBool(
|
||||||
'VRCX_overlayNotifications',
|
'VRCX_overlayNotifications',
|
||||||
this.overlayNotifications
|
this.overlayNotifications
|
||||||
@@ -11418,6 +11430,7 @@ speechSynthesis.getVoices();
|
|||||||
var VRConfigVars = {
|
var VRConfigVars = {
|
||||||
overlayNotifications: this.overlayNotifications,
|
overlayNotifications: this.overlayNotifications,
|
||||||
hideDevicesFromFeed: this.hideDevicesFromFeed,
|
hideDevicesFromFeed: this.hideDevicesFromFeed,
|
||||||
|
hideCpuUsageFromFeed: this.hideCpuUsageFromFeed,
|
||||||
minimalFeed: this.minimalFeed,
|
minimalFeed: this.minimalFeed,
|
||||||
notificationPosition: this.notificationPosition,
|
notificationPosition: this.notificationPosition,
|
||||||
notificationTimeout: this.notificationTimeout,
|
notificationTimeout: this.notificationTimeout,
|
||||||
@@ -12360,6 +12373,10 @@ speechSynthesis.getVoices();
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
D.loading = false;
|
D.loading = false;
|
||||||
D.visible = false;
|
D.visible = false;
|
||||||
|
this.$message({
|
||||||
|
message: 'Failed to load user',
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
throw err;
|
throw err;
|
||||||
})
|
})
|
||||||
.then((args) => {
|
.then((args) => {
|
||||||
@@ -13011,56 +13028,7 @@ speechSynthesis.getVoices();
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (command === 'Refresh') {
|
if (command === 'Refresh') {
|
||||||
D.loading = true;
|
this.showUserDialog(D.id);
|
||||||
API.getUser({
|
|
||||||
userId: D.id
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
D.loading = false;
|
|
||||||
D.visible = false;
|
|
||||||
throw err;
|
|
||||||
})
|
|
||||||
.then((args) => {
|
|
||||||
if (D.id === args.ref.id) {
|
|
||||||
D.loading = false;
|
|
||||||
D.ref = args.ref;
|
|
||||||
D.friend = this.friends.get(D.id);
|
|
||||||
D.isFriend = Boolean(D.friend);
|
|
||||||
D.incomingRequest = false;
|
|
||||||
D.outgoingRequest = false;
|
|
||||||
D.isBlock = false;
|
|
||||||
D.isMute = false;
|
|
||||||
D.isHideAvatar = false;
|
|
||||||
for (var ref of API.cachedPlayerModerations.values()) {
|
|
||||||
if (
|
|
||||||
ref.$isDeleted === false &&
|
|
||||||
ref.targetUserId === D.id &&
|
|
||||||
ref.sourceUserId === API.currentUser.id
|
|
||||||
) {
|
|
||||||
if (ref.type === 'block') {
|
|
||||||
D.isBlock = true;
|
|
||||||
} else if (ref.type === 'mute') {
|
|
||||||
D.isMute = true;
|
|
||||||
} else if (ref.type === 'hideAvatar') {
|
|
||||||
D.isHideAvatar = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
D.isFavorite = API.cachedFavoritesByObjectId.has(D.id);
|
|
||||||
this.applyUserDialogLocation();
|
|
||||||
API.getFriendStatus({
|
|
||||||
userId: D.id
|
|
||||||
});
|
|
||||||
var L = API.parseLocation(D.ref.location);
|
|
||||||
if (L.worldId && this.lastLocation.location !== L.tag) {
|
|
||||||
API.getInstance({
|
|
||||||
worldId: L.worldId,
|
|
||||||
instanceId: L.instanceId
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return args;
|
|
||||||
});
|
|
||||||
} else if (command === 'Add Favorite') {
|
} else if (command === 'Add Favorite') {
|
||||||
this.showFavoriteDialog('friend', D.id);
|
this.showFavoriteDialog('friend', D.id);
|
||||||
} else if (command === 'Edit Social Status') {
|
} else if (command === 'Edit Social Status') {
|
||||||
@@ -13328,6 +13296,10 @@ speechSynthesis.getVoices();
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
D.loading = false;
|
D.loading = false;
|
||||||
D.visible = false;
|
D.visible = false;
|
||||||
|
this.$message({
|
||||||
|
message: 'Failed to load world',
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
throw err;
|
throw err;
|
||||||
})
|
})
|
||||||
.then((args) => {
|
.then((args) => {
|
||||||
@@ -13486,26 +13458,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'Refresh':
|
case 'Refresh':
|
||||||
D.loading = true;
|
this.showWorldDialog(D.id);
|
||||||
API.getWorld({
|
|
||||||
worldId: D.id
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
D.loading = false;
|
|
||||||
D.visible = false;
|
|
||||||
throw err;
|
|
||||||
})
|
|
||||||
.then((args) => {
|
|
||||||
if (D.id === args.ref.id) {
|
|
||||||
D.loading = false;
|
|
||||||
D.ref = args.ref;
|
|
||||||
D.isFavorite = API.cachedFavoritesByObjectId.has(
|
|
||||||
D.id
|
|
||||||
);
|
|
||||||
this.updateVRChatWorldCache();
|
|
||||||
}
|
|
||||||
return args;
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case 'New Instance':
|
case 'New Instance':
|
||||||
this.showNewInstanceDialog(D.$location.tag);
|
this.showNewInstanceDialog(D.$location.tag);
|
||||||
@@ -13756,6 +13709,15 @@ speechSynthesis.getVoices();
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
D.loading = false;
|
||||||
|
D.visible = false;
|
||||||
|
this.$message({
|
||||||
|
message: 'Failed to load avatar',
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
throw err;
|
||||||
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
D.loading = false;
|
D.loading = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1027,6 +1027,9 @@ html
|
|||||||
div.options-container-item
|
div.options-container-item
|
||||||
span.name Hide VR Devices
|
span.name Hide VR Devices
|
||||||
el-switch(v-model="hideDevicesFromFeed" @change="saveOpenVROption" :disabled="!openVR || !overlayWrist")
|
el-switch(v-model="hideDevicesFromFeed" @change="saveOpenVROption" :disabled="!openVR || !overlayWrist")
|
||||||
|
div.options-container-item
|
||||||
|
span.name Hide CPU Usage
|
||||||
|
el-switch(v-model="hideCpuUsageFromFeed" @change="saveOpenVROption" :disabled="!openVR || !overlayWrist")
|
||||||
div.options-container-item
|
div.options-container-item
|
||||||
el-button(size="small" icon="el-icon-notebook-2" @click="showWristFeedFiltersDialog" :disabled="!openVR || !overlayWrist") Wrist Feed Filters
|
el-button(size="small" icon="el-icon-notebook-2" @click="showWristFeedFiltersDialog" :disabled="!openVR || !overlayWrist") Wrist Feed Filters
|
||||||
br
|
br
|
||||||
|
|||||||
@@ -343,8 +343,10 @@ Vue.component('marquee-text', MarqueeText);
|
|||||||
$app.methods.updateStatsLoop = async function () {
|
$app.methods.updateStatsLoop = async function () {
|
||||||
try {
|
try {
|
||||||
this.currentTime = new Date().toJSON();
|
this.currentTime = new Date().toJSON();
|
||||||
var cpuUsage = await AppApi.CpuUsage();
|
if (!this.config.hideCpuUsageFromFeed) {
|
||||||
this.cpuUsage = cpuUsage.toFixed(0);
|
var cpuUsage = await AppApi.CpuUsage();
|
||||||
|
this.cpuUsage = cpuUsage.toFixed(0);
|
||||||
|
}
|
||||||
|
|
||||||
this.lastLocationTimer = '';
|
this.lastLocationTimer = '';
|
||||||
if (this.lastLocation.date !== 0) {
|
if (this.lastLocation.date !== 0) {
|
||||||
|
|||||||
@@ -398,7 +398,6 @@ html
|
|||||||
span(style="display:inline-block") {{ lastLocation.playerList.length }}
|
span(style="display:inline-block") {{ lastLocation.playerList.length }}
|
||||||
span(style="display:inline-block;font-weight:bold") {{ lastLocation.friendList.length !== 0 ? ` (${lastLocation.friendList.length})` : ''}}
|
span(style="display:inline-block;font-weight:bold") {{ lastLocation.friendList.length !== 0 ? ` (${lastLocation.friendList.length})` : ''}}
|
||||||
span(v-if="photonLobbyBotSize > 0 && lastLocation.playerList.length > 0" style="display:inline-block;color:red;margin-left:5px") {{ photonLobbyBotSize }}
|
span(v-if="photonLobbyBotSize > 0 && lastLocation.playerList.length > 0" style="display:inline-block;color:red;margin-left:5px") {{ photonLobbyBotSize }}
|
||||||
span(style="display:inline-block;margin-left:15px") {{ onlineFriendCount }}
|
|
||||||
template(v-else)
|
template(v-else)
|
||||||
template(v-if="downloadProgress === 100")
|
template(v-if="downloadProgress === 100")
|
||||||
span(style="display:inline-block;margin-right:5px") Downloading: #[i.el-icon-loading]
|
span(style="display:inline-block;margin-right:5px") Downloading: #[i.el-icon-loading]
|
||||||
@@ -409,10 +408,10 @@ html
|
|||||||
span(style="display:inline-block") Players: {{ lastLocation.playerList.length }}
|
span(style="display:inline-block") Players: {{ lastLocation.playerList.length }}
|
||||||
span(style="display:inline-block;font-weight:bold") {{ lastLocation.friendList.length !== 0 ? ` (${lastLocation.friendList.length})` : ''}}
|
span(style="display:inline-block;font-weight:bold") {{ lastLocation.friendList.length !== 0 ? ` (${lastLocation.friendList.length})` : ''}}
|
||||||
span(v-if="photonLobbyBotSize > 0 && lastLocation.playerList.length > 0" style="display:inline-block;color:red;margin-left:5px") {{ photonLobbyBotSize }}
|
span(v-if="photonLobbyBotSize > 0 && lastLocation.playerList.length > 0" style="display:inline-block;color:red;margin-left:5px") {{ photonLobbyBotSize }}
|
||||||
span(style="display:inline-block;margin-left:15px") Online: {{ onlineFriendCount }}
|
|
||||||
br
|
br
|
||||||
span(style="float:right") {{ currentTime | formatDate('YYYY-MM-DD HH:MI:SS AMPM') }}
|
span(style="float:right") {{ currentTime | formatDate('YYYY-MM-DD HH:MI:SS AMPM') }}
|
||||||
span CPU {{ cpuUsage }}%
|
span(v-if="config && !config.hideCpuUsageFromFeed" style="display:inline-block;margin-right:5px") CPU: {{ cpuUsage }}%
|
||||||
|
span(style="display:inline-block") Online: {{ onlineFriendCount }}
|
||||||
template(v-else)
|
template(v-else)
|
||||||
svg(class="np-progress-circle")
|
svg(class="np-progress-circle")
|
||||||
circle(class="np-progress-circle-stroke" cx="60" cy="60" stroke="white" r="30" fill="transparent" stroke-width="60")
|
circle(class="np-progress-circle-stroke" cx="60" cy="60" stroke="white" r="30" fill="transparent" stroke-width="60")
|
||||||
|
|||||||
Reference in New Issue
Block a user