Age gated instances display (#1035)

This commit is contained in:
Nekromateion
2024-12-19 13:52:19 +01:00
committed by GitHub
parent eebd465a29
commit a197b89739
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -357,6 +357,7 @@ export default class extends baseClass {
'<span v-if="isHardClosed" style="margin-left:5px;color:lightcoral">{{ $t("dialog.user.info.instance_hard_closed") }}</span>' + '<span v-if="isHardClosed" style="margin-left:5px;color:lightcoral">{{ $t("dialog.user.info.instance_hard_closed") }}</span>' +
'<span v-else-if="isClosed" style="margin-left:5px;color:lightcoral">{{ $t("dialog.user.info.instance_closed") }}</span>' + '<span v-else-if="isClosed" style="margin-left:5px;color:lightcoral">{{ $t("dialog.user.info.instance_closed") }}</span>' +
'<span v-if="queueSize" style="margin-left:5px">{{ $t("dialog.user.info.instance_queue") }} {{ queueSize }}</span>' + '<span v-if="queueSize" style="margin-left:5px">{{ $t("dialog.user.info.instance_queue") }} {{ queueSize }}</span>' +
'<span v-if="isAgeGated" style="margin-left:5px;color:lightcoral">{{ $t("dialog.user.info.instance_age_gated") }}</span>' +
'</div>', '</div>',
props: { props: {
location: String, location: String,
@@ -396,6 +397,7 @@ export default class extends baseClass {
this.userList = []; this.userList = [];
this.gameServerVersion = ''; this.gameServerVersion = '';
this.canCloseInstance = false; this.canCloseInstance = false;
this.isAgeGated = false;
if ( if (
!this.location || !this.location ||
!this.instance || !this.instance ||
@@ -437,6 +439,7 @@ export default class extends baseClass {
'group-instance-moderate' 'group-instance-moderate'
); );
} }
this.isAgeGated = this.instance.ageGate === true;
}, },
showUserDialog(userId) { showUserDialog(userId) {
API.$emit('SHOW_USER_DIALOG', userId); API.$emit('SHOW_USER_DIALOG', userId);
+2 -1
View File
@@ -663,7 +663,8 @@
"instance_full": "full", "instance_full": "full",
"instance_closed": "closed", "instance_closed": "closed",
"instance_hard_closed": "hard closed", "instance_hard_closed": "hard closed",
"close_instance": "Close Instance" "close_instance": "Close Instance",
"instance_age_gated": "age gated"
}, },
"groups": { "groups": {
"header": "Groups", "header": "Groups",