mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 14:23:51 +02:00
feat(localization): add prompts
This commit is contained in:
248
html/src/app.js
248
html/src/app.js
@@ -6419,15 +6419,15 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.methods.promptTOTP = function () {
|
||||
this.$prompt(
|
||||
'Enter a numeric code from your authenticator app',
|
||||
'Two-factor Authentication',
|
||||
$t('prompt.totp.description'),
|
||||
$t('prompt.totp.header'),
|
||||
{
|
||||
distinguishCancelAndClose: true,
|
||||
cancelButtonText: 'Use OTP',
|
||||
confirmButtonText: 'Verify',
|
||||
inputPlaceholder: 'Code',
|
||||
cancelButtonText: $t('prompt.totp.use_otp'),
|
||||
confirmButtonText: $t('prompt.totp.verify'),
|
||||
inputPlaceholder: $t('prompt.totp.input_placeholder'),
|
||||
inputPattern: /^[0-9]{6}$/,
|
||||
inputErrorMessage: 'Invalid Code',
|
||||
inputErrorMessage: $t('prompt.totp.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (action === 'confirm') {
|
||||
API.verifyTOTP({
|
||||
@@ -6451,15 +6451,15 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.methods.promptOTP = function () {
|
||||
this.$prompt(
|
||||
'Enter one of your saved recovery codes',
|
||||
'Two-factor Authentication',
|
||||
$t('prompt.otp.description'),
|
||||
$t('prompt.otp.header'),
|
||||
{
|
||||
distinguishCancelAndClose: true,
|
||||
cancelButtonText: 'Use TOTP',
|
||||
confirmButtonText: 'Verify',
|
||||
inputPlaceholder: 'Code',
|
||||
cancelButtonText: $t('prompt.otp.use_otp'),
|
||||
confirmButtonText: $t('prompt.otp.verify'),
|
||||
inputPlaceholder: $t('prompt.otp.input_placeholder'),
|
||||
inputPattern: /^[a-z0-9]{4}-[a-z0-9]{4}$/,
|
||||
inputErrorMessage: 'Invalid Code',
|
||||
inputErrorMessage: $t('prompt.otp.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (action === 'confirm') {
|
||||
API.verifyOTP({
|
||||
@@ -6483,15 +6483,15 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.methods.promptEmailOTP = function () {
|
||||
this.$prompt(
|
||||
'Enter a numeric code that was sent to your email',
|
||||
'Email Two-factor Authentication',
|
||||
$t('prompt.email_otp.description'),
|
||||
$t('prompt.email_otp.header'),
|
||||
{
|
||||
distinguishCancelAndClose: true,
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: 'Verify',
|
||||
inputPlaceholder: 'Code',
|
||||
cancelButtonText: $t('prompt.email_otp.cancel'),
|
||||
confirmButtonText: $t('prompt.email_otp.verify'),
|
||||
inputPlaceholder: $t('prompt.email_otp.input_placeholder'),
|
||||
inputPattern: /^[0-9]{6}$/,
|
||||
inputErrorMessage: 'Invalid Code',
|
||||
inputErrorMessage: $t('prompt.email_otp.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (action === 'confirm') {
|
||||
API.verifyEmailOTP({
|
||||
@@ -6627,8 +6627,8 @@ speechSynthesis.getVoices();
|
||||
resolve(args.password);
|
||||
}
|
||||
$app.$prompt(
|
||||
'Please enter your Primary Password.',
|
||||
'Primary Password Required',
|
||||
$t('prompt.primary_password.description'),
|
||||
$t('prompt.primary_password.header'),
|
||||
{
|
||||
inputType: 'password',
|
||||
inputPattern: /[\s\S]{1,32}/
|
||||
@@ -6663,8 +6663,8 @@ speechSynthesis.getVoices();
|
||||
this.enablePrimaryPasswordDialog.visible = true;
|
||||
} else {
|
||||
this.$prompt(
|
||||
'Please enter your Primary Password.',
|
||||
'Primary Password Required',
|
||||
$t('prompt.primary_password.description'),
|
||||
$t('prompt.primary_password.header'),
|
||||
{
|
||||
inputType: 'password',
|
||||
inputPattern: /[\s\S]{1,32}/
|
||||
@@ -6918,8 +6918,8 @@ speechSynthesis.getVoices();
|
||||
this.enablePrimaryPassword
|
||||
) {
|
||||
$app.$prompt(
|
||||
'Please enter your Primary Password.',
|
||||
'Primary Password Required',
|
||||
$t('prompt.primary_password.description'),
|
||||
$t('prompt.primary_password.header'),
|
||||
{
|
||||
inputType: 'password',
|
||||
inputPattern: /[\s\S]{1,32}/
|
||||
@@ -11793,14 +11793,14 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.changeFavoriteGroupName = function (ctx) {
|
||||
this.$prompt('Enter a new name', 'Change Group Name', {
|
||||
this.$prompt($t('prompt.change_favorite_group_name.description'), $t('prompt.change_favorite_group_name.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: 'Change',
|
||||
inputPlaceholder: 'Name',
|
||||
cancelButtonText: $t('prompt.change_favorite_group_name.cancel'),
|
||||
confirmButtonText: $t('prompt.change_favorite_group_name.change'),
|
||||
inputPlaceholder: $t('prompt.change_favorite_group_name.input_placeholder'),
|
||||
inputValue: ctx.displayName,
|
||||
inputPattern: /\S+/,
|
||||
inputErrorMessage: 'Name is required',
|
||||
inputErrorMessage: $t('prompt.change_favorite_group_name.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (action === 'confirm') {
|
||||
API.saveFavoriteGroup({
|
||||
@@ -11809,7 +11809,7 @@ speechSynthesis.getVoices();
|
||||
displayName: instance.inputValue
|
||||
}).then((args) => {
|
||||
this.$message({
|
||||
message: 'Group renamed',
|
||||
message: $t('prompt.change_favorite_group_name.message.success'),
|
||||
type: 'success'
|
||||
});
|
||||
return args;
|
||||
@@ -13465,12 +13465,12 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptUserIdDialog = function () {
|
||||
this.$prompt('Enter a User URL or ID (UUID)', 'Direct Access', {
|
||||
this.$prompt($t('prompt.direct_access_user_id.description'), $t('prompt.direct_access_user_id.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.direct_access_user_id.ok'),
|
||||
cancelButtonText: $t('prompt.direct_access_user_id.cancel'),
|
||||
inputPattern: /\S+/,
|
||||
inputErrorMessage: 'User URL/ID is required',
|
||||
inputErrorMessage: $t('prompt.direct_access_user_id.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (action === 'confirm' && instance.inputValue) {
|
||||
var testUrl = instance.inputValue.substring(0, 15);
|
||||
@@ -13480,7 +13480,7 @@ speechSynthesis.getVoices();
|
||||
this.showUserDialog(userId);
|
||||
} else {
|
||||
this.$message({
|
||||
message: 'Invalid URL',
|
||||
message: $t('prompt.direct_access_user_id.message.error'),
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
@@ -13493,12 +13493,12 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptUsernameDialog = function () {
|
||||
this.$prompt('Enter a Username', 'Direct Access', {
|
||||
this.$prompt($t('prompt.direct_access_username.description'), $t('prompt.direct_access_username.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.direct_access_username.ok'),
|
||||
cancelButtonText: $t('prompt.direct_access_username.cancel'),
|
||||
inputPattern: /\S+/,
|
||||
inputErrorMessage: 'Username is required',
|
||||
inputErrorMessage: $t('prompt.direct_access_username.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (action === 'confirm' && instance.inputValue) {
|
||||
this.lookupUser({displayName: instance.inputValue});
|
||||
@@ -13508,17 +13508,17 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptWorldDialog = function () {
|
||||
this.$prompt('Enter a World URL or ID (UUID)', 'Direct Access', {
|
||||
this.$prompt($t('prompt.direct_access_world_id.description'), $t('prompt.direct_access_world_id.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.direct_access_world_id.ok'),
|
||||
cancelButtonText: $t('prompt.direct_access_world_id.cancel'),
|
||||
inputPattern: /\S+/,
|
||||
inputErrorMessage: 'World URL/ID is required',
|
||||
inputErrorMessage: $t('prompt.direct_access_world_id.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (action === 'confirm' && instance.inputValue) {
|
||||
if (!this.directAccessWorld(instance.inputValue)) {
|
||||
this.$message({
|
||||
message: 'Invalid URL/id',
|
||||
message: $t('prompt.direct_access_world_id.message.error'),
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
@@ -13528,12 +13528,12 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptAvatarDialog = function () {
|
||||
this.$prompt('Enter a Avatar URL or ID (UUID)', 'Direct Access', {
|
||||
this.$prompt($t('prompt.direct_access_avatar_id.description'), $t('prompt.direct_access_avatar_id.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.direct_access_avatar_id.ok'),
|
||||
cancelButtonText: $t('prompt.direct_access_avatar_id.cancel'),
|
||||
inputPattern: /\S+/,
|
||||
inputErrorMessage: 'Avatar URL/ID is required',
|
||||
inputErrorMessage: $t('prompt.direct_access_avatar_id.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (action === 'confirm' && instance.inputValue) {
|
||||
var testUrl = instance.inputValue.substring(0, 15);
|
||||
@@ -13543,7 +13543,7 @@ speechSynthesis.getVoices();
|
||||
this.showAvatarDialog(avatarId);
|
||||
} else {
|
||||
this.$message({
|
||||
message: 'Invalid URL',
|
||||
message: $t('prompt.direct_access_avatar_id.message.error'),
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
@@ -13557,20 +13557,20 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.methods.promptOmniDirectDialog = function () {
|
||||
this.$prompt(
|
||||
'Enter a User/World/Instance/Avatar/Group URL or ID (UUID)',
|
||||
'Direct Access',
|
||||
$t('prompt.direct_access_omni.description'),
|
||||
$t('prompt.direct_access_omni.header'),
|
||||
{
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.direct_access_omni.ok'),
|
||||
cancelButtonText: $t('prompt.direct_access_omni.cancel'),
|
||||
inputPattern: /\S+/,
|
||||
inputErrorMessage: 'URL/ID is required',
|
||||
inputErrorMessage: $t('prompt.direct_access_omni.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (action === 'confirm' && instance.inputValue) {
|
||||
var input = instance.inputValue;
|
||||
if (!this.directAccessParse(input)) {
|
||||
this.$message({
|
||||
message: 'Invalid URL/ID',
|
||||
message: $t('prompt.direct_access_omni.message.error'),
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
@@ -13702,13 +13702,13 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptNotificationTimeout = function () {
|
||||
this.$prompt('Enter amount of seconds', 'Notification Timeout', {
|
||||
this.$prompt($t('prompt.notification_timeout.description'), $t('prompt.notification_timeout.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.notification_timeout.ok'),
|
||||
cancelButtonText: $t('prompt.notification_timeout.cancel'),
|
||||
inputValue: this.notificationTimeout / 1000,
|
||||
inputPattern: /\d+$/,
|
||||
inputErrorMessage: 'Valid number is required',
|
||||
inputErrorMessage: $t('prompt.notification_timeout.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
@@ -13729,13 +13729,13 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptPhotonOverlayMessageTimeout = function () {
|
||||
this.$prompt('Enter amount of seconds', 'Overlay Message Timeout', {
|
||||
this.$prompt($t('prompt.overlay_message_timeout.description'), $t('prompt.overlay_message_timeout.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.overlay_message_timeout.ok'),
|
||||
cancelButtonText: $t('prompt.overlay_message_timeout.cancel'),
|
||||
inputValue: this.photonOverlayMessageTimeout / 1000,
|
||||
inputPattern: /\d+$/,
|
||||
inputErrorMessage: 'Valid number is required',
|
||||
inputErrorMessage: $t('prompt.overlay_message_timeout.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
@@ -13756,12 +13756,12 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptRenameAvatar = function (avatar) {
|
||||
this.$prompt('Enter avatar name', 'Rename Avatar', {
|
||||
this.$prompt($t('prompt.rename_avatar.description'), $t('prompt.rename_avatar.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.rename_avatar.ok'),
|
||||
cancelButtonText: $t('prompt.rename_avatar.cancel'),
|
||||
inputValue: avatar.ref.name,
|
||||
inputErrorMessage: 'Valid name is required',
|
||||
inputErrorMessage: $t('prompt.rename_avatar.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
@@ -13772,7 +13772,7 @@ speechSynthesis.getVoices();
|
||||
name: instance.inputValue
|
||||
}).then((args) => {
|
||||
this.$message({
|
||||
message: 'Avatar renamed',
|
||||
message: $t('prompt.rename_avatar.message.success'),
|
||||
type: 'success'
|
||||
});
|
||||
return args;
|
||||
@@ -13783,12 +13783,12 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptChangeAvatarDescription = function (avatar) {
|
||||
this.$prompt('Enter avatar description', 'Change Description', {
|
||||
this.$prompt($t('prompt.change_avatar_description.description'), $t('prompt.change_avatar_description.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.change_avatar_description.ok'),
|
||||
cancelButtonText: $t('prompt.change_avatar_description.cancel'),
|
||||
inputValue: avatar.ref.description,
|
||||
inputErrorMessage: 'Valid description is required',
|
||||
inputErrorMessage: $t('prompt.change_avatar_description.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
@@ -13799,7 +13799,7 @@ speechSynthesis.getVoices();
|
||||
description: instance.inputValue
|
||||
}).then((args) => {
|
||||
this.$message({
|
||||
message: 'Avatar description changed',
|
||||
message: $t('prompt.change_avatar_description.message.success'),
|
||||
type: 'success'
|
||||
});
|
||||
return args;
|
||||
@@ -13810,12 +13810,12 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptRenameWorld = function (world) {
|
||||
this.$prompt('Enter world name', 'Rename World', {
|
||||
this.$prompt($t('prompt.rename_world.description'), $t('prompt.rename_world.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.rename_world.ok'),
|
||||
cancelButtonText: $t('prompt.rename_world.cancel'),
|
||||
inputValue: world.ref.name,
|
||||
inputErrorMessage: 'Valid name is required',
|
||||
inputErrorMessage: $t('prompt.rename_world.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
@@ -13826,7 +13826,7 @@ speechSynthesis.getVoices();
|
||||
name: instance.inputValue
|
||||
}).then((args) => {
|
||||
this.$message({
|
||||
message: 'World renamed',
|
||||
message: $t('prompt.rename_world.message.success'),
|
||||
type: 'success'
|
||||
});
|
||||
return args;
|
||||
@@ -13837,12 +13837,12 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptChangeWorldDescription = function (world) {
|
||||
this.$prompt('Enter world description', 'Change Description', {
|
||||
this.$prompt($t('prompt.change_world_description.description'), $t('prompt.change_world_description.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.change_world_description.ok'),
|
||||
cancelButtonText: $t('prompt.change_world_description.cancel'),
|
||||
inputValue: world.ref.description,
|
||||
inputErrorMessage: 'Valid description is required',
|
||||
inputErrorMessage: $t('prompt.change_world_description.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
@@ -13853,7 +13853,7 @@ speechSynthesis.getVoices();
|
||||
description: instance.inputValue
|
||||
}).then((args) => {
|
||||
this.$message({
|
||||
message: 'World description changed',
|
||||
message: $t('prompt.change_world_description.message.success'),
|
||||
type: 'success'
|
||||
});
|
||||
return args;
|
||||
@@ -13864,13 +13864,13 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptChangeWorldCapacity = function (world) {
|
||||
this.$prompt('Enter world capacity, Max: 40', 'Change Capacity', {
|
||||
this.$prompt($t('prompt.change_world_capacity.description'), $t('prompt.change_world_capacity.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.change_world_capacity.ok'),
|
||||
cancelButtonText: $t('prompt.change_world_capacity.cancel'),
|
||||
inputValue: world.ref.capacity,
|
||||
inputPattern: /\d+$/,
|
||||
inputErrorMessage: 'Valid number is required',
|
||||
inputErrorMessage: $t('prompt.change_world_capacity.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
@@ -13881,7 +13881,7 @@ speechSynthesis.getVoices();
|
||||
capacity: instance.inputValue
|
||||
}).then((args) => {
|
||||
this.$message({
|
||||
message: 'World capacity changed',
|
||||
message: $t('prompt.change_world_capacity.message.success'),
|
||||
type: 'success'
|
||||
});
|
||||
return args;
|
||||
@@ -13892,12 +13892,12 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptChangeWorldYouTubePreview = function (world) {
|
||||
this.$prompt('Enter world YouTube preview', 'Change YouTube Preview', {
|
||||
this.$prompt($t('prompt.change_world_preview.description'), $t('prompt.change_world_preview.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.change_world_preview.ok'),
|
||||
cancelButtonText: $t('prompt.change_world_preview.cancel'),
|
||||
inputValue: world.ref.previewYoutubeId,
|
||||
inputErrorMessage: 'Valid YouTube URL is required',
|
||||
inputErrorMessage: $t('prompt.change_world_preview.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
@@ -13916,7 +13916,7 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
} catch {
|
||||
this.$message({
|
||||
message: 'Invalid YouTube URL',
|
||||
message: $t('prompt.change_world_preview.message.error'),
|
||||
type: 'error'
|
||||
});
|
||||
return;
|
||||
@@ -13928,7 +13928,7 @@ speechSynthesis.getVoices();
|
||||
previewYoutubeId: instance.inputValue
|
||||
}).then((args) => {
|
||||
this.$message({
|
||||
message: 'World YouTube preview changed',
|
||||
message: $t('prompt.change_world_preview.message.success'),
|
||||
type: 'success'
|
||||
});
|
||||
return args;
|
||||
@@ -13941,15 +13941,15 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.methods.promptMaxTableSizeDialog = function () {
|
||||
this.$prompt(
|
||||
'Larger table sizes may impact RAM usage and performance (default: 1000)',
|
||||
'Max Table Size',
|
||||
$t('prompt.change_table_size.description'),
|
||||
$t('prompt.change_table_size.header'),
|
||||
{
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Save',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.change_table_size.save'),
|
||||
cancelButtonText: $t('prompt.change_table_size.cancel'),
|
||||
inputValue: this.maxTableSize,
|
||||
inputPattern: /\d+$/,
|
||||
inputErrorMessage: 'Valid number is required',
|
||||
inputErrorMessage: $t('prompt.change_table_size.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (action === 'confirm' && instance.inputValue) {
|
||||
this.maxTableSize = instance.inputValue;
|
||||
@@ -13978,15 +13978,15 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.methods.promptPhotonLobbyTimeoutThreshold = function () {
|
||||
this.$prompt(
|
||||
'Enter amount of seconds (default: 3)',
|
||||
'User Timeout Threshold',
|
||||
$t('prompt.photon_lobby_timeout.description'),
|
||||
$t('prompt.photon_lobby_timeout.header'),
|
||||
{
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.photon_lobby_timeout.ok'),
|
||||
cancelButtonText: $t('prompt.photon_lobby_timeout.cancel'),
|
||||
inputValue: this.photonLobbyTimeoutThreshold / 1000,
|
||||
inputPattern: /\d+$/,
|
||||
inputErrorMessage: 'Valid number is required',
|
||||
inputErrorMessage: $t('prompt.photon_lobby_timeout.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
@@ -14008,15 +14008,15 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.methods.promptAutoClearVRCXCacheFrequency = function () {
|
||||
this.$prompt(
|
||||
'Enter amount of hours, larger values may impact RAM usage and performance (default: 24, disabled: 0)',
|
||||
'Clear VRCX Cache Timer',
|
||||
$t('prompt.auto_clear_cache.description'),
|
||||
$t('prompt.auto_clear_cache.header'),
|
||||
{
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.auto_clear_cache.ok'),
|
||||
cancelButtonText: $t('prompt.auto_clear_cache.cancel'),
|
||||
inputValue: this.clearVRCXCacheFrequency / 3600 / 2,
|
||||
inputPattern: /\d+$/,
|
||||
inputErrorMessage: 'Valid number is required',
|
||||
inputErrorMessage: $t('prompt.auto_clear_cache.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
@@ -22675,12 +22675,12 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptNewLocalWorldFavoriteGroup = function () {
|
||||
this.$prompt('Enter a world favorite group name', 'New Group', {
|
||||
this.$prompt($t('prompt.new_local_favorite_group.description'), $t('prompt.new_local_favorite_group.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.new_local_favorite_group.ok'),
|
||||
cancelButtonText: $t('prompt.new_local_favorite_group.cancel'),
|
||||
inputPattern: /\S+/,
|
||||
inputErrorMessage: 'Name is required',
|
||||
inputErrorMessage: $t('prompt.new_local_favorite_group.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (action === 'confirm' && instance.inputValue) {
|
||||
this.newLocalWorldFavoriteGroup(instance.inputValue);
|
||||
@@ -22692,7 +22692,7 @@ speechSynthesis.getVoices();
|
||||
$app.methods.newLocalWorldFavoriteGroup = function (group) {
|
||||
if (this.localWorldFavoriteGroups.includes(group)) {
|
||||
$app.$message({
|
||||
message: `Group already exists with the name ${group}`,
|
||||
message: $t('prompt.new_local_favorite_group.message.error', { name: group }),
|
||||
type: 'error'
|
||||
});
|
||||
return;
|
||||
@@ -22707,12 +22707,12 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.promptLocalWorldFavoriteGroupRename = function (group) {
|
||||
this.$prompt('Enter a world favorite group name', 'Rename Group', {
|
||||
this.$prompt($t('prompt.local_favorite_group_rename.description'), $t('prompt.local_favorite_group_rename.header'), {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Save',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.local_favorite_group_rename.save'),
|
||||
cancelButtonText: $t('prompt.local_favorite_group_rename.cancel'),
|
||||
inputPattern: /\S+/,
|
||||
inputErrorMessage: 'Name is required',
|
||||
inputErrorMessage: $t('prompt.local_favorite_group_rename.input_error'),
|
||||
inputValue: group,
|
||||
callback: (action, instance) => {
|
||||
if (action === 'confirm' && instance.inputValue) {
|
||||
@@ -22728,7 +22728,7 @@ speechSynthesis.getVoices();
|
||||
$app.methods.renameLocalWorldFavoriteGroup = function (newName, group) {
|
||||
if (this.localWorldFavoriteGroups.includes(newName)) {
|
||||
$app.$message({
|
||||
message: `Group already exists with the name ${newName}`,
|
||||
message: $t('prompt.local_favorite_group_rename.message.error', { name: newName }),
|
||||
type: 'error'
|
||||
});
|
||||
return;
|
||||
@@ -22818,15 +22818,15 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.methods.promptSetPendingOffline = function () {
|
||||
this.$prompt(
|
||||
'Set pending offline delay in seconds (default: 110)',
|
||||
'Pending Offline',
|
||||
$t('prompt.pending_offline_delay.description'),
|
||||
$t('prompt.pending_offline_delay.header'),
|
||||
{
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Save',
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonText: $t('prompt.pending_offline_delay.save'),
|
||||
cancelButtonText: $t('prompt.pending_offline_delay.cancel'),
|
||||
inputValue: this.pendingOfflineDelay / 1000,
|
||||
inputPattern: /\d+$/,
|
||||
inputErrorMessage: 'Valid number is required',
|
||||
inputErrorMessage: $t('prompt.pending_offline_delay.input_error'),
|
||||
callback: (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
|
||||
@@ -1041,6 +1041,217 @@
|
||||
"ok": "OK"
|
||||
}
|
||||
},
|
||||
"prompt": {
|
||||
"totp": {
|
||||
"header": "Two-factor Authentication",
|
||||
"description": "Enter a numeric code from your authenticator app",
|
||||
"use_otp": "Use OTP",
|
||||
"verify": "Verify",
|
||||
"input_placeholder": "Code",
|
||||
"input_error": "Invalid Code"
|
||||
},
|
||||
"otp": {
|
||||
"header": "Two-factor Authentication",
|
||||
"description": "Enter one of your saved recovery codes",
|
||||
"use_otp": "Use TOTP",
|
||||
"verify": "Verify",
|
||||
"input_placeholder": "Code",
|
||||
"input_error": "Invalid Code"
|
||||
},
|
||||
"email_otp": {
|
||||
"header": "Two-factor Authentication",
|
||||
"description": "Enter a numeric code that was sent to your email",
|
||||
"cancel": "Cancel",
|
||||
"verify": "Verify",
|
||||
"input_placeholder": "Code",
|
||||
"input_error": "Invalid Code"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "Primary Password Required",
|
||||
"description": "Please enter your Primary Password."
|
||||
},
|
||||
"change_favorite_group_name": {
|
||||
"header": "Change Group Name",
|
||||
"description": "Enter a new name",
|
||||
"cancel": "Cancel",
|
||||
"change": "Change",
|
||||
"input_placeholder": "Name",
|
||||
"input_error": "Name is required",
|
||||
"message": {
|
||||
"success": "Group renamed"
|
||||
}
|
||||
},
|
||||
"direct_access_user_id": {
|
||||
"header": "Direct Access",
|
||||
"description": "Enter a User URL or ID (UUID)",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "User URL/ID is required",
|
||||
"message": {
|
||||
"error": "Invalid URL/ID"
|
||||
}
|
||||
},
|
||||
"direct_access_username": {
|
||||
"header": "Direct Access",
|
||||
"description": "Enter a Username",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Username is required"
|
||||
},
|
||||
"direct_access_world_id": {
|
||||
"header": "Direct Access",
|
||||
"description": "Enter a World URL or ID (UUID)",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "World URL/ID is required",
|
||||
"message": {
|
||||
"error": "Invalid URL/ID"
|
||||
}
|
||||
},
|
||||
"direct_access_avatar_id": {
|
||||
"header": "Direct Access",
|
||||
"description": "Enter a Avatar URL or ID (UUID)",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Avatar URL/ID is required",
|
||||
"message": {
|
||||
"error": "Invalid URL/ID"
|
||||
}
|
||||
},
|
||||
"direct_access_omni": {
|
||||
"header": "Direct Access",
|
||||
"description": "Enter a User/World/Instance/Avatar/Group URL or ID (UUID)",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "URL/ID is required",
|
||||
"message": {
|
||||
"error": "Invalid URL/ID"
|
||||
}
|
||||
},
|
||||
"notification_timeout": {
|
||||
"header": "Notification Timeout",
|
||||
"description": "Enter amount of seconds",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Valid number is required"
|
||||
},
|
||||
"overlay_message_timeout": {
|
||||
"header": "Overlay Message Timeout",
|
||||
"description": "Enter amount of seconds",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Valid number is required"
|
||||
},
|
||||
"rename_avatar": {
|
||||
"header": "Rename Avatar",
|
||||
"description": "Enter avatar name",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Valid name is required",
|
||||
"message": {
|
||||
"success": "Avatar renamed"
|
||||
}
|
||||
},
|
||||
"change_avatar_description": {
|
||||
"header": "Change Description",
|
||||
"description": "Enter avatar description",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Valid description is required",
|
||||
"message": {
|
||||
"success": "Avatar description changed"
|
||||
}
|
||||
},
|
||||
"rename_world": {
|
||||
"header": "Rename World",
|
||||
"description": "Enter world name",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Valid name is required",
|
||||
"message": {
|
||||
"success": "World renamed"
|
||||
}
|
||||
},
|
||||
"change_world_description": {
|
||||
"header": "Change Description",
|
||||
"description": "Enter world description",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Valid description is required",
|
||||
"message": {
|
||||
"success": "World description changed"
|
||||
}
|
||||
},
|
||||
"change_world_capacity": {
|
||||
"header": "Change Capacity",
|
||||
"description": "Enter world capacity, Max: 40",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Valid number is required",
|
||||
"message": {
|
||||
"success": "World capacity changed"
|
||||
}
|
||||
},
|
||||
"change_world_preview": {
|
||||
"header": "Change YouTube Preview",
|
||||
"description": "Enter world YouTube preview",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Valid YouTube URL is required",
|
||||
"message": {
|
||||
"error": "Invalid YouTube URL",
|
||||
"success": "World YouTube preview changed"
|
||||
}
|
||||
},
|
||||
"change_table_size": {
|
||||
"header": "Max Table Size",
|
||||
"description": "Larger table sizes may impact RAM usage and performance (default: 1000)",
|
||||
"cancel": "Cancel",
|
||||
"save": "Save",
|
||||
"input_error": "Valid number is required"
|
||||
},
|
||||
"photon_lobby_timeout": {
|
||||
"header": "User Timeout Threshold",
|
||||
"description": "Enter amount of seconds (default: 3)",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Valid number is required"
|
||||
},
|
||||
"auto_clear_cache": {
|
||||
"header": "Clear VRCX Cache Timer",
|
||||
"description": "Enter amount of hours, larger values may impact RAM usage and performance (default: 24, disabled: 0)",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Valid number is required"
|
||||
},
|
||||
"new_local_favorite_group": {
|
||||
"header": "New Group",
|
||||
"description": "Enter a world favorite group name",
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK",
|
||||
"input_error": "Name is required",
|
||||
"message": {
|
||||
"error": "Group already exists with the name {name}"
|
||||
}
|
||||
},
|
||||
"local_favorite_group_rename": {
|
||||
"header": "Rename Group",
|
||||
"description": "Enter a world favorite group name",
|
||||
"cancel": "Cancel",
|
||||
"save": "Save",
|
||||
"input_error": "Name is required",
|
||||
"message": {
|
||||
"error": "Group already exists with the name {name}"
|
||||
}
|
||||
},
|
||||
"pending_offline_delay": {
|
||||
"header": "Pending Offline",
|
||||
"description": "Set pending offline delay in seconds (default: 110)",
|
||||
"cancel": "Cancel",
|
||||
"save": "Save",
|
||||
"input_error": "Valid number is required"
|
||||
}
|
||||
},
|
||||
"table": {
|
||||
"feed": {
|
||||
"date": "Date",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"register": "註冊",
|
||||
"forgotPassword": "忘記密碼?",
|
||||
"field": {
|
||||
"username": "玩家名稱或電子郵件",
|
||||
"username": "玩家名稱或電子信箱",
|
||||
"password": "密碼",
|
||||
"saveCredentials": "儲存登入資料",
|
||||
"devEndpoint": "開發接口",
|
||||
@@ -1041,6 +1041,217 @@
|
||||
"ok": "OK"
|
||||
}
|
||||
},
|
||||
"prompt": {
|
||||
"totp": {
|
||||
"header": "雙重認證",
|
||||
"description": "輸入你的身份驗證器應用程式中的數字代碼",
|
||||
"use_otp": "使用一次性密碼",
|
||||
"verify": "驗證",
|
||||
"input_placeholder": "驗證碼",
|
||||
"input_error": "無效的代碼"
|
||||
},
|
||||
"otp": {
|
||||
"header": "雙重認證",
|
||||
"description": "輸入你儲存的其中一個備份驗證碼",
|
||||
"use_otp": "使用驗證碼",
|
||||
"verify": "驗證",
|
||||
"input_placeholder": "備份驗證碼",
|
||||
"input_error": "無效的代碼"
|
||||
},
|
||||
"email_otp": {
|
||||
"header": "雙重認證",
|
||||
"description": "輸入寄送到電子信箱的數字代碼",
|
||||
"cancel": "取消",
|
||||
"verify": "驗證",
|
||||
"input_placeholder": "代碼",
|
||||
"input_error": "無效的代碼"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "需要主密碼",
|
||||
"description": "請輸入你的主密碼"
|
||||
},
|
||||
"change_favorite_group_name": {
|
||||
"header": "變更收藏群組名稱",
|
||||
"description": "輸入新名稱",
|
||||
"cancel": "取消",
|
||||
"change": "變更",
|
||||
"input_placeholder": "名稱",
|
||||
"input_error": "需要名稱",
|
||||
"message": {
|
||||
"success": "已重新命名收藏群組"
|
||||
}
|
||||
},
|
||||
"direct_access_user_id": {
|
||||
"header": "直接存取",
|
||||
"description": "輸入玩家連結或玩家 ID (UUID)",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "需要玩家連結 / 玩家 ID",
|
||||
"message": {
|
||||
"error": "無效的連結或 ID"
|
||||
}
|
||||
},
|
||||
"direct_access_username": {
|
||||
"header": "直接存取",
|
||||
"description": "輸入玩家名稱",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "需要玩家名稱"
|
||||
},
|
||||
"direct_access_world_id": {
|
||||
"header": "直接存取",
|
||||
"description": "輸入世界連結或世界 ID (UUID)",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "需要世界連結 / 世界 ID",
|
||||
"message": {
|
||||
"error": "無效的連結或 ID"
|
||||
}
|
||||
},
|
||||
"direct_access_avatar_id": {
|
||||
"header": "直接存取",
|
||||
"description": "輸入角色連結或角色 ID (UUID)",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "需要角色連結 / 角色 ID",
|
||||
"message": {
|
||||
"error": "無效的連結或 ID"
|
||||
}
|
||||
},
|
||||
"direct_access_omni": {
|
||||
"header": "直接存取",
|
||||
"description": "輸入玩家 / 世界 / 房間 / 角色連結 或 ID (UUID)",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "需要連結或 ID",
|
||||
"message": {
|
||||
"error": "無效的連結或 ID"
|
||||
}
|
||||
},
|
||||
"notification_timeout": {
|
||||
"header": "通知顯示時間",
|
||||
"description": "輸入秒數",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "請輸入有效的秒數"
|
||||
},
|
||||
"overlay_message_timeout": {
|
||||
"header": "訊息疊層顯示時間",
|
||||
"description": "輸入秒數",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "請輸入有效的秒數"
|
||||
},
|
||||
"rename_avatar": {
|
||||
"header": "重新命名角色",
|
||||
"description": "輸入角色名稱",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "請輸入有效的名稱",
|
||||
"message": {
|
||||
"success": "已重新命名角色"
|
||||
}
|
||||
},
|
||||
"change_avatar_description": {
|
||||
"header": "變更角色敘述",
|
||||
"description": "輸入角色敘述",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "請輸入有效的敘述",
|
||||
"message": {
|
||||
"success": "已變更角色敘述"
|
||||
}
|
||||
},
|
||||
"rename_world": {
|
||||
"header": "重新命名世界",
|
||||
"description": "輸入世界名稱",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "請輸入有效的名稱",
|
||||
"message": {
|
||||
"success": "已重新命名世界"
|
||||
}
|
||||
},
|
||||
"change_world_description": {
|
||||
"header": "變更世界敘述",
|
||||
"description": "輸入世界敘述",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "請輸入有效的敘述",
|
||||
"message": {
|
||||
"success": "已變更世界敘述"
|
||||
}
|
||||
},
|
||||
"change_world_capacity": {
|
||||
"header": "變更世界最大人數",
|
||||
"description": "輸入世界最大人數, 最大:40",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "請輸入有效的人數",
|
||||
"message": {
|
||||
"success": "已變更世界最大人數"
|
||||
}
|
||||
},
|
||||
"change_world_preview": {
|
||||
"header": "變更 YouTube 預覽",
|
||||
"description": "輸入世界 YouTube 預覽",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "請輸入有效的 Youtube 連結",
|
||||
"message": {
|
||||
"error": "無效的 Youtube 連結",
|
||||
"success": "世界 YouTube 預覽已變更"
|
||||
}
|
||||
},
|
||||
"change_table_size": {
|
||||
"header": "最大表格大小",
|
||||
"description": "較大的資料表大小可能會影響內存用量和性能 (預設:1000)",
|
||||
"cancel": "取消",
|
||||
"save": "儲存",
|
||||
"input_error": "請輸入有效的行數"
|
||||
},
|
||||
"photon_lobby_timeout": {
|
||||
"header": "玩家愈時閥值",
|
||||
"description": "輸入秒數(預設:3)",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "請輸入有效的秒數"
|
||||
},
|
||||
"auto_clear_cache": {
|
||||
"header": "VRCX 快取清除間隔",
|
||||
"description": "輸入小時數,較大的數值可能會影響內存用量和性能 (預設:24,關閉:0)",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "請輸入有效的小時數"
|
||||
},
|
||||
"new_local_favorite_group": {
|
||||
"header": "新增收藏群組",
|
||||
"description": "輸入世界收藏群組名稱",
|
||||
"cancel": "取消",
|
||||
"ok": "OK",
|
||||
"input_error": "請輸入有效的名稱",
|
||||
"message": {
|
||||
"error": "名稱為 {name} 的群組已存在"
|
||||
}
|
||||
},
|
||||
"local_favorite_group_rename": {
|
||||
"header": "重新命名收藏群組",
|
||||
"description": "輸入世界收藏群組名稱",
|
||||
"cancel": "取消",
|
||||
"save": "儲存",
|
||||
"input_error": "請輸入有效的名稱",
|
||||
"message": {
|
||||
"error": "名稱為 {name} 的群組已存在"
|
||||
}
|
||||
},
|
||||
"pending_offline_delay": {
|
||||
"header": "待確認離線",
|
||||
"description": "設定將玩家標記為離線之前的延遲秒數(預設:110)",
|
||||
"cancel": "取消",
|
||||
"save": "儲存",
|
||||
"input_error": "請輸入有效的秒數"
|
||||
}
|
||||
},
|
||||
"table": {
|
||||
"feed": {
|
||||
"date": "時間",
|
||||
|
||||
Reference in New Issue
Block a user