diff --git a/README.md b/README.md index 509a5d15..001dc690 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Integrations for embedding SaaS data within documents. ## Latest version -v1.54.0 +v1.54.1 ## OS support diff --git a/domain/template/endpoint.go b/domain/template/endpoint.go index 8a6132a7..1bac47aa 100644 --- a/domain/template/endpoint.go +++ b/domain/template/endpoint.go @@ -262,7 +262,7 @@ func (h *Handler) Use(w http.ResponseWriter, r *http.Request) { var d = doc.Document{} d.Title = docTitle d.Location = fmt.Sprintf("template-%s", templateID) - d.Excerpt = "A new document" + d.Excerpt = "Add detailed description for document..." d.Slug = stringutil.MakeSlug(d.Title) d.Tags = "" d.LabelID = folderID diff --git a/edition/community.go b/edition/community.go index 39fd34ac..41f17c66 100644 --- a/edition/community.go +++ b/edition/community.go @@ -42,7 +42,7 @@ func main() { rt.Product = env.ProdInfo{} rt.Product.Major = "1" rt.Product.Minor = "54" - rt.Product.Patch = "0" + rt.Product.Patch = "1" rt.Product.Version = fmt.Sprintf("%s.%s.%s", rt.Product.Major, rt.Product.Minor, rt.Product.Patch) rt.Product.Edition = "Community" rt.Product.Title = fmt.Sprintf("%s Edition", rt.Product.Edition) diff --git a/gui/app/components/customize/user-admin.js b/gui/app/components/customize/user-admin.js index 20fbdaf0..52fef106 100644 --- a/gui/app/components/customize/user-admin.js +++ b/gui/app/components/customize/user-admin.js @@ -114,19 +114,14 @@ export default Ember.Component.extend(AuthProvider, DropdownMixin, { this.closeDropdown(); - let drop = new Drop({ + let dropOptions = Object.assign(this.get('dropDefaults'), { target: $(".edit-button-" + id)[0], content: $(".edit-user-dialog")[0], classes: 'drop-theme-basic', position: "bottom right", - openOn: "always", - tetherOptions: { - offset: "5px 0", - targetOffset: "10px 0" - }, - remove: false - }); + remove: false}); + let drop = new Drop(dropOptions); self.set('dropdown', drop); drop.on('open', function () { @@ -141,19 +136,14 @@ export default Ember.Component.extend(AuthProvider, DropdownMixin, { this.closeDropdown(); - let drop = new Drop({ + let dropOptions = Object.assign(this.get('dropDefaults'), { target: $(".delete-button-" + id)[0], content: $(".delete-user-dialog")[0], classes: 'drop-theme-basic', position: "bottom right", - openOn: "always", - tetherOptions: { - offset: "5px 0", - targetOffset: "10px 0" - }, - remove: false - }); + remove: false}); + let drop = new Drop(dropOptions); this.set('dropdown', drop); }, diff --git a/gui/app/components/document/document-attachments.js b/gui/app/components/document/document-attachments.js index 97f220db..2d55022c 100644 --- a/gui/app/components/document/document-attachments.js +++ b/gui/app/components/document/document-attachments.js @@ -12,11 +12,12 @@ import Ember from 'ember'; import NotifierMixin from '../../mixins/notifier'; import TooltipMixin from '../../mixins/tooltip'; +import DropdownMixin from '../../mixins/dropdown'; -export default Ember.Component.extend(NotifierMixin, TooltipMixin, { +export default Ember.Component.extend(NotifierMixin, TooltipMixin, DropdownMixin, { documentService: Ember.inject.service('document'), appMeta: Ember.inject.service(), - drop: null, + dropdown: null, hasAttachments: Ember.computed.notEmpty('files'), deleteAttachment: { id: "", @@ -78,11 +79,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { willDestroyElement() { this._super(...arguments); - - let drop = this.get('drop'); - if (is.not.null(drop)) { - drop.destroy(); - } + this.destroyDropdown(); }, getAttachments() { @@ -100,25 +97,21 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { $(".delete-attachment-dialog").css("display", "block"); - let drop = new Drop({ + this.closeDropdown(); + + let dropOptions = Object.assign(this.get('dropDefaults'), { target: $(".delete-attachment-" + id)[0], content: $(".delete-attachment-dialog")[0], classes: 'drop-theme-basic', position: "bottom right", - openOn: "always", - tetherOptions: { - offset: "5px 0", - targetOffset: "10px 0" - }, - remove: false - }); + remove: false}); - this.set('drop', drop); + let drop = new Drop(dropOptions); + this.set('dropdown', drop); }, onCancel() { - let drop = this.get('drop'); - drop.close(); + this.closeDropdown(); this.set('deleteAttachment', { id: "", @@ -127,9 +120,9 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, { }, onDelete() { + this.closeDropdown(); + let attachment = this.get('deleteAttachment'); - let drop = this.get('drop'); - drop.close(); this.showNotification(`Deleted ${name}`); diff --git a/gui/app/components/dropdown-dialog.js b/gui/app/components/dropdown-dialog.js index ba9986c2..b8e30c71 100644 --- a/gui/app/components/dropdown-dialog.js +++ b/gui/app/components/dropdown-dialog.js @@ -62,7 +62,13 @@ export default Ember.Component.extend({ tetherOptions: { offset: self.offset, targetOffset: self.targetOffset, - targetModifier: 'scroll-handle' + // targetModifier: 'scroll-handle', + constraints: [ + { + to: 'scrollParent', + attachment: 'together' + } + ], }, remove: true }); diff --git a/gui/app/components/folder/category-admin.js b/gui/app/components/folder/category-admin.js index f1165b34..0b7d3fbc 100644 --- a/gui/app/components/folder/category-admin.js +++ b/gui/app/components/folder/category-admin.js @@ -160,19 +160,14 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, DropdownMixin $(".category-access-dialog").css("display", "block"); - let drop = new Drop({ + let dropOptions = Object.assign(this.get('dropDefaults'), { target: $("#category-access-button-" + catId)[0], content: $(".category-access-dialog")[0], classes: 'drop-theme-basic', position: "bottom right", - openOn: "always", - tetherOptions: { - offset: "5px 0", - targetOffset: "10px 0" - }, - remove: false - }); + remove: false}); + let drop = new Drop(dropOptions); this.set('dropdown', drop); }); }, diff --git a/gui/app/components/folder/documents-list.js b/gui/app/components/folder/documents-list.js index afc2337c..db70590b 100644 --- a/gui/app/components/folder/documents-list.js +++ b/gui/app/components/folder/documents-list.js @@ -12,6 +12,13 @@ import Ember from 'ember'; export default Ember.Component.extend({ + showAdd: Ember.computed('permissions', 'documents', function() { + return this.get('documents.length') === 0 && this.get('permissions.documentAdd'); + }), + showLockout: Ember.computed('permissions', 'documents', function() { + return this.get('documents.length') === 0 && !this.get('permissions.documentAdd'); + }), + actions: { selectDocument(documentId) { let doc = this.get('documents').findBy('id', documentId); diff --git a/gui/app/components/folder/permission-admin.js b/gui/app/components/folder/permission-admin.js index 87169bee..0e7d12f8 100644 --- a/gui/app/components/folder/permission-admin.js +++ b/gui/app/components/folder/permission-admin.js @@ -112,6 +112,7 @@ export default Ember.Component.extend(NotifierMixin, { this.get('folderService').savePermissions(folder.get('id'), payload).then(() => { this.showNotification('Saved permissions'); + this.get('router').transitionTo('folder', folder.get('id'), folder.get('slug')); }); if (is.not.undefined(hasEveryone)) { diff --git a/gui/app/components/folder/space-toolbar.js b/gui/app/components/folder/space-toolbar.js index 997cc2a0..bab8dee4 100644 --- a/gui/app/components/folder/space-toolbar.js +++ b/gui/app/components/folder/space-toolbar.js @@ -34,6 +34,9 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, AuthMixin, { newName: '' }, deleteSpaceName: '', + spaceSettings: Ember.computed('permissions', function() { + return this.get('permissions.spaceOwner') || this.get('permissions.spaceManage'); + }), didReceiveAttrs() { this._super(...arguments); diff --git a/gui/app/mixins/dropdown.js b/gui/app/mixins/dropdown.js index fb15df6e..ce2d521e 100644 --- a/gui/app/mixins/dropdown.js +++ b/gui/app/mixins/dropdown.js @@ -26,5 +26,27 @@ export default Ember.Mixin.create({ if (is.not.null(drop) && is.not.null(drop.drop)) { drop.destroy(); } + }, + + dropDefaults: { + // position: "bottom right", + openOn: "always", + tetherOptions: { + offset: "5px 0", + targetOffset: "10px 0", + // targetModifier: 'visible', + // attachment: 'middle right', + // targetAttachment: 'middle right', + constraints: [ + { + to: 'scrollParent', + attachment: 'together' + } + ], + // optimizations: { + // moveElement: false, + // gpu: false + // }, + }, } }); diff --git a/gui/app/pods/customize/folders/controller.js b/gui/app/pods/customize/folders/controller.js index c7e010ef..bbdbfab7 100644 --- a/gui/app/pods/customize/folders/controller.js +++ b/gui/app/pods/customize/folders/controller.js @@ -33,6 +33,7 @@ export default Ember.Controller.extend(NotifierMixin, DropdownMixin, { willDestroyElement() { + this._super(...arguments); this.destroyDropdown(); }, @@ -43,19 +44,16 @@ export default Ember.Controller.extend(NotifierMixin, DropdownMixin, { $(".delete-space-dialog").css("display", "block"); $('#delete-space-name').removeClass('error'); - let drop = new Drop({ + this.closeDropdown(); + + let dropOptions = Object.assign(this.get('dropDefaults'), { target: $("#delete-space-button-" + spaceId)[0], content: $(".delete-space-dialog")[0], classes: 'drop-theme-basic', position: "bottom right", - openOn: "always", - tetherOptions: { - offset: "5px 0", - targetOffset: "10px 0" - }, - remove: false - }); + remove: false}); + let drop = new Drop(dropOptions); this.set('dropdown', drop); }, diff --git a/gui/app/styles/view/common.scss b/gui/app/styles/view/common.scss index d1d96fac..1e3e88ef 100644 --- a/gui/app/styles/view/common.scss +++ b/gui/app/styles/view/common.scss @@ -1,15 +1,24 @@ -.explainer { +.empty-state { text-align: center; + margin: 0 auto; + margin-top: 50px; + max-width: 500px; + padding: 30px; + @include border-radius(5px); + background-color: $color-off-white; + display: block; + opacity: 0.8; - > .empty-state { - margin: 30px 0; - font-size: 1.2rem; + > p { + font-size: 1.5rem; + line-height: 2.5rem; color: $color-gray; + display: block; } - > .normal-state { - margin: 10px; - font-size: 1.2rem; - color: $color-gray; + + > .material-icons { + font-size: 5rem; + color: $color-stroke; } } diff --git a/gui/app/styles/view/document/space-category-tag.scss b/gui/app/styles/view/document/space-category-tag.scss index a7b2249e..90d37b4a 100644 --- a/gui/app/styles/view/document/space-category-tag.scss +++ b/gui/app/styles/view/document/space-category-tag.scss @@ -40,6 +40,7 @@ > .regular-button { margin-right: 10px; + text-transform: lowercase; } > .none { diff --git a/gui/app/styles/view/folder/document.scss b/gui/app/styles/view/folder/document.scss index 7aa15bfa..8d68d194 100644 --- a/gui/app/styles/view/folder/document.scss +++ b/gui/app/styles/view/folder/document.scss @@ -153,6 +153,10 @@ font-size: 1.0rem; margin: 0 0 10px 0; } + + > .regular-button { + margin-bottom: 10px; + } } .category-filter { @@ -161,6 +165,7 @@ > .regular-button { margin-right: 10px; + margin-bottom: 10px; } > .caption { diff --git a/gui/app/styles/view/folder/settings.scss b/gui/app/styles/view/folder/settings.scss index 63229611..891be410 100644 --- a/gui/app/styles/view/folder/settings.scss +++ b/gui/app/styles/view/folder/settings.scss @@ -22,10 +22,16 @@ > .permission-roles-cell { margin: 15px 0 20px 40px; - > .role-category { - color: $color-gray; - font-weight: bold; + > .role-container { + white-space: nowrap; display: inline-block; + margin-bottom: 10px; + + > .role-category { + color: $color-gray; + font-weight: bold; + display: inline-block; + } } > label { diff --git a/gui/app/templates/components/document/document-attachments.hbs b/gui/app/templates/components/document/document-attachments.hbs index 21279b13..aba01b98 100644 --- a/gui/app/templates/components/document/document-attachments.hbs +++ b/gui/app/templates/components/document/document-attachments.hbs @@ -1,4 +1,4 @@ -
+{{/if}} + +{{#if showAdd}} + {{empty-state message="You can create new documents via the green + button"}} +{{/if}} + +{{#if showLockout}} + {{empty-state message="It looks like space permissions are preventing you from viewing and creating documents"}} {{/if}} \ No newline at end of file diff --git a/gui/app/templates/components/folder/permission-admin.hbs b/gui/app/templates/components/folder/permission-admin.hbs index 12d94c9b..ca9c7513 100644 --- a/gui/app/templates/components/folder/permission-admin.hbs +++ b/gui/app/templates/components/folder/permission-admin.hbs @@ -8,29 +8,33 @@