forked from wanswap/snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use sendTransaction from Snapshot.js (snapshot-labs#150)
* Add page skins * Use sendTransaction from Snapshot.js
- Loading branch information
1 parent
e2ffaaf
commit d7dd441
Showing
14 changed files
with
213 additions
and
331 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<template> | ||
<div :class="skin.key" class="bg-black rounded-0 rounded-md-2"> | ||
<Block> | ||
<UiButton class="button--submit mb-2">{{ skin.key }}</UiButton> | ||
<div class="text-gray"> | ||
In {{ _numeral(skin.spaces.length) }} space(s) | ||
</div> | ||
</Block> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: ['skin'] | ||
}; | ||
</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
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,30 +1,22 @@ | ||
<template> | ||
<UiModal :open="open" @close="$emit('close')"> | ||
<h3 class="m-4 text-center">Skins</h3> | ||
<div class="px-4"> | ||
<div | ||
v-for="skin in skins" | ||
:key="skin" | ||
:class="skin" | ||
class="bg-black text-center rounded-0 rounded-md-2" | ||
> | ||
<Block> | ||
<UiButton class="button--submit">{{ skin }}</UiButton> | ||
</Block> | ||
</div> | ||
<div class="mx-0 mx-md-4"> | ||
<BlockSkin v-for="skin in skins" :key="skin.key" :skin="skin" /> | ||
</div> | ||
</UiModal> | ||
</template> | ||
|
||
<script> | ||
import skins from '@/helpers/skins'; | ||
import { filterSkins } from '@/helpers/utils'; | ||
export default { | ||
props: ['open'], | ||
data() { | ||
return { | ||
skins | ||
}; | ||
computed: { | ||
skins() { | ||
return filterSkins(skins, this.app.spaces, ''); | ||
} | ||
} | ||
}; | ||
</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,31 @@ | ||
<template> | ||
<textarea-autosize @input="handleInput" v-model="input" /> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
value: Array | ||
}, | ||
data() { | ||
return { | ||
input: '' | ||
}; | ||
}, | ||
created() { | ||
if (this.value) this.input = this.value.join('\n'); | ||
}, | ||
methods: { | ||
handleInput() { | ||
const input = this.input | ||
.replace(/\n/g, ' ') | ||
.replace(/,/g, ' ') | ||
.replace(/;/g, ' ') | ||
.split(' ') | ||
.map(item => item.trim()) | ||
.filter(item => !!item); | ||
this.$emit('input', input); | ||
} | ||
} | ||
}; | ||
</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
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
Oops, something went wrong.