mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-26 10:13:48 +02:00
Capacity changes
This commit is contained in:
@@ -2239,6 +2239,7 @@ speechSynthesis.getVoices();
|
||||
authorId: '',
|
||||
authorName: '',
|
||||
capacity: 0,
|
||||
recommendedCapacity: 0,
|
||||
tags: [],
|
||||
releaseStatus: '',
|
||||
imageUrl: '',
|
||||
@@ -12355,14 +12356,14 @@ speechSynthesis.getVoices();
|
||||
if (ref) {
|
||||
L.worldName = ref.name;
|
||||
L.thumbnailImageUrl = ref.thumbnailImageUrl;
|
||||
L.worldCapacity = ref.capacity * 2;
|
||||
L.worldCapacity = ref.capacity;
|
||||
} else {
|
||||
API.getWorld({
|
||||
worldId: L.worldId
|
||||
}).then((args) => {
|
||||
L.worldName = args.ref.name;
|
||||
L.thumbnailImageUrl = args.ref.thumbnailImageUrl;
|
||||
L.worldCapacity = args.ref.capacity * 2;
|
||||
L.worldCapacity = args.ref.capacity;
|
||||
return args;
|
||||
});
|
||||
}
|
||||
@@ -15548,6 +15549,42 @@ speechSynthesis.getVoices();
|
||||
);
|
||||
};
|
||||
|
||||
$app.methods.promptChangeWorldRecommendedCapacity = function (world) {
|
||||
this.$prompt(
|
||||
$t('prompt.change_world_recommended_capacity.description'),
|
||||
$t('prompt.change_world_recommended_capacity.header'),
|
||||
{
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: $t('prompt.change_world_capacity.ok'),
|
||||
cancelButtonText: $t('prompt.change_world_capacity.cancel'),
|
||||
inputValue: world.ref.recommendedCapacity,
|
||||
inputPattern: /\d+$/,
|
||||
inputErrorMessage: $t(
|
||||
'prompt.change_world_recommended_capacity.input_error'
|
||||
),
|
||||
callback: (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
instance.inputValue !== world.ref.recommendedCapacity
|
||||
) {
|
||||
API.saveWorld({
|
||||
id: world.id,
|
||||
recommendedCapacity: instance.inputValue
|
||||
}).then((args) => {
|
||||
this.$message({
|
||||
message: $t(
|
||||
'prompt.change_world_recommended_capacity.message.success'
|
||||
),
|
||||
type: 'success'
|
||||
});
|
||||
return args;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
$app.methods.promptChangeWorldYouTubePreview = function (world) {
|
||||
this.$prompt(
|
||||
$t('prompt.change_world_preview.description'),
|
||||
@@ -17891,6 +17928,9 @@ speechSynthesis.getVoices();
|
||||
case 'Change Capacity':
|
||||
this.promptChangeWorldCapacity(D);
|
||||
break;
|
||||
case 'Change Recommended Capacity':
|
||||
this.promptChangeWorldRecommendedCapacity(D);
|
||||
break;
|
||||
case 'Change YouTube Preview':
|
||||
this.promptChangeWorldYouTubePreview(D);
|
||||
break;
|
||||
@@ -26616,6 +26656,11 @@ speechSynthesis.getVoices();
|
||||
json.world = args1.ref;
|
||||
return args1;
|
||||
});
|
||||
// get queue size etc
|
||||
this.getInstance({
|
||||
worldId: json.worldId,
|
||||
instanceId: json.instanceId
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ html
|
||||
.detail
|
||||
span.name
|
||||
span(v-text="ref.group.name")
|
||||
span(style="font-weight:normal;margin-left:5px") ({{ ref.instance.userCount }}/{{ ref.instance.capacity }})
|
||||
span(style="font-weight:normal;margin-left:5px") ({{ ref.instance.n_users }}/{{ ref.instance.capacity }})
|
||||
location.extra(:location="ref.instance.location" :link="false")
|
||||
|
||||
|
||||
@@ -610,6 +610,7 @@ html
|
||||
el-dropdown-item(icon="el-icon-edit" command="Rename") {{ $t('dialog.world.actions.rename') }}
|
||||
el-dropdown-item(icon="el-icon-edit" command="Change Description") {{ $t('dialog.world.actions.change_description') }}
|
||||
el-dropdown-item(icon="el-icon-edit" command="Change Capacity") {{ $t('dialog.world.actions.change_capacity') }}
|
||||
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-picture-outline" command="Change Image") {{ $t('dialog.world.actions.change_image') }}
|
||||
@@ -622,7 +623,7 @@ html
|
||||
div.
|
||||
#[i.el-icon-user] {{ $t('dialog.world.instances.public_count', { count: worldDialog.ref.publicOccupants }) }}
|
||||
#[i.el-icon-user-solid(style="margin-left:10px")] {{ $t('dialog.world.instances.private_count', { count: worldDialog.ref.privateOccupants }) }}
|
||||
#[i.el-icon-check(style="margin-left:10px")] {{ $t('dialog.world.instances.capacity_count', { count: worldDialog.ref.capacity, max: worldDialog.ref.capacity * 2 }) }}
|
||||
#[i.el-icon-check(style="margin-left:10px")] {{ $t('dialog.world.instances.capacity_count', { count: worldDialog.ref.recommendedCapacity, max: worldDialog.ref.capacity }) }}
|
||||
div(v-for="room in worldDialog.rooms" :key="room.id")
|
||||
div(style="margin:5px 0")
|
||||
location-world(:locationobject="room.$location" :currentuserid="API.currentUser.id" :worlddialogshortname="worldDialog.$location.shortName")
|
||||
@@ -693,7 +694,7 @@ html
|
||||
.x-friend-item(style="cursor:default")
|
||||
.detail
|
||||
span.name {{ $t('dialog.world.info.capacity') }}
|
||||
span.extra {{ worldDialog.ref.capacity | commaNumber }} ({{ worldDialog.ref.capacity * 2 | commaNumber }})
|
||||
span.extra {{ worldDialog.ref.recommendedCapacity | commaNumber }} ({{ worldDialog.ref.capacity | commaNumber }})
|
||||
.x-friend-item(style="cursor:default")
|
||||
.detail
|
||||
span.name {{ $t('dialog.world.info.heat') }}
|
||||
|
||||
@@ -653,6 +653,7 @@
|
||||
"rename": "Rename",
|
||||
"change_description": "Change Description",
|
||||
"change_capacity": "Change Capacity",
|
||||
"change_recommended_capacity": "Change Recommended Capacity",
|
||||
"change_preview": "Change Youtube Preview",
|
||||
"change_tags": "Change Tags",
|
||||
"change_image": "Change Image",
|
||||
@@ -1330,7 +1331,7 @@
|
||||
},
|
||||
"change_world_capacity": {
|
||||
"header": "Change Capacity",
|
||||
"description": "Enter world capacity, Max: 40",
|
||||
"description": "Enter world capacity (hard cap), Max: 80",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Valid number is required",
|
||||
@@ -1338,6 +1339,16 @@
|
||||
"success": "World capacity changed"
|
||||
}
|
||||
},
|
||||
"change_world_recommended_capacity": {
|
||||
"header": "Change Recommended Capacity",
|
||||
"description": "Enter world recommended capacity (soft cap)",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Valid number is required",
|
||||
"message": {
|
||||
"success": "World recommended capacity changed"
|
||||
}
|
||||
},
|
||||
"change_world_preview": {
|
||||
"header": "Change YouTube Preview",
|
||||
"description": "Enter world YouTube preview",
|
||||
|
||||
Reference in New Issue
Block a user