mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 08:32:14 +00:00
V 1.1 Beta
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<AuthButton icon="chevron-right" text="Next Step" :loading="isLoading" :disabled="isLoading"/>
|
||||
</ValidationObserver>
|
||||
|
||||
<span class="additional-link">Don’t have an account? <b
|
||||
<span v-if="config.userRegistration" class="additional-link">Don’t have an account? <b
|
||||
@click="goToAuthPage('sign-up')">Register account.</b></span>
|
||||
</AuthContent>
|
||||
|
||||
@@ -98,10 +98,10 @@
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>Confirm your new password:</label>
|
||||
<label>Confirm new password:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Confirm Password"
|
||||
rules="required" v-slot="{ errors }">
|
||||
<input v-model="recoverPassword.newPasswordConfirm" placeholder="Confirm your new password"
|
||||
<input v-model="recoverPassword.newPasswordConfirm" placeholder="Confirm new password"
|
||||
type="password" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
@@ -198,7 +198,7 @@
|
||||
import AuthContent from '@/components/VueFileManagerComponents/Auth/AuthContent'
|
||||
import AuthButton from '@/components/VueFileManagerComponents/Auth/AuthButton'
|
||||
import {required} from 'vee-validate/dist/rules'
|
||||
import {events} from '@/bus'
|
||||
import {mapGetters} from 'vuex'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
@@ -211,24 +211,32 @@
|
||||
AuthButton,
|
||||
required,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['config']),
|
||||
},
|
||||
watch: {
|
||||
loginEmail(val) {
|
||||
this.recoverEmail = val
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
checkedAccount: undefined,
|
||||
loginPassword: 'vuefilemanager',
|
||||
loginEmail: 'peterpapp@makingcg.com',
|
||||
recoverEmail: 'peterpapp@makingcg.com',
|
||||
loginPassword: '',
|
||||
loginEmail: '',
|
||||
recoverEmail: '',
|
||||
recoverPassword: {
|
||||
token: undefined,
|
||||
email: 'peterpapp@makingcg.com',
|
||||
newPassword: 'vuefilemanager',
|
||||
newPasswordConfirm: 'vuefilemanager',
|
||||
email: '',
|
||||
newPassword: '',
|
||||
newPasswordConfirm: '',
|
||||
},
|
||||
register: {
|
||||
name: 'Hi5Ve Digital',
|
||||
email: 'peterpapp@makingcg.com',
|
||||
password: 'vuefilemanager',
|
||||
password_confirmation: 'vuefilemanager',
|
||||
name: '',
|
||||
email: '',
|
||||
password: '',
|
||||
password_confirmation: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -299,7 +307,7 @@
|
||||
email: this.loginEmail,
|
||||
password: this.loginPassword,
|
||||
})
|
||||
.then(response => {
|
||||
.then(() => {
|
||||
|
||||
// End loading
|
||||
this.isLoading = false
|
||||
@@ -335,7 +343,7 @@
|
||||
.post(this.$store.getters.api + '/password/email', {
|
||||
email: this.recoverEmail
|
||||
})
|
||||
.then(response => {
|
||||
.then(() => {
|
||||
|
||||
// End loading
|
||||
this.isLoading = false
|
||||
@@ -371,7 +379,7 @@
|
||||
password: this.recoverPassword.newPassword,
|
||||
password_confirmation: this.recoverPassword.newPasswordConfirm,
|
||||
})
|
||||
.then(response => {
|
||||
.then(() => {
|
||||
|
||||
// End loading
|
||||
this.isLoading = false
|
||||
@@ -414,16 +422,13 @@
|
||||
// Send request to get user token
|
||||
axios
|
||||
.post(this.$store.getters.api + '/user/register', this.register)
|
||||
.then(response => {
|
||||
.then(() => {
|
||||
|
||||
// End loading
|
||||
this.isLoading = false
|
||||
|
||||
// Store token to localstorage
|
||||
localStorage.setItem('access_token', response.data.access_token)
|
||||
|
||||
// Store token to vuex
|
||||
this.$store.commit('RETRIEVE_TOKEN', response.data.access_token)
|
||||
// Set login state
|
||||
this.$store.commit('SET_AUTHORIZED', true)
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
@@ -467,7 +472,6 @@
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@assets/app.scss";
|
||||
//@import "@/assets/scss/_forms.scss";
|
||||
|
||||
.auth-form {
|
||||
text-align: center;
|
||||
@@ -506,6 +510,10 @@
|
||||
.block-form {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
.block-wrapper label {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.additional-link {
|
||||
@@ -535,7 +543,6 @@
|
||||
@media only screen and (max-width: 690px) {
|
||||
|
||||
.auth-form {
|
||||
//font-size: 90%;
|
||||
width: 100%;
|
||||
|
||||
h1 {
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
ref="image"
|
||||
:src="imagePreview"
|
||||
class="image-preview"
|
||||
v-if="data || imagePreview"
|
||||
v-if="imagePreview"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -55,13 +55,13 @@
|
||||
<TextLabel>Last Uploads</TextLabel>
|
||||
|
||||
<p class="empty-list" v-if="app.latest_uploads.length == 0">You don't have any latest uploads.</p>
|
||||
<FileListItemThumbnail @dblclick.native="downloadFile(item)" @click.native="showFileDetail(item)"
|
||||
:file="item" v-for="item in app.latest_uploads" :key="item.unique_id"/>
|
||||
|
||||
<FileListItemThumbnail @dblclick.native="downloadFile(item)" @click.native="showFileDetail(item)" :file="item" v-for="item in app.latest_uploads" :key="item.unique_id"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Storage Size Info-->
|
||||
<StorageSize/>
|
||||
<StorageSize v-if="config.storageLimit"/>
|
||||
|
||||
<div v-if="isSmallAppSize" class="log-out-button">
|
||||
<ButtonBase @click.native="$store.dispatch('logOut')" button-style="danger">Log Out</ButtonBase>
|
||||
@@ -89,7 +89,7 @@
|
||||
TextLabel,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['homeDirectory', 'app', 'appSize']),
|
||||
...mapGetters(['homeDirectory', 'app', 'appSize', 'config']),
|
||||
isSmallAppSize() {
|
||||
return this.appSize === 'small'
|
||||
}
|
||||
@@ -174,7 +174,6 @@
|
||||
<style scoped lang="scss">
|
||||
@import "@assets/app.scss";
|
||||
|
||||
|
||||
#sidebar {
|
||||
position: relative;
|
||||
flex: 0 0 295px;
|
||||
@@ -201,39 +200,11 @@
|
||||
.menu-list-wrapper {
|
||||
margin-bottom: 25px;
|
||||
|
||||
&.favourites {
|
||||
|
||||
&.is-dragenter {
|
||||
|
||||
.menu-list {
|
||||
border: 2px dashed $theme;
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
border: 2px dashed transparent;
|
||||
|
||||
.menu-list-item {
|
||||
padding: 10px 13px;
|
||||
|
||||
.icon {
|
||||
@include font-size(20);
|
||||
width: 20px;
|
||||
|
||||
path {
|
||||
fill: $theme;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
|
||||
.menu-list-item {
|
||||
display: block;
|
||||
padding: 10px 13px;
|
||||
padding: 10px 15px;
|
||||
@include transition(150ms);
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
@@ -261,7 +232,7 @@
|
||||
.icon {
|
||||
@include font-size(13);
|
||||
width: 15px;
|
||||
margin-right: 15px;
|
||||
margin-right: 9px;
|
||||
vertical-align: middle;
|
||||
|
||||
path {
|
||||
@@ -295,6 +266,34 @@
|
||||
}
|
||||
}
|
||||
|
||||
&.favourites {
|
||||
|
||||
&.is-dragenter {
|
||||
|
||||
.menu-list {
|
||||
border: 2px dashed $theme;
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
border: 2px dashed transparent;
|
||||
|
||||
.menu-list-item {
|
||||
padding: 10px 13px;
|
||||
|
||||
.icon {
|
||||
@include font-size(20);
|
||||
width: 20px;
|
||||
|
||||
path {
|
||||
fill: $theme;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty-list {
|
||||
@include font-size(12);
|
||||
color: $text-muted;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<span class="title">Storage</span>
|
||||
<span class="size">{{ app.storage.used }} of {{ app.storage.capacity }} Used</span>
|
||||
</div>
|
||||
<ProgressBar :progress="app.storage.percentage"/>
|
||||
<ProgressBar :progress="app.storage.percentage" :class="{'is-exceeded': app.storage.percentage > 100}"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -57,6 +57,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
|
||||
&.is-exceeded /deep/ span {
|
||||
background: $danger;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 690px) {
|
||||
|
||||
.storage-size {
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
.email {
|
||||
@include font-size(13);
|
||||
color: $light_text;
|
||||
color: $theme;
|
||||
display: block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
@@ -100,6 +100,8 @@
|
||||
},
|
||||
watch: {
|
||||
name: debounce(function (val) {
|
||||
if (val === '') return
|
||||
|
||||
this.$store.commit('UPDATE_NAME', val)
|
||||
}, 300),
|
||||
},
|
||||
@@ -119,19 +121,11 @@
|
||||
|
||||
if (!isValid) return;
|
||||
|
||||
// Start loading
|
||||
//this.isLoading = true
|
||||
|
||||
// Send request to get user reset link
|
||||
axios
|
||||
.post(this.$store.getters.api + '/user/password', {
|
||||
password: this.newPassword,
|
||||
password_confirmation: this.newPasswordConfirmation,
|
||||
},
|
||||
{
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + this.$store.getters.token
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
@@ -147,9 +141,6 @@
|
||||
title: 'Your password was changed!',
|
||||
message: 'So now, you have awesome new password.',
|
||||
})
|
||||
|
||||
// End loading
|
||||
//this.isLoading = false
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
@@ -162,9 +153,6 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// End loading
|
||||
//this.isLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -178,7 +166,6 @@
|
||||
<style lang="scss">
|
||||
@import "@assets/app.scss";
|
||||
|
||||
|
||||
.avatar-upload {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user