New age gated instance

This commit is contained in:
Natsumi
2024-12-20 01:53:50 +13:00
parent 029739b20d
commit b861d47f87
3 changed files with 12 additions and 0 deletions
+9
View File
@@ -1332,6 +1332,7 @@ speechSynthesis.getVoices();
roleRestricted: false, // only present with group instance type roleRestricted: false, // only present with group instance type
instancePersistenceEnabled: null, instancePersistenceEnabled: null,
playerPersistenceEnabled: null, playerPersistenceEnabled: null,
ageGate: null,
// VRCX // VRCX
$fetchedAt: '', $fetchedAt: '',
...json ...json
@@ -12571,6 +12572,7 @@ speechSynthesis.getVoices();
'instanceDialogGroupAccessType', 'instanceDialogGroupAccessType',
'plus' 'plus'
), ),
ageGate: await configRepository.getBool('instanceDialogAgeGate', false),
strict: false, strict: false,
location: '', location: '',
shortName: '', shortName: '',
@@ -12744,6 +12746,9 @@ speechSynthesis.getVoices();
params.canRequestInvite = true; params.canRequestInvite = true;
} }
} }
if (D.ageGate) {
params.ageGate = true;
}
try { try {
var args = await API.createInstance(params); var args = await API.createInstance(params);
D.location = args.json.location; D.location = args.json.location;
@@ -12827,6 +12832,10 @@ speechSynthesis.getVoices();
'instanceDialogQueueEnabled', 'instanceDialogQueueEnabled',
this.newInstanceDialog.queueEnabled this.newInstanceDialog.queueEnabled
); );
await configRepository.setBool(
'instanceDialogAgeGate',
this.newInstanceDialog.ageGate
);
}; };
$app.methods.showNewInstanceDialog = async function (tag) { $app.methods.showNewInstanceDialog = async function (tag) {
+1
View File
@@ -1031,6 +1031,7 @@
"launch": "Launch", "launch": "Launch",
"create_instance": "Create Instance", "create_instance": "Create Instance",
"queueEnabled": "Queue", "queueEnabled": "Queue",
"ageGate": "Age Gate",
"normal": "Normal", "normal": "Normal",
"group": "Group", "group": "Group",
"legacy": "Legacy", "legacy": "Legacy",
+2
View File
@@ -24,6 +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-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="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'")