mail notification
This commit is contained in:
@@ -12,11 +12,11 @@
|
||||
el-tab-pane.pt-1(label='email' name='email')
|
||||
p(v-html='$t(`export_email_explanation`)')
|
||||
b-form
|
||||
el-switch(v-model='reminder.notify_on_add' :active-text="$t('notify_on_insert')")
|
||||
br
|
||||
//- el-switch.mt-2(v-model='reminder.send_reminder' :active-text="$t('send_reminder')")
|
||||
el-input.mt-2(v-model='reminder.email' :placeholder="$t('Insert your address')")
|
||||
el-button.mt-2.float-right(type='success' @click='add_reminder') {{$t('Send')}}
|
||||
//- el-switch(v-model='notification.notify_on_add' :active-text="$t('notify_on_insert')")
|
||||
//- br
|
||||
//- el-switch.mt-2(v-model='notification.send_notification' :active-text="$t('send_notification')")
|
||||
el-input.mt-2(v-model='notification.email' :placeholder="$t('Insert your address')")
|
||||
el-button.mt-2.float-right(type='success' @click='add_notification') {{$t('Send')}}
|
||||
|
||||
el-tab-pane.pt-1(label='feed rss' name='feed')
|
||||
span(v-html='$t(`export_feed_explanation`)')
|
||||
@@ -67,9 +67,9 @@ export default {
|
||||
return {
|
||||
type: 'email',
|
||||
link: '',
|
||||
reminder: { notify_on_add: true, send_reminder: false },
|
||||
export_list: true,
|
||||
script: `<iframe>Ti piacerebbe</iframe>`,
|
||||
notification: { email: '' },
|
||||
}
|
||||
},
|
||||
filters,
|
||||
@@ -82,8 +82,8 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async add_reminder () {
|
||||
await api.emailReminder({ ...this.reminder, filters: this.filters})
|
||||
async add_notification () {
|
||||
await api.addNotification({ ...this.notification, filters: this.filters})
|
||||
this.$refs.modal.hide()
|
||||
},
|
||||
loadLink () {
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
<template lang="pug">
|
||||
b-modal(hide-header hide-footer @hide='$router.go(-1)' :visible='true')
|
||||
h4.text-center {{$t('Settings')}}
|
||||
b-form
|
||||
b-input-group.mt-1(prepend='Email')
|
||||
b-form-input(v-model="user.email")
|
||||
//- b-form-checkbox(v-model="tmpUser.user.autoboost") Autoboost
|
||||
b-input-group.mt-1(prepend='Mastodon instance')
|
||||
b-form-input(v-model="mastodon_instance")
|
||||
b-input-group-append
|
||||
b-button(@click='associate', variant='primary') Associate
|
||||
b-modal(:title="$t('Settings')" hide-footer @hide='$router.go(-1)' :visible='true')
|
||||
el-form(inline)
|
||||
el-input(v-model="mastodon_instance")
|
||||
span(slot='prepend') Mastodon instance
|
||||
el-button(slot='append' @click='associate' type='success') Associate
|
||||
|
||||
</template>
|
||||
<script>
|
||||
@@ -35,6 +30,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async associate () {
|
||||
if (!this.mastodon_instance) return
|
||||
const url = await api.getAuthURL({instance: this.mastodon_instance})
|
||||
setTimeout( () => window.location.href=url, 100);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
id: null,
|
||||
activeTab: "0",
|
||||
date: null,
|
||||
time: { start: '00:00', end: null },
|
||||
time: { start: '20:00', end: null },
|
||||
edit: false,
|
||||
sending: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user