Change Allowed Video Player Domains

This commit is contained in:
Natsumi
2024-11-16 14:07:27 +13:00
parent c50a69c30f
commit 7956e19a10
4 changed files with 57 additions and 3 deletions

View File

@@ -4486,6 +4486,10 @@ speechSynthesis.getVoices();
if (typeof ref !== 'undefined') {
ctx.name = ref.displayName;
}
if (!this.friendLogInitStatus) {
this.updateFriendDelayedCheck(ctx, location, $location_at);
return;
}
// prevent status flapping
if (ctx.pendingOffline) {
if (this.debugFriendState) {
@@ -11303,6 +11307,9 @@ speechSynthesis.getVoices();
case 'Change Tags':
this.showSetWorldTagsDialog();
break;
case 'Change Allowed Domains':
this.showWorldAllowedDomainsDialog();
break;
case 'Download Unity Package':
this.openExternalLink(
this.replaceVrcPackageUrl(
@@ -15780,7 +15787,7 @@ speechSynthesis.getVoices();
this.VRChatConfigList = {
cache_size: {
name: $t('dialog.config_json.max_cache_size'),
default: '20',
default: '30',
type: 'number',
min: 20
},
@@ -21829,6 +21836,37 @@ speechSynthesis.getVoices();
// #endregion
$app.data.worldAllowedDomainsDialog = {
visible: false,
worldId: '',
urlList: []
};
$app.methods.showWorldAllowedDomainsDialog = function () {
this.$nextTick(() =>
$app.adjustDialogZ(this.$refs.worldAllowedDomainsDialog.$el)
);
var D = this.worldAllowedDomainsDialog;
D.worldId = this.worldDialog.id;
D.urlList = this.worldDialog.ref?.urlList ?? [];
D.visible = true;
};
$app.methods.saveWorldAllowedDomains = function () {
var D = this.worldAllowedDomainsDialog;
API.saveWorld({
id: D.worldId,
urlList: D.urlList
}).then((args) => {
this.$message({
message: 'Allowed Video Player Domains updated',
type: 'success'
});
return args;
});
D.visible = false;
};
$app.data.ossDialog = false;
// "$app" is being replaced by Vue, update references inside all the classes