From dc4e6bf907e317cba9e6e5a04343523a5989b5d9 Mon Sep 17 00:00:00 2001 From: Pitu Date: Tue, 12 Mar 2019 06:43:17 +0000 Subject: Added faq --- src/site/pages/faq.vue | 153 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 src/site/pages/faq.vue (limited to 'src/site/pages/faq.vue') diff --git a/src/site/pages/faq.vue b/src/site/pages/faq.vue new file mode 100644 index 0000000..32a1ee2 --- /dev/null +++ b/src/site/pages/faq.vue @@ -0,0 +1,153 @@ + + + + + -- cgit v1.2.3 From ea3e503d13b7be477c064b02b9b2e5a9ef06c9a9 Mon Sep 17 00:00:00 2001 From: Pitu Date: Fri, 29 Mar 2019 00:35:58 +0900 Subject: Added middleware for pages and switched to $axios --- src/site/pages/faq.vue | 95 ++------------------------------------------------ 1 file changed, 3 insertions(+), 92 deletions(-) (limited to 'src/site/pages/faq.vue') 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. - - - @@ -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' }; } }; -- cgit v1.2.3 From a248f69947b0a211fd1288c5ad389ba62334ec3f Mon Sep 17 00:00:00 2001 From: Pitu Date: Fri, 29 Mar 2019 03:28:25 +0000 Subject: Tody up a little bit --- src/site/pages/faq.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/site/pages/faq.vue') diff --git a/src/site/pages/faq.vue b/src/site/pages/faq.vue index 904ec5f..97d1afa 100644 --- a/src/site/pages/faq.vue +++ b/src/site/pages/faq.vue @@ -5,10 +5,9 @@