release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
3 changed files with 11 additions and 24 deletions
Showing only changes of commit 6e90075db3 - Show all commits

View File

@ -97,7 +97,7 @@ export default defineComponent({
});
return;
}
root.$store
void root.$store
.dispatch('session/requestPasswordReset', {
userid: userid.value
})

View File

@ -38,6 +38,7 @@
<script lang="ts">
import { defineComponent, ref } from '@vue/composition-api';
import { Loading, Notify } from 'quasar';
import { AxiosResponse } from 'axios';
export default defineComponent({
// name: 'PageName'
@ -74,7 +75,7 @@ export default defineComponent({
password: password.value,
token: root.$route.query.token
})
.catch(error => {
.catch((error: AxiosResponse) => {
if (error.status == 403) {
Notify.create({
group: false,

View File

@ -71,10 +71,7 @@
</q-file>
</q-card-section>
<q-separator v-if="!props.newUser" />
<q-card-section
class="fit row justify-start content-center items-center"
v-if="!props.newUser"
>
<q-card-section class="fit row justify-start content-center items-center" v-if="!props.newUser">
<q-input
v-if="isCurrentUser"
class="col-xs-12 col-sm-6 col-md-4 q-pa-sm"
@ -110,12 +107,7 @@
</template>
<script lang="ts">
import {
computed,
defineComponent,
ref,
onBeforeMount
} from '@vue/composition-api';
import { computed, defineComponent, ref, onBeforeMount } from '@vue/composition-api';
import { Store } from 'vuex';
import { StateInterface } from 'src/store';
import { hasPermission } from 'src/utils/permission';
@ -174,17 +166,14 @@ export default defineComponent({
avatar.value = [];
}
const allRoles = computed(() =>
store.state.user.roles.map(role => role.name)
);
const allRoles = computed(() => store.state.user.roles.map(role => role.name));
const password = ref('');
const new_password = ref('');
const new_password2 = ref('');
function save() {
let changed = <FG.User>props.user;
if (typeof changed.birthday === 'string')
changed.birthday = new Date(changed.birthday);
if (typeof changed.birthday === 'string') changed.birthday = new Date(changed.birthday);
changed = Object.assign(changed, {
password: password.value
});
@ -196,10 +185,7 @@ export default defineComponent({
emit('update:user', changed);
if (
avatar.value &&
(avatar.value.length > 0 || avatar.value instanceof File)
)
if (avatar.value && (avatar.value.length > 0 || avatar.value instanceof File))
store
.dispatch('user/uploadAvatar', {
user: changed,
@ -214,6 +200,8 @@ export default defineComponent({
}
function reset() {
//TODO: hier müssen wir uns etwas anderes einfallen lassen!
// eslint-disable-next-line vue/no-mutating-props
props.user = oldUser.value;
password.value = '';
new_password.value = '';
@ -230,9 +218,7 @@ export default defineComponent({
function isEmail(val: string | null) {
return (
!val ||
/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w\w+)+$/.test(val) ||
'E-Mail ist nicht valide.'
!val || /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w\w+)+$/.test(val) || 'E-Mail ist nicht valide.'
);
}