From 34d8235551cdef37f42d378c348031fc6848797c Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Wed, 27 Feb 2019 16:14:14 +0200 Subject: Add the following new Sandstorm features and fixes: - All Boards page [so it's possible to go back from subtask board](https://github.com/wekan/wekan/issues/2082) - Board favorites - New Sandstorm board first user is Admin and [has IFTTT Rules](https://github.com/wekan/wekan/issues/2125) and Standalone Wekan Admin Panel. Probably some Admin Panel features do not work yet. Please keep backup of your grains before testig Admin Panel. - Linked Cards and Linked Boards. - Some not needed options like Logout etc have been hidden from top bar right menu. - [Import board now works. "Board not found" is not problem anymore](https://github.com/wekan/wekan/issues/1430), because you can go to All Boards page to change to imported board. and removes the following features: - Remove Welcome Board from Standalone Wekan, [to fix Welcome board not translated](https://github.com/wekan/wekan/issues/1601). Sandstorm Wekan does not have Welcome Board. Thanks to xet7 ! Closes #2125, closes #2082, closes #1430, closes #1601, related #2205, related #2070, related #1695, related #1192. --- client/components/boards/boardHeader.jade | 110 +++++++++++++------------- client/components/cards/cardDetails.jade | 18 ++--- client/components/lists/listBody.jade | 18 ++--- client/components/main/header.jade | 65 +++++++-------- client/components/main/layouts.jade | 6 +- client/components/settings/settingHeader.jade | 31 ++++---- client/components/sidebar/sidebar.jade | 19 +++-- client/components/users/userHeader.jade | 21 ++--- models/users.js | 5 +- sandstorm.js | 18 ++--- 10 files changed, 151 insertions(+), 160 deletions(-) diff --git a/client/components/boards/boardHeader.jade b/client/components/boards/boardHeader.jade index 75b2f02b..746dae09 100644 --- a/client/components/boards/boardHeader.jade +++ b/client/components/boards/boardHeader.jade @@ -7,71 +7,69 @@ template(name="boardHeaderBar") .board-header-btns.left unless isMiniScreen - unless isSandstorm - if currentBoard - if currentUser - a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}" - title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}") - i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}") - if showStarCounter - span - = currentBoard.stars + if currentBoard + if currentUser + a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}" + title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}") + i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}") + if showStarCounter + span + = currentBoard.stars - a.board-header-btn( - class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}" - title="{{_ currentBoard.permission}}") - i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}") - span {{_ currentBoard.permission}} + a.board-header-btn( + class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}" + title="{{_ currentBoard.permission}}") + i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}") + span {{_ currentBoard.permission}} - a.board-header-btn.js-watch-board( - title="{{_ watchLevel }}") - if $eq watchLevel "watching" - i.fa.fa-eye - if $eq watchLevel "tracking" - i.fa.fa-bell - if $eq watchLevel "muted" - i.fa.fa-bell-slash - span {{_ watchLevel}} + a.board-header-btn.js-watch-board( + title="{{_ watchLevel }}") + if $eq watchLevel "watching" + i.fa.fa-eye + if $eq watchLevel "tracking" + i.fa.fa-bell + if $eq watchLevel "muted" + i.fa.fa-bell-slash + span {{_ watchLevel}} - else - a.board-header-btn.js-log-in( - title="{{_ 'log-in'}}") - i.fa.fa-sign-in - span {{_ 'log-in'}} + else + a.board-header-btn.js-log-in( + title="{{_ 'log-in'}}") + i.fa.fa-sign-in + span {{_ 'log-in'}} .board-header-btns.right if currentBoard if isMiniScreen - unless isSandstorm - if currentUser - a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}" - title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}") - i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}") - if showStarCounter - span - = currentBoard.stars + if currentUser + a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}" + title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}") + i.fa(class="fa-star{{#unless isStarred}}-o{{/unless}}") + if showStarCounter + span + = currentBoard.stars - a.board-header-btn( - class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}" - title="{{_ currentBoard.permission}}") - i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}") - span {{_ currentBoard.permission}} + a.board-header-btn( + class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}" + title="{{_ currentBoard.permission}}") + i.fa(class="{{#if currentBoard.isPublic}}fa-globe{{else}}fa-lock{{/if}}") + span {{_ currentBoard.permission}} - a.board-header-btn.js-watch-board( - title="{{_ watchLevel }}") - if $eq watchLevel "watching" - i.fa.fa-eye - if $eq watchLevel "tracking" - i.fa.fa-bell - if $eq watchLevel "muted" - i.fa.fa-bell-slash - span {{_ watchLevel}} + a.board-header-btn.js-watch-board( + title="{{_ watchLevel }}") + if $eq watchLevel "watching" + i.fa.fa-eye + if $eq watchLevel "tracking" + i.fa.fa-bell + if $eq watchLevel "muted" + i.fa.fa-bell-slash + span {{_ watchLevel}} - else - a.board-header-btn.js-log-in( - title="{{_ 'log-in'}}") - i.fa.fa-sign-in - span {{_ 'log-in'}} + else + a.board-header-btn.js-log-in( + title="{{_ 'log-in'}}") + i.fa.fa-sign-in + span {{_ 'log-in'}} if isSandstorm if currentUser @@ -143,6 +141,8 @@ template(name="boardMenuPopup") ul.pop-over-list li: a(href="{{exportUrl}}", download="{{exportFilename}}") {{_ 'export-board'}} li: a.js-import-board {{_ 'import-board-c'}} + li: a.js-archive-board {{_ 'archive-board'}} + li: a.js-outgoing-webhooks {{_ 'outgoing-webhooks'}} hr ul.pop-over-list li: a.js-subtask-settings {{_ 'subtask-settings'}} diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index 25316d04..df76edce 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -19,16 +19,14 @@ template(name="cardDetails") a.js-parent-card(href=linkForCard) {{title}} // else {{_ 'top-level-card'}} - unless isSandstorm - if isLinkedCard - h3.linked-card-location - +viewer - | {{getBoardTitle}} > {{getTitle}} + if isLinkedCard + h3.linked-card-location + +viewer + | {{getBoardTitle}} > {{getTitle}} if getArchived if isLinkedBoard - unless isSandstorm - p.warning {{_ 'board-archived'}} + p.warning {{_ 'board-archived'}} else p.warning {{_ 'card-archived'}} @@ -192,11 +190,9 @@ template(name="cardDetails") unless currentUser.isNoComments if isLoaded.get if isLinkedCard - unless isSandstorm - +activities(card=this mode="linkedcard") + +activities(card=this mode="linkedcard") else if isLinkedBoard - unless isSandstorm - +activities(card=this mode="linkedboard") + +activities(card=this mode="linkedboard") else +activities(card=this mode="card") diff --git a/client/components/lists/listBody.jade b/client/components/lists/listBody.jade index f030833b..d31070bd 100644 --- a/client/components/lists/listBody.jade +++ b/client/components/lists/listBody.jade @@ -44,14 +44,13 @@ template(name="addCardForm") .add-controls.clearfix button.primary.confirm(type="submit") {{_ 'add'}} - unless isSandstorm - span.quiet - | {{_ 'or'}} - a.js-link {{_ 'link'}} - span.quiet - |   - | / - a.js-search {{_ 'search'}} + span.quiet + | {{_ 'or'}} + a.js-link {{_ 'link'}} + span.quiet + |   + | / + a.js-search {{_ 'search'}} template(name="autocompleteLabelLine") .minicard-label(class="card-label-{{colorName}}" title=labelName) @@ -84,8 +83,7 @@ template(name="linkCardPopup") option(value="{{getId}}") {{getTitle}} .edit-controls.clearfix - unless isSandstorm - input.primary.confirm.js-done(type="button" value="{{_ 'link'}}") + input.primary.confirm.js-done(type="button" value="{{_ 'link'}}") template(name="searchCardPopup") label {{_ 'boards'}}: diff --git a/client/components/main/header.jade b/client/components/main/header.jade index e21ce096..c0781303 100644 --- a/client/components/main/header.jade +++ b/client/components/main/header.jade @@ -4,39 +4,38 @@ template(name="header") list all starred boards with a link to go there. This is inspired by the Reddit "subreddit" bar. The first link goes to the boards page. - unless isSandstorm - if currentUser - #header-quick-access(class=currentBoard.colorClass) - if isMiniScreen - ul - li - a(href="{{pathFor 'home'}}") - span.fa.fa-home + if currentUser + #header-quick-access(class=currentBoard.colorClass) + if isMiniScreen + ul + li + a(href="{{pathFor 'home'}}") + span.fa.fa-home - if currentList - each currentBoard.lists - li(class="{{#if $.Session.equals 'currentList' _id}}current{{/if}}") - a.js-select-list - = title - #header-new-board-icon - else - ul - li - a(href="{{pathFor 'home'}}") - span.fa.fa-home - | {{_ 'all-boards'}} - each currentUser.starredBoards - li.separator - - li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}") - a(href="{{pathFor 'board' id=_id slug=slug}}") + if currentList + each currentBoard.lists + li(class="{{#if $.Session.equals 'currentList' _id}}current{{/if}}") + a.js-select-list = title - else - li.current {{_ 'quick-access-description'}} + #header-new-board-icon + else + ul + li + a(href="{{pathFor 'home'}}") + span.fa.fa-home + | {{_ 'all-boards'}} + each currentUser.starredBoards + li.separator - + li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}") + a(href="{{pathFor 'board' id=_id slug=slug}}") + = title + else + li.current {{_ 'quick-access-description'}} - a#header-new-board-icon.js-create-board - i.fa.fa-plus(title="Create a new board") + a#header-new-board-icon.js-create-board + i.fa.fa-plus(title="Create a new board") - +headerUserBar + +headerUserBar #header(class=currentBoard.colorClass) //- @@ -52,13 +51,9 @@ template(name="header") On sandstorm, the logo shouldn't be clickable, because we only have one page/document on it, and we don't want to see the home page containing the list of all boards. - if isSandstorm - .wekan-logo + unless currentSetting.hideLogo + a.wekan-logo(href="{{pathFor 'home'}}" title="{{_ 'header-logo-title'}}") img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan") - else - unless currentSetting.hideLogo - a.wekan-logo(href="{{pathFor 'home'}}" title="{{_ 'header-logo-title'}}") - img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan") if appIsOffline +offlineWarning diff --git a/client/components/main/layouts.jade b/client/components/main/layouts.jade index f2c40b9f..50585aa4 100644 --- a/client/components/main/layouts.jade +++ b/client/components/main/layouts.jade @@ -14,13 +14,13 @@ head template(name="userFormsLayout") section.auth-layout - unless currentSetting.hideLogo - h1.at-form-landing-logo - img(src="{{pathFor '/wekan-logo.png'}}" alt="Wekan") if currentSetting.hideLogo h1 br br + else + h1.at-form-landing-logo + img(src="{{pathFor '/wekan-logo.png'}}" alt="Wekan") section.auth-dialog +Template.dynamic(template=content) if currentSetting.displayAuthenticationMethod diff --git a/client/components/settings/settingHeader.jade b/client/components/settings/settingHeader.jade index c2d4db3a..221c1b79 100644 --- a/client/components/settings/settingHeader.jade +++ b/client/components/settings/settingHeader.jade @@ -4,22 +4,21 @@ template(name="settingHeaderBar") .setting-header-btns.left unless isMiniScreen - unless isSandstorm - if currentUser - a.setting-header-btn.settings(href="{{pathFor 'setting'}}") - i.fa(class="fa-cog") - span {{_ 'settings'}} + if currentUser + a.setting-header-btn.settings(href="{{pathFor 'setting'}}") + i.fa(class="fa-cog") + span {{_ 'settings'}} - a.setting-header-btn.people(href="{{pathFor 'people'}}") - i.fa(class="fa-users") - span {{_ 'people'}} + a.setting-header-btn.people(href="{{pathFor 'people'}}") + i.fa(class="fa-users") + span {{_ 'people'}} - a.setting-header-btn.informations(href="{{pathFor 'information'}}") - i.fa(class="fa-info-circle") - span {{_ 'info'}} + a.setting-header-btn.informations(href="{{pathFor 'information'}}") + i.fa(class="fa-info-circle") + span {{_ 'info'}} - else - a.setting-header-btn.js-log-in( - title="{{_ 'log-in'}}") - i.fa.fa-sign-in - span {{_ 'log-in'}} + else + a.setting-header-btn.js-log-in( + title="{{_ 'log-in'}}") + i.fa.fa-sign-in + span {{_ 'log-in'}} diff --git a/client/components/sidebar/sidebar.jade b/client/components/sidebar/sidebar.jade index ec88ce7e..f7ca9bf3 100644 --- a/client/components/sidebar/sidebar.jade +++ b/client/components/sidebar/sidebar.jade @@ -83,17 +83,16 @@ template(name="memberPopup") ul.pop-over-list li a.js-filter-member {{_ 'filter-cards'}} - unless isSandstorm - if currentUser.isBoardAdmin - li - a.js-change-role - | {{_ 'change-permissions'}} - span.quiet (#{memberType}) + if currentUser.isBoardAdmin li - if $eq currentUser._id userId - a.js-leave-member {{_ 'leave-board'}} - else if currentUser.isBoardAdmin - a.js-remove-member {{_ 'remove-from-board'}} + a.js-change-role + | {{_ 'change-permissions'}} + span.quiet (#{memberType}) + li + if $eq currentUser._id userId + a.js-leave-member {{_ 'leave-board'}} + else if currentUser.isBoardAdmin + a.js-remove-member {{_ 'remove-from-board'}} template(name="removeMemberPopup") diff --git a/client/components/users/userHeader.jade b/client/components/users/userHeader.jade index b6e10d8a..af120045 100644 --- a/client/components/users/userHeader.jade +++ b/client/components/users/userHeader.jade @@ -4,10 +4,11 @@ template(name="headerUserBar") .header-user-bar-avatar +userAvatar(userId=currentUser._id) unless isMiniScreen - if currentUser.profile.fullname - = currentUser.profile.fullname - else - = currentUser.username + unless isSandstorm + if currentUser.profile.fullname + = currentUser.profile.fullname + else + = currentUser.username template(name="memberMenuPopup") ul.pop-over-list @@ -15,13 +16,15 @@ template(name="memberMenuPopup") li: a.js-edit-profile {{_ 'edit-profile'}} li: a.js-change-settings {{_ 'change-settings'}} li: a.js-change-avatar {{_ 'edit-avatar'}} - li: a.js-change-password {{_ 'changePasswordPopup-title'}} - li: a.js-change-language {{_ 'changeLanguagePopup-title'}} + unless isSandstorm + li: a.js-change-password {{_ 'changePasswordPopup-title'}} + li: a.js-change-language {{_ 'changeLanguagePopup-title'}} if currentUser.isAdmin li: a.js-go-setting(href="{{pathFor 'setting'}}") {{_ 'admin-panel'}} - hr - ul.pop-over-list - li: a.js-logout {{_ 'log-out'}} + unless isSandstorm + hr + ul.pop-over-list + li: a.js-logout {{_ 'log-out'}} template(name="editProfilePopup") form diff --git a/models/users.js b/models/users.js index 0fdf21a8..c6c0f857 100644 --- a/models/users.js +++ b/models/users.js @@ -559,7 +559,7 @@ if (Meteor.isServer) { }); Accounts.onCreateUser((options, user) => { const userCount = Users.find().count(); - if (!isSandstorm && userCount === 0) { + if (userCount === 0) { user.isAdmin = true; return user; } @@ -675,7 +675,7 @@ if (Meteor.isServer) { CollectionHooks.getUserId = () => { return fakeUserId.get() || getUserId(); }; - + /* if (!isSandstorm) { Users.after.insert((userId, doc) => { const fakeUser = { @@ -704,6 +704,7 @@ if (Meteor.isServer) { }); }); } + */ Users.after.insert((userId, doc) => { diff --git a/sandstorm.js b/sandstorm.js index 37dced92..de003a6f 100644 --- a/sandstorm.js +++ b/sandstorm.js @@ -435,12 +435,12 @@ if (isSandstorm && Meteor.isClient) { // // XXX Hack. The home route is already defined at this point so we need to // add the redirection trigger to the internal route object. - FlowRouter._routesMap.home._triggersEnter.push((context, redirect) => { - redirect(FlowRouter.path('board', { - id: sandstormBoard._id, - slug: sandstormBoard.slug, - })); - }); + //FlowRouter._routesMap.home._triggersEnter.push((context, redirect) => { + // redirect(FlowRouter.path('board', { + // id: sandstormBoard._id, + // slug: sandstormBoard.slug, + // })); + //}); // XXX Hack. `Meteor.absoluteUrl` doesn't work in Sandstorm, since every // session has a different URL whereas Meteor computes absoluteUrl based on @@ -457,9 +457,9 @@ if (isSandstorm && Meteor.isClient) { // XXX Hack to fix https://github.com/wefork/wekan/issues/27 // Sandstorm Wekan instances only ever have a single board, so there is no need // to cache per-board subscriptions. - SubsManager.prototype.subscribe = function(...params) { - return Meteor.subscribe(...params); - }; + //SubsManager.prototype.subscribe = function(...params) { + // return Meteor.subscribe(...params); + //}; } // We use this blaze helper in the UI to hide some templates that does not make -- cgit v1.2.3-1-g7c22 From 57516177a0cfdb94893c40fbe8e5d515f216ea2c Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Wed, 27 Feb 2019 16:17:21 +0200 Subject: Update ChangeLog. --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0eeb550..2b3b246c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +# Upcoming Wekan release + +This release adds the following new Sandstorm features and fixes: + +- All Boards page [so it's possible to go back from subtask board](https://github.com/wekan/wekan/issues/2082). +- Board favorites. +- New Sandstorm board first user is Admin and [has IFTTT Rules](https://github.com/wekan/wekan/issues/2125) and Standalone Wekan Admin Panel. + Probably some Admin Panel features do not work yet. Please keep backup of your grains before testig Admin Panel. +- Linked Cards and Linked Boards. +- Some not needed options like Logout etc have been hidden from top bar right menu. +- [Import board now works. "Board not found" is not problem anymore](https://github.com/wekan/wekan/issues/1430), because you can go to All Boards page to change to imported board. + +and removes the following features: + +- Remove Welcome Board from Standalone Wekan, [to fix Welcome board not translated](https://github.com/wekan/wekan/issues/1601). + Sandstorm Wekan does not have Welcome Board. + +Thanks to GitHub user xet7 for contributions. + # v2.27 2019-02-27 Wekan release This release fixes the following bugs: -- cgit v1.2.3-1-g7c22 From 29c3080eb6b925e0fe8308b721dca25cbeb34e73 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Wed, 27 Feb 2019 16:21:31 +0200 Subject: v2.28 --- CHANGELOG.md | 2 +- Stackerfile.yml | 2 +- package.json | 2 +- sandstorm-pkgdef.capnp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b3b246c..79317001 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Upcoming Wekan release +# v2.28 2019-02-27 Wekan release This release adds the following new Sandstorm features and fixes: diff --git a/Stackerfile.yml b/Stackerfile.yml index 195f2eff..294bdb9a 100644 --- a/Stackerfile.yml +++ b/Stackerfile.yml @@ -1,5 +1,5 @@ appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928 -appVersion: "v2.27.0" +appVersion: "v2.28.0" files: userUploads: - README.md diff --git a/package.json b/package.json index 2a66ab1a..22b394a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wekan", - "version": "v2.27.0", + "version": "v2.28.0", "description": "Open-Source kanban", "private": true, "scripts": { diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index fe488dd8..11cf0c31 100644 --- a/sandstorm-pkgdef.capnp +++ b/sandstorm-pkgdef.capnp @@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = ( appTitle = (defaultText = "Wekan"), # The name of the app as it is displayed to the user. - appVersion = 229, + appVersion = 230, # Increment this for every release. - appMarketingVersion = (defaultText = "2.27.0~2019-02-27"), + appMarketingVersion = (defaultText = "2.28.0~2019-02-27"), # Human-readable presentation of the app version. minUpgradableAppVersion = 0, -- cgit v1.2.3-1-g7c22