+
+
-
- {{ moreOptionsTitle }}
-
+
+
@@ -148,13 +156,17 @@ export default {
},
submitButtonText() {
return this.isGeneratedShared ? this.$t('shared_form.button_done') : this.$t('shared_form.button_generate')
- },
- moreOptionsTitle() {
- return this.isMoreOptions ? this.$t('shared_form.button_close_options') : this.$t('shared_form.button_more_options')
}
},
+ watch: {
+ isExpiration(val) {
+ if (! val) this.shareOptions.expiration = undefined
+ }
+ },
data() {
return {
+ isExpiration: false,
+ isEmailSharing: false,
shareOptions: {
isPassword: false,
expiration: undefined,
@@ -167,17 +179,10 @@ export default {
pickedItem: undefined,
isGeneratedShared: false,
isLoading: false,
- isMoreOptions: false,
sharedViaEmail: false
}
},
methods: {
- moreOptions() {
- this.isMoreOptions = !this.isMoreOptions
-
- if (!this.isMoreOptions)
- this.shareOptions.expiration = undefined
- },
async submitShareOptions() {
// If shared was generated, then close popup
@@ -199,10 +204,6 @@ export default {
.post(`/api/share`, this.shareOptions)
.then(response => {
- // Show infobox and reset emails container
- if (this.shareOptions.emails)
- this.sharedViaEmail = true
-
// End loading
this.isGeneratedShared = true
@@ -224,7 +225,7 @@ export default {
},
mounted() {
- events.$on('emailsInputValues', (emails) => this.shareOptions.emails = emails)
+ events.$on('emailsInputValues', emails => this.shareOptions.emails = emails)
// Show popup
events.$on('popup:open', args => {
@@ -243,18 +244,18 @@ export default {
// Restore data
setTimeout(() => {
- this.shareOptions = {
- permission: undefined,
- password: undefined,
- isPassword: false,
- expiration: undefined,
- type: undefined,
- id: undefined,
- emails: undefined
- }
- this.isGeneratedShared = false
- this.isMoreOptions = false
- this.sharedViaEmail = false
+ this.isGeneratedShared = false
+ this.isExpiration = false
+ this.isEmailSharing = false
+ this.shareOptions = {
+ isPassword: false,
+ expiration: undefined,
+ password: undefined,
+ permission: undefined,
+ type: undefined,
+ id: undefined,
+ emails: undefined
+ }
}, 150)
})
}
@@ -265,10 +266,6 @@ export default {
@import "resources/sass/vuefilemanager/_inapp-forms.scss";
@import '/resources/sass/vuefilemanager/_forms';
-.more-options {
- margin-bottom: 10px;
-}
-
.input-wrapper {
&.password {
diff --git a/resources/js/components/Others/ShareEditPopup.vue b/resources/js/components/Others/ShareEditPopup.vue
index 3d16f81e..c28cc389 100644
--- a/resources/js/components/Others/ShareEditPopup.vue
+++ b/resources/js/components/Others/ShareEditPopup.vue
@@ -9,64 +9,69 @@
-
-
-
-
-
+
+
-
-
-
+
-
+
{{ errors[0] }}
-
-
-
-
+
+
+
-
-
-
-
- {{ moreOptionsTitle }}
-
+
@@ -164,36 +169,31 @@
if(this.sendToRecipientsMenu)
return this.isEmailSended ? this.$t('shared_form.button_done') : this.$t('popup_share_edit.send_to_recipients')
-
},
- isSharedLocation() {
- return this.currentFolder && this.currentFolder.location === 'shared'
- },
- moreOptionsTitle() {
- return this.isMoreOptions ? this.$t('shared_form.button_close_options') : this.$t('shared_form.button_more_options')
- }
},
+ watch: {
+ 'shareOptions.expiration': function (val) {
+ if (!val) {
+ this.shareOptions.expiration = undefined
+ }
+ }
+ },
data() {
return {
+ isExpiration: false,
sendToRecipientsMenu: false,
isConfirmedDestroy: false,
canChangePassword: false,
shareOptions: undefined,
pickedItem: undefined,
- emails:undefined,
isMoreOptions: false,
isEmailSended:false,
isDeleting: false,
+ emails:undefined,
isLoading: false,
}
},
methods: {
- moreOptions() {
- this.isMoreOptions = ! this.isMoreOptions
-
- if (! this.isMoreOptions)
- this.shareOptions.expiration = undefined
- },
changePassword() {
this.canChangePassword = false
},
@@ -216,11 +216,8 @@
.finally(() => {
this.isEmailSended = true
-
- // End loading
this.isLoading = false
})
-
},
async destroySharing() {
@@ -333,7 +330,7 @@
}
if (args.item.shared.expire_in)
- this.isMoreOptions = true
+ this.isExpiration = true
if (args.sentToEmail)
this.sendToRecipientsMenu = true
@@ -348,11 +345,12 @@
// Restore data
setTimeout(() => {
this.sendToRecipientsMenu = false
- this.isEmailSended = false
this.isConfirmedDestroy = false
this.canChangePassword = false
- this.pickedItem = undefined
this.shareOptions = undefined
+ this.pickedItem = undefined
+ this.isEmailSended = false
+ this.isExpiration = false
}, 150)
})
}
@@ -377,6 +375,7 @@
.change-password {
opacity: 0.7;
text-decoration: underline;
+ margin-top: -8px;
}
.item-thumbnail {
diff --git a/resources/sass/vuefilemanager/_forms.scss b/resources/sass/vuefilemanager/_forms.scss
index 34af46ee..312b04a4 100644
--- a/resources/sass/vuefilemanager/_forms.scss
+++ b/resources/sass/vuefilemanager/_forms.scss
@@ -23,6 +23,18 @@
&.block-form {
+ .switch-wrapper {
+ padding-bottom: 13px;
+ margin-bottom: 13px;
+ border-bottom: 1px solid $light_background;
+
+ &:last-child {
+ padding-bottom: 0;
+ margin-bottom: 0;
+ border-bottom: none;
+ }
+ }
+
.wrapper-inline {
display: flex;
margin: 0 -15px;
diff --git a/src/Domain/Sharing/Controllers/ShareController.php b/src/Domain/Sharing/Controllers/ShareController.php
index d5158bcd..fc48c763 100644
--- a/src/Domain/Sharing/Controllers/ShareController.php
+++ b/src/Domain/Sharing/Controllers/ShareController.php
@@ -61,7 +61,7 @@ class ShareController extends Controller
$share->update([
'permission' => $request->input('permission'),
'is_protected' => $request->input('protected'),
- 'expire_in' => $request->input('expiration'),
+ 'expire_in' => $request->input('expiration') ?? null,
'password' => $request->input('password')
? bcrypt($request->input('password'))
: $share->password,