mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 22:46:06 +02:00
Age gate limits
This commit is contained in:
+11
-1
@@ -12620,6 +12620,9 @@ speechSynthesis.getVoices();
|
|||||||
tags.push('~canRequestInvite');
|
tags.push('~canRequestInvite');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (D.accessType === 'group' && D.ageGate) {
|
||||||
|
tags.push('~ageGate');
|
||||||
|
}
|
||||||
if (D.region === 'US West') {
|
if (D.region === 'US West') {
|
||||||
tags.push(`~region(us)`);
|
tags.push(`~region(us)`);
|
||||||
} else if (D.region === 'US East') {
|
} else if (D.region === 'US East') {
|
||||||
@@ -12746,7 +12749,14 @@ speechSynthesis.getVoices();
|
|||||||
params.canRequestInvite = true;
|
params.canRequestInvite = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (D.ageGate) {
|
if (
|
||||||
|
D.ageGate &&
|
||||||
|
type === 'group' &&
|
||||||
|
this.hasGroupPermission(
|
||||||
|
D.groupRef,
|
||||||
|
'group-instance-age-gated-create'
|
||||||
|
)
|
||||||
|
) {
|
||||||
params.ageGate = true;
|
params.ageGate = true;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -440,6 +440,10 @@ export default class extends baseClass {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
this.isAgeGated = this.instance.ageGate === true;
|
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) {
|
showUserDialog(userId) {
|
||||||
API.$emit('SHOW_USER_DIALOG', userId);
|
API.$emit('SHOW_USER_DIALOG', userId);
|
||||||
|
|||||||
@@ -105,7 +105,8 @@ export default {
|
|||||||
groupId: null,
|
groupId: null,
|
||||||
groupAccessType: null,
|
groupAccessType: null,
|
||||||
canRequestInvite: false,
|
canRequestInvite: false,
|
||||||
strict: false
|
strict: false,
|
||||||
|
ageGate: false
|
||||||
};
|
};
|
||||||
if (_tag === 'offline' || _tag === 'offline:offline') {
|
if (_tag === 'offline' || _tag === 'offline:offline') {
|
||||||
ctx.isOffline = true;
|
ctx.isOffline = true;
|
||||||
@@ -149,6 +150,8 @@ export default {
|
|||||||
ctx.groupAccessType = value;
|
ctx.groupAccessType = value;
|
||||||
} else if (key === 'strict') {
|
} else if (key === 'strict') {
|
||||||
ctx.strict = true;
|
ctx.strict = true;
|
||||||
|
} else if (key === 'ageGate') {
|
||||||
|
ctx.ageGate = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ctx.instanceName = s;
|
ctx.instanceName = s;
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ mixin newInstance()
|
|||||||
el-radio-button(label="Japan") {{ $t('dialog.new_instance.region_jp') }}
|
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-form-item(:label="$t('dialog.new_instance.queueEnabled')" v-if="newInstanceDialog.accessType === 'group'")
|
||||||
el-checkbox(v-model="newInstanceDialog.queueEnabled" @change="buildInstance")
|
el-checkbox(v-model="newInstanceDialog.queueEnabled" @change="buildInstance")
|
||||||
el-form-item(:label="$t('dialog.new_instance.ageGate')")
|
el-form-item(:label="$t('dialog.new_instance.ageGate')" v-if="newInstanceDialog.accessType === 'group'")
|
||||||
el-checkbox(v-model="newInstanceDialog.ageGate" @change="buildInstance")
|
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-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-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'")
|
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="US East") {{ $t('dialog.new_instance.region_use') }}
|
||||||
el-radio-button(label="Europe") {{ $t('dialog.new_instance.region_eu') }}
|
el-radio-button(label="Europe") {{ $t('dialog.new_instance.region_eu') }}
|
||||||
el-radio-button(label="Japan") {{ $t('dialog.new_instance.region_jp') }}
|
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-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-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')")
|
el-form-item(:label="$t('dialog.new_instance.instance_id')")
|
||||||
|
|||||||
Reference in New Issue
Block a user