mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-21 09:12:14 +00:00
added translations for Personal Access Token UI
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<PopupWrapper name="create-personal-token">
|
||||
|
||||
<PopupHeader :title="$t('Create Personal Token')" icon="key" />
|
||||
<PopupHeader :title="$t('popup_personal_token.title')" icon="key" />
|
||||
|
||||
<PopupContent>
|
||||
<ValidationObserver v-if="! token" @submit.prevent="createTokenForm" ref="createToken" v-slot="{ invalid }" tag="form" class="form-wrapper">
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper password" name="Token Name" rules="required" v-slot="{ errors }">
|
||||
<label class="input-label"> {{ $t('Token Name') }}:</label>
|
||||
<input v-model="name" :class="{'is-error': errors[0]}" type="text" ref="input" class="focus-border-theme" :placeholder="$t('Type token name...')">
|
||||
<label class="input-label"> {{ $t('popup_personal_token.label') }}:</label>
|
||||
<input v-model="name" :class="{'is-error': errors[0]}" type="text" ref="input" class="focus-border-theme" :placeholder="$t('popup_personal_token.plc')">
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</ValidationObserver>
|
||||
@@ -15,12 +15,12 @@
|
||||
<div v-if="token" class="form-wrapper">
|
||||
<div v-if="token">
|
||||
<div class="input-wrapper">
|
||||
<label class="input-label">{{ $t('Your Personal Access Token') }}:</label>
|
||||
<label class="input-label">{{ $t('popup_personal_token.your_token') }}:</label>
|
||||
<CopyInput size="small" :str="token['plainTextToken']" />
|
||||
</div>
|
||||
</div>
|
||||
<InfoBox style="margin-bottom: 0; margin-top: 20px">
|
||||
<p v-html="$t('Make sure to <b class=\'text-theme\'>copy your personal access token now</b>. You won’t be able to see it again!')"></p>
|
||||
<p v-html="$t('popup_personal_token.copy_token')"></p>
|
||||
</InfoBox>
|
||||
</div>
|
||||
</PopupContent>
|
||||
@@ -40,7 +40,7 @@
|
||||
:loading="isLoading"
|
||||
:disabled="isLoading"
|
||||
>
|
||||
{{ $t('Create Token') }}
|
||||
{{ $t('personal_token.create_token') }}
|
||||
</ButtonBase>
|
||||
</PopupActions>
|
||||
|
||||
|
||||
@@ -73,9 +73,9 @@
|
||||
</div>
|
||||
</PageTabGroup>
|
||||
<PageTabGroup class="form block-form">
|
||||
<FormLabel icon="key">{{ $t('Personal Access Token') }}</FormLabel>
|
||||
<FormLabel icon="key">{{ $t('personal_token.section_title') }}</FormLabel>
|
||||
<InfoBox v-if="tokens.length === 0">
|
||||
<p>{{ $t("You don't have any created personal access tokens yet.") }}</p>
|
||||
<p>{{ $t("personal_token.section_description") }}</p>
|
||||
</InfoBox>
|
||||
|
||||
<InfoBox v-if="tokens.length > 0">
|
||||
@@ -83,7 +83,7 @@
|
||||
<li class="token-item" v-for="token in tokens" :key="token.id">
|
||||
<div class="tokens-details">
|
||||
<b class="name">{{ token.name}}</b>
|
||||
<time class="last-used">{{ $t('Last Used') }}: {{ token.last_used_at ? formatDate(token.last_used_at) : $t('Never') }}</time>
|
||||
<time class="last-used">{{ $t('last_used') }}: {{ token.last_used_at ? formatDate(token.last_used_at) : $t('never') }}</time>
|
||||
</div>
|
||||
<div @click="confirmDeleteToken(token)" class="tokens-destroyer">
|
||||
<x-icon size="16" class="close-icon hover-text-theme" />
|
||||
@@ -93,7 +93,7 @@
|
||||
</InfoBox>
|
||||
|
||||
<ButtonBase @click.native="openCreateTokenPopup" type="submit" button-style="theme" class="confirm-form">
|
||||
{{ $t('Create Token') }}
|
||||
{{ $t('personal_token.create_token') }}
|
||||
</ButtonBase>
|
||||
</PageTabGroup>
|
||||
</PageTab>
|
||||
@@ -152,8 +152,8 @@
|
||||
},
|
||||
confirmDeleteToken(token) {
|
||||
events.$emit('confirm:open', {
|
||||
title: this.$t('Are you sure you want to delete this token?'),
|
||||
message: this.$t('Any applications or scripts using this token will no longer be able to access into your account. You cannot undo this action.'),
|
||||
title: this.$t('popup_delete_personal_token.title'),
|
||||
message: this.$t('popup_delete_personal_token.description'),
|
||||
action: {
|
||||
id: token.id,
|
||||
operation: 'delete-personal-access-token'
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
events.$emit('toaster', {
|
||||
type: 'success',
|
||||
message: this.$t('Token was successfully deleted!'),
|
||||
message: this.$t('personal_token.token_deleted'),
|
||||
})
|
||||
})
|
||||
.catch(() => this.$isSomethingWrong())
|
||||
|
||||
Reference in New Issue
Block a user