trying to fix the scss

This commit is contained in:
Moriz Wahl 2021-06-10 18:04:48 +02:00
parent ddb4ba676b
commit 552b31f77a
4 changed files with 186 additions and 126 deletions

View File

@ -23,38 +23,95 @@
// Bootstrap (4.1.3) components
@import "~bootstrap/scss/root";
@import "~bootstrap/scss/reboot";
@import "~bootstrap/scss/type";
@import "~bootstrap/scss/images";
@import "~bootstrap/scss/code";
@import "~bootstrap/scss/grid";
@import "~bootstrap/scss/tables";
@import "~bootstrap/scss/forms";
@import "~bootstrap/scss/buttons";
@import "~bootstrap/scss/transitions";
@import "~bootstrap/scss/dropdown";
@import "~bootstrap/scss/alert";
@import "~bootstrap/scss/badge";
@import "~bootstrap/scss/breadcrumb";
@import "~bootstrap/scss/button-group";
@import "~bootstrap/scss/input-group";
@import "~bootstrap/scss/buttons";
@import "~bootstrap/scss/card";
@import "~bootstrap/scss/carousel";
@import "~bootstrap/scss/close";
@import "~bootstrap/scss/code";
@import "~bootstrap/scss/custom-forms";
@import "~bootstrap/scss/dropdown";
@import "~bootstrap/scss/forms";
@import "~bootstrap/scss/grid";
@import "~bootstrap/scss/images";
@import "~bootstrap/scss/input-group";
@import "~bootstrap/scss/jumbotron";
@import "~bootstrap/scss/list-group";
@import "~bootstrap/scss/media";
@import "~bootstrap/scss/modal";
@import "~bootstrap/scss/nav";
@import "~bootstrap/scss/navbar";
@import "~bootstrap/scss/card";
@import "~bootstrap/scss/breadcrumb";
@import "~bootstrap/scss/pagination";
@import "~bootstrap/scss/badge";
@import "~bootstrap/scss/jumbotron";
@import "~bootstrap/scss/alert";
@import "~bootstrap/scss/progress";
@import "~bootstrap/scss/media";
@import "~bootstrap/scss/list-group";
@import "~bootstrap/scss/close";
@import "~bootstrap/scss/modal";
@import "~bootstrap/scss/tooltip";
@import "~bootstrap/scss/popover";
@import "~bootstrap/scss/carousel";
@import "~bootstrap/scss/utilities";
@import "~bootstrap/scss/print";
@import "~bootstrap/scss/progress";
@import "~bootstrap/scss/reboot";
@import "~bootstrap/scss/root";
@import "~bootstrap/scss/tables";
@import "~bootstrap/scss/toasts";
@import "~bootstrap/scss/tooltip";
@import "~bootstrap/scss/transitions";
@import "~bootstrap/scss/type";
@import "~bootstrap/scss/utilities";
@import "~bootstrap/scss/variables";
// Utilities
@import "~bootstrap/scss/utilities/align";
@import "~bootstrap/scss/utilities/background";
@import "~bootstrap/scss/utilities/borders";
@import "~bootstrap/scss/utilities/clearfix";
@import "~bootstrap/scss/utilities/display";
@import "~bootstrap/scss/utilities/embed";
@import "~bootstrap/scss/utilities/flex";
@import "~bootstrap/scss/utilities/float";
@import "~bootstrap/scss/utilities/overflow";
@import "~bootstrap/scss/utilities/position";
@import "~bootstrap/scss/utilities/screenreaders";
@import "~bootstrap/scss/utilities/shadows";
@import "~bootstrap/scss/utilities/sizing";
@import "~bootstrap/scss/utilities/spacing";
@import "~bootstrap/scss/utilities/stretched-link";
@import "~bootstrap/scss/utilities/text";
@import "~bootstrap/scss/utilities/visibility";
// Mixins
@import "~bootstrap/scss/mixins/alert";
@import "~bootstrap/scss/mixins/badge";
@import "~bootstrap/scss/mixins/border-radius";
@import "~bootstrap/scss/mixins/box-shadow";
@import "~bootstrap/scss/mixins/breakpoints";
@import "~bootstrap/scss/mixins/buttons";
@import "~bootstrap/scss/mixins/caret";
@import "~bootstrap/scss/mixins/clearfix";
@import "~bootstrap/scss/mixins/deprecate";
@import "~bootstrap/scss/mixins/float";
@import "~bootstrap/scss/mixins/forms";
@import "~bootstrap/scss/mixins/gradients";
@import "~bootstrap/scss/mixins/grid-framework";
@import "~bootstrap/scss/mixins/grid";
@import "~bootstrap/scss/mixins/hover";
@import "~bootstrap/scss/mixins/image";
@import "~bootstrap/scss/mixins/list-group";
@import "~bootstrap/scss/mixins/lists";
@import "~bootstrap/scss/mixins/nav-divider";
@import "~bootstrap/scss/mixins/pagination";
@import "~bootstrap/scss/mixins/reset-text";
@import "~bootstrap/scss/mixins/resize";
@import "~bootstrap/scss/mixins/screen-reader";
@import "~bootstrap/scss/mixins/size";
@import "~bootstrap/scss/mixins/table-row";
@import "~bootstrap/scss/mixins/text-emphasis";
@import "~bootstrap/scss/mixins/text-hide";
@import "~bootstrap/scss/mixins/text-truncate";
@import "~bootstrap/scss/mixins/transition";
@import "~bootstrap/scss/mixins/visibility";
// Argon utilities and components

View File

@ -11,6 +11,8 @@ import GlobalDirectives from './globalDirectives'
// Sidebar on the right. Used as a local plugin in DashboardLayout.vue
import SideBar from '@/components/SidebarPlugin'
import PortalVue from 'portal-vue'
// vue-bootstrap
import { BootstrapVue, IconsPlugin, ToastPlugin } from 'bootstrap-vue'
@ -47,6 +49,7 @@ export default {
Vue.use(GlobalDirectives)
Vue.use(SideBar)
Vue.use(Notifications)
Vue.use(PortalVue)
Vue.use(BootstrapVue)
Vue.use(IconsPlugin)
Vue.use(ToastPlugin)

View File

@ -46,31 +46,31 @@
</div>
</template>
<script>
import loginAPI from '../../apis/loginAPI.js'
import loginAPI from '../../apis/loginAPI.js'
export default {
name: 'password',
data() {
return {
disable: 'disabled',
form: {
email: '',
},
}
},
methods: {
async onSubmit() {
const result = await loginAPI.sendEmail(this.form.email)
if (result.success) {
this.$router.push('/thx/password')
} else {
this.$bvToast.toast(result.result.message, {
title: this.$t('error.error'),
noAutoHide: true,
})
}
},
},
}
export default {
name: 'password',
data() {
return {
disable: 'disabled',
form: {
email: '',
},
}
},
methods: {
async onSubmit() {
const result = await loginAPI.sendEmail(this.form.email)
if (result.success) {
this.$router.push('/thx/password')
} else {
this.$bvToast.toast(result.result.message, {
title: this.$t('error.error'),
noAutoHide: true,
})
}
},
},
}
</script>
<style></style>

View File

@ -85,86 +85,86 @@
</div>
</template>
<script>
import loginAPI from '../../apis/loginAPI'
export default {
name: 'reset',
data() {
return {
password: '',
checkPassword: '',
passwordVisible: false,
submitted: false,
authenticated: false,
sessionId: null,
email: null,
}
},
methods: {
togglePasswordVisibility() {
this.passwordVisible = !this.passwordVisible
},
async onSubmit() {
const result = await loginAPI.changePassword(this.sessionId, this.email, this.password)
if (result.success) {
this.password = ''
/*
import loginAPI from '../../apis/loginAPI'
export default {
name: 'reset',
data() {
return {
password: '',
checkPassword: '',
passwordVisible: false,
submitted: false,
authenticated: false,
sessionId: null,
email: null,
}
},
methods: {
togglePasswordVisibility() {
this.passwordVisible = !this.passwordVisible
},
async onSubmit() {
const result = await loginAPI.changePassword(this.sessionId, this.email, this.password)
if (result.success) {
this.password = ''
/*
this.$store.dispatch('login', {
sessionId: result.result.data.session_id,
email: result.result.data.user.email,
})
*/
this.$router.push('/thx/reset')
} else {
this.$bvToast.toast(result.result.message, {
title: this.$t('error.error'),
})
}
},
async authenticate() {
const optin = this.$route.params.optin
const result = await loginAPI.loginViaEmailVerificationCode(optin)
if (result.success) {
this.authenticated = true
this.sessionId = result.result.data.session_id
this.email = result.result.data.user.email
} else {
this.$bvToast.toast(result.result.message, {
title: this.$t('error.error'),
})
}
},
},
computed: {
samePasswords() {
return this.password === this.checkPassword
},
passwordsFilled() {
return this.password !== '' && this.checkPassword !== ''
},
rules() {
return [
{ message: this.$t('site.signup.lowercase'), regex: /[a-z]+/ },
{ message: this.$t('site.signup.uppercase'), regex: /[A-Z]+/ },
{ message: this.$t('site.signup.minimum'), regex: /.{8,}/ },
{ message: this.$t('site.signup.one_number'), regex: /[0-9]+/ },
]
},
passwordValidation() {
const errors = []
for (const condition of this.rules) {
if (!condition.regex.test(this.password)) {
errors.push(condition.message)
}
}
if (errors.length === 0) {
return { valid: true, errors }
}
return { valid: false, errors }
},
},
async created() {
this.authenticate()
},
}
this.$router.push('/thx/reset')
} else {
this.$bvToast.toast(result.result.message, {
title: this.$t('error.error'),
})
}
},
async authenticate() {
const optin = this.$route.params.optin
const result = await loginAPI.loginViaEmailVerificationCode(optin)
if (result.success) {
this.authenticated = true
this.sessionId = result.result.data.session_id
this.email = result.result.data.user.email
} else {
this.$bvToast.toast(result.result.message, {
title: this.$t('error.error'),
})
}
},
},
computed: {
samePasswords() {
return this.password === this.checkPassword
},
passwordsFilled() {
return this.password !== '' && this.checkPassword !== ''
},
rules() {
return [
{ message: this.$t('site.signup.lowercase'), regex: /[a-z]+/ },
{ message: this.$t('site.signup.uppercase'), regex: /[A-Z]+/ },
{ message: this.$t('site.signup.minimum'), regex: /.{8,}/ },
{ message: this.$t('site.signup.one_number'), regex: /[0-9]+/ },
]
},
passwordValidation() {
const errors = []
for (const condition of this.rules) {
if (!condition.regex.test(this.password)) {
errors.push(condition.message)
}
}
if (errors.length === 0) {
return { valid: true, errors }
}
return { valid: false, errors }
},
},
async created() {
this.authenticate()
},
}
</script>
<style></style>