🎨 (update margin, import modal)
This commit is contained in:
17
src/App.vue
17
src/App.vue
@@ -10,15 +10,6 @@
|
|||||||
<div class="navbar-brand">
|
<div class="navbar-brand">
|
||||||
<router-link class="navbar-item" to="/">
|
<router-link class="navbar-item" to="/">
|
||||||
<img src="./assets/vaquant-root-white.png" title="vaquant" />
|
<img src="./assets/vaquant-root-white.png" title="vaquant" />
|
||||||
<online-view class="online-view">
|
|
||||||
<div slot="offline">
|
|
||||||
<img
|
|
||||||
class="icon"
|
|
||||||
src="./assets/icons/baseline_cloud_off_white_48dp.png"
|
|
||||||
alt="offline"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</online-view>
|
|
||||||
</router-link>
|
</router-link>
|
||||||
<app-installed class="navbar-item">
|
<app-installed class="navbar-item">
|
||||||
<template v-slot:app-installed>
|
<template v-slot:app-installed>
|
||||||
@@ -83,7 +74,6 @@ import ClickOutside from 'vue-click-outside'
|
|||||||
import { Action, Getter } from 'vuex-class'
|
import { Action, Getter } from 'vuex-class'
|
||||||
import IUser from '@/models/IUser'
|
import IUser from '@/models/IUser'
|
||||||
import { COFFEE_LINK } from '@/utils/constants'
|
import { COFFEE_LINK } from '@/utils/constants'
|
||||||
import OnlineView from '@/components/OnlineView.vue'
|
|
||||||
import AppInstalled from '@/components/AppInstalled.vue'
|
import AppInstalled from '@/components/AppInstalled.vue'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -91,7 +81,6 @@ import AppInstalled from '@/components/AppInstalled.vue'
|
|||||||
ClickOutside
|
ClickOutside
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'online-view': OnlineView,
|
|
||||||
'app-installed': AppInstalled
|
'app-installed': AppInstalled
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -136,7 +125,6 @@ export default class App extends Vue {
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
$icon_size: 18px;
|
$icon_size: 18px;
|
||||||
$margin: 0.75rem;
|
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
color: red;
|
color: red;
|
||||||
@@ -173,9 +161,4 @@ $margin: 0.75rem;
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
|
||||||
margin-left: $margin;
|
|
||||||
margin-right: $margin;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ export default class AccountList extends Vue {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.account-list {
|
||||||
|
margin: 0 0.75rem;
|
||||||
|
}
|
||||||
li {
|
li {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
&:last-child {
|
&:last-child {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import bus, { SYNC } from '@/utils/bus-event'
|
|||||||
import IUser from '@/models/IUser'
|
import IUser from '@/models/IUser'
|
||||||
import notif from '@/utils/notif'
|
import notif from '@/utils/notif'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import { confirmation, toHex } from '@/utils'
|
import { confirmation } from '@/utils'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
|
|
||||||
PouchDb.plugin(PouchDbAuthentication)
|
PouchDb.plugin(PouchDbAuthentication)
|
||||||
@@ -19,7 +19,7 @@ const remoteConfig = {
|
|||||||
withCredentials: true
|
withCredentials: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const LOCALE_DB: string = 'LOCALE_DB'
|
const LOCALE_DB: string = 'VAQUANT_LOCALE_DB'
|
||||||
const REMOTE: string = 'https://juliencalixte.ddns.net/database'
|
const REMOTE: string = 'https://juliencalixte.ddns.net/database'
|
||||||
|
|
||||||
class CouchService {
|
class CouchService {
|
||||||
@@ -98,11 +98,7 @@ class CouchService {
|
|||||||
return !!docs.total_rows
|
return !!docs.total_rows
|
||||||
}
|
}
|
||||||
|
|
||||||
public setUser(
|
public setUser(user: IUser | null, replicateLocale: boolean): void {
|
||||||
user: IUser | null,
|
|
||||||
hexUser: string | null,
|
|
||||||
replicateLocale: boolean
|
|
||||||
): void {
|
|
||||||
const newUser: boolean =
|
const newUser: boolean =
|
||||||
!this.user || (!!user && this.user.userId !== user.userId)
|
!this.user || (!!user && this.user.userId !== user.userId)
|
||||||
this.user = user
|
this.user = user
|
||||||
@@ -219,8 +215,8 @@ class CouchService {
|
|||||||
await this.db.destroy()
|
await this.db.destroy()
|
||||||
this.db = null
|
this.db = null
|
||||||
}
|
}
|
||||||
const hexUser: string = toHex(this.user.userId)
|
|
||||||
this.setUser(this.user, hexUser, false)
|
this.setUser(this.user, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export default new Vuex.Store<IState>({
|
|||||||
) {
|
) {
|
||||||
store.user = user
|
store.user = user
|
||||||
store.hexUser = user ? toHex(user.userId) : null
|
store.hexUser = user ? toHex(user.userId) : null
|
||||||
couchService.setUser(user, store.hexUser, replicate || false)
|
couchService.setUser(user, replicate || false)
|
||||||
},
|
},
|
||||||
[ADD_PUBLIC_ACCOUNT](store, { accountId }: { accountId: string }) {
|
[ADD_PUBLIC_ACCOUNT](store, { accountId }: { accountId: string }) {
|
||||||
if (!accountId) {
|
if (!accountId) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
@import '~bulma/sass/components/card.sass';
|
@import '~bulma/sass/components/card.sass';
|
||||||
@import '~bulma/sass/components/message.sass';
|
@import '~bulma/sass/components/message.sass';
|
||||||
@import '~bulma/sass/components/tabs.sass';
|
@import '~bulma/sass/components/tabs.sass';
|
||||||
|
@import '~bulma/sass/components/modal.sass';
|
||||||
@import '~bulma/sass/elements/button.sass';
|
@import '~bulma/sass/elements/button.sass';
|
||||||
@import '~bulma/sass/elements/box.sass';
|
@import '~bulma/sass/elements/box.sass';
|
||||||
@import '~bulma/sass/elements/container.sass';
|
@import '~bulma/sass/elements/container.sass';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="about">
|
<div class="about">
|
||||||
<img class="logo" src="../assets/logo.svg" title="logo Vaquant" >
|
<img class="logo" src="../assets/logo.svg" title="logo Vaquant" />
|
||||||
<p class="simple-description" v-t="'about.description'"></p>
|
<p class="simple-description" v-t="'about.description'"></p>
|
||||||
<hr>
|
<hr />
|
||||||
<app-resume />
|
<app-resume />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -19,6 +19,9 @@ export default class About extends Vue {}
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.about {
|
||||||
|
margin: 0 0.75rem;
|
||||||
|
}
|
||||||
.simple-description {
|
.simple-description {
|
||||||
max-width: 450pt;
|
max-width: 450pt;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
:to="{ name: 'user' }"
|
:to="{ name: 'user' }"
|
||||||
v-t="'user.loginsignup'"
|
v-t="'user.loginsignup'"
|
||||||
></router-link>
|
></router-link>
|
||||||
<div class="account-list-container box" v-if="showAccounts">
|
<div class="account-list-container" v-if="showAccounts">
|
||||||
<account-list />
|
<account-list />
|
||||||
</div>
|
</div>
|
||||||
<fab-button v-else :to="{ name: 'account-new' }" :margin="true">
|
<fab-button v-else :to="{ name: 'account-new' }" :margin="true">
|
||||||
|
|||||||
@@ -8,9 +8,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="buttons is-centered">
|
<div class="buttons is-centered">
|
||||||
<button class="button is-warning" type="button" @click="logout" v-t="'user.logout'"></button>
|
<button
|
||||||
<button class="button is-warning" type="button" @click="purge" v-t="'user.purge'"></button>
|
class="button is-warning"
|
||||||
<confirm-button class="is-danger" @confirm="remove">{{ $t('user.delete') }}</confirm-button>
|
type="button"
|
||||||
|
@click="logout"
|
||||||
|
v-t="'user.logout'"
|
||||||
|
></button>
|
||||||
|
<button
|
||||||
|
class="button is-warning"
|
||||||
|
type="button"
|
||||||
|
@click="purge"
|
||||||
|
v-t="'user.purge'"
|
||||||
|
></button>
|
||||||
|
<confirm-button class="is-danger" @confirm="remove">{{
|
||||||
|
$t('user.delete')
|
||||||
|
}}</confirm-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -24,11 +36,19 @@
|
|||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="tabs is-centered is-fullwidth">
|
<div class="tabs is-centered is-fullwidth">
|
||||||
<ul>
|
<ul>
|
||||||
<li :class="{ 'is-active': activeTab === 'login'}">
|
<li :class="{ 'is-active': activeTab === 'login' }">
|
||||||
<a href="#" @click.prevent="activeTab = 'login'" v-t="'user.login'"></a>
|
<a
|
||||||
|
href="#"
|
||||||
|
@click.prevent="activeTab = 'login'"
|
||||||
|
v-t="'user.login'"
|
||||||
|
></a>
|
||||||
</li>
|
</li>
|
||||||
<li :class="{ 'is-active': activeTab === 'signup'}">
|
<li :class="{ 'is-active': activeTab === 'signup' }">
|
||||||
<a href="#" @click.prevent="activeTab = 'signup'" v-t="'user.signup'"></a>
|
<a
|
||||||
|
href="#"
|
||||||
|
@click.prevent="activeTab = 'signup'"
|
||||||
|
v-t="'user.signup'"
|
||||||
|
></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -186,12 +206,20 @@
|
|||||||
<div class="modal" :class="{ 'is-active': show }">
|
<div class="modal" :class="{ 'is-active': show }">
|
||||||
<div class="modal-background"></div>
|
<div class="modal-background"></div>
|
||||||
<div class="modal-card">
|
<div class="modal-card">
|
||||||
<section
|
<section class="modal-card-body">
|
||||||
class="modal-card-body"
|
Voulez-vous récupérer les comptes utilisés avant d'être inscrit ?
|
||||||
>Voulez-vous récupérer les comptes utilisés avant d'être inscrit ?</section>
|
</section>
|
||||||
<footer class="modal-card-foot">
|
<footer class="modal-card-foot buttons has-addons is-centered">
|
||||||
<button type="button" class="button is-success" @click="toReplicate(true)">Oui</button>
|
<button
|
||||||
<button type="button" class="button" @click="toReplicate(false)">Non</button>
|
type="button"
|
||||||
|
class="button is-success"
|
||||||
|
@click="toReplicate(true)"
|
||||||
|
>
|
||||||
|
Oui
|
||||||
|
</button>
|
||||||
|
<button type="button" class="button" @click="toReplicate(false)">
|
||||||
|
Non
|
||||||
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
<button class="modal-close is-large" aria-label="close"></button>
|
<button class="modal-close is-large" aria-label="close"></button>
|
||||||
|
|||||||
@@ -95,64 +95,53 @@
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
key="transaction"
|
key="transaction"
|
||||||
class="transaction-panel tab-content columns is-centered"
|
class="transaction-panel tab-content is-centered"
|
||||||
v-if="activeTab === 'transaction'"
|
v-if="activeTab === 'transaction'"
|
||||||
>
|
>
|
||||||
<div class="column">
|
<account-transaction-list
|
||||||
<account-transaction-list
|
:account="account"
|
||||||
:account="account"
|
:transactions="transactions"
|
||||||
:transactions="transactions"
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
key="tag"
|
key="tag"
|
||||||
class="tag-panel tab-content columns is-centered"
|
class="tag-panel tab-content is-centered"
|
||||||
v-if="activeTab === 'tag'"
|
v-if="activeTab === 'tag'"
|
||||||
>
|
>
|
||||||
<div class="column">
|
<tag-list
|
||||||
<tag-list
|
:transactions="transactionWithoutRefund"
|
||||||
:transactions="transactionWithoutRefund"
|
:account="account"
|
||||||
:account="account"
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
key="balance"
|
key="balance"
|
||||||
class="balance-panel tab-content columns is-centered"
|
class="balance-panel tab-content is-centered"
|
||||||
v-if="activeTab === 'balance'"
|
v-if="activeTab === 'balance'"
|
||||||
>
|
>
|
||||||
<div class="column">
|
<chart-balance
|
||||||
<chart-balance
|
:account="account"
|
||||||
:account="account"
|
:stats="userStats"
|
||||||
:stats="userStats"
|
:currency="account.mainCurrency"
|
||||||
:currency="account.mainCurrency"
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
key="refund"
|
key="refund"
|
||||||
class="refund-panel tab-content columns is-centered"
|
class="refund-panel tab-content is-centered"
|
||||||
v-if="activeTab === 'refund'"
|
v-if="activeTab === 'refund'"
|
||||||
>
|
>
|
||||||
<div class="column">
|
<div
|
||||||
|
v-if="userRefunds.length"
|
||||||
|
class="columns is-centered is-multiline"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
v-if="userRefunds.length"
|
class="column is-one-fifth"
|
||||||
class="columns is-centered is-multiline"
|
v-for="(refund, k) in userRefunds"
|
||||||
|
:key="`${refund.from.alias}-${refund.to.alias}`"
|
||||||
>
|
>
|
||||||
<div
|
<refund-transaction :refund="userRefunds[k]" :account="account" />
|
||||||
class="column is-one-fifth"
|
|
||||||
v-for="(refund, k) in userRefunds"
|
|
||||||
:key="`${refund.from.alias}-${refund.to.alias}`"
|
|
||||||
>
|
|
||||||
<refund-transaction
|
|
||||||
:refund="userRefunds[k]"
|
|
||||||
:account="account"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="equilibrium">Le compte est à l'équilibre !</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else class="equilibrium">Le compte est à l'équilibre !</div>
|
||||||
</div>
|
</div>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
</div>
|
</div>
|
||||||
@@ -535,8 +524,8 @@ export default class AccountItem extends BaseAccount {
|
|||||||
}
|
}
|
||||||
.tab-content {
|
.tab-content {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: calc(100% - 30px);
|
width: 100%;
|
||||||
margin: auto;
|
margin: 10px auto;
|
||||||
transition: opacity 0.5s cubic-bezier(0.55, 0, 0.1, 1),
|
transition: opacity 0.5s cubic-bezier(0.55, 0, 0.1, 1),
|
||||||
transform 0.5s cubic-bezier(0.55, 0, 0.1, 1);
|
transform 0.5s cubic-bezier(0.55, 0, 0.1, 1);
|
||||||
&.columns {
|
&.columns {
|
||||||
|
|||||||
Reference in New Issue
Block a user