first pass of migration - states and obvious replacements
This commit is contained in:
parent
02f952047d
commit
24ce2dc0a5
66 changed files with 398 additions and 568 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import { mapState as mapPiniaState } from 'pinia'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import passwordResetApi from '../../services/new_api/password_reset.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
|
|
@ -20,8 +22,8 @@ const passwordReset = {
|
|||
computed: {
|
||||
...mapState({
|
||||
signedIn: (state) => !!state.users.currentUser,
|
||||
instance: (state) => state.instance,
|
||||
}),
|
||||
...mapPiniaState(useInstanceStore, ['server']),
|
||||
mailerEnabled() {
|
||||
return this.instance.mailerEnabled
|
||||
},
|
||||
|
|
@ -44,9 +46,9 @@ const passwordReset = {
|
|||
submit() {
|
||||
this.isPending = true
|
||||
const email = this.user.email
|
||||
const instance = this.instance.server
|
||||
const server = this.server
|
||||
|
||||
passwordResetApi({ instance, email })
|
||||
passwordResetApi({ server, email })
|
||||
.then(({ status }) => {
|
||||
this.isPending = false
|
||||
this.user.email = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue