a0941ffa84
commit16d8b87e90Merge:07387faf486bea232d47Author: negue <eugen.bolz@gmail.com> Date: Thu Sep 14 22:30:00 2023 +0200 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commit07387faf48Author: negue <eugen.bolz@gmail.com> Date: Wed Sep 13 23:38:37 2023 +0200 remove generate promoCode from ui commit6bea232d47Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Sep 11 12:55:31 2023 -0400 build(deps): bump core-js from 3.32.1 to 3.32.2 in /website/client (#14867) Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.32.1 to 3.32.2. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/commits/v3.32.2/packages/core-js) --- updated-dependencies: - dependency-name: core-js dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commitcebb3f0f25Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Sep 11 12:43:49 2023 -0400 build(deps): bump webpack from 4.46.0 to 4.47.0 in /website/client (#14868) Bumps [webpack](https://github.com/webpack/webpack) from 4.46.0 to 4.47.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v4.46.0...v4.47.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commitea8563cd17Merge:3e16584dcf6259955891Author: negue <eugen.bolz@gmail.com> Date: Tue Aug 29 21:23:02 2023 +0200 Merge remote-tracking branch 'origin/negue/ui/setting' into negue/ui/setting commit3e16584dcfAuthor: negue <eugen.bolz@gmail.com> Date: Tue Aug 29 21:22:06 2023 +0200 fix PR comments commit84ba44fb19Author: negue <eugen.bolz@gmail.com> Date: Tue Aug 29 20:38:54 2023 +0200 fix PR comments commit6259955891Author: CuriousMagpie <eilatan@gmail.com> Date: Fri Aug 25 11:20:26 2023 -0400 update form.scss commitda82bd8e68Author: negue <eugen.bolz@gmail.com> Date: Thu Aug 24 21:40:02 2023 +0200 remove ending commit82e5fd2a83Author: negue <eugen.bolz@gmail.com> Date: Mon Aug 21 22:25:41 2023 +0200 fix spacing commit9ad06ea88bAuthor: negue <eugen.bolz@gmail.com> Date: Mon Aug 21 22:09:22 2023 +0200 clean up debug row for login methods commit41cde37675Merge:8c568060f982ebe71eb4Author: negue <eugen.bolz@gmail.com> Date: Mon Aug 21 21:51:22 2023 +0200 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commit8c568060f9Author: negue <eugen.bolz@gmail.com> Date: Mon Aug 21 21:49:31 2023 +0200 fix PR comments commit36f7a4711dMerge:d279af7897647b27c55fAuthor: negue <eugen.bolz@gmail.com> Date: Fri Aug 11 20:04:15 2023 +0200 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commitd279af7897Merge:ffbed3e044b20ea44d49Author: negue <eugen.bolz@gmail.com> Date: Wed Aug 9 21:13:37 2023 +0200 Merge branch 'negue/refactor/routes' into negue/ui/setting commitb20ea44d49Author: negue <eugen.bolz@gmail.com> Date: Wed Aug 9 21:04:12 2023 +0200 Split Vue.Router routes commitffbed3e044Author: negue <eugen.bolz@gmail.com> Date: Sun Jul 23 00:00:24 2023 +0200 remove console commit4c350b0180Author: negue <eugen.bolz@gmail.com> Date: Sat Jul 22 23:34:20 2023 +0200 update Bailey Notification Text + fix popover commitc105b9ecf9Author: negue <eugen.bolz@gmail.com> Date: Sat Jul 22 23:21:53 2023 +0200 fix change password setting commit06410b4807Author: negue <eugen.bolz@gmail.com> Date: Sat Jul 22 22:50:00 2023 +0200 fix reset account texts commitccfdd9bb9cMerge:35c75304f18558dcc3a8Author: negue <eugen.bolz@gmail.com> Date: Sat Jul 22 22:48:13 2023 +0200 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commit35c75304f1Author: negue <eugen.bolz@gmail.com> Date: Sun Jul 2 20:16:06 2023 +0200 more fixes commit203e961464Author: negue <eugen.bolz@gmail.com> Date: Sun Jul 2 19:45:17 2023 +0200 fix notification settings commitec94604791Author: negue <eugen.bolz@gmail.com> Date: Sun Jun 25 22:00:45 2023 +0200 applied same styling to promoCode.vue commit0177b3a76bAuthor: negue <eugen.bolz@gmail.com> Date: Sun Jun 25 21:41:05 2023 +0200 move promoCode.vue to pages/settings commit8fbb600273Author: negue <eugen.bolz@gmail.com> Date: Sun Jun 25 21:40:35 2023 +0200 saveCancelButtons.vue allow to hide the cancel part commit4915f2a3fbAuthor: negue <eugen.bolz@gmail.com> Date: Sun Jun 25 21:09:07 2023 +0200 Hide Transactions Page again commit8b5ae17f02Author: negue <eugen.bolz@gmail.com> Date: Sun Jun 25 20:52:03 2023 +0200 also check for invalid arguments in the password settings commitaa97ed5299Author: negue <eugen.bolz@gmail.com> Date: Sun Jun 25 20:25:53 2023 +0200 fix localhost externalLinks check commit87a4e4931bAuthor: negue <eugen.bolz@gmail.com> Date: Sun Jun 25 20:01:31 2023 +0200 show notification on username change + fix userEmail checks commit6a6f55f6fcMerge:f9ff5e5c55e49d26eacdAuthor: negue <eugen.bolz@gmail.com> Date: Sat Jun 24 22:54:00 2023 +0200 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commitf9ff5e5c55Author: negue <eugen.bolz@gmail.com> Date: Tue May 30 22:41:42 2023 +0200 check password inputs and mark invalid for "password change" setting commit4497514eebAuthor: negue <eugen.bolz@gmail.com> Date: Tue May 30 21:59:21 2023 +0200 show notification when chaning display name commit3232f12f0dAuthor: negue <eugen.bolz@gmail.com> Date: Tue May 30 21:55:25 2023 +0200 check current password valid style in "delete account" and "reset account" commit582a2f1304Author: negue <eugen.bolz@gmail.com> Date: Tue May 30 21:27:20 2023 +0200 mark password field of email setting as invalid on wrong password commit8e3b8a962aAuthor: negue <eugen.bolz@gmail.com> Date: Tue May 30 21:24:46 2023 +0200 refactor currentPasswordInput.vue to use validatedTextInput.vue commit61521507a4Author: negue <eugen.bolz@gmail.com> Date: Tue May 30 20:20:56 2023 +0200 fix username setting: - unsaved values check - @ char must be first in input, otherwise not remove it for checks commitf74c29a065Merge:c4b6f0c39cd4a5823916Author: negue <eugen.bolz@gmail.com> Date: Tue May 30 19:54:06 2023 +0200 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commitc4b6f0c39cMerge:37eee140ad6e3a367832Author: negue <eugen.bolz@gmail.com> Date: Fri May 12 22:08:08 2023 +0200 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commit37eee140adAuthor: negue <eugen.bolz@gmail.com> Date: Fri May 12 21:57:27 2023 +0200 delete account without password commit48a6801f4eAuthor: negue <eugen.bolz@gmail.com> Date: Mon May 8 22:06:29 2023 +0200 fix duplicate json entry commit47a2189f49Merge:a56b4a445749f45d27e3Author: negue <eugen.bolz@gmail.com> Date: Mon May 8 21:48:21 2023 +0200 Merge remote-tracking branch 'origin/release' into negue/ui/setting commita56b4a4457Author: negue <eugen.bolz@gmail.com> Date: Mon May 8 21:37:31 2023 +0200 show current class on setting panel commit9c973cca2aAuthor: negue <eugen.bolz@gmail.com> Date: Mon May 8 21:15:46 2023 +0200 fix selectDifficulty.vue - refactor selectList.vue commit95b37b3ba3Author: negue <eugen.bolz@gmail.com> Date: Mon May 8 20:45:09 2023 +0200 migrate restoreValues fix to new setting component commit7947b1c67dMerge:ad3e4d604a71e165433aAuthor: negue <eugen.bolz@gmail.com> Date: Mon May 8 20:41:31 2023 +0200 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commitad3e4d604aAuthor: negue <eugen.bolz@gmail.com> Date: Sat Apr 29 01:18:25 2023 +0200 style fixes commitcea13d5bc3Merge:73a5e5fcabb159182188Author: negue <eugen.bolz@gmail.com> Date: Fri Apr 28 23:58:09 2023 +0200 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commit73a5e5fcabAuthor: negue <eugen.bolz@gmail.com> Date: Tue Apr 25 20:51:14 2023 +0200 style / padding issues commit0a10eb32ccAuthor: negue <eugen.bolz@gmail.com> Date: Sat Apr 15 20:54:08 2023 +0200 fix "setting new password" invalid check commita79bec3fa5Author: negue <eugen.bolz@gmail.com> Date: Tue Apr 11 23:15:15 2023 +0200 add password for other logins commit9ff17fd6ddAuthor: negue <eugen.bolz@gmail.com> Date: Tue Apr 11 23:05:19 2023 +0200 "fix values" use keydown event to mark as change commit1f470942a9Author: negue <eugen.bolz@gmail.com> Date: Thu Apr 6 00:19:18 2023 +0200 delete old api.vue commitb4904a8b84Merge:b5da7ccc70c8b98678d0Author: negue <eugen.bolz@gmail.com> Date: Thu Apr 6 00:18:07 2023 +0200 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commitb5da7ccc70Author: negue <eugen.bolz@gmail.com> Date: Thu Apr 6 00:11:36 2023 +0200 refactor webhook ui to use save/cancel buttons commitf49f67ff5cAuthor: negue <eugen.bolz@gmail.com> Date: Wed Apr 5 22:56:37 2023 +0200 remove unused settings commitcc73b44b25Author: negue <eugen.bolz@gmail.com> Date: Wed Mar 29 23:40:30 2023 +0200 remove advancedCollapsed settings to start it opened commite0300e8710Author: negue <eugen.bolz@gmail.com> Date: Wed Mar 29 22:58:09 2023 +0200 remove displayInviteToPartyWhenPartyIs1 setting commit1741ddfc64Author: negue <eugen.bolz@gmail.com> Date: Mon Mar 20 23:00:17 2023 +0100 webhook margins commit24a43d027cAuthor: negue <eugen.bolz@gmail.com> Date: Mon Mar 20 22:40:19 2023 +0100 userid tooltip commit42fcb20bc4Author: negue <eugen.bolz@gmail.com> Date: Thu Mar 16 00:51:10 2023 +0100 remove balance for choosing class commit160848473dAuthor: negue <eugen.bolz@gmail.com> Date: Thu Mar 16 00:20:56 2023 +0100 show real class setting modal if enough gems available commitf74ba9738dAuthor: negue <eugen.bolz@gmail.com> Date: Thu Mar 16 00:10:53 2023 +0100 update apple icon and size commitbf961bc728Author: negue <eugen.bolz@gmail.com> Date: Wed Mar 15 23:59:42 2023 +0100 Copied API Token Notification commit28f0220b4eAuthor: negue <eugen.bolz@gmail.com> Date: Wed Mar 15 23:53:33 2023 +0100 remove blue color of setting links commitb53ccace95Author: negue <eugen.bolz@gmail.com> Date: Wed Mar 15 23:43:06 2023 +0100 fix username/email setting input width commit1dfa5b275dAuthor: negue <eugen.bolz@gmail.com> Date: Wed Mar 15 23:11:32 2023 +0100 developer mode commit776618d2dbAuthor: negue <eugen.bolz@gmail.com> Date: Tue Mar 14 21:11:52 2023 +0100 Add new Pause Dailies Setting commit576c80af7eMerge:dec1a1159d377b152ffdAuthor: negue <eugen.bolz@gmail.com> Date: Tue Mar 14 21:04:05 2023 +0100 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commitdec1a1159dAuthor: negue <eugen.bolz@gmail.com> Date: Tue Mar 14 21:00:52 2023 +0100 developer mode dummy row commit1e80a7d145Author: negue <eugen.bolz@gmail.com> Date: Sat Mar 11 00:03:33 2023 +0100 WIP webhook row commitcc4bedbe2dAuthor: negue <eugen.bolz@gmail.com> Date: Fri Mar 10 20:28:57 2023 +0100 add spritely login creds message to the new api-row / redirect old url to the new one commitf9833aa78aAuthor: negue <eugen.bolz@gmail.com> Date: Thu Mar 9 02:23:39 2023 +0100 API Token Row commit123c9b9bb1Author: negue <eugen.bolz@gmail.com> Date: Mon Mar 6 22:46:50 2023 +0100 "Your User Data" Row instead of Page commit0ade5663aeAuthor: negue <eugen.bolz@gmail.com> Date: Fri Mar 3 22:43:03 2023 +0100 userid row commitb4f2236ab8Author: negue <eugen.bolz@gmail.com> Date: Fri Mar 3 22:22:32 2023 +0100 rename folder of setting rows commit3b050861c4Author: negue <eugen.bolz@gmail.com> Date: Tue Feb 21 21:11:48 2023 +0100 move remaining setting to generalSettings.vue - delete site.vue - start with siteData.vue commitb09298fb01Author: negue <eugen.bolz@gmail.com> Date: Tue Feb 21 20:56:03 2023 +0100 move taskSettings.vue and add it to the settings list commit5ed25066ecAuthor: negue <eugen.bolz@gmail.com> Date: Tue Feb 21 20:06:13 2023 +0100 size/margin for transactions commit25e77cbd95Author: negue <eugen.bolz@gmail.com> Date: Tue Feb 21 19:52:12 2023 +0100 move purchaseHistory.vue commit8e4e1bcb0fMerge:bb14d09aa485c50d50e9Author: negue <eugen.bolz@gmail.com> Date: Tue Feb 21 19:04:31 2023 +0100 Merge remote-tracking branch 'origin/negue/ui/setting' into negue/ui/setting commit85c50d50e9Author: SabreCat <sabe@habitica.com> Date: Thu Feb 16 14:23:27 2023 -0600 fix(css): remove redundant formatting for a elements commitbb14d09aa4Author: negue <eugen.bolz@gmail.com> Date: Thu Feb 16 01:34:09 2023 +0100 remove console commit8c5e722c72Author: negue <eugen.bolz@gmail.com> Date: Thu Feb 16 01:26:43 2023 +0100 first try with the refactored UI of Login Methods commit9c8770051dAuthor: negue <eugen.bolz@gmail.com> Date: Sat Feb 11 19:13:16 2023 +0100 fix dayStartAdjustmentSetting.vue for 0 value commitee2ff3881bAuthor: negue <eugen.bolz@gmail.com> Date: Sat Feb 11 18:37:46 2023 +0100 fix color after refactor commit121e7485caAuthor: negue <eugen.bolz@gmail.com> Date: Sat Feb 11 18:29:00 2023 +0100 mark audioThemeSetting as changed commit98c6570003Author: negue <eugen.bolz@gmail.com> Date: Sat Feb 11 18:05:55 2023 +0100 fix ul/li style in resetAccount.vue commitfed824f705Author: negue <eugen.bolz@gmail.com> Date: Sat Feb 11 17:49:36 2023 +0100 fix color of gem price commit80365e537dAuthor: negue <eugen.bolz@gmail.com> Date: Sat Feb 11 17:44:55 2023 +0100 fix "fixValuesSetting.vue" commitd3e15c5413Author: negue <eugen.bolz@gmail.com> Date: Wed Feb 8 01:06:27 2023 +0100 open forgot password in new tab commit31edec9ec5Author: negue <eugen.bolz@gmail.com> Date: Wed Feb 8 01:03:19 2023 +0100 move validatedTextInput.vue to shared components + fix check pos/size + input-error cleanup commit2adfd8c259Author: negue <eugen.bolz@gmail.com> Date: Sun Feb 5 20:19:30 2023 +0100 hide class setting until level 10 commit64fb4c0cf9Author: negue <eugen.bolz@gmail.com> Date: Sun Feb 5 19:32:40 2023 +0100 delete old modals (refactored into new settings ui) commitb5be137a8dAuthor: negue <eugen.bolz@gmail.com> Date: Sun Feb 5 19:27:26 2023 +0100 enable forgot password link in settings commitbec75c6e12Author: negue <eugen.bolz@gmail.com> Date: Sun Feb 5 18:52:54 2023 +0100 reset account + password required in api commit64f7e7a1d9Author: negue <eugen.bolz@gmail.com> Date: Mon Jan 30 23:22:55 2023 +0100 fix compile commit7ffb5101beMerge:2bfb130b929f64633a57Author: negue <eugen.bolz@gmail.com> Date: Mon Jan 30 22:47:05 2023 +0100 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commit2bfb130b92Author: negue <eugen.bolz@gmail.com> Date: Mon Jan 30 22:44:23 2023 +0100 remove restore-modal and replace it with the finished fix values setting commit89530a133cAuthor: negue <eugen.bolz@gmail.com> Date: Wed Jan 18 19:22:36 2023 +0100 wip fix values commit428647fc71Author: negue <eugen.bolz@gmail.com> Date: Sat Jan 14 21:50:22 2023 +0100 refactor change class to design update + clean up old site.vue settings commit1f16819bc1Author: negue <eugen.bolz@gmail.com> Date: Wed Jan 11 22:41:05 2023 +0100 WIP fix values commit6fef3d0579Author: negue <eugen.bolz@gmail.com> Date: Sat Jan 7 22:51:30 2023 +0100 check for unsaved changes when pressing cancel commitbef8a4cdfcMerge:494f32c3e3c7aadede4dAuthor: negue <eugen.bolz@gmail.com> Date: Sat Jan 7 22:10:53 2023 +0100 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commit494f32c3e3Author: negue <eugen.bolz@gmail.com> Date: Wed Dec 21 00:55:31 2022 +0100 Class Setting commitbda210cfbbAuthor: negue <eugen.bolz@gmail.com> Date: Tue Dec 20 23:01:41 2022 +0100 removes username, email and display name from site.vue commit38198d7df6Author: negue <eugen.bolz@gmail.com> Date: Tue Dec 20 22:36:27 2022 +0100 WIP class setting commitdddcfa637fAuthor: negue <eugen.bolz@gmail.com> Date: Tue Dec 20 22:31:36 2022 +0100 fix styles commitce0a5cf974Author: negue <eugen.bolz@gmail.com> Date: Sun Dec 11 23:57:07 2022 +0100 Scroll into opened Setting commit7e0a95ddffAuthor: negue <eugen.bolz@gmail.com> Date: Sun Dec 11 23:43:44 2022 +0100 Audio Theme Setting commit9c556662feAuthor: negue <eugen.bolz@gmail.com> Date: Sun Dec 11 00:25:30 2022 +0100 prepare header settings but still hidden commit30d8b27534Merge:a1d1a788b2580139ff69Author: negue <eugen.bolz@gmail.com> Date: Sat Dec 10 23:36:36 2022 +0100 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commita1d1a788b2Author: negue <eugen.bolz@gmail.com> Date: Sat Dec 10 23:34:33 2022 +0100 DayStartAdjustmentSetting commitddee94a393Author: negue <eugen.bolz@gmail.com> Date: Sat Dec 10 20:00:12 2022 +0100 disable reset account button when password empty commit30a6db4c2dAuthor: negue <eugen.bolz@gmail.com> Date: Sat Dec 10 19:54:21 2022 +0100 hide & reset previous setting when switching to a different one commit78093848d7Author: negue <eugen.bolz@gmail.com> Date: Wed Dec 7 22:19:15 2022 +0100 validated text input (in/valid border color + icon) commite1b444ea63Author: negue <eugen.bolz@gmail.com> Date: Tue Dec 6 22:09:54 2022 +0100 re-enable box-shadow on hover commit96dc4e47aeAuthor: negue <negue@users.noreply.github.com> Date: Mon Nov 28 01:13:47 2022 +0100 remove console log commit69ad07daadAuthor: negue <negue@users.noreply.github.com> Date: Mon Nov 28 01:01:17 2022 +0100 dateFormatSetting commitbc11c0cf75Author: negue <negue@users.noreply.github.com> Date: Mon Nov 28 00:49:24 2022 +0100 move shared components / mixins commit0d1a189c64Author: negue <negue@users.noreply.github.com> Date: Mon Nov 28 00:44:21 2022 +0100 language Setting + imports cleanup commit29ebd89030Author: negue <negue@users.noreply.github.com> Date: Sun Nov 27 23:23:02 2022 +0100 fix icon size + fix display name valid checks commit5c7747517bMerge:fd5cbc302690b34c4dacAuthor: negue <negue@users.noreply.github.com> Date: Sun Nov 27 23:08:35 2022 +0100 Merge remote-tracking branch 'origin/release' into negue/ui/setting commitfd5cbc3026Author: negue <negue@users.noreply.github.com> Date: Wed Nov 23 00:14:21 2022 +0100 fix conflicts commit49361217b0Merge:edb427158f04e2a39a9fAuthor: negue <negue@users.noreply.github.com> Date: Wed Nov 23 00:12:38 2022 +0100 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commitedb427158fAuthor: negue <negue@users.noreply.github.com> Date: Wed Nov 23 00:03:19 2022 +0100 disable save button if nothing was changed commitc7e40e9446Author: negue <negue@users.noreply.github.com> Date: Tue Nov 22 23:36:37 2022 +0100 delete account row commit4bf740c531Author: negue <negue@users.noreply.github.com> Date: Tue Nov 22 23:14:24 2022 +0100 Shared Modal Visible State commitd718153717Author: negue <negue@users.noreply.github.com> Date: Sun Nov 20 18:06:20 2022 +0100 resetAccount commite25922f8b3Author: negue <negue@users.noreply.github.com> Date: Wed Nov 16 23:39:26 2022 +0100 rename functional components for compiler commitfdbc2c0eeeAuthor: negue <negue@users.noreply.github.com> Date: Wed Nov 16 01:44:50 2022 +0100 password setting row commit5fd5e6275aAuthor: negue <negue@users.noreply.github.com> Date: Tue Nov 15 17:35:44 2022 +0100 update package-lock.json again commit9d742fd9a1Author: negue <negue@users.noreply.github.com> Date: Tue Nov 15 17:24:15 2022 +0100 update package-lock.json commitcd588e74d5Author: negue <negue@users.noreply.github.com> Date: Mon Nov 14 02:12:39 2022 +0100 displayNameSetting.vue commit265970c5efAuthor: negue <negue@users.noreply.github.com> Date: Mon Nov 14 02:09:47 2022 +0100 fix lint commita2b510cacaMerge:0bae5fbe024dca69f14bAuthor: negue <negue@users.noreply.github.com> Date: Mon Nov 14 01:15:02 2022 +0100 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commit0bae5fbe02Author: negue <negue@users.noreply.github.com> Date: Sun Nov 13 22:00:34 2022 +0100 userEmailSetting commit23da70fa2eAuthor: negue <negue@users.noreply.github.com> Date: Sun Nov 13 20:38:14 2022 +0100 extract save / cancel buttons and the shared inlineSetting "logic" commit82047380f3Author: negue <negue@users.noreply.github.com> Date: Sun Nov 13 20:18:21 2022 +0100 first setting (username) in the new layout commit39150349c7Author: negue <negue@users.noreply.github.com> Date: Wed Nov 2 21:42:12 2022 +0100 Working on M1 - will be reverted on full merge commitf7787b318cMerge:4c0ecc993853fb28cc48Author: negue <negue@users.noreply.github.com> Date: Tue Nov 1 14:20:24 2022 +0100 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commit4c0ecc9938Merge:2f53613a4562b4315b3dAuthor: negue <negue@users.noreply.github.com> Date: Sun Oct 30 12:49:34 2022 +0100 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commit2f53613a45Author: negue <eugen.bolz@gmail.com> Date: Mon Oct 10 22:54:41 2022 +0200 split routes for ease of dev commit390f0fc69dMerge:cf222ee63a137f7d53dcAuthor: negue <eugen.bolz@gmail.com> Date: Mon Oct 10 22:50:43 2022 +0200 Merge remote-tracking branch 'origin/develop' into negue/ui/setting commitcf222ee63aAuthor: negue <eugen.bolz@gmail.com> Date: Sun Oct 2 23:15:35 2022 +0200 Update remaining Notification labels commitf837cce125Author: negue <eugen.bolz@gmail.com> Date: Sun Oct 2 22:45:12 2022 +0200 move site popup settings to notifications commitfc5181c3a7Author: negue <eugen.bolz@gmail.com> Date: Sun Oct 2 21:12:24 2022 +0200 fix styling in notification settings commit7b5568ed23Author: negue <eugen.bolz@gmail.com> Date: Sat Sep 10 16:00:56 2022 +0200 wip notification settings
1346 lines
36 KiB
Vue
1346 lines
36 KiB
Vue
<template>
|
|
<b-modal
|
|
id="task-modal"
|
|
:no-close-on-esc="true"
|
|
:no-close-on-backdrop="true"
|
|
size="sm"
|
|
:hide-footer="true"
|
|
@hidden="onClose()"
|
|
@show="syncTask()"
|
|
@shown="focusInput()"
|
|
>
|
|
<div
|
|
v-if="task"
|
|
slot="modal-header"
|
|
class="task-modal-header p-4"
|
|
:class="cssClass('bg')"
|
|
>
|
|
<div class="d-flex align-items-center mb-3">
|
|
<h2
|
|
class="my-auto"
|
|
:class="cssClass('headings')"
|
|
>
|
|
{{ title }}
|
|
</h2>
|
|
<div
|
|
class="ml-auto d-flex align-items-center"
|
|
>
|
|
<button
|
|
class="cancel-task-btn mr-3"
|
|
:class="cssClass('headings')"
|
|
type="button"
|
|
@click="cancel()"
|
|
>
|
|
{{ $t('cancel') }}
|
|
</button>
|
|
<button
|
|
class="btn btn-secondary d-flex align-items-center justify-content-center"
|
|
:class="{disabled: !canSave}"
|
|
type="button"
|
|
@click="submit()"
|
|
>
|
|
<div
|
|
v-if="purpose === 'edit'"
|
|
class="m-auto"
|
|
>
|
|
{{ $t('save') }}
|
|
</div>
|
|
<div
|
|
v-if="purpose === 'create'"
|
|
class="m-auto"
|
|
>
|
|
{{ $t('create') }}
|
|
</div>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<lockable-label
|
|
:class-override="cssClass('headings')"
|
|
:locked="challengeAccessRequired"
|
|
:text="`${$t('text')}*`"
|
|
/>
|
|
<input
|
|
ref="inputToFocus"
|
|
v-model="task.text"
|
|
class="form-control input-title"
|
|
:class="cssClass('input')"
|
|
type="text"
|
|
required="required"
|
|
spellcheck="true"
|
|
:disabled="challengeAccessRequired"
|
|
:placeholder="$t('addATitle')"
|
|
>
|
|
</div>
|
|
<div
|
|
class="form-group mb-0"
|
|
>
|
|
<div class="d-flex">
|
|
<lockable-label
|
|
class="mr-auto"
|
|
:class-override="cssClass('headings')"
|
|
:text="`${$t('notes')}`"
|
|
/>
|
|
<small
|
|
class="my-1"
|
|
>
|
|
<a
|
|
target="_blank"
|
|
href="https://habitica.fandom.com/wiki/Markdown_Cheat_Sheet"
|
|
:class="cssClass('headings')"
|
|
>{{ $t('markdownHelpLink') }}</a>
|
|
</small>
|
|
</div>
|
|
<textarea
|
|
v-model="task.notes"
|
|
class="form-control input-notes"
|
|
:class="cssClass('input')"
|
|
:placeholder="$t('addNotes')"
|
|
></textarea>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="task"
|
|
class="task-modal-content px-4"
|
|
:class="cssClass('content')"
|
|
>
|
|
<form
|
|
@submit.stop.prevent="submit()"
|
|
>
|
|
<div
|
|
v-if="task.type === 'reward'"
|
|
class="option mt-3"
|
|
>
|
|
<div class="form-group">
|
|
<label
|
|
v-once
|
|
class="mb-1"
|
|
>{{ $t('cost') }}</label>
|
|
<div class="input-group">
|
|
<div class="input-group-prepend input-group-icon align-items-center">
|
|
<div
|
|
class="svg-icon gold"
|
|
v-html="icons.gold"
|
|
></div>
|
|
</div>
|
|
<input
|
|
v-model="task.value"
|
|
class="form-control"
|
|
type="number"
|
|
required="required"
|
|
placeholder="Enter a Value"
|
|
step="0.01"
|
|
min="0"
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="checklistEnabled"
|
|
class="option mt-3"
|
|
>
|
|
<checklist
|
|
:items.sync="task.checklist"
|
|
/>
|
|
</div>
|
|
<div
|
|
v-if="task.type === 'habit'"
|
|
class="d-flex justify-content-center mt-3"
|
|
>
|
|
<button
|
|
type="button"
|
|
class="habit-option-container no-transition
|
|
d-flex flex-column justify-content-center align-items-center"
|
|
:class="!task.up ? cssClass('habit-control-disabled') : ''"
|
|
:disabled="challengeAccessRequired"
|
|
@click="toggleUpDirection()"
|
|
>
|
|
<div
|
|
class="habit-option-button no-transition
|
|
d-flex justify-content-center align-items-center mb-2"
|
|
:class="task.up ? cssClass('bg') : ''"
|
|
>
|
|
<div
|
|
class="habit-option-icon svg-icon no-transition"
|
|
:class="task.up ? '' : 'disabled'"
|
|
v-html="icons.positive"
|
|
></div>
|
|
</div>
|
|
<div
|
|
class="habit-option-label no-transition"
|
|
:class="task.up ? cssClass('icon') : 'disabled'"
|
|
>
|
|
{{ $t('positive') }}
|
|
</div>
|
|
</button>
|
|
<button
|
|
type="button"
|
|
class="habit-option-container no-transition
|
|
d-flex flex-column justify-content-center align-items-center"
|
|
:class="!task.down ? cssClass('habit-control-disabled') : ''"
|
|
:disabled="challengeAccessRequired"
|
|
@click="toggleDownDirection()"
|
|
>
|
|
<div
|
|
class="habit-option-button no-transition
|
|
d-flex justify-content-center align-items-center mb-2"
|
|
:class="task.down ? cssClass('bg') : ''"
|
|
>
|
|
<div
|
|
class="habit-option-icon no-transition svg-icon negative mx-auto"
|
|
:class="task.down ? '' : 'disabled'"
|
|
v-html="icons.negative"
|
|
></div>
|
|
</div>
|
|
<div
|
|
class="habit-option-label no-transition"
|
|
:class="task.down ? cssClass('icon') : 'disabled'"
|
|
>
|
|
{{ $t('negative') }}
|
|
</div>
|
|
</button>
|
|
</div>
|
|
<template
|
|
v-if="task.type !== 'reward'"
|
|
>
|
|
<div class="d-flex mt-3 align-items-center">
|
|
<lockable-label
|
|
:locked="challengeAccessRequired"
|
|
:text="$t('difficulty')"
|
|
/>
|
|
<information-icon
|
|
tooltip-id="difficultyHelp"
|
|
:tooltip="$t('difficultyHelp')"
|
|
/>
|
|
</div>
|
|
<select-difficulty
|
|
:value="task.priority"
|
|
:disabled="challengeAccessRequired"
|
|
@select="setDifficulty($event)"
|
|
/>
|
|
</template>
|
|
<div
|
|
v-if="task.type === 'todo' && (!challengeAccessRequired || task.date)"
|
|
class="option mt-3"
|
|
>
|
|
<div class="form-group">
|
|
<lockable-label
|
|
:locked="challengeAccessRequired"
|
|
:text="$t('dueDate')"
|
|
/>
|
|
<datepicker
|
|
:date.sync="task.date"
|
|
:disabled="challengeAccessRequired"
|
|
:highlighted="calendarHighlights"
|
|
:clear-button="true"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="task.type === 'daily'"
|
|
class="option mt-3"
|
|
>
|
|
<div class="form-group">
|
|
<lockable-label
|
|
:locked="challengeAccessRequired"
|
|
:text="$t('startDate')"
|
|
/>
|
|
<datepicker
|
|
:date.sync="task.startDate"
|
|
:disabled="challengeAccessRequired"
|
|
:highlighted="calendarHighlights"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="task.type === 'daily'"
|
|
class="option mt-3"
|
|
>
|
|
<div class="form-group">
|
|
<lockable-label
|
|
:locked="challengeAccessRequired"
|
|
:text="$t('repeats')"
|
|
/>
|
|
<select-translated-array
|
|
:disabled="challengeAccessRequired"
|
|
:items="['daily', 'weekly', 'monthly', 'yearly']"
|
|
:value="task.frequency"
|
|
@select="task.frequency = $event"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="task.type === 'daily'"
|
|
class="option mt-3"
|
|
>
|
|
<div class="form-group">
|
|
<lockable-label
|
|
:locked="challengeAccessRequired"
|
|
:text="$t('repeatEvery')"
|
|
/>
|
|
<div
|
|
class="input-group-outer"
|
|
:class="{disabled: challengeAccessRequired}"
|
|
>
|
|
<div class="input-group">
|
|
<input
|
|
v-model="task.everyX"
|
|
class="form-control"
|
|
type="number"
|
|
min="0"
|
|
max="9999"
|
|
required="required"
|
|
:disabled="challengeAccessRequired"
|
|
>
|
|
</div>
|
|
<div class="input-group-spaced input-group-text">
|
|
{{ repeatSuffix }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="task.type === 'daily' && task.frequency === 'weekly'"
|
|
class="option mt-3"
|
|
>
|
|
<div class="form-group">
|
|
<lockable-label
|
|
:locked="challengeAccessRequired"
|
|
:text="$t('repeatOn')"
|
|
/>
|
|
<div class="toggle-group">
|
|
<toggle-checkbox
|
|
v-for="(day, dayNumber) in ['su','m','t','w','th','f','s']"
|
|
:key="dayNumber"
|
|
:tab-index="dayNumber"
|
|
:checked.sync="task.repeat[day]"
|
|
:disabled="challengeAccessRequired"
|
|
:text="weekdaysMin(dayNumber)"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="task.type === 'daily' && task.frequency === 'monthly'"
|
|
class="option mt-3"
|
|
>
|
|
<label
|
|
v-once
|
|
class="d-block mb-1"
|
|
>{{ $t('repeatOn') }}</label>
|
|
<div class="form-radio">
|
|
<div class="custom-control custom-radio custom-control-inline">
|
|
<input
|
|
id="repeat-dayOfMonth"
|
|
v-model="repeatsOn"
|
|
class="custom-control-input"
|
|
type="radio"
|
|
value="dayOfMonth"
|
|
name="repeatsOn"
|
|
>
|
|
<label
|
|
class="custom-control-label"
|
|
for="repeat-dayOfMonth"
|
|
>{{ $t('dayOfMonth') }}</label>
|
|
</div>
|
|
<div class="custom-control custom-radio custom-control-inline">
|
|
<input
|
|
id="repeat-dayOfWeek"
|
|
v-model="repeatsOn"
|
|
class="custom-control-input"
|
|
type="radio"
|
|
value="dayOfWeek"
|
|
name="repeatsOn"
|
|
>
|
|
<label
|
|
class="custom-control-label"
|
|
for="repeat-dayOfWeek"
|
|
>{{ $t('dayOfWeek') }}</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="!groupId"
|
|
class="tags-select option mt-3"
|
|
>
|
|
<div class="tags-inline form-group row">
|
|
<label
|
|
v-once
|
|
class="col-12 mb-1"
|
|
>{{ $t('tags') }}</label>
|
|
<div class="col-12">
|
|
<select-multi
|
|
ref="selectTag"
|
|
:selected-items="task.tags"
|
|
:all-items="user.tags"
|
|
:add-new="true"
|
|
:empty-message="$t('addTags')"
|
|
:search-placeholder="$t('enterTag')"
|
|
@changed="task.tags = $event"
|
|
@addNew="addTag"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="task.type === 'habit' && !groupId"
|
|
class="option mt-3"
|
|
>
|
|
<div class="form-group">
|
|
<lockable-label
|
|
:locked="challengeAccessRequired"
|
|
:text="$t('resetCounter')"
|
|
/>
|
|
<select-translated-array
|
|
:disabled="challengeAccessRequired"
|
|
:items="['daily', 'weekly', 'monthly']"
|
|
:value="task.frequency"
|
|
@select="task.frequency = $event"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="groupId"
|
|
class="option group-options mt-3"
|
|
>
|
|
<div class="form-group row mt-3 mb-3">
|
|
<label
|
|
v-once
|
|
class="col-10 mb-1"
|
|
>{{ $t('assignTo') }}</label>
|
|
<a
|
|
v-if="assignedMembers.length > 0"
|
|
class="col-2 text-right mt-1"
|
|
@click="clearAssignments"
|
|
>
|
|
{{ $t('clear') }}
|
|
</a>
|
|
<div class="col-12">
|
|
<select-multi
|
|
ref="assignMembers"
|
|
:all-items="membersNameAndId"
|
|
:empty-message="$t('unassigned')"
|
|
:pill-invert="true"
|
|
:search-placeholder="$t('chooseTeamMember')"
|
|
:selected-items="assignedMembers"
|
|
@toggle="toggleAssignment($event)"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="advancedSettingsAvailable"
|
|
class="advanced-settings mt-3"
|
|
>
|
|
<div
|
|
class="advanced-settings-toggle d-flex justify-content-between align-items-center"
|
|
@click="showAdvancedOptions = !showAdvancedOptions"
|
|
>
|
|
<h3>{{ $t('advancedSettings') }}</h3>
|
|
<div class="toggle-up">
|
|
<div
|
|
class="svg-icon"
|
|
:class="{'toggle-open': showAdvancedOptions}"
|
|
v-html="icons.chevron"
|
|
></div>
|
|
</div>
|
|
</div>
|
|
<b-collapse
|
|
id="advancedOptionsCollapse"
|
|
v-model="showAdvancedOptions"
|
|
>
|
|
<div>
|
|
<div
|
|
v-if="advancedSettingsShowRestoreStreak"
|
|
class="option mt-3"
|
|
>
|
|
<div class="form-group">
|
|
<label
|
|
v-once
|
|
class="mb-1"
|
|
>{{ $t('restoreStreak') }}</label>
|
|
<div class="input-group">
|
|
<div class="input-group-prepend streak-addon input-group-icon">
|
|
<div
|
|
v-once
|
|
class="svg-icon"
|
|
v-html="icons.streak"
|
|
></div>
|
|
</div>
|
|
<input
|
|
v-model="task.streak"
|
|
class="form-control"
|
|
type="number"
|
|
min="0"
|
|
required="required"
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="advancedSettingsShowAdjustCounter"
|
|
class="option mt-3"
|
|
>
|
|
<div class="form-group">
|
|
<label
|
|
v-once
|
|
class="mb-1"
|
|
>{{ $t('adjustCounter') }}</label>
|
|
<div
|
|
class="row streak-inputs"
|
|
:class="{'both': task.up && task.down}"
|
|
>
|
|
<div
|
|
v-if="task.up"
|
|
class="positive"
|
|
:class="{'col-6': task.down, 'col-12': !task.down}"
|
|
>
|
|
<div class="input-group">
|
|
<div class="input-group-prepend positive-addon input-group-icon">
|
|
<div
|
|
v-once
|
|
class="svg-icon"
|
|
v-html="icons.positive"
|
|
></div>
|
|
</div>
|
|
<input
|
|
v-model="task.counterUp"
|
|
class="form-control"
|
|
type="number"
|
|
min="0"
|
|
required="required"
|
|
>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="task.down"
|
|
class="negative"
|
|
:class="{'col-6': task.up, 'col-12': !task.up}"
|
|
>
|
|
<div class="input-group">
|
|
<div class="input-group-prepend negative-addon input-group-icon">
|
|
<div
|
|
v-once
|
|
class="svg-icon"
|
|
v-html="icons.negative"
|
|
></div>
|
|
</div>
|
|
<input
|
|
v-model="task.counterDown"
|
|
class="form-control"
|
|
type="number"
|
|
min="0"
|
|
required="required"
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="advancedSettingsShowTaskAlias"
|
|
class="option mt-3"
|
|
>
|
|
<div class="form-group">
|
|
<label
|
|
v-once
|
|
class="mb-1"
|
|
>{{ $t('taskAlias') }}
|
|
|
|
<information-icon
|
|
tooltip-id="taskAlias"
|
|
:tooltip="$t('taskAliasPopover')"
|
|
/>
|
|
</label>
|
|
<div class="input-group">
|
|
<input
|
|
v-model="task.alias"
|
|
class="form-control"
|
|
:placeholder="$t('taskAliasPlaceholder')"
|
|
type="text"
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</b-collapse>
|
|
</div>
|
|
<div
|
|
v-if="purpose !== 'create' && !challengeAccessRequired"
|
|
class="d-flex justify-content-center mt-4 mb-4"
|
|
>
|
|
<button
|
|
class="delete-task-btn d-flex"
|
|
type="button"
|
|
@click="destroy()"
|
|
>
|
|
<div
|
|
v-once
|
|
class="svg-icon"
|
|
v-html="icons.destroy"
|
|
></div>
|
|
<span class="delete-text mt-1">
|
|
{{ $t('deleteTaskType', { type: $t(task.type) }) }}
|
|
</span>
|
|
</button>
|
|
</div>
|
|
<div
|
|
v-if="purpose === 'create'"
|
|
slot="modal-footer"
|
|
class="task-modal-footer d-flex justify-content-center align-items-center mt-4 mb-4"
|
|
>
|
|
<button
|
|
class="btn btn-primary btn-footer
|
|
d-flex align-items-center justify-content-center"
|
|
:class="{disabled: !canSave}"
|
|
type="button"
|
|
@click="submit()"
|
|
>
|
|
{{ $t('create') }}
|
|
</button>
|
|
</div>
|
|
<div
|
|
v-else
|
|
class="task-modal-footer mt-4"
|
|
>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</b-modal>
|
|
</template>
|
|
|
|
<style lang="scss">
|
|
@import '~@/assets/scss/colors.scss';
|
|
|
|
#task-modal {
|
|
a:not(.dropdown-item) {
|
|
font-size: 12px;
|
|
line-height: 1.33;
|
|
}
|
|
|
|
.modal-dialog.modal-sm {
|
|
max-width: 448px;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.custom-control-input {
|
|
z-index: -1;
|
|
opacity: 0;
|
|
}
|
|
|
|
.modal-header {
|
|
.form-group {
|
|
margin-bottom: 1rem;
|
|
}
|
|
}
|
|
|
|
.habit-option-container {
|
|
&, &:focus, &:active, &:hover {
|
|
outline: 0;
|
|
border: 0;
|
|
background: none;
|
|
}
|
|
}
|
|
|
|
.no-transition {
|
|
transition: none;
|
|
}
|
|
|
|
input, textarea {
|
|
transition-property: border-color, box-shadow, color, background;
|
|
background-color: rgba(255, 255, 255, 0.5);
|
|
&:focus:not(:disabled), &:active:not(:disabled), &:hover:not(:disabled) {
|
|
background-color: rgba(255, 255, 255, 0.75);
|
|
}
|
|
}
|
|
|
|
.modal-content {
|
|
border-radius: 8px;
|
|
border: none;
|
|
box-shadow: 0 14px 28px 0 rgba($black, 0.24), 0 10px 10px 0 rgba($black, 0.28);
|
|
}
|
|
|
|
.modal-header, .modal-body, .modal-footer {
|
|
padding: 0px;
|
|
border: none;
|
|
}
|
|
|
|
.cursor-auto {
|
|
cursor: auto;
|
|
}
|
|
|
|
.task-modal-header {
|
|
color: $white;
|
|
width: 100%;
|
|
border-top-left-radius: 8px;
|
|
border-top-right-radius: 8px;
|
|
|
|
h2 {
|
|
color: $white;
|
|
}
|
|
}
|
|
|
|
.info-icon {
|
|
float: left;
|
|
height: 16px;
|
|
width: 16px;
|
|
margin-top: 2px;
|
|
color: $gray-200;
|
|
}
|
|
|
|
.option {
|
|
position: relative;
|
|
|
|
.custom-control-label p {
|
|
word-break: break-word;
|
|
}
|
|
}
|
|
|
|
.option-item {
|
|
margin-right: 48px;
|
|
cursor: pointer;
|
|
|
|
&:last-child {
|
|
margin-right: 0px;
|
|
}
|
|
|
|
&-box {
|
|
width: 64px;
|
|
height: 64px;
|
|
border-radius: 2px;
|
|
background: $gray-600;
|
|
margin-bottom: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
&-label {
|
|
color: $gray-50;
|
|
text-align: center;
|
|
transition-property: none;
|
|
}
|
|
}
|
|
|
|
.category-wrap {
|
|
cursor: pointer;
|
|
margin-top: 0px;
|
|
width: 100%;
|
|
}
|
|
|
|
.category-box {
|
|
bottom: 0px;
|
|
left: 40px;
|
|
top: auto;
|
|
z-index: 11;
|
|
|
|
.container {
|
|
max-height: 90vh;
|
|
overflow: auto;
|
|
}
|
|
}
|
|
|
|
.datetime-buttons {
|
|
display: flex;
|
|
flex-direction: row;
|
|
|
|
.btn {
|
|
flex: 1;
|
|
}
|
|
}
|
|
|
|
.delete-task-btn, .cancel-task-btn {
|
|
border: 0;
|
|
background: none;
|
|
padding-right: 0;
|
|
color: inherit;
|
|
cursor: pointer;
|
|
|
|
&:hover, &:active, &:focus {
|
|
border: none !important;
|
|
background: none !important;
|
|
outline: none !important;
|
|
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
|
|
.delete-task-btn {
|
|
height: 1.5rem;
|
|
align-items: center;
|
|
|
|
&:hover, &:focus, &:active {
|
|
text-decoration: underline;
|
|
text-decoration-color: $maroon-50;
|
|
}
|
|
|
|
.delete-text {
|
|
font-size: 14px;
|
|
font-weight: normal;
|
|
font-stretch: normal;
|
|
font-style: normal;
|
|
line-height: 1.71;
|
|
letter-spacing: normal;
|
|
color: $maroon-50;
|
|
height: 1.5rem;
|
|
}
|
|
|
|
.svg-icon {
|
|
svg {
|
|
height: 1rem;
|
|
width: 1rem;
|
|
object-fit: contain;
|
|
display: inline;
|
|
}
|
|
|
|
margin-right: 0.5rem;
|
|
color: $maroon-50;
|
|
display: inline;
|
|
}
|
|
}
|
|
|
|
.task-modal-footer {
|
|
margin: 0;
|
|
width: 100%;
|
|
|
|
.cancel-task-btn {
|
|
margin-right: 16px;
|
|
color: $blue-10;
|
|
}
|
|
|
|
.btn-footer {
|
|
height: 2rem;
|
|
}
|
|
}
|
|
|
|
.weekday-check {
|
|
margin-left: 0px;
|
|
width: 57px;
|
|
}
|
|
|
|
.advanced-settings {
|
|
min-height: 3rem;
|
|
background-color: $gray-700;
|
|
margin-left: -1.5rem;
|
|
margin-right: -1.5rem;
|
|
|
|
padding: 0.75rem 1.5rem;
|
|
|
|
.form-group:last-of-type {
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
&-toggle {
|
|
cursor: pointer;
|
|
}
|
|
|
|
h3 {
|
|
height: 1.5rem;
|
|
// Condensed is the default for h3
|
|
font-family: Roboto;
|
|
font-size: 14px;
|
|
font-weight: bold;
|
|
font-stretch: normal;
|
|
font-style: normal;
|
|
line-height: 1.71;
|
|
letter-spacing: normal;
|
|
color: $gray-10;
|
|
margin: 0;
|
|
}
|
|
|
|
.attributes .custom-control {
|
|
margin-right: 40px;
|
|
}
|
|
|
|
.toggle-up .svg-icon {
|
|
width: 1rem;
|
|
}
|
|
|
|
.toggle-up svg {
|
|
width: 1rem;
|
|
height: 1rem;
|
|
}
|
|
|
|
.toggle-open {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.attr-description {
|
|
border-bottom: 1px dashed;
|
|
}
|
|
|
|
label {
|
|
height: 1.5rem;
|
|
letter-spacing: normal;
|
|
color: $gray-50;
|
|
}
|
|
}
|
|
|
|
.form-radio {
|
|
.custom-control {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: 768px) {
|
|
.option-item {
|
|
margin-right: 12px !important;
|
|
}
|
|
}
|
|
|
|
.streak-addon path {
|
|
fill: $gray-200;
|
|
}
|
|
</style>
|
|
|
|
<style lang="scss" scoped>
|
|
@import '~@/assets/scss/colors.scss';
|
|
|
|
.gold {
|
|
width: 1rem;
|
|
height: 1rem;
|
|
}
|
|
|
|
label {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.habit-option {
|
|
&-container {
|
|
min-width: 3rem;
|
|
|
|
&:not(:disabled) {
|
|
cursor: pointer;
|
|
}
|
|
|
|
&:first-of-type {
|
|
margin-right: 2rem;
|
|
}
|
|
}
|
|
|
|
&-button {
|
|
width: 2.5rem;
|
|
height: 2.5rem;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
&-icon {
|
|
width: 10px;
|
|
height: 10px;
|
|
color: $white;
|
|
|
|
&.disabled {
|
|
color: $gray-200;
|
|
}
|
|
|
|
&.negative {
|
|
margin-top: 0.5rem;
|
|
}
|
|
}
|
|
|
|
&-label {
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
text-align: center;
|
|
|
|
&.disabled {
|
|
color: $gray-100;
|
|
font-weight: normal;
|
|
}
|
|
}
|
|
}
|
|
|
|
input, textarea, input.form-control, textarea.form-control {
|
|
padding: 0.25rem 0.75rem;
|
|
line-height: 1.71;
|
|
}
|
|
|
|
.input-title {
|
|
height: 2rem;
|
|
}
|
|
|
|
.input-notes {
|
|
height: 3.5rem;
|
|
}
|
|
|
|
label {
|
|
font-size: 14px;
|
|
font-weight: bold;
|
|
line-height: 1.71;
|
|
}
|
|
|
|
.flex-group {
|
|
display: flex;
|
|
|
|
.flex {
|
|
flex: 1;
|
|
}
|
|
}
|
|
|
|
.streak-inputs.both {
|
|
.positive {
|
|
padding-right: 6px;
|
|
}
|
|
|
|
.negative {
|
|
padding-left: 6px;
|
|
}
|
|
}
|
|
|
|
.input-group-text {
|
|
font-size: 14px;
|
|
font-weight: bold;
|
|
font-stretch: normal;
|
|
font-style: normal;
|
|
line-height: 1.71;
|
|
letter-spacing: normal;
|
|
text-align: center;
|
|
color: $gray-50;
|
|
border: 0;
|
|
}
|
|
|
|
.disabled .input-group-text {
|
|
color: $gray-200;
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
import axios from 'axios';
|
|
import moment from 'moment';
|
|
import Datepicker from '@/components/ui/datepicker';
|
|
import toggleCheckbox from '@/components/ui/toggleCheckbox';
|
|
import markdownDirective from '@/directives/markdown';
|
|
import { mapGetters, mapActions, mapState } from '@/libs/store';
|
|
import checklist from './modal-controls/checklist';
|
|
import SelectMulti from './modal-controls/selectMulti';
|
|
import selectDifficulty from '@/components/tasks/modal-controls/selectDifficulty';
|
|
import selectTranslatedArray from '@/components/tasks/modal-controls/selectTranslatedArray';
|
|
import lockableLabel from '@/components/tasks/modal-controls/lockableLabel';
|
|
|
|
import syncTask from '../../mixins/syncTask';
|
|
|
|
import positiveIcon from '@/assets/svg/positive.svg';
|
|
import negativeIcon from '@/assets/svg/negative.svg';
|
|
import streakIcon from '@/assets/svg/streak.svg';
|
|
import deleteIcon from '@/assets/svg/delete.svg';
|
|
import goldIcon from '@/assets/svg/gold.svg';
|
|
import chevronIcon from '@/assets/svg/chevron.svg';
|
|
import calendarIcon from '@/assets/svg/calendar.svg';
|
|
import gripIcon from '@/assets/svg/grip.svg';
|
|
import InformationIcon from '@/components/ui/informationIcon.vue';
|
|
|
|
|
|
export default {
|
|
components: {
|
|
InformationIcon,
|
|
SelectMulti,
|
|
Datepicker,
|
|
checklist,
|
|
selectDifficulty,
|
|
selectTranslatedArray,
|
|
toggleCheckbox,
|
|
lockableLabel,
|
|
},
|
|
directives: {
|
|
markdown: markdownDirective,
|
|
},
|
|
mixins: [syncTask],
|
|
// purpose is either create or edit, task is the task created or edited
|
|
props: ['task', 'purpose', 'challengeId', 'groupId'],
|
|
data () {
|
|
return {
|
|
showAssignedSelect: false,
|
|
newChecklistItem: null,
|
|
icons: Object.freeze({
|
|
negative: negativeIcon,
|
|
positive: positiveIcon,
|
|
destroy: deleteIcon,
|
|
gold: goldIcon,
|
|
chevron: chevronIcon,
|
|
streak: streakIcon,
|
|
calendar: calendarIcon,
|
|
grip: gripIcon,
|
|
}),
|
|
members: [],
|
|
membersNameAndId: [],
|
|
memberNamesById: {},
|
|
assignedMembers: [],
|
|
managers: [],
|
|
showAdvancedOptions: false,
|
|
attributesStrings: {
|
|
str: 'strength',
|
|
int: 'intelligence',
|
|
con: 'constitution',
|
|
per: 'perception',
|
|
},
|
|
calendarHighlights: { dates: [new Date()] },
|
|
};
|
|
},
|
|
computed: {
|
|
...mapGetters({
|
|
getTaskClasses: 'tasks:getTaskClasses',
|
|
canDeleteTask: 'tasks:canDelete',
|
|
}),
|
|
...mapState({
|
|
user: 'user.data',
|
|
dayMapping: 'constants.DAY_MAPPING',
|
|
ATTRIBUTES: 'constants.ATTRIBUTES',
|
|
}),
|
|
// region advanced settings
|
|
advancedSettingsShowAdjustCounter () {
|
|
return this.task.type === 'habit'
|
|
&& this.isUserTask && this.purpose === 'edit'
|
|
&& (this.task.up || this.task.down);
|
|
},
|
|
advancedSettingsShowRestoreStreak () {
|
|
return this.task.type === 'daily' && this.isUserTask
|
|
&& this.purpose === 'edit';
|
|
},
|
|
advancedSettingsShowTaskAlias () {
|
|
return this.isUserTask && this.user.preferences.developerMode;
|
|
},
|
|
advancedSettingsAvailable () {
|
|
return this.advancedSettingsShowRestoreStreak
|
|
|| this.advancedSettingsShowAdjustCounter
|
|
|| this.advancedSettingsShowTaskAlias;
|
|
},
|
|
// endregion advanced settings
|
|
checklistEnabled () {
|
|
return ['daily', 'todo'].indexOf(this.task.type) > -1 && !this.isOriginalChallengeTask;
|
|
},
|
|
isChallengeTask () {
|
|
return Boolean(this.task.challenge && this.task.challenge.id);
|
|
},
|
|
isUserTask () {
|
|
return !this.challengeId && !this.groupId;
|
|
},
|
|
challengeAccessRequired () {
|
|
return this.isUserTask && this.isChallengeTask;
|
|
},
|
|
isOriginalChallengeTask () {
|
|
const isUserChallenge = Boolean(this.task.userId);
|
|
return !isUserChallenge
|
|
&& (this.challengeId || (this.task.challenge && this.task.challenge.id));
|
|
},
|
|
canDelete () {
|
|
return this.purpose !== 'create' && this.canDeleteTask(this.task);
|
|
},
|
|
canSave () {
|
|
return this.task && this.task.text && this.task.text.length > 0;
|
|
},
|
|
title () {
|
|
const type = this.$t(this.task.type);
|
|
return this.$t(this.purpose === 'edit' ? 'editATask' : 'createTask', { type });
|
|
},
|
|
repeatSuffix () {
|
|
const { task } = this;
|
|
|
|
// once changed it is a string
|
|
const everyXValue = +task.everyX;
|
|
|
|
if (task.frequency === 'daily') {
|
|
return everyXValue === 1 ? this.$t('day') : this.$t('days');
|
|
} if (task.frequency === 'weekly') {
|
|
return everyXValue === 1 ? this.$t('week') : this.$t('weeks');
|
|
} if (task.frequency === 'monthly') {
|
|
return everyXValue === 1 ? this.$t('month') : this.$t('months');
|
|
} if (task.frequency === 'yearly') {
|
|
return everyXValue === 1 ? this.$t('year') : this.$t('years');
|
|
}
|
|
return null;
|
|
},
|
|
repeatsOn: {
|
|
get () {
|
|
let repeatsOn = 'dayOfMonth';
|
|
|
|
if (this.task.type === 'daily' && this.task.weeksOfMonth && this.task.weeksOfMonth.length > 0) {
|
|
repeatsOn = 'dayOfWeek';
|
|
}
|
|
|
|
return repeatsOn;
|
|
},
|
|
set (newRepeatsOn) {
|
|
this.calculateMonthlyRepeatDays(newRepeatsOn);
|
|
},
|
|
},
|
|
selectedTags () {
|
|
return this.getTagsFor(this.task);
|
|
},
|
|
},
|
|
watch: {
|
|
task () {
|
|
this.syncTask();
|
|
},
|
|
'task.startDate': function taskStartDate () {
|
|
this.calculateMonthlyRepeatDays();
|
|
},
|
|
'task.frequency': function taskFrequency () {
|
|
this.calculateMonthlyRepeatDays();
|
|
},
|
|
},
|
|
async mounted () {
|
|
if (this.groupId) {
|
|
const groupResponse = await axios.get(`/api/v4/groups/${this.groupId}`);
|
|
this.managers = Object.keys(groupResponse.data.data.managers);
|
|
this.managers.push(groupResponse.data.data.leader._id);
|
|
}
|
|
},
|
|
methods: {
|
|
...mapActions({
|
|
saveTask: 'tasks:save',
|
|
destroyTask: 'tasks:destroy',
|
|
createTask: 'tasks:create',
|
|
createTag: 'tags:createTag',
|
|
}),
|
|
cssClass (suffix) {
|
|
if (!this.task) {
|
|
return '';
|
|
}
|
|
|
|
return this.getTaskClasses(this.task, `${this.purpose === 'edit' ? 'edit' : 'create'}-modal-${suffix}`);
|
|
},
|
|
setDifficulty (level) {
|
|
if (this.challengeAccessRequired) return;
|
|
this.task.priority = level;
|
|
},
|
|
toggleUpDirection () {
|
|
if (this.challengeAccessRequired) return;
|
|
this.task.up = !this.task.up;
|
|
},
|
|
toggleDownDirection () {
|
|
if (this.challengeAccessRequired) return;
|
|
this.task.down = !this.task.down;
|
|
},
|
|
weekdaysMin (dayNumber) {
|
|
return moment.weekdaysMin(dayNumber);
|
|
},
|
|
formattedDate (date) {
|
|
return moment(date).format('MM/DD/YYYY');
|
|
},
|
|
calculateMonthlyRepeatDays (newRepeatsOn) {
|
|
if (!this.task) return;
|
|
const { task } = this;
|
|
const repeatsOn = newRepeatsOn || this.repeatsOn;
|
|
|
|
if (task.frequency === 'monthly') {
|
|
if (repeatsOn === 'dayOfMonth') {
|
|
const date = moment(task.startDate).date();
|
|
task.weeksOfMonth = [];
|
|
task.daysOfMonth = [date];
|
|
} else if (repeatsOn === 'dayOfWeek') {
|
|
const week = Math.ceil(moment(task.startDate).date() / 7) - 1;
|
|
const dayOfWeek = moment(task.startDate).day();
|
|
const shortDay = this.dayMapping[dayOfWeek];
|
|
task.daysOfMonth = [];
|
|
task.weeksOfMonth = [week];
|
|
for (const key of Object.keys(task.repeat)) {
|
|
task.repeat[key] = false;
|
|
}
|
|
task.repeat[shortDay] = true;
|
|
}
|
|
}
|
|
},
|
|
async submit () {
|
|
if (!this.canSave) return;
|
|
if (this.newChecklistItem) this.addChecklistItem();
|
|
|
|
if (this.task.type === 'reward' && this.task.value === '') {
|
|
this.task.value = 0;
|
|
}
|
|
|
|
if (this.purpose === 'create') {
|
|
if (this.challengeId) {
|
|
const response = await this.$store.dispatch('tasks:createChallengeTasks', {
|
|
challengeId: this.challengeId,
|
|
tasks: [this.task],
|
|
});
|
|
Object.assign(this.task, response);
|
|
this.$emit('taskCreated', this.task);
|
|
} else if (this.groupId) {
|
|
const response = await this.$store.dispatch('tasks:createGroupTasks', {
|
|
groupId: this.groupId,
|
|
tasks: [this.task],
|
|
});
|
|
Object.assign(this.task, response);
|
|
await this.$store.dispatch('tasks:assignTask', {
|
|
taskId: this.task._id,
|
|
assignedUserIds: this.assignedMembers,
|
|
});
|
|
this.assignedMembers.forEach(memberId => {
|
|
if (!this.task.assignedUsersDetail) this.task.assignedUsersDetail = {};
|
|
this.task.assignedUsersDetail[memberId] = {
|
|
assignedDate: new Date(),
|
|
assigningUsername: this.user.auth.local.username,
|
|
completed: false,
|
|
};
|
|
});
|
|
this.$emit('taskCreated', this.task);
|
|
} else {
|
|
this.createTask(this.task);
|
|
}
|
|
} else {
|
|
await this.saveTask(this.task);
|
|
this.$emit('taskEdited', this.task);
|
|
}
|
|
this.$root.$emit('bv::hide::modal', 'task-modal');
|
|
},
|
|
destroy () {
|
|
const type = this.$t(this.task.type);
|
|
if (!window.confirm(this.$t('sureDeleteType', { type }))) return; // eslint-disable-line no-alert
|
|
this.destroyTask(this.task);
|
|
this.$emit('taskDestroyed', this.task);
|
|
this.$root.$emit('bv::hide::modal', 'task-modal');
|
|
},
|
|
cancel () {
|
|
this.$root.$emit('bv::hide::modal', 'task-modal');
|
|
},
|
|
onClose () {
|
|
this.newChecklistItem = '';
|
|
this.$emit('cancel');
|
|
},
|
|
async toggleAssignment (memberId) {
|
|
if (this.purpose === 'create') {
|
|
return;
|
|
}
|
|
const assignedIndex = this.assignedMembers.indexOf(memberId);
|
|
if (assignedIndex === -1) {
|
|
await this.$store.dispatch('tasks:unassignTask', {
|
|
taskId: this.task._id,
|
|
userId: memberId,
|
|
});
|
|
} else {
|
|
await this.$store.dispatch('tasks:assignTask', {
|
|
taskId: this.task._id,
|
|
assignedUserIds: [memberId],
|
|
});
|
|
}
|
|
},
|
|
async clearAssignments () {
|
|
if (this.purpose === 'edit') {
|
|
for (const assignedMember of this.assignedMembers) {
|
|
await this.$store.dispatch('tasks:unassignTask', { // eslint-disable-line no-await-in-loop
|
|
taskId: this.task._id,
|
|
userId: assignedMember,
|
|
});
|
|
}
|
|
}
|
|
this.assignedMembers = [];
|
|
},
|
|
focusInput () {
|
|
this.$refs.inputToFocus.focus();
|
|
},
|
|
async addTag (name) {
|
|
const tagResult = await this.createTag({ name });
|
|
|
|
this.task.tags.push(tagResult.id);
|
|
},
|
|
},
|
|
};
|
|
</script>
|