mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-23 00:33:18 +01:00
Add Toolbar within edit mode
This commit is contained in:
parent
1c55e7e2e1
commit
0dbbb979dc
@ -1,6 +1,21 @@
|
||||
<template>
|
||||
<div class="main-section">
|
||||
<router-view></router-view>
|
||||
<div>
|
||||
<!-- toolbar -->
|
||||
<header class="toolbar has-background-black-bis" v-if="showToolbar">
|
||||
<div class="container">
|
||||
<div class="columns is-mobile is-centered">
|
||||
<div class="column is-three-quarters-mobile is-one-third-tablet is-one-quarter-desktop is-one-quarter-widescreen is-one-quarter-fullhd">
|
||||
<a class="button is-dark">
|
||||
Delete
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<!-- main content -->
|
||||
<main class="main-section">
|
||||
<router-view :showToolbar="showToolbar"></router-view>
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -10,7 +25,7 @@
|
||||
|
||||
data(){
|
||||
return {
|
||||
|
||||
showToolbar: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- accounts -->
|
||||
<div class="columns is-multiline is-centered">
|
||||
<div class="accounts columns is-multiline is-centered">
|
||||
<div class="tfa column is-narrow has-text-white" v-for="account in filteredAccounts">
|
||||
<div class="tfa-container">
|
||||
<div class="tfa-checkbox" v-if="editMode">
|
||||
@ -37,14 +37,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <span v-if="editMode">
|
||||
<router-link :to="{ name: 'edit', params: { twofaccountId: account.id }}" class="tag is-dark">
|
||||
<font-awesome-icon :icon="['fas', 'edit']" />
|
||||
</router-link>
|
||||
<a class="tag is-dark" v-on:click="deleteAccount(account.id)">
|
||||
<font-awesome-icon :icon="['fas', 'trash']" />
|
||||
</a>
|
||||
</span> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- No account -->
|
||||
@ -73,8 +65,8 @@
|
||||
</router-link>
|
||||
</p>
|
||||
<p class="control">
|
||||
<a class="button is-dark is-rounded" @click="editMode = true" v-if="!editMode">{{ $t('twofaccounts.manage') }}</a>
|
||||
<a class="button is-success is-rounded" @click="editMode = false" v-if="editMode">
|
||||
<a class="button is-dark is-rounded" @click="setEditModeTo(true)" v-if="!editMode">{{ $t('twofaccounts.manage') }}</a>
|
||||
<a class="button is-success is-rounded" @click="setEditModeTo(false)" v-if="editMode">
|
||||
<span>{{ $t('twofaccounts.done') }}</span>
|
||||
<span class="icon is-small">
|
||||
<font-awesome-icon :icon="['fas', 'check']" />
|
||||
@ -190,6 +182,11 @@
|
||||
this.$router.go('/login');
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
setEditModeTo(state) {
|
||||
this.editMode = state
|
||||
this.$parent.showToolbar = state
|
||||
}
|
||||
|
||||
},
|
||||
|
17
resources/sass/app.scss
vendored
17
resources/sass/app.scss
vendored
@ -13,14 +13,25 @@
|
||||
padding: 1.5rem 1rem 8rem 1rem;
|
||||
}
|
||||
|
||||
.search {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.accounts {
|
||||
margin-top: 0.75rem;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.main-section {
|
||||
padding: 0.75rem 1rem 8rem 1rem;
|
||||
}
|
||||
|
||||
.search {
|
||||
margin-bottom: 0.75rem !important;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 30;
|
||||
padding: 0.75rem 0;
|
||||
}
|
||||
|
||||
.form-column {
|
||||
|
Loading…
Reference in New Issue
Block a user