diff options
| author | Pitu <[email protected]> | 2019-03-29 00:35:58 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2019-03-29 00:35:58 +0900 |
| commit | ea3e503d13b7be477c064b02b9b2e5a9ef06c9a9 (patch) | |
| tree | 8ffd0bef5e2e210ca28478d18c3876b73cc79784 /src/site/pages/faq.vue | |
| parent | Added axios package (diff) | |
| download | host.fuwn.me-ea3e503d13b7be477c064b02b9b2e5a9ef06c9a9.tar.xz host.fuwn.me-ea3e503d13b7be477c064b02b9b2e5a9ef06c9a9.zip | |
Added middleware for pages and switched to $axios
Diffstat (limited to 'src/site/pages/faq.vue')
| -rw-r--r-- | src/site/pages/faq.vue | 95 |
1 files changed, 3 insertions, 92 deletions
diff --git a/src/site/pages/faq.vue b/src/site/pages/faq.vue index 32a1ee2..904ec5f 100644 --- a/src/site/pages/faq.vue +++ b/src/site/pages/faq.vue @@ -43,34 +43,8 @@ There are too many file upload services out there, and a lot of them rely on the foundations of pomf which is ancient. In a desperate and unsuccessful attempt of finding a good file uploader that's easily extendable, lolisafe was born. We give you control over your files, we give you a way to sort your uploads into albums for ease of access and we give you an api to use with ShareX or any other thing that let's you make POST requests. </div> </article> - </div> </div> - - <!-- - <b-modal :active.sync="isMfaModalActive" - :canCancel="true" - has-modal-card> - <div class="card mfa"> - <div class="card-content"> - <div class="content"> - <p>Enter your Two-Factor code to proceed.</p> - <b-field> - <b-input v-model="mfaCode" - placeholder="Your MFA Code" - type="text" - @keyup.enter.native="mfa"/> - <p class="control"> - <button :class="{ 'is-loading': isLoading }" - class="button is-primary" - @click="mfa">Submit</button> - </p> - </b-field> - </div> - </div> - </div> - </b-modal> - --> </section> </template> @@ -78,76 +52,13 @@ import Navbar from '~/components/navbar/Navbar.vue'; export default { - name: 'Login', + name: 'Faq', components: { Navbar }, data() { - return { - username: null, - password: null, - mfaCode: null, - isMfaModalActive: false, - isLoading: false - }; - }, - computed: { - config() { - return this.$store.state.config; - } + return {}; }, metaInfo() { - return { title: 'Login' }; - }, - methods: { - login() { - if (this.isLoading) return; - if (!this.username || !this.password) { - this.$showToast('Please fill both fields before attempting to log in.', true); - return; - } - this.isLoading = true; - this.axios.post(`${this.config.baseURL}/auth/login`, { - username: this.username, - password: this.password - }).then(res => { - this.$store.commit('token', res.data.token); - this.$store.commit('user', res.data.user); - /* - if (res.data.mfa) { - this.isMfaModalActive = true; - this.isLoading = false; - } else { - this.getUserData(); - } - */ - this.redirect(); - }).catch(err => { - this.isLoading = false; - this.$onPromiseError(err); - }); - }, - /* - mfa() { - if (!this.mfaCode) return; - if (this.isLoading) return; - this.isLoading = true; - this.axios.post(`${this.$BASE_URL}/login/mfa`, { token: this.mfaCode }) - .then(res => { - this.$store.commit('token', res.data.token); - this.redirect(); - }) - .catch(err => { - this.isLoading = false; - this.$onPromiseError(err); - }); - },*/ - redirect() { - this.$store.commit('loggedIn', true); - if (typeof this.$route.query.redirect !== 'undefined') { - this.$router.push(this.$route.query.redirect); - return; - } - this.$router.push('/dashboard'); - } + return { title: 'Faq' }; } }; </script> |