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

View File

@@ -724,6 +724,7 @@
"change_preview": "Change Youtube Preview",
"change_tags": "Change Tags",
"change_image": "Change Image",
"change_allowed_video_player_domains": "Change Allowed Video Player Domains",
"download_package": "Download Unity Package",
"publish_to_labs": "Publish To Labs",
"unpublish": "Unpublish",
@@ -1408,6 +1409,11 @@
"default_emojis": "Default Emojis",
"cancel": "Cancel",
"send": "Send"
},
"allowed_video_player_domains": {
"header": "Allowed Video Player Domains",
"add_domain": "Add Domain",
"save": "Save"
}
},
"prompt": {

View File

@@ -67,6 +67,7 @@ mixin worldDialog()
el-dropdown-item(icon="el-icon-edit" command="Change Recommended Capacity") {{ $t('dialog.world.actions.change_recommended_capacity') }}
el-dropdown-item(icon="el-icon-edit" command="Change YouTube Preview") {{ $t('dialog.world.actions.change_preview') }}
el-dropdown-item(icon="el-icon-edit" command="Change Tags") {{ $t('dialog.world.actions.change_tags') }}
el-dropdown-item(icon="el-icon-edit" command="Change Allowed Domains") {{ $t('dialog.world.actions.change_allowed_video_player_domains') }}
el-dropdown-item(icon="el-icon-picture-outline" command="Change Image") {{ $t('dialog.world.actions.change_image') }}
el-dropdown-item(v-if="worldDialog.ref.unityPackageUrl" icon="el-icon-download" command="Download Unity Package") {{ $t('dialog.world.actions.download_package') }}
el-dropdown-item(v-if="worldDialog.ref.tags.includes('system_approved') || worldDialog.ref.tags.includes('system_labs')" icon="el-icon-view" command="Unpublish" divided) {{ $t('dialog.world.actions.unpublish') }}
@@ -215,3 +216,12 @@ mixin worldDialog()
span
span(v-text="scope.data.key" style="font-weight:bold;margin-right:5px")
span(v-if="!scope.data.children" v-text="scope.data.value")
//- dialog: change Allowed Video Player Domains
el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="worldAllowedDomainsDialog" :visible.sync="worldAllowedDomainsDialog.visible" :title="$t('dialog.allowed_video_player_domains.header')" width="600px")
div(v-loading="bioDialog.loading")
el-input(v-for="(domain, index) in worldAllowedDomainsDialog.urlList" :key="index" :value="domain" v-model="worldAllowedDomainsDialog.urlList[index]" size="small" style="margin-top:5px")
el-button(slot="append" icon="el-icon-delete" @click="worldAllowedDomainsDialog.urlList.splice(index, 1)")
el-button(@click="worldAllowedDomainsDialog.urlList.push('')" size="mini" style="margin-top:5px") {{ $t('dialog.allowed_video_player_domains.add_domain') }}
template(#footer)
el-button(type="primary" size="small" :disabled="!worldAllowedDomainsDialog.worldId" @click="saveWorldAllowedDomains") {{ $t('dialog.allowed_video_player_domains.save') }}

View File

@@ -4,7 +4,7 @@ mixin notificationsTab()
template(#tool)
div(style="margin:0 0 10px;display:flex;align-items:center")
el-select(v-model="notificationTable.filters[0].value" @change="saveTableFilters" multiple clearable collapse-tags style="flex:1" :placeholder="$t('view.notification.filter_placeholder')")
el-option(v-once v-for="type in ['requestInvite', 'invite', 'requestInviteResponse', 'inviteResponse', 'friendRequest', 'ignoredFriendRequest', 'message', 'boop', 'groupChange', 'group.announcement', 'group.informative', 'group.invite', 'group.joinRequest', 'group.transfer', 'group.queueReady', 'moderation.warning.group', 'instance.closed']" :key="type" :label="type" :value="type")
el-option(v-once v-for="type in ['requestInvite', 'invite', 'requestInviteResponse', 'inviteResponse', 'friendRequest', 'ignoredFriendRequest', 'message', 'boop', 'groupChange', 'group.announcement', 'group.informative', 'group.invite', 'group.joinRequest', 'group.transfer', 'group.queueReady', 'moderation.warning.group', 'moderation.report.closed', 'instance.closed']" :key="type" :label="type" :value="type")
el-input(v-model="notificationTable.filters[1].value" :placeholder="$t('view.notification.search_placeholder')" style="flex:none;width:150px;margin:0 10px")
el-tooltip(placement="bottom" :content="$t('view.notification.refresh_tooltip')" :disabled="hideTooltips")
el-button(type="default" :loading="API.isNotificationsLoading" @click="API.refreshNotifications()" icon="el-icon-refresh" circle style="flex:none")
@@ -14,7 +14,7 @@ mixin notificationsTab()
template(#content)
span {{ scope.row.created_at | formatDate('long') }}
span {{ scope.row.created_at | formatDate('short') }}
el-table-column(:label="$t('table.notification.type')" prop="type" width="160")
el-table-column(:label="$t('table.notification.type')" prop="type" width="180")
template(v-once #default="scope")
el-tooltip(v-if="scope.row.type === 'invite'" placement="top")
template(#content)