forked from symbol/desktop-wallet
-
Notifications
You must be signed in to change notification settings - Fork 1
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 symbol#1725 from symbol/dev
v1.0.7 release
- Loading branch information
Showing
59 changed files
with
612 additions
and
405 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
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
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
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,22 @@ | ||
<template> | ||
<div class="transaction-filter"> | ||
<Select v-model="selectedSigner" size="large" prefix="ios-home" @input="onSignerChange"> | ||
<Icon slot="prefix" type="ios-people" size="0" /> | ||
<Option :key="rootSigner.address.plain()" :value="rootSigner.address.plain()"> | ||
{{ rootSigner.label }} | ||
</Option> | ||
<OptionGroup v-if="multisigSigners.length" label="Multisig accounts"> | ||
<Option v-for="item in multisigSigners" :key="item.signer.address.plain()" :value="item.signer.address.plain()"> | ||
<span :style="`display: inline-block; width: 0.1rem; margin-left: ${item.level * 0.1}rem;`"> | ||
<em v-if="item.parent" class="ivu-icon ivu-icon-ios-arrow-down"></em> | ||
</span> | ||
{{ $t('label_postfix_multisig') + item.signer.label }} | ||
</Option> | ||
</OptionGroup> | ||
</Select> | ||
</div> | ||
</template> | ||
<script lang="ts"> | ||
import { SignerBaseFilterTs } from './SignerBaseFilterTs'; | ||
export default class SignerBaseFilter extends SignerBaseFilterTs {} | ||
</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,59 @@ | ||
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'; | ||
import { Signer } from '@/store/Account'; | ||
import { mapGetters } from 'vuex'; | ||
|
||
export class SignerItem { | ||
constructor(public parent: boolean, public signer: Signer, public level: number) {} | ||
} | ||
@Component({ | ||
computed: { | ||
...mapGetters({ | ||
currentSigner: 'account/currentSigner', | ||
}), | ||
}, | ||
}) | ||
export class SignerBaseFilterTs extends Vue { | ||
@Prop({ default: null }) | ||
public rootSigner?: Signer; | ||
|
||
/** | ||
* Selected signer from the store | ||
* @protected | ||
* @type {string} | ||
*/ | ||
public currentSigner: Signer; | ||
|
||
public selectedSigner: string = ''; | ||
|
||
public created() { | ||
this.selectedSigner = this.currentSigner.address.plain(); | ||
} | ||
|
||
get multisigSigners(): SignerItem[] { | ||
return this.getParentSignerItems(this.rootSigner, 0); | ||
} | ||
|
||
public getParentSignerItems(signer: Signer, level: number): SignerItem[] { | ||
if (!signer?.parentSigners) { | ||
return []; | ||
} | ||
const signerItems: SignerItem[] = []; | ||
for (const parentSigner of signer.parentSigners) { | ||
signerItems.push(new SignerItem(parentSigner.parentSigners?.length > 0, parentSigner, level)); | ||
signerItems.push(...this.getParentSignerItems(parentSigner, level + 1)); | ||
} | ||
return signerItems; | ||
} | ||
|
||
/** | ||
* onAddressChange | ||
*/ | ||
public onSignerChange() { | ||
this.$emit('signer-change', this.selectedSigner); | ||
} | ||
|
||
@Watch('currentSigner', { immediate: true }) | ||
public onCurrentSignerChange() { | ||
this.selectedSigner = this.currentSigner.address.plain(); | ||
} | ||
} |
This file was deleted.
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
Oops, something went wrong.