Adds AppPasswordModal to explain the application password flow.

This commit is contained in:
mateuswetah 2022-06-22 17:18:53 -03:00
parent 2703c5ecd7
commit fb5f77f4ea
3 changed files with 58 additions and 9 deletions

View File

@ -0,0 +1,39 @@
<template>
<ion-modal ref="modal" trigger="open-explanation-modal" :initial-breakpoint="0.9" :breakpoints="[0, 0.5, 0.75, 1.0]">
<ion-content
style="font-size: 0.9375rem; opacity: 0.85"
class="ion-padding">
<h1>Application Passwords</h1>
<p><em>Application passwords</em> are a safe way to peform operations without using your actual website password. To generate one, you must:
<ol>
<li>Open a web browser and login do your website traditional login page (usually <em>"https://your-website.com.br/wp-admin"</em>).</li>
<li>Go to your profile page by clicking on your picture in the upper right corner.</li>
<li>Scroll down to the "Application passwords" section. There should be a text input labelled "New name to the application password".</li>
<li>Fill in the text input with any value to identify this password (you can have multiple), for example: "Tainacan Mobile".</li>
<li>Click on the "Add new application password" button.</li>
</ol>
</p>
<p>With this steps completed, you will receive a code, that may look like this:</p>
<pre><code>vlOh CdaH UqWw YV7X beou 6MFY</code></pre>
<p>Copy this code and <strong>keep it safe somewhere</strong>. You won't be able to access it later. Finally, paste it on this app login screen.</p>
<p>While it should be kept logged in, if you ever loose your access to the app, you can revogate the previous passwords and generate new ones in the same screen.</p>
</ion-content>
</ion-modal>
</template>
<script lang="ts">
import {
IonModal,
IonContent
} from '@ionic/vue';
export default {
components: {
IonModal,
IonContent
},
setup() {
return {}
}
}
</script>

View File

@ -12,8 +12,8 @@ export const translationStrings = {
placeholder_site_url: 'https://my-tainacan-archive.com',
label_user_name: 'User name',
placeholder_user_name: 'your user name',
label_user_password: 'User password',
placeholder_user_password: 'your password here',
label_user_password: 'User application password',
placeholder_user_password: 'your application password here',
label_access_archive: 'Access archive',
label_item_without_title: 'Item without title',
label_collection_without_name: 'Collection without name',
@ -25,7 +25,9 @@ export const translationStrings = {
label_option_multiple_items: 'Multiple items from file selection',
label_option_multiple_attachments: 'Single item with document and attachments from file selection',
label_option_single_item: 'Single empty item',
label_cancel: 'Cancel'
label_cancel: 'Cancel',
info_application_password: 'This password is not the same of your WordPress admin.',
label_learn_more_here: 'Learn more here'
},
pt: {
collections: "Coleções",
@ -40,8 +42,8 @@ export const translationStrings = {
placeholder_site_url: 'https://meu-acervo-tainacan.com',
label_user_name: 'Nome de usuário',
placeholder_user_name: 'seu nome de usuário aqui',
label_user_password: 'Senha do usuário',
placeholder_user_password: 'sua senha de usuário aqui',
label_user_password: 'Senha do usuário da aplicação',
placeholder_user_password: 'sua senha de usuário da aplicação aqui',
label_access_archive: 'Acessar acervo',
label_item_without_title: 'Item sem título',
label_collection_without_name: 'Coleção sem nome',
@ -53,6 +55,8 @@ export const translationStrings = {
label_option_multiple_items: 'Vários itens a partir de uma seleção de arquivos',
label_option_multiple_attachments: 'Um item com documento e anexos provenientes de ums seleção de aquivos',
label_option_single_item: 'Um item vazio',
label_cancel: 'Cancelar'
label_cancel: 'Cancelar',
info_application_password: 'Esta senha não é a mesma do seu painel admin do WordPress.',
label_learn_more_here: 'Saiba mais aqui.'
}
}

View File

@ -40,7 +40,7 @@
</ion-item>
<ion-item>
<ion-label position="floating">
{{ $t('label_user_password') }}
{{ $t('label_user_password') }}*
</ion-label>
<ion-input
:placeholder="$t('placeholder_user_password')"
@ -52,6 +52,7 @@
autocomplete="new-password"
enterkeyhint="done">
</ion-input>
<ion-note>{{ $t('info_application_password') }} <a id="open-explanation-modal">{{ $t('label_learn_more_here') }}</a></ion-note>
</ion-item>
</ion-list>
<br>
@ -62,6 +63,7 @@
</form>
</ion-col>
</ion-row>
<app-password-modal />
</ion-content>
</ion-page>
</template>
@ -70,6 +72,7 @@
import { useTainacanStore } from '../store/storeTainacan';
import { useWpStore } from '../store/storeWp';
import { arrowForwardOutline } from "ionicons/icons";
import AppPasswordModal from '../components/modals/AppPasswordModal.vue';
import {
IonIcon,
@ -82,7 +85,8 @@ import {
IonLabel,
IonRow,
IonCol,
IonContent
IonContent,
IonNote
} from '@ionic/vue';
import { computed } from 'vue';
export default {
@ -98,7 +102,9 @@ export default {
IonLabel,
IonRow,
IonCol,
IonContent
IonContent,
IonNote,
AppPasswordModal
},
data(){
return {