mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-17 05:43:51 +02:00
Age gate limits
This commit is contained in:
@@ -12620,6 +12620,9 @@ speechSynthesis.getVoices();
|
||||
tags.push('~canRequestInvite');
|
||||
}
|
||||
}
|
||||
if (D.accessType === 'group' && D.ageGate) {
|
||||
tags.push('~ageGate');
|
||||
}
|
||||
if (D.region === 'US West') {
|
||||
tags.push(`~region(us)`);
|
||||
} else if (D.region === 'US East') {
|
||||
@@ -12746,7 +12749,14 @@ speechSynthesis.getVoices();
|
||||
params.canRequestInvite = true;
|
||||
}
|
||||
}
|
||||
if (D.ageGate) {
|
||||
if (
|
||||
D.ageGate &&
|
||||
type === 'group' &&
|
||||
this.hasGroupPermission(
|
||||
D.groupRef,
|
||||
'group-instance-age-gated-create'
|
||||
)
|
||||
) {
|
||||
params.ageGate = true;
|
||||
}
|
||||
try {
|
||||
|
||||
@@ -440,6 +440,10 @@ export default class extends baseClass {
|
||||
);
|
||||
}
|
||||
this.isAgeGated = this.instance.ageGate === true;
|
||||
if (this.location && this.location.includes('~ageGate')) {
|
||||
// dumb workaround for API not returning `ageGate`
|
||||
this.isAgeGated = true;
|
||||
}
|
||||
},
|
||||
showUserDialog(userId) {
|
||||
API.$emit('SHOW_USER_DIALOG', userId);
|
||||
|
||||
@@ -105,7 +105,8 @@ export default {
|
||||
groupId: null,
|
||||
groupAccessType: null,
|
||||
canRequestInvite: false,
|
||||
strict: false
|
||||
strict: false,
|
||||
ageGate: false
|
||||
};
|
||||
if (_tag === 'offline' || _tag === 'offline:offline') {
|
||||
ctx.isOffline = true;
|
||||
@@ -149,6 +150,8 @@ export default {
|
||||
ctx.groupAccessType = value;
|
||||
} else if (key === 'strict') {
|
||||
ctx.strict = true;
|
||||
} else if (key === 'ageGate') {
|
||||
ctx.ageGate = true;
|
||||
}
|
||||
} else {
|
||||
ctx.instanceName = s;
|
||||
|
||||
@@ -24,8 +24,8 @@ mixin newInstance()
|
||||
el-radio-button(label="Japan") {{ $t('dialog.new_instance.region_jp') }}
|
||||
el-form-item(:label="$t('dialog.new_instance.queueEnabled')" v-if="newInstanceDialog.accessType === 'group'")
|
||||
el-checkbox(v-model="newInstanceDialog.queueEnabled" @change="buildInstance")
|
||||
el-form-item(:label="$t('dialog.new_instance.ageGate')")
|
||||
el-checkbox(v-model="newInstanceDialog.ageGate" @change="buildInstance")
|
||||
el-form-item(:label="$t('dialog.new_instance.ageGate')" v-if="newInstanceDialog.accessType === 'group'")
|
||||
el-checkbox(v-model="newInstanceDialog.ageGate" @change="buildInstance" :disabled="!hasGroupPermission(newInstanceDialog.groupRef, 'group-instance-age-gated-create')")
|
||||
el-form-item(:label="$t('dialog.new_instance.world_id')")
|
||||
el-input(v-model="newInstanceDialog.worldId" size="mini" @click.native="$event.target.tagName === 'INPUT' && $event.target.select()" @change="buildInstance")
|
||||
el-form-item(:label="$t('dialog.new_instance.group_id')" v-if="newInstanceDialog.accessType === 'group'")
|
||||
@@ -70,6 +70,8 @@ mixin newInstance()
|
||||
el-radio-button(label="US East") {{ $t('dialog.new_instance.region_use') }}
|
||||
el-radio-button(label="Europe") {{ $t('dialog.new_instance.region_eu') }}
|
||||
el-radio-button(label="Japan") {{ $t('dialog.new_instance.region_jp') }}
|
||||
el-form-item(:label="$t('dialog.new_instance.ageGate')" v-if="newInstanceDialog.accessType === 'group'")
|
||||
el-checkbox(v-model="newInstanceDialog.ageGate" @change="buildInstance")
|
||||
el-form-item(:label="$t('dialog.new_instance.world_id')")
|
||||
el-input(v-model="newInstanceDialog.worldId" size="mini" @click.native="$event.target.tagName === 'INPUT' && $event.target.select()" @change="buildLegacyInstance")
|
||||
el-form-item(:label="$t('dialog.new_instance.instance_id')")
|
||||
|
||||
Reference in New Issue
Block a user