refactor: modal-delete-user -> vue component + localizations
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user