Merge branch 'devel'

This commit is contained in:
Lauri Ojansivu 2018-02-23 21:01:44 +02:00
commit 57cf86a79f
70 changed files with 748 additions and 96 deletions

1
.gitignore vendored
View file

@ -14,3 +14,4 @@ package-lock.json
**/stage
**/prime
**/*.snap
snap/.snapcraft/

View file

@ -39,7 +39,7 @@ host = https://www.transifex.com
# tap:i18n requires us to use `-` separator in the language identifiers whereas
# Transifex uses a `_` separator, without an option to customize it on one side
# or the other, so we need to do a Manual mapping.
lang_map = en_GB:en-GB, es_AR:es-AR, el_GR:el, fi_FI:fi, hu_HU:hu, id_ID:id, mn_MN:mn, no:nb, lv_LV:lv, pt_BR:pt-BR, ro_RO:ro, zh_CN:zh-CN, zh_TW:zh-TW
lang_map = bg_BG:bg, en_GB:en-GB, es_AR:es-AR, el_GR:el, fi_FI:fi, hu_HU:hu, id_ID:id, mn_MN:mn, no:nb, lv_LV:lv, pt_BR:pt-BR, ro_RO:ro, zh_CN:zh-CN, zh_TW:zh-TW
[wekan.application]
file_filter = i18n/<lang>.i18n.json

View file

@ -1,3 +1,29 @@
# v0.77 2018-02-23 Wekan release
This release adds the following new features:
- [Search from card titles and descriptions on this board](https://github.com/wekan/wekan/pull/1503).
- Add Bulgarian language.
and adds the following [Snap updates](https://github.com/wekan/wekan/pull/1495):
- Cleanup of snap helper scripts
- Cleanup and snapctl settings handling
- Fix for snap store auto review refusal
- Adding support for automatic restart of services when setting(s) are changed.
No need to call systemctl restart anymore
- Fixing snap set functionality
- Adding optional caddy service support (by default caddy service is disabled),
it can be enabled by calling: snap set wekan caddy-enabled=true
- [Service life cycle improvements](https://github.com/wekan/wekan/pull/1495)
- [Wekan help text changes and tweaks](https://github.com/wekan/wekan/pull/1495).
and fixes the following bugs:
- [Fix: card-shadow no longer covered the page if you scroll down](https://github.com/wekan/wekan/pull/1496).
Thanks to GitHub users GhassenRjab, kubiko and stefano-pogliani for their contributions.
# v0.76 2018-02-21 Wekan release
This release adds the following new features:

View file

@ -1,8 +1,11 @@
@import 'nib'
position()
if arguments[0] == cover
position: absolute
if arguments[0] == cover || arguments[0] == fixed-cover
if arguments[0] == cover
position: absolute
else
position: fixed
left: 0
right: 0
top: 0
@ -30,7 +33,7 @@ position()
overflow-y: hidden
.board-overlay
position: cover
position: fixed-cover
top: -100px
right: -400px
background: black

View file

@ -87,6 +87,10 @@ template(name="boardHeaderBar")
a.board-header-btn-close.js-filter-reset(title="{{_ 'filter-clear'}}")
i.fa.fa-times-thin
a.board-header-btn.js-open-search-view(title="{{_ 'search'}}")
i.fa.fa-search
span {{_ 'search'}}
a.board-header-btn.js-toggle-board-view(
title="{{_ 'board-view'}}")
i.fa.fa-th-large

View file

@ -100,6 +100,9 @@ BlazeComponent.extendComponent({
Sidebar.setView();
Filter.reset();
},
'click .js-open-search-view'() {
Sidebar.setView('search');
},
'click .js-multiselection-activate'() {
const currentCard = Session.get('currentCard');
MultiSelection.activate();

View file

@ -4,6 +4,7 @@
color: white
transition: background-color 0.4s
background: #2980B9
z-index: 17
#header-main-bar
height: 40px
@ -99,6 +100,7 @@
height: 28px
font-size: 12px
display: flex
z-index: 17
#header-user-bar,
#header-new-board-icon,

View file

@ -4,6 +4,7 @@ const defaultView = 'home';
const viewTitles = {
filter: 'filter-cards',
search: 'search-cards',
multiselection: 'multi-selection',
archives: 'archives',
};

View file

@ -0,0 +1,8 @@
template(name="searchSidebar")
form.js-search-term-form
input(type="text" name="searchTerm" placeholder="{{_ 'search-example'}}" autofocus)
.list-body.js-perfect-scrollbar
.minicards.clearfix.js-minicards
each (results)
a.minicard-wrapper.js-minicard(href=absoluteUrl)
+minicard(this)

View file

@ -0,0 +1,19 @@
BlazeComponent.extendComponent({
onCreated() {
this.term = new ReactiveVar('');
},
results() {
const currentBoard = Boards.findOne(Session.get('currentBoard'));
return currentBoard.searchCards(this.term.get());
},
events() {
return [{
'submit .js-search-term-form'(evt) {
evt.preventDefault();
this.term.set(evt.target.searchTerm.value);
},
}];
},
}).register('searchSidebar');

View file

@ -0,0 +1,2 @@
input
max-width: 100%

View file

@ -331,6 +331,8 @@
"restore": "استعادة",
"save": "حفظ",
"search": "بحث",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "اختيار اللون",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

439
i18n/bg.i18n.json Normal file
View file

@ -0,0 +1,439 @@
{
"accept": "Accept",
"act-activity-notify": "[Wekan] Activity Notification",
"act-addAttachment": "attached __attachment__ to __card__",
"act-addChecklist": "added checklist __checklist__ to __card__",
"act-addChecklistItem": "added __checklistItem__ to checklist __checklist__ on __card__",
"act-addComment": "commented on __card__: __comment__",
"act-createBoard": "created __board__",
"act-createCard": "added __card__ to __list__",
"act-createList": "added __list__ to __board__",
"act-addBoardMember": "added __member__ to __board__",
"act-archivedBoard": "archived __board__",
"act-archivedCard": "archived __card__",
"act-archivedList": "archived __list__",
"act-archivedSwimlane": "archived __swimlane__",
"act-importBoard": "imported __board__",
"act-importCard": "imported __card__",
"act-importList": "imported __list__",
"act-joinMember": "added __member__ to __card__",
"act-moveCard": "moved __card__ from __oldList__ to __list__",
"act-removeBoardMember": "removed __member__ from __board__",
"act-restoredCard": "restored __card__ to __board__",
"act-unjoinMember": "removed __member__ from __card__",
"act-withBoardTitle": "[Wekan] __board__",
"act-withCardTitle": "[__board__] __card__",
"actions": "Actions",
"activities": "Activities",
"activity": "Activity",
"activity-added": "added %s to %s",
"activity-archived": "archived %s",
"activity-attached": "attached %s to %s",
"activity-created": "created %s",
"activity-excluded": "excluded %s from %s",
"activity-imported": "imported %s into %s from %s",
"activity-imported-board": "imported %s from %s",
"activity-joined": "joined %s",
"activity-moved": "moved %s from %s to %s",
"activity-on": "на %s",
"activity-removed": "removed %s from %s",
"activity-sent": "sent %s to %s",
"activity-unjoined": "unjoined %s",
"activity-checklist-added": "added checklist to %s",
"activity-checklist-item-added": "added checklist item to '%s' in %s",
"add": "Add",
"add-attachment": "Add Attachment",
"add-board": "Add Board",
"add-card": "Add Card",
"add-swimlane": "Add Swimlane",
"add-checklist": "Add Checklist",
"add-checklist-item": "Add an item to checklist",
"add-cover": "Add Cover",
"add-label": "Add Label",
"add-list": "Add List",
"add-members": "Добави членове",
"added": "Added",
"addMemberPopup-title": "Членове",
"admin": "Администратор",
"admin-desc": "Can view and edit cards, remove members, and change settings for the board.",
"admin-announcement": "Съобщение",
"admin-announcement-active": "Active System-Wide Announcement",
"admin-announcement-title": "Announcement from Administrator",
"all-boards": "All boards",
"and-n-other-card": "And __count__ other card",
"and-n-other-card_plural": "And __count__ other cards",
"apply": "Apply",
"app-is-offline": "Wekan is loading, please wait. Refreshing the page will cause data loss. If Wekan does not load, please check that Wekan server has not stopped.",
"archive": "Архив",
"archive-all": "Архивирай всички",
"archive-board": "Архивирай дъската",
"archive-card": "Архивирай картата",
"archive-list": "Архивирай списъка",
"archive-swimlane": "Архивирай коридора",
"archive-selection": "Archive selection",
"archiveBoardPopup-title": "Archive Board?",
"archived-items": "Archived Items",
"archived-boards": "Archived Boards",
"restore-board": "Restore Board",
"no-archived-boards": "No Archived Boards.",
"archives": "Archives",
"assign-member": "Assign member",
"attached": "attached",
"attachment": "Attachment",
"attachment-delete-pop": "Deleting an attachment is permanent. There is no undo.",
"attachmentDeletePopup-title": "Delete Attachment?",
"attachments": "Attachments",
"auto-watch": "Automatically watch boards when they are created",
"avatar-too-big": "The avatar is too large (70KB max)",
"back": "Back",
"board-change-color": "Change color",
"board-nb-stars": "%s stars",
"board-not-found": "Board not found",
"board-private-info": "This board will be <strong>private</strong>.",
"board-public-info": "This board will be <strong>public</strong>.",
"boardChangeColorPopup-title": "Change Board Background",
"boardChangeTitlePopup-title": "Rename Board",
"boardChangeVisibilityPopup-title": "Change Visibility",
"boardChangeWatchPopup-title": "Change Watch",
"boardMenuPopup-title": "Board Menu",
"boards": "Дъски",
"board-view": "Board View",
"board-view-swimlanes": "Коридори",
"board-view-lists": "Lists",
"bucket-example": "Like “Bucket List” for example",
"cancel": "Cancel",
"card-archived": "This card is archived.",
"card-comments-title": "This card has %s comment.",
"card-delete-notice": "Deleting is permanent. You will lose all actions associated with this card.",
"card-delete-pop": "All actions will be removed from the activity feed and you won't be able to re-open the card. There is no undo.",
"card-delete-suggest-archive": "You can archive a card to remove it from the board and preserve the activity.",
"card-due": "Due",
"card-due-on": "Due on",
"card-spent": "Spent Time",
"card-edit-attachments": "Edit attachments",
"card-edit-labels": "Edit labels",
"card-edit-members": "Edit members",
"card-labels-title": "Change the labels for the card.",
"card-members-title": "Add or remove members of the board from the card.",
"card-start": "Начало",
"card-start-on": "Starts on",
"cardAttachmentsPopup-title": "Attach From",
"cardDeletePopup-title": "Delete Card?",
"cardDetailsActionsPopup-title": "Card Actions",
"cardLabelsPopup-title": "Labels",
"cardMembersPopup-title": "Членове",
"cardMorePopup-title": "More",
"cards": "Cards",
"change": "Change",
"change-avatar": "Change Avatar",
"change-password": "Change Password",
"change-permissions": "Change permissions",
"change-settings": "Change Settings",
"changeAvatarPopup-title": "Change Avatar",
"changeLanguagePopup-title": "Change Language",
"changePasswordPopup-title": "Change Password",
"changePermissionsPopup-title": "Change Permissions",
"changeSettingsPopup-title": "Change Settings",
"checklists": "Checklists",
"click-to-star": "Click to star this board.",
"click-to-unstar": "Click to unstar this board.",
"clipboard": "Clipboard or drag & drop",
"close": "Close",
"close-board": "Close Board",
"close-board-pop": "You will be able to restore the board by clicking the “Archives” button from the home header.",
"color-black": "black",
"color-blue": "blue",
"color-green": "green",
"color-lime": "lime",
"color-orange": "orange",
"color-pink": "pink",
"color-purple": "purple",
"color-red": "red",
"color-sky": "sky",
"color-yellow": "yellow",
"comment": "Comment",
"comment-placeholder": "Write Comment",
"comment-only": "Comment only",
"comment-only-desc": "Can comment on cards only.",
"computer": "Computer",
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
"copyChecklistToManyCardsPopup-format": "[ {\"title\": \"First card title\", \"description\":\"First card description\"}, {\"title\":\"Second card title\",\"description\":\"Second card description\"},{\"title\":\"Last card title\",\"description\":\"Last card description\"} ]",
"create": "Create",
"createBoardPopup-title": "Create Board",
"chooseBoardSourcePopup-title": "Import board",
"createLabelPopup-title": "Create Label",
"current": "current",
"date": "Date",
"decline": "Decline",
"default-avatar": "Default avatar",
"delete": "Delete",
"deleteLabelPopup-title": "Delete Label?",
"description": "Description",
"disambiguateMultiLabelPopup-title": "Disambiguate Label Action",
"disambiguateMultiMemberPopup-title": "Disambiguate Member Action",
"discard": "Discard",
"done": "Done",
"download": "Download",
"edit": "Edit",
"edit-avatar": "Change Avatar",
"edit-profile": "Edit Profile",
"edit-wip-limit": "Edit WIP Limit",
"soft-wip-limit": "Soft WIP Limit",
"editCardStartDatePopup-title": "Change start date",
"editCardDueDatePopup-title": "Change due date",
"editCardSpentTimePopup-title": "Change spent time",
"editLabelPopup-title": "Change Label",
"editNotificationPopup-title": "Edit Notification",
"editProfilePopup-title": "Edit Profile",
"email": "Email",
"email-enrollAccount-subject": "An account created for you on __siteName__",
"email-enrollAccount-text": "Hello __user__,\n\nTo start using the service, simply click the link below.\n\n__url__\n\nThanks.",
"email-fail": "Sending email failed",
"email-fail-text": "Error trying to send email",
"email-invalid": "Invalid email",
"email-invite": "Invite via Email",
"email-invite-subject": "__inviter__ sent you an invitation",
"email-invite-text": "Dear __user__,\n\n__inviter__ invites you to join board \"__board__\" for collaborations.\n\nPlease follow the link below:\n\n__url__\n\nThanks.",
"email-resetPassword-subject": "Reset your password on __siteName__",
"email-resetPassword-text": "Hello __user__,\n\nTo reset your password, simply click the link below.\n\n__url__\n\nThanks.",
"email-sent": "Email sent",
"email-verifyEmail-subject": "Verify your email address on __siteName__",
"email-verifyEmail-text": "Hello __user__,\n\nTo verify your account email, simply click the link below.\n\n__url__\n\nThanks.",
"enable-wip-limit": "Enable WIP Limit",
"error-board-doesNotExist": "This board does not exist",
"error-board-notAdmin": "You need to be admin of this board to do that",
"error-board-notAMember": "You need to be a member of this board to do that",
"error-json-malformed": "Your text is not valid JSON",
"error-json-schema": "Your JSON data does not include the proper information in the correct format",
"error-list-doesNotExist": "This list does not exist",
"error-user-doesNotExist": "This user does not exist",
"error-user-notAllowSelf": "You can not invite yourself",
"error-user-notCreated": "This user is not created",
"error-username-taken": "This username is already taken",
"error-email-taken": "Email has already been taken",
"export-board": "Export board",
"filter": "Filter",
"filter-cards": "Filter Cards",
"filter-clear": "Clear filter",
"filter-no-label": "No label",
"filter-no-member": "No member",
"filter-on": "Filter is on",
"filter-on-desc": "You are filtering cards on this board. Click here to edit filter.",
"filter-to-selection": "Filter to selection",
"fullname": "Full Name",
"header-logo-title": "Go back to your boards page.",
"hide-system-messages": "Hide system messages",
"headerBarCreateBoardPopup-title": "Create Board",
"home": "Home",
"import": "Import",
"import-board": "import board",
"import-board-c": "Import board",
"import-board-title-trello": "Import board from Trello",
"import-board-title-wekan": "Import board from Wekan",
"import-sandstorm-warning": "Imported board will delete all existing data on board and replace it with imported board.",
"from-trello": "From Trello",
"from-wekan": "From Wekan",
"import-board-instruction-trello": "In your Trello board, go to 'Menu', then 'More', 'Print and Export', 'Export JSON', and copy the resulting text.",
"import-board-instruction-wekan": "In your Wekan board, go to 'Menu', then 'Export board', and copy the text in the downloaded file.",
"import-json-placeholder": "Paste your valid JSON data here",
"import-map-members": "Map members",
"import-members-map": "Your imported board has some members. Please map the members you want to import to Wekan users",
"import-show-user-mapping": "Review members mapping",
"import-user-select": "Pick the Wekan user you want to use as this member",
"importMapMembersAddPopup-title": "Select Wekan member",
"info": "Version",
"initials": "Initials",
"invalid-date": "Invalid date",
"invalid-time": "Invalid time",
"invalid-user": "Invalid user",
"joined": "joined",
"just-invited": "You are just invited to this board",
"keyboard-shortcuts": "Keyboard shortcuts",
"label-create": "Create Label",
"label-default": "%s label (default)",
"label-delete-pop": "There is no undo. This will remove this label from all cards and destroy its history.",
"labels": "Labels",
"language": "Language",
"last-admin-desc": "You cant change roles because there must be at least one admin.",
"leave-board": "Leave Board",
"leave-board-pop": "Are you sure you want to leave __boardTitle__? You will be removed from all cards on this board.",
"leaveBoardPopup-title": "Leave Board ?",
"link-card": "Link to this card",
"list-archive-cards": "Archive all cards in this list",
"list-archive-cards-pop": "This will remove all the cards in this list from the board. To view archived cards and bring them back to the board, click “Menu” > “Archived Items”.",
"list-move-cards": "Move all cards in this list",
"list-select-cards": "Select all cards in this list",
"listActionPopup-title": "List Actions",
"swimlaneActionPopup-title": "Swimlane Actions",
"listImportCardPopup-title": "Import a Trello card",
"listMorePopup-title": "More",
"link-list": "Link to this list",
"list-delete-pop": "All actions will be removed from the activity feed and you won't be able to recover the list. There is no undo.",
"list-delete-suggest-archive": "You can archive a list to remove it from the board and preserve the activity.",
"lists": "Lists",
"swimlanes": "Коридори",
"log-out": "Log Out",
"log-in": "Log In",
"loginPopup-title": "Log In",
"memberMenuPopup-title": "Member Settings",
"members": "Членове",
"menu": "Menu",
"move-selection": "Move selection",
"moveCardPopup-title": "Move Card",
"moveCardToBottom-title": "Move to Bottom",
"moveCardToTop-title": "Move to Top",
"moveSelectionPopup-title": "Move selection",
"multi-selection": "Multi-Selection",
"multi-selection-on": "Multi-Selection is on",
"muted": "Muted",
"muted-info": "You will never be notified of any changes in this board",
"my-boards": "My Boards",
"name": "Name",
"no-archived-cards": "No archived cards.",
"no-archived-lists": "No archived lists.",
"no-archived-swimlanes": "No archived swimlanes.",
"no-results": "No results",
"normal": "Normal",
"normal-desc": "Can view and edit cards. Can't change settings.",
"not-accepted-yet": "Invitation not accepted yet",
"notify-participate": "Receive updates to any cards you participate as creater or member",
"notify-watch": "Receive updates to any boards, lists, or cards youre watching",
"optional": "optional",
"or": "or",
"page-maybe-private": "This page may be private. You may be able to view it by <a href='%s'>logging in</a>.",
"page-not-found": "Page not found.",
"password": "Password",
"paste-or-dragdrop": "to paste, or drag & drop image file to it (image only)",
"participating": "Participating",
"preview": "Preview",
"previewAttachedImagePopup-title": "Preview",
"previewClipboardImagePopup-title": "Preview",
"private": "Private",
"private-desc": "This board is private. Only people added to the board can view and edit it.",
"profile": "Profile",
"public": "Public",
"public-desc": "This board is public. It's visible to anyone with the link and will show up in search engines like Google. Only people added to the board can edit.",
"quick-access-description": "Star a board to add a shortcut in this bar.",
"remove-cover": "Remove Cover",
"remove-from-board": "Remove from Board",
"remove-label": "Remove Label",
"listDeletePopup-title": "Delete List ?",
"remove-member": "Remove Member",
"remove-member-from-card": "Remove from Card",
"remove-member-pop": "Remove __name__ (__username__) from __boardTitle__? The member will be removed from all cards on this board. They will receive a notification.",
"removeMemberPopup-title": "Remove Member?",
"rename": "Rename",
"rename-board": "Rename Board",
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",
"shortcut-assign-self": "Assign yourself to current card",
"shortcut-autocomplete-emoji": "Autocomplete emoji",
"shortcut-autocomplete-members": "Autocomplete members",
"shortcut-clear-filters": "Clear all filters",
"shortcut-close-dialog": "Close Dialog",
"shortcut-filter-my-cards": "Filter my cards",
"shortcut-show-shortcuts": "Bring up this shortcuts list",
"shortcut-toggle-filterbar": "Toggle Filter Sidebar",
"shortcut-toggle-sidebar": "Toggle Board Sidebar",
"show-cards-minimum-count": "Show cards count if list contains more than",
"sidebar-open": "Open Sidebar",
"sidebar-close": "Close Sidebar",
"signupPopup-title": "Create an Account",
"star-board-title": "Click to star this board. It will show up at top of your boards list.",
"starred-boards": "Starred Boards",
"starred-boards-description": "Starred boards show up at the top of your boards list.",
"subscribe": "Subscribe",
"team": "Team",
"this-board": "this board",
"this-card": "this card",
"spent-time-hours": "Spent time (hours)",
"overtime-hours": "Overtime (hours)",
"overtime": "Overtime",
"has-overtime-cards": "Has overtime cards",
"has-spenttime-cards": "Has spent time cards",
"time": "Time",
"title": "Title",
"tracking": "Tracking",
"tracking-info": "You will be notified of any changes to those cards you are involved as creator or member.",
"unassign-member": "Unassign member",
"unsaved-description": "You have an unsaved description.",
"unwatch": "Unwatch",
"upload": "Upload",
"upload-avatar": "Upload an avatar",
"uploaded-avatar": "Uploaded an avatar",
"username": "Username",
"view-it": "View it",
"warn-list-archived": "warning: this card is in an archived list",
"watch": "Watch",
"watching": "Watching",
"watching-info": "You will be notified of any change in this board",
"welcome-board": "Welcome Board",
"welcome-swimlane": "Milestone 1",
"welcome-list1": "Basics",
"welcome-list2": "Advanced",
"what-to-do": "What do you want to do?",
"wipLimitErrorPopup-title": "Invalid WIP Limit",
"wipLimitErrorPopup-dialog-pt1": "The number of tasks in this list is higher than the WIP limit you've defined.",
"wipLimitErrorPopup-dialog-pt2": "Please move some tasks out of this list, or set a higher WIP limit.",
"admin-panel": "Admin Panel",
"settings": "Settings",
"people": "People",
"registration": "Registration",
"disable-self-registration": "Disable Self-Registration",
"invite": "Invite",
"invite-people": "Invite People",
"to-boards": "To board(s)",
"email-addresses": "Email Addresses",
"smtp-host-description": "The address of the SMTP server that handles your emails.",
"smtp-port-description": "The port your SMTP server uses for outgoing emails.",
"smtp-tls-description": "Enable TLS support for SMTP server",
"smtp-host": "SMTP Host",
"smtp-port": "SMTP Port",
"smtp-username": "Username",
"smtp-password": "Password",
"smtp-tls": "TLS support",
"send-from": "From",
"send-smtp-test": "Send a test email to yourself",
"invitation-code": "Invitation Code",
"email-invite-register-subject": "__inviter__ sent you an invitation",
"email-invite-register-text": "Dear __user__,\n\n__inviter__ invites you to Wekan for collaborations.\n\nPlease follow the link below:\n__url__\n\nAnd your invitation code is: __icode__\n\nThanks.",
"email-smtp-test-subject": "SMTP Test Email From Wekan",
"email-smtp-test-text": "You have successfully sent an email",
"error-invitation-code-not-exist": "Invitation code doesn't exist",
"error-notAuthorized": "You are not authorized to view this page.",
"outgoing-webhooks": "Outgoing Webhooks",
"outgoingWebhooksPopup-title": "Outgoing Webhooks",
"new-outgoing-webhook": "New Outgoing Webhook",
"no-name": "(Unknown)",
"Wekan_version": "Wekan version",
"Node_version": "Node version",
"OS_Arch": "OS Arch",
"OS_Cpus": "OS CPU Count",
"OS_Freemem": "OS Free Memory",
"OS_Loadavg": "OS Load Average",
"OS_Platform": "OS Platform",
"OS_Release": "OS Release",
"OS_Totalmem": "OS Total Memory",
"OS_Type": "OS Type",
"OS_Uptime": "OS Uptime",
"hours": "hours",
"minutes": "minutes",
"seconds": "seconds",
"yes": "Yes",
"no": "No",
"accounts": "Accounts",
"accounts-allowEmailChange": "Allow Email Change",
"createdAt": "Created at",
"verified": "Verified",
"active": "Active"
}

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Restaura",
"save": "Desa",
"search": "Cerca",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Selecciona color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Obnovit",
"save": "Uložit",
"search": "Hledat",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Wiederherstellen",
"save": "Speichern",
"search": "Suchen",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Farbe auswählen",
"set-wip-limit-value": "Setzen Sie ein Limit für die maximale Anzahl von Aufgaben in dieser Liste",
"setWipLimitPopup-title": "WIP-Limit setzen",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Αποθήκευση",
"search": "Αναζήτηση",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Επιλέξτε Χρώμα",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Forigi",
"save": "Savi",
"search": "Serĉi",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Restaurar",
"save": "Grabar",
"search": "Buscar",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Seleccionar Color",
"set-wip-limit-value": "Fijar un límite para el número máximo de tareas en esta lista",
"setWipLimitPopup-title": "Establecer Límite TEP",

View file

@ -331,6 +331,8 @@
"restore": "Restaurar",
"save": "Guardar",
"search": "Buscar",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Selecciona un color",
"set-wip-limit-value": "Fija un límite para el número máximo de tareas en esta lista.",
"setWipLimitPopup-title": "Fijar el límite del TEP",

View file

@ -331,6 +331,8 @@
"restore": "Berrezarri",
"save": "Gorde",
"search": "Bilatu",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Aukeratu kolorea",
"set-wip-limit-value": "Zerrenda honetako atazen muga maximoa ezarri",
"setWipLimitPopup-title": "WIP muga ezarri",

View file

@ -331,6 +331,8 @@
"restore": "بازیابی",
"save": "ذخیره",
"search": "جستجو",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Palauta",
"save": "Tallenna",
"search": "Etsi",
"search-cards": "Etsi korttien otsikoista ja kuvauksista tällä taululla",
"search-example": "Teksti jota etsitään?",
"select-color": "Valitse väri",
"set-wip-limit-value": "Aseta tämän listan tehtävien enimmäismäärä",
"setWipLimitPopup-title": "Aseta WIP-raja",

View file

@ -331,6 +331,8 @@
"restore": "Restaurer",
"save": "Enregistrer",
"search": "Chercher",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Sélectionner une couleur",
"set-wip-limit-value": "Définit une limite maximale au nombre de cartes de cette liste",
"setWipLimitPopup-title": "Définir la limite WIP",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "שחזור",
"save": "שמירה",
"search": "חיפוש",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "בחירת צבע",
"set-wip-limit-value": "הגדרת מגבלה למספר המרבי של משימות ברשימה זו",
"setWipLimitPopup-title": "הגדרת מגבלת „בעבודה”",

View file

@ -331,6 +331,8 @@
"restore": "Visszaállítás",
"save": "Mentés",
"search": "Keresés",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Szín kiválasztása",
"set-wip-limit-value": "Korlát beállítása a listán lévő feladatok legnagyobb számához",
"setWipLimitPopup-title": "WIP korlát beállítása",

View file

@ -331,6 +331,8 @@
"restore": "Pulihkan",
"save": "Simpan",
"search": "Cari",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Ripristina",
"save": "Salva",
"search": "Cerca",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Seleziona Colore",
"set-wip-limit-value": "Seleziona un limite per il massimo numero di attività in questa lista",
"setWipLimitPopup-title": "Imposta limite di work in progress",

View file

@ -331,6 +331,8 @@
"restore": "復元",
"save": "保存",
"search": "検索",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "色を選択",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "복구",
"save": "저장",
"search": "검색",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "색 선택",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Herstel",
"save": "Opslaan",
"search": "Zoek",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Selecteer kleur",
"set-wip-limit-value": "Zet een limiet voor het maximaal aantal taken in deze lijst",
"setWipLimitPopup-title": "Zet een WIP limiet",

View file

@ -331,6 +331,8 @@
"restore": "Przywróć",
"save": "Zapisz",
"search": "Wyszukaj",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Wybierz kolor",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Restaurar",
"save": "Salvar",
"search": "Buscar",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Selecionar Cor",
"set-wip-limit-value": "Defina um limite máximo para o número de tarefas nesta lista",
"setWipLimitPopup-title": "Definir Limite WIP",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Salvează",
"search": "Caută",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Восстановить",
"save": "Сохранить",
"search": "Поиск",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Выбрать цвет",
"set-wip-limit-value": "Устанавливает ограничение на максимальное количество задач в этом списке",
"setWipLimitPopup-title": "Задать лимит на кол-во задач",

View file

@ -331,6 +331,8 @@
"restore": "Oporavi",
"save": "Snimi",
"search": "Pretraga",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Återställ",
"save": "Spara",
"search": "Sök",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Välj färg",
"set-wip-limit-value": "Ange en gräns för det maximala antalet uppgifter i den här listan",
"setWipLimitPopup-title": "Ställ in WIP-gräns",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "กู้คืน",
"save": "บันทึก",
"search": "ค้นหา",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Geri Getir",
"save": "Kaydet",
"search": "Arama",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Renk Seç",
"set-wip-limit-value": "Bu listedeki en fazla öğe sayısı için bir sınır belirleyin",
"setWipLimitPopup-title": "Devam Eden İş Sınırı Belirle",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "Restore",
"save": "Save",
"search": "Search",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "Select Color",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -331,6 +331,8 @@
"restore": "还原",
"save": "保存",
"search": "搜索",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "选择颜色",
"set-wip-limit-value": "设置此列表中的最大任务数",
"setWipLimitPopup-title": "设置最大任务数",

View file

@ -331,6 +331,8 @@
"restore": "還原",
"save": "儲存",
"search": "搜尋",
"search-cards": "Search from card titles and descriptions on this board",
"search-example": "Text to search for?",
"select-color": "選擇顏色",
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
"setWipLimitPopup-title": "Set WIP Limit",

View file

@ -264,6 +264,27 @@ Boards.helpers({
Boards.direct.update(this._id, { $push: { labels: { _id, name, color } } });
return _id;
},
searchCards(term) {
check(term, Match.OneOf(String, null, undefined));
let query = { boardId: this._id };
const projection = { limit: 10, sort: { createdAt: -1 } };
if (term) {
const regex = new RegExp(term, 'i');
query = {
boardId: this._id,
$or: [
{ title: regex },
{ description: regex },
],
};
}
return Cards.find(query, projection);
},
});
Boards.mutations({

View file

@ -1,6 +1,6 @@
{
"name": "wekan",
"version": "0.76.0",
"version": "0.77.0",
"description": "The open-source Trello-like kanban",
"private": true,
"scripts": {

View file

@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
appTitle = (defaultText = "Wekan"),
# The name of the app as it is displayed to the user.
appVersion = 61,
appVersion = 62,
# Increment this for every release.
appMarketingVersion = (defaultText = "0.76.0~2018-02-21"),
appMarketingVersion = (defaultText = "0.77.0~2018-02-23"),
# Human-readable presentation of the app version.
minUpgradableAppVersion = 0,

5
snap-src/Caddyfile Normal file
View file

@ -0,0 +1,5 @@
http://:8080
proxy / localhost:3001 {
websocket
transparent
}

12
snap-src/bin/caddy-control Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
# get wekan/mongo settings
source $SNAP/bin/wekan-read-settings
if [ "$CADDY_ENABLED" = "true" ]; then
env LC_ALL=C caddy -conf=$SNAP_COMMON/Caddyfile -host=localhost:${CADDY_PORT}
else
echo "caddy is disabled. Stop service"
snapctl stop --disable ${SNAP_NAME}.caddy
# sleep here, in case snapctl fails to stop service so we do not restart too often
fi

View file

@ -1,17 +1,14 @@
#!/bin/sh
# store here all configuration options for wekan snap
# read configured settings first
SETTINGS_FILE="$SNAP_COMMON/wekan_settings.sh"
[ -f $SETTINGS_FILE ] && . $SETTINGS_FILE
# All supported keys are defined here together with descriptions and default values
# list of supported keys
keys="MONGODB_BIND_UNIX_SOCKET MONGODB_BIND_IP MONGODB_PORT MAIL_URL MAIL_FROM ROOT_URL PORT DISABLE_MONGODB"
keys="MONGODB_BIND_UNIX_SOCKET MONGODB_BIND_IP MONGODB_PORT MAIL_URL MAIL_FROM ROOT_URL PORT DISABLE_MONGODB CADDY_ENABLED CADDY_BIND_PORT"
# default values
DESCRIPTION_MONGODB_BIND_UNIX_SOCKET="mongodb binding unix socket:\n"\
"\t\t\t Default behaviour will preffer binding over unix socket, to disable unix socket binding set value to 'nill' string\n"\
"\t\t\t To bind to instance of mongo provided through contect interface set to relative path to the socket inside shared directory"
"\t\t\t To bind to instance of mongodb provided through content interface,set value to relative path to the socket inside '$SNAP_DATA/shared' directory"
DEFAULT_MONGODB_BIND_UNIX_SOCKET="$SNAP_DATA/share"
KEY_MONGODB_BIND_UNIX_SOCKET="mongodb-bind-unix-socket"
@ -39,6 +36,14 @@ DESCRIPTION_PORT="port wekan is exposed at"
DEFAULT_PORT="8080"
KEY_PORT="port"
DESCRIPTION_DISABLE_MONGODB="Disable mongodb service: use only if binding to database outside of the snap. Valid values: [true,false]"
DESCRIPTION_DISABLE_MONGODB="Disable mongodb service: use only if binding to database outside of the ${SNAP_NAME} snap. Valid values: [true,false]"
DEFAULT_DISABLE_MONGODB="false"
KEY_DISABLE_MONGODB="disable-mongodb"
DESCRIPTION_CADDY_ENABLED="Enable caddy service (caddy - Every Site on HTTPS). Set to 'true' to enable caddy\n\t\tcaddy settings are handled through $SNAP_COMMON/Caddyfile"
DEFAULT_CADDY_ENABLED="false"
KEY_CADDY_ENABLED="caddy-enabled"
DESCRIPTION_CADDY_BIND_PORT="Port on which caddy will expect proxy, value set here will be set in $SNAP_COMMON/Caddyfile"
DEFAULT_CADDY_BIND_PORT="3001"
KEY_CADDY_BIND_PORT="caddy-bind-port"

View file

@ -4,7 +4,8 @@
source $SNAP/bin/wekan-read-settings
if [ "true" == "${DISABLE_MONGODB}" ]; then
echo "mongodb is disabled. Not starting it"
echo "mongodb is disabled. Stop service"
snapctl stop --disable ${SNAP_NAME}.mongodb
exit 0
fi

View file

@ -1,8 +1,5 @@
#!/bin/bash
SYSTEMD_WEKAN_SERVICE="snap.${SNAP_NAME}.wekan"
SYSTEMD_MONGODB_SERVICE="snap.${SNAP_NAME}.mongodb"
# get wekan/mongo settings
source $SNAP/bin/wekan-read-settings

View file

@ -1,15 +1,17 @@
#!/bin/bash
source $SNAP/bin/config &>/dev/null
# first read settings
source $SNAP/bin/wekan-read-settings &>/dev/null
if [ "$CADDY_ENABLED" = "true" ]; then
# tweak port nunmber as it has been remapped
export PORT=${CADDY_PORT} &>/dev/null
fi
echo -e "Wekan: The open-source Trello-like kanban.\n"
echo -e "Make sure you have connected all interfaces, check more by calling $ snap interfaces"
echo -e "Make sure you have connected all interfaces, check more by calling $ snap interfaces ${SNAP_NAME}"
echo -e "\n"
echo -e "${SNAP_NAME} has two services, to check status/restart/stop use systemd commands"
echo -e "mongodb service:"
echo -e "\t$ sudo systemctl status/start/stop/restart snap.$SNAP_NAME.mongodb"
echo -e "wekan service"
echo -e "\t$ sudo systemctl status/start/stop/restart snap.$SNAP_NAME.wekan"
echo -e "${SNAP_NAME} has multiple services, to check status use systemctl"
echo -e "\t$ systemctl status snap.$SNAP_NAME.*"
echo -e "\n"
echo -e "To make backup of wekan's database use: $ ${SNAP_NAME}.database-backup [backup file]"
echo -e "\t backup file is optional parameter, if not passed backup is created in directory:"
@ -42,7 +44,5 @@ do
echo -e "\t\tCurrent value set to: '${!key}', (default value: '${!default_value}')"
fi
done
echo -e "\nFor changes to take effect restart wekan service,"
echo -e "if mongodb key was change also restart mongodb service, before restarting wekan"
echo -e "to restart mongodb: $ sudo systemctl restart snap.$SNAP_NAME.mongodb"
echo -e "to restart wekan: $ sudo systemctl restart snap.$SNAP_NAME.wekan"
echo -e "\n!!!! Some changes result in restart of some or all services, use with caution !!!!!"

View file

@ -0,0 +1,29 @@
#!/bin/sh
# read wekan config
source $SNAP/bin/config
for key in ${keys[@]}
do
default_value="DEFAULT_$key"
description="DESCRIPTION_$key"
snappy_key="KEY_$key"
value=$(snapctl get ${!snappy_key})
if [ "x$value" == "x" ]; then
echo -e "$key=${!default_value} (default value)"
export $key=${!default_value}
else
echo -e "$key=$value"
export $key=$value
fi
done
# if caddy is enabled, do update port settings based on caddy file
if [ "$CADDY_ENABLED" = "true" ]; then
echo "caddy is enabled, adjusting ports"
export CADDY_PORT=${PORT}
echo -e "CADDY_PORT=$CADDY_PORT"
export PORT=${CADDY_BIND_PORT}
echo -e "PORT=$PORT"
fi

View file

@ -1,36 +0,0 @@
#!/bin/sh
# read wekan config
source $SNAP/bin/config
# TODO: uncomment following, once snapctl can be called from outside the hooks
# for key in ${keys[@]}
# do
# # snappy is picky about key syntax, using mapping
# MAP_KEY="KEY_$key"
# SNAPPY_KEY=
# if value=$(snapctl get ${!MAP_KEY}); then
# echo "$key='$value'"
# export $key=$value
# else
# # use default value
# default_value="DEFAULT_$key"
# echo "using default value: $key='${!default_value}'"
# export $key=${!default_value}
# fi
# done
# TODO: get rid of this workaround once above can be used
# loop through all values, and if not defined, use default value
for key in ${keys[@]}
do
if [ "x" == "x${!key}" ]; then
# use default value
default_value="DEFAULT_$key"
echo "using default value: $key='${!default_value}'"
export $key=${!default_value}
# echo "export $key='${!def_value}'" >> $SETTINGS_FILE
else
echo "$key='${!key}'"
fi
done

51
snap/hooks/configure vendored
View file

@ -1,32 +1,35 @@
#!/bin/bash
exec >> $SNAP_COMMON/hook.log 2>&1
echo "$(date '+%Y-%m-%d %H:%M:%S') $0: Entering hook"
set -x
# read wekan config
. $SNAP/bin/config
# create run dir, we're going to use it for unix socket
mkdir -p $SNAP_DATA/share
mkdir -p $SNAP_DATA/shared
# settings were altered by user, safest way to get them applied is to restart service
# first check if caddy service is enabled
value=$(snapctl get caddy-enabled)
if [ "$value" = "true" ]; then
# update caddy file
bind_port=$(snapctl get caddy-bind-port)
port=$(snapctl get port)
[ "x" != "x${bind_port}" ] && sed -i 's|proxy / localhost:.* {|proxy / localhost:'"${bind_port}"' {|g' $SNAP_COMMON/Caddyfile
[ "x" != "x$port" ] && sed -i 's|http://:.*|http://:'"${port}"'|g' $SNAP_COMMON/Caddyfile
snapctl stop ${SNAP_NAME}.caddy 2>&1 || true
snapctl start --enable ${SNAP_NAME}.caddy 2>&1 || true
else
snapctl stop --disable ${SNAP_NAME}.caddy 2>&1 || true
fi
# TODO: remove this workaround once it's not needed
# for the moment we can't read settings outside of the hook,
# so store all settings in helpper script which is then picked by main wrapper
echo -e "#!/bin/sh\n" > $SETTINGS_FILE
for key in ${keys[@]}
do
# snappy is picky about key syntax, using mapping
MAP_KEY="KEY_$key"
if value=$(snapctl get ${!MAP_KEY}); then
echo "export $key='$value'" >> $SETTINGS_FILE
elif [ -d "${!key}" ]; then
# store back value from SETTINGS_FILE
echo "export $key='${!key}'" >> $SETTINGS_FILE
fi
done
value=$(snapctl get disable-mongodb)
if [ "$value" = "true" ]; then
snapctl stop --disable ${SNAP_NAME}.mongodb 2>&1 || true
else
snapctl stop ${SNAP_NAME}.mongodb 2>&1 || true
snapctl start --enable ${SNAP_NAME}.mongodb 2>&1 || true
fi
# set file executable
chmod 755 $SETTINGS_FILE
# we can't use snapctl to restart service, may be one day ....
echo "Setting has been updated, restart service."
# restart all services
snapctl restart ${SNAP_NAME}.wekan 2>&1 || true

12
snap/hooks/install Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
exec >> $SNAP_COMMON/hook.log 2>&1
echo "$(date '+%Y-%m-%d %H:%M:%S') $0: Entering hook"
# coppy caddy file in place
[ ! -e $SNAP_COMMON/Caddyfile ] && cp $SNAP/Caddyfile $SNAP_COMMON/Caddyfile
# create run dir, we're going to use it for unix socket
mkdir -p $SNAP_DATA/share
mkdir -p $SNAP_DATA/shared

1
snap/hooks/post-refresh Symbolic link
View file

@ -0,0 +1 @@
install

View file

@ -38,6 +38,11 @@ apps:
daemon: simple
plugs: [network, network-bind]
caddy:
command: caddy-control
daemon: simple
plugs: [network, network-bind]
help:
command: wekan-help
@ -85,6 +90,7 @@ parts:
- npm
- curl
- paxctl
- execstack
prepare: |
echo "Cleaning environment first"
rm -rf ~/.meteor ~/.npm /usr/local/lib/node_modules
@ -118,17 +124,23 @@ parts:
cp -r .build/bundle/* $SNAPCRAFT_PART_INSTALL/
cp .build/bundle/.node_version.txt $SNAPCRAFT_PART_INSTALL/
rm $SNAPCRAFT_PART_INSTALL/lib/node_modules/wekan
execstack --clear-execstack $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/rajit_bootstrap3-datepicker/lib/bootstrap-datepicker/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
organize:
README: README.wekan
helpers:
source: snap-src
plugin: dump
caddy:
plugin: dump
source: https://caddyserver.com/download/linux/amd64?plugins=
source-type: tar
organize:
wekan-control: bin/wekan-control
mongodb-control: bin/mongodb-control
wekan-read-settings: bin/wekan-read-settings
wekan-help: bin/wekan-help
mongodb-backup: bin/mongodb-backup
mongodb-restore: bin/mongodb-restore
config: bin/config
caddy: bin/caddy
CHANGES.txt: CADDY_CHANGES.txt
EULA.txt: CADDY_EULA.txt
LICENSES.txt: CADDY_LICENSES.txt
README.txt: CADDY_README.txt
stage:
- -init