refactor: modal-delete-user -> vue component + localizations

This commit is contained in:
NGPixel
2017-05-29 21:58:33 -04:00
parent fa098f8ece
commit 8239adfe7b
15 changed files with 135 additions and 134 deletions

View File

@@ -7,13 +7,13 @@
transition(name='modal-content')
.modal-content(v-show='isShown')
header.is-blue
span Copy link to this section
span {{ $t('modal.anchortitle') }}
section
p.control.is-fullwidth
input.input(type='text', ref='anchorURLinput', v-model='anchorURL')
footer
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
a.button.is-blue(v-clipboard='anchorURL', @success="clipboardSuccess", @error="clipboardError") Copy to Clipboard
a.button.is-grey.is-outlined(v-on:click='cancel') {{ $t('modal.discard') }}
a.button.is-blue(v-clipboard='anchorURL', @success="clipboardSuccess", @error="clipboardError") {{ $t('modal.copyclipboard') }}
</template>
<script>
@@ -38,7 +38,7 @@
this.$store.dispatch('alert', {
style: 'blue',
icon: 'clipboard',
msg: 'The URL has been copied to your clipboard.'
msg: this.$t('modal.anchorsuccess')
})
this.$store.dispatch('anchorClose')
},
@@ -46,7 +46,7 @@
this.$store.dispatch('alert', {
style: 'red',
icon: 'clipboard',
msg: 'Clipboard copy failed. Copy the URL manually.'
msg: this.$t('modal.anchorerror')
})
this.$refs.anchorURLinput.select()
}