-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #320 from vechain/dev
v2.0.9
- Loading branch information
Showing
13 changed files
with
339 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<widget android-versionCode="200080" id="org.vechain.sync2" ios-CFBundleIdentifier="org.vechain.sync2app" ios-CFBundleVersion="5" version="2.0.8" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | ||
<widget android-versionCode="200090" id="org.vechain.sync2" ios-CFBundleIdentifier="org.vechain.sync2app" ios-CFBundleVersion="6" version="2.0.9" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | ||
<name>Sync2</name> | ||
<description>VeChain Sync2</description> | ||
<author email="[email protected]" href="http://cordova.io"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<template> | ||
<q-dialog | ||
ref="dialog" | ||
@hide="$emit('hide')" | ||
maximized | ||
transition-show="slide-up" | ||
transition-hide="slide-down" | ||
> | ||
<q-card class="column no-wrap"> | ||
<page-toolbar | ||
:title="$t('backup.title')" | ||
icon="close" | ||
@action="hide()" | ||
/> | ||
<backup-panel | ||
:wallet-id="walletId" | ||
:words="words" | ||
:meta="meta" | ||
:panel="panel" | ||
@start="next" | ||
@next="next" | ||
@done="onDone" | ||
/> | ||
</q-card> | ||
</q-dialog> | ||
</template> | ||
<script lang="ts"> | ||
import Vue from 'vue' | ||
import { QDialog } from 'quasar' | ||
import BackupPanel from './BackupPanel.vue' | ||
import PageToolbar from 'src/components/PageToolbar.vue' | ||
export default Vue.extend({ | ||
components: { | ||
QDialog, | ||
PageToolbar, | ||
BackupPanel | ||
}, | ||
props: { | ||
walletId: Number, | ||
words: { | ||
type: Array as () => string[], | ||
default: () => [] | ||
}, | ||
meta: { | ||
type: Object as () => M.Wallet.Meta, | ||
default: () => {} | ||
} | ||
}, | ||
data() { | ||
return { | ||
panel: 'notice' as 'notice' | 'words' | 'check' | 'done' | ||
} | ||
}, | ||
methods: { | ||
// method is REQUIRED by $q.dialog | ||
show() { (this.$refs.dialog as QDialog).show() }, | ||
// method is REQUIRED by $q.dialog | ||
hide() { (this.$refs.dialog as QDialog).hide() }, | ||
next() { | ||
switch (this.panel) { | ||
case 'notice': | ||
this.panel = 'words' | ||
break | ||
case 'words': | ||
this.panel = 'check' | ||
break | ||
case 'check': | ||
this.panel = 'done' | ||
break | ||
} | ||
}, | ||
onDone() { | ||
this.hide() | ||
} | ||
} | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
<template> | ||
<q-tab-panels | ||
class="col" | ||
animated | ||
v-model="panel" | ||
transition-next="jump-up" | ||
> | ||
<q-tab-panel | ||
name="notice" | ||
class="column q-pa-none no-wrap" | ||
> | ||
<page-content | ||
padding | ||
class="col" | ||
innerClass="fit column justify-evenly" | ||
> | ||
<notice /> | ||
</page-content> | ||
<page-action> | ||
<q-btn | ||
:label="$t('common.next')" | ||
unelevated | ||
color="primary" | ||
@click="$emit('start')" | ||
/> | ||
</page-action> | ||
</q-tab-panel> | ||
<q-tab-panel | ||
name="words" | ||
class="column q-pa-none no-wrap" | ||
> | ||
<page-content class="col q-pa-sm"> | ||
<Words :words="words" /> | ||
</page-content> | ||
<page-action> | ||
<q-btn | ||
:label="$t('backup.action_next_verify')" | ||
unelevated | ||
@click="$emit('next')" | ||
color="primary" | ||
/> | ||
</page-action> | ||
</q-tab-panel> | ||
<q-tab-panel | ||
name="check" | ||
class="column q-pa-none no-wrap" | ||
> | ||
<page-content | ||
class="col q-pa-sm" | ||
innerClass="fit" | ||
> | ||
<CheckWords | ||
:words="words" | ||
@checked="$emit('next')" | ||
/> | ||
</page-content> | ||
</q-tab-panel> | ||
<q-tab-panel | ||
name="done" | ||
class="column q-pa-none no-wrap" | ||
> | ||
<page-content | ||
class="column fit" | ||
innerClass="fit column justify-evenly" | ||
> | ||
<q-list class="text-center"> | ||
<q-item> | ||
<q-item-section> | ||
<q-icon | ||
size="4rem" | ||
class="q-mx-auto" | ||
name="verified_user" | ||
color="positive" | ||
/> | ||
</q-item-section> | ||
</q-item> | ||
<q-item> | ||
<q-item-section> | ||
<q-item-label class="text-h6 text-dark">{{$t('backup.label_backed_up')}}</q-item-label> | ||
</q-item-section> | ||
</q-item> | ||
<q-item> | ||
<q-item-section> | ||
<q-item-label class="text-body1 text-dark">{{$t('backup.msg_backed_up')}}</q-item-label> | ||
</q-item-section> | ||
</q-item> | ||
|
||
</q-list> | ||
</page-content> | ||
<page-action> | ||
<q-btn | ||
:label="$t('common.finish')" | ||
unelevated | ||
@click="onFinish" | ||
color="primary" | ||
/> | ||
</page-action> | ||
</q-tab-panel> | ||
</q-tab-panels> | ||
</template> | ||
<script lang="ts"> | ||
import Vue from 'vue' | ||
import Words from './Words.vue' | ||
import CheckWords from './CheckWords.vue' | ||
import Notice from './Notice.vue' | ||
import PageContent from 'src/components/PageContent.vue' | ||
import PageAction from 'src/components/PageAction.vue' | ||
export default Vue.extend({ | ||
props: { | ||
panel: String, | ||
walletId: Number, | ||
words: { | ||
type: Array as () => string[], | ||
default: () => [] | ||
}, | ||
meta: { | ||
type: Object as () => M.Wallet.Meta, | ||
default: () => {} | ||
} | ||
}, | ||
components: { | ||
Words, | ||
CheckWords, | ||
Notice, | ||
PageContent, | ||
PageAction | ||
}, | ||
data() { | ||
return {} | ||
}, | ||
methods: { | ||
async onFinish() { | ||
const m: M.Wallet.Meta = { | ||
...this.meta as M.Wallet.Meta, | ||
backedUp: true | ||
} | ||
try { | ||
await this.$loading( | ||
() => { | ||
return this.$svc.wallet.update(this.walletId, m) | ||
} | ||
) | ||
} catch (error) { | ||
console.warn(error) | ||
} | ||
this.$emit('done') | ||
} | ||
} | ||
}) | ||
</script> |
Oops, something went wrong.