-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backup page #26
Backup page #26
Changes from 2 commits
f7a51af
ea40f1d
e957a02
f9a8f08
21388ab
4d1ea27
95f8dd8
bdf28b0
5098880
981a793
6a6c981
caee391
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_style = tab | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,8 @@ | |
v-if="isProfilePage" | ||
@click='backAction') | ||
icon-component(name="trusty_options") | ||
.header_title(v-if="!isProfilePage") {{ getTitle }} | ||
|
||
.header_title(v-if="!isProfilePage") {{ appHeaderTitle }} | ||
|
||
|
||
</div> | ||
|
@@ -27,6 +27,7 @@ | |
|
||
<script> | ||
import iconComponent from '@/components/icon'; | ||
import { mapGetters, mapActions } from 'vuex'; | ||
|
||
export default { | ||
components: { | ||
|
@@ -39,21 +40,33 @@ export default { | |
login: 'login', | ||
deposit: 'deposit details', | ||
withdraw: 'withdraw', | ||
manage: 'manage fund' | ||
manage: 'manage fund', | ||
backup: 'compulsory backup', | ||
'backup-phrase': 'backup phrase', | ||
'backup-verify': 'verify backup', | ||
'backup-done': 'almost done! let\'s review' | ||
} | ||
}; | ||
}, | ||
mounted() { | ||
this.setHeaderTitle(this.titles[this.$route.name]); | ||
}, | ||
methods: { | ||
...mapActions('app', ['setHeaderTitle']), | ||
backAction() { | ||
this.$router.push({ name: 'home' }); | ||
}, | ||
}, | ||
|
||
watch: { | ||
$route(val) { | ||
this.setHeaderTitle(this.titles[val.name]); | ||
} | ||
}, | ||
computed: { | ||
...mapGetters('app', ['appHeaderTitle']), | ||
isProfilePage() { | ||
return this.$route.path.indexOf('home') !== -1 || this.$route.name === 'home'; | ||
}, | ||
getTitle() { | ||
return this.titles[this.$route.name]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Вот этот вариант был лучше. |
||
} | ||
} | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ export default { | |
}, | ||
render() { | ||
// eslint-disable-next-line | ||
let app = (this.connected) ? (<router-view></router-view>) : (<h4>Connecting</h4>); | ||
let app = (this.connected) || true ? (<router-view></router-view>) : (<h4>Connecting</h4>); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Я понимаю, что ты это ставишь, чтобы верстать удобнее было, не дожидаясь загрузки, но это изменение ломает другие компоненты, не забывай плз перед сабмитом PR убирать его. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. у меня был коммит с более удобным управлением этим условием но он куда-то пропал в мержах |
||
return ( | ||
<div id="app"> | ||
<Header /> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const APP_SET_HEADER_TITLE = 'APP_SET_HEADER_TITLE'; | ||
const APP_SET_MODAL = 'APP_SET_MODAL'; | ||
|
||
const actions = { | ||
setModal({ commit }, val) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Что это за действие? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Это действие дает возможность использовать v-if для показа модального окна в зависимости от его названия. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ок. Только давай будем использовать более понятные имена переменных. Если val - это название модального окна, то стоит обозначить его modalName. |
||
commit(APP_SET_MODAL, val); | ||
}, | ||
setHeaderTitle({ commit }, val) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Это не обязательно в стор выносить. Тебе ведь это нужно только в компоненте хедера? Можно обойтись простым computed там. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. там была идея вначале менять в компоненте, потом в итоге вышло, что особо и нужно было. Но с другой стороны ничего плохого нет, что через стор хедер работает. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Да, работает, но совершаются лишние манипуляции, которые вообще без надобности (действия со стором и вотч), прошлый вариант с computed был проще и всё полностью выполнял. Верни, пожалуйста, к нему. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Вполне вероятна ситуация появления в нем надобности. Я же его и затеял, чтобы менять хедер в любом месте приложения при случае. Но отказался от реализации в текущем компоненте. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. А зачем менять хедер в каком-то месте, если он отражает текущее местоположение по роуту? Если возникнет необходимость показать там какие-то еще данные, то для этого лучше будет использовать отдельный параметр, который отдельными экшенами можно будет устанавливать, который не будет меняться на вотч роута. |
||
commit(APP_SET_HEADER_TITLE, val); | ||
} | ||
}; | ||
|
||
const getters = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Переименуй плз в getModalName, геттер - это функция, т.е. глагол и начинаем с get. |
||
appModal: state => state.modalName, | ||
appHeaderTitle: state => state.headerTitle, | ||
}; | ||
|
||
const mutations = { | ||
[APP_SET_MODAL](state, val) { | ||
state.modalName = val; | ||
}, | ||
[APP_SET_HEADER_TITLE](state, val) { | ||
state.headerTitle = val; | ||
} | ||
}; | ||
|
||
|
||
const state = { | ||
modalName: '', | ||
headerTitle: '' | ||
}; | ||
|
||
export default { | ||
namespaced: true, | ||
state, | ||
getters, | ||
actions, | ||
mutations, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,20 @@ HTML { | |
/* Планшет */ | ||
@media ( max-width: 768px ) { | ||
HTML { | ||
background-image: url("./screens/manage_portfolio_manual.png"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pixel-glass - это для пиксель-перфект верстки ты используешь? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pixel glass да.. вещь) |
||
|
||
background-image: url("./screens/account_backup_6_popup.png"); | ||
//background-image: url("./screens/account_backup_5.png"); | ||
|
||
//background-image: url("./screens/account_backup_5_popup.png"); | ||
|
||
//background-image: url("./screens/account_backup_4.png"); | ||
|
||
//background-image: url("./screens/account_backup_3.png"); | ||
//background-image: url("./screens/account_backup_1_popup.png"); | ||
|
||
//background-image: url("./screens/account_backup_1_popup.png"); | ||
//background-image: url("./screens/account_backup_1.png"); | ||
//background-image: url("./screens/manage_portfolio_manual.png"); | ||
//background-image: url("./screens/payment_method_user_profile_perfect.png"); | ||
//background-image: url("./screens/login.png") | ||
//background-image: url("./screens/signup.png") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<template lang="pug"> | ||
|
||
#done | ||
.tick_container(v-for="text in infos") | ||
._tick: icon(name="tick_backup") | ||
._info | ||
p.trusty_help_text(v-html="text") | ||
|
||
.trusty_inline_buttons._one_button | ||
button copy password | ||
|
||
._bottom_fixed.main_padding | ||
.tick_container | ||
._tick: icon(name="tick_backup") | ||
._info | ||
p.trusty_help_text | ||
| I have read, understood, and#[br]gree | ||
span._yellow The terms of use | ||
|
||
.trusty_inline_buttons._one_button | ||
button finish backup | ||
|
||
</template> | ||
|
||
<script> | ||
|
||
import icon from '@/components/icon'; | ||
/*eslint-disable*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Убирай пожалуйста все выключения еслинта перед сабмитом PR |
||
const infos = [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. А зачем это в отдельную переменную? В целом можно, но тогда стоит хранить просто в дате (а лучше - в $options, если это реактивные данные). А вообще хтмл код должен быть только в темплейте. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. намного удобнее выносить списки текстов в переменные, нежели писать эти строки в html. |
||
` | ||
I understand that my funds are<br/> | ||
help securely on this device, not<br/> | ||
by a compony, and nobody can<br/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Опечатка в company |
||
recover my backup phrase and password | ||
`, | ||
` | ||
I understand that if I open Trusty,<br/> | ||
on a new device or clear browser<br/> | ||
cash, my funds can only be<br/> | ||
accessed with the backed pharse | ||
|
||
`, | ||
` | ||
I undersatand that I need to<br/> | ||
confirm every transaction with<br/> | ||
the password | ||
` | ||
]; | ||
|
||
/*eslint-disable*/ | ||
|
||
export default { | ||
components: {icon}, | ||
data() { | ||
return { | ||
infos | ||
}; | ||
} | ||
}; | ||
|
||
</script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Что это за файл? Конфиг еслинта или?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
извини,но ответ на это вопрос можно получить из названия файла..
я менял это потому что не очень ясно работает саблайм, webpack, eslinter и editor config вместе создавая дополнительных ошибки.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ок, я просто не понял, что это за эдитор такой...