mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
dd5066ab72cf97ff47cb7e8cf64c2e11e9f4472f
11 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
38b39b600c |
Adminpanel and revamped permissions (#13843)
* create Admin Panel page with initial content from Hall's admin section * reorganise Admin Panel form and add more accordians * add lastCron to fields returned by api.getHeroes * improve timestamps and authentication section * add party and quest info to Admin Panel, add party to heroAdminFields * move Admin Panel menu item to top of menu, make invisible to non-admins * remove code used for displaying all Heroes * add avatar appearance and drops section in Admin Panel * allow logged-in user to be the default hero loaded * add time zones to timestamp/authentication section * rename Items to Update Items This will allow a new Items section to be added. * add read-only Items display with button to copy data to Update Items section * remove never-used allItemsPaths code that had been copied from Hall * update tests for the attributes added to heroAdminFields * supply names for items and also set information for gear/equipment * remove code that loads subsections of content We use enough of the content that it's easier to load it all and access it through the content object, especially when we're looping through different item types. * add gear names and set details to Avatar Costume/Battle Gear section * make the wiki URLs clickable and make minor item format improvements * add gear sets for Check-In Incentives and animal ears and tails * add gear set for Gold-Purchasable Quest Lines Also merges the existing Mystery of the Masterclassers quest set into it. * fix error with Kickstarter gear set and include wiki link * improve description of check-in incentive gear set * fix description of Items section * fix lint warnings * update another test for the attributes added to heroAdminFields * allow "@" to be included when specifying Username to load * create GetHeroParty API v3 route to fetch a given user's party data Only some data from the party will be loaded (e.g., not private data such as name, description). Includes tests for the route. See the next commit for front-end changes that use this. * display data from a given user's party in admin panel Only some data from the party will be loaded (e.g., not private data such as name, description). Also adds support for finding and displaying errors from the user's data. * use new error handling method for other sections - Time zone differences - Cron bugs - Privilege removal (mute/block) - not a bug but needs to be highlighted * redirect non-admin users away from admin-only page (WIP) This needs more work. Currently, admin users are also redirected if they access the page by direct URL or after reload. * clarify source of items from Check-In Incentives and Lunar Battle quests * replace non-standard form fields with HTML forms * add user's language, remove unused export blocks * convert functions to filters: formatDate, formatTimeZone * improve display of minutes portion of time zone in Admin Panel * move basic details about user to a new component * move Timestamp/Cron/Auth/etc details to a new component - WIP, has errors The automatic expand and error warnings don't reset themselves when you fetch data for a new user. * replace non-standard form fields with HTML forms Most of this was done in |
||
|
|
d9e774dd77 |
Implement Bailey CMS API (#10739)
* Begin refactoring news API to return individual markdown posts * Implement simple bailey CMS * Prevented users with lvl less than 10 from seeing mana * Added in class checks and notification tests * Added getter use * Fixed class check * chore(i18n): update locales * 4.60.2 * remove tests that are no longer needed because we won't be purging private messages (#10670) Ref: this comment from paglias: https://github.com/HabitRPG/habitica/issues/7940#issuecomment-406489506 * remove .only * allow challenge leader/owner to view/join/modify challenge in private group they've left - fixes #9753 (#10606) * rename hasAccess to canJoin for challenges This is so the function won't be used accidentally for other purposes, since hasAccess could be misinterpretted. * add isLeader function for challenges * allow challenge leader to join/modify/end challenge when they're not in the private group it's in * delete duplicate test * clarify title of existing tests * add tests and adjust existing tests to reduce privileges of test users * fix lint errors * remove pointless isLeader check (it's checked in canJoin) * Correct Challenges tooltip in Guild view (#10667) * Fix new party member cannot join pending quest (#10648) * Saved sort selection into local storage for later use - fixes #10432 (#10655) * Saved sort selection into local storage for later use * Updated code to use userLocalManager module * Fix initial position item info when selecting one item after another (fixes #10077) (#10661) * Update lastMouseMoveEvent even when dragging an egg or potion. * Update lastMouseMoveEvent even when dragging a food item. * Refactor/market vue (#10601) * extract inventoryDrawer from market * show scrollbar only if needed * extract featuredItemsHeader / pinUtils * extract pageLayout * extract layoutSection / filterDropdown - fix sortByNumber * rollback sortByNumber order-fix * move equipment lists out of the layout-section (for now) * refactor sellModal * extract checkbox * extract equipment section * extract category row * revert scroll - remove sellModal item template * fix(lint): commas and semis * Created category item component (#10613) * extract filter sidebar * fix gemCount - fix raising the item count if the item wasn't previously owned * fixes #10659 * remove unneeded method * fix typo when importing component * feat(content): Forest Friends Quest Bundle * chore(sprites): compile * chore(i18n): update locales * 4.60.3 * fix(bcrypt): install fork compatible with Node 8 * chore(i18n): update locales * 4.60.4 * add swear words - TRIGGER / CONTENT WARNING: assault, slurs, swearwords, etc * add pinUtils-mixin - fixes #10682 (#10683) * chore(news): Bailey * chore(i18n): update locales * 4.60.5 * Improve rendering banner about sleeping in the inn See #10695 * Display settings in one column * Small Updates (#10701) * small updates * fix client unit test * fix uuid validation * Revert "Small Updates (#10701)" (#10702) This reverts commit |
||
|
|
83aca20ce5 |
Fall Festival Gem Promo (#138)
* content: add gems blocks * gemsBlocks: include ios and android identifiers * wip: promo code * split common constants into multiple files * add second promo part * geCurrentEvent, refactor promo * fix lint * fix exports, use world state api * start adding world state tests * remove console.log * use gems block for purchases * remove comments * fix most unit tests * restore comment * fix lint * prevent apple/google gift tests from breaking other tests when stub is not reset * fix unit tests, clarify tests names * iap: use gift object when gifting gems * allow gift object with less data * fix iap tests, remove findById stubs * iap: require less data from the mobile apps * apply discounts * add missing worldState file * fix lint * add test event * start removing 20 gems option for web * start adding support for all gems packages on web * fix unit tests for apple, stripe and google * amazon: support all gems blocks * paypal: support all gems blocks * fix payments unit tests, add tests for getGemsBlock * web: add gems plans with discounts, update stripe * fix amazon and paypal clients, payments success modals * amazon pay: disabled state * update icons, start abstracting payments buttons * begin redesign * redesign gems modal * fix buttons * fix hover color for gems modal close icon * add key to world state current event * extend test event length * implement gems modals designs * early test fall2020 * fix header banner position * add missing files * use iso 8601 for dates, minor ui fixes * fix time zones * events: fix ISO8601 format * fix css indentation * start abstracting banners * refactor payments buttons * test spooky, fix group plans box * implement gems promo banners, refactor banners, fixes * fix lint * fix dates * remove unused i18n strings * fix stripe integration test * fix world state integration tests * the current active event * add missing unit tests * add storybook story for payments buttons component * fix typo * fix(stripe): correct label when gifting subscriptions |
||
|
|
88de5552a0 | change blocked message | ||
|
|
d0bc0dbe49 |
Add API Call to bulk score tasks (#11389)
* Add new API call to complete multiple task scorings in one call * Improve API response * Improve saving process * Improve handling for multiple tasks scored at once * Handle challenge task errors better * Improve check for alias * Improve check for task scorings * Fix merge errors * make nodemon ignore content_cache * Fix completing group tasks * fix test * fix tests (again) * typo * WIP(a11y): task modal updates * fix(tasks): borders in modal * fix(tasks): circley locks * fix(task-modal): placeholders * WIP(task-modal): disabled states, hide empty options, +/- restyle * fix(task-modal): box shadows instead of borders, habit control pointer * fix(task-modal): button states? * fix(modal): tighten up layout, new spacing utils * fix(tasks): more stylin * fix(tasks): habit hovers * fix(css): checklist labels, a11y colors * fix(css): one more missed hover issue * fix(css): lock Challenges, label fixes * fix(css): scope input/textarea changes * fix(style): task tweakies * fix(style): more button fixage * WIP(component): start select list story * working example of a templated selectList * fix(style): more button corrections * fix(lint): EOL * fix(buttons): factor btn-secondary to better override Bootstrap * fix(styles): standardize more buttons * wip: difficulty select - style fixes * selectDifficulty works! 🎉 - fix styles * change the dropdown-item sizes only for the selectList ones * selectTranslatedArray * changed many label margins * more correct dropdown style * fix(modals): button corrections * input-group styling + datetime picker without today button * Style/margins for "repeat every" - extract selectTag.vue * working tag-selection / update - cleanup * fix stories * fix svg color on create modal (purple) * fix task modal bottom padding * correct dropdown shadow * update dropdown-toggle caret size / color * fixed checklist style * sync checked state * selectTag padding * fix spacing between positive/negative streak inputs * toggle-checkbox + fix some spacings * disable repeat-on when its a groupTask * fix new checklist-item * fix toggle-checkbox style - fix difficulty style * fix checklist ui * add tags label , when there arent any tags selected * WORKING select-tag component 🎉 * fix taglist story * show max 5 items in tag dropdown + "X more" label * fix datetime clear button * replace m-b-xs to mb-1 (bootstrap) - fix input-group-text style * fix styles of advanced settings * fix delete task styles * always show grippy on hover of the item * extract modal-text-input mixin + fix the borders/dropshadow * fix(spacing): revert most to Bootstrap * feat(checklists): make local copy of master checklist non-editable also aggressively update checklists because they weren't syncing?? * fix(checklists): handle add/remove options better * feat(teams): manager notes field * fix select/dropdown styles * input border + icon colors * delete task underline color * fix checklist "delete icon" vertical position * selectTag fixes - normal open/close toggle working again - remove icon color * fixing icons: Trash can - Delete Little X - Remove Big X - Close Block - Block * fix taglist margins / icon sizes * wip margin overview (in storybook) * fix routerlink * remove unused method * new selectTag style + add markdown inside tagList + scrollable tag selection * fix selectTag / selectList active border * fix difficulty select (svg default color) * fix input padding-left + fix reset habit streak fullwidth / padding + "repeat every" gray text (no border) * feat(teams): improved approval request > approve > reward flow * fix(tests): address failures * fix(lint): oops only * fix(tasks): short-circuit group related logic * fix(tasks): more short circuiting * fix(tasks): more lines, less lint * fix(tasks): how do i keep missing these * feat(teams): provide assigning user summary * fix(teams): don't attempt to record assiging user if not supplied * fix advanced-settings styling / margin * fix merge + hide advanced streak settings when none enabled * fix styles * set Roboto font for advanced settings * Add Challenge flag to the tag list * add tag with enter, when no other tag is found * fix styles + tag cancel button * refactor footer / margin * split repeat fields into option mt-3 groups * button all the things * fix(tasks): style updates * no hover state for non-editable tasks on team board * keep assign/claim footer on task after requesting approval * disable more fields on user copy of team task, and remove hover states for them * fix(tasks): functional revisions * "Claim Rewards" instead of "x" in task approved notif * Remove default transition supplied by Bootstrap, apply individually to some elements * Delete individual tasks and related notifications when master task deleted from team board * Manager notes now save when supplied at task initial creation * Can no longer dismiss rewards from approved task by hitting Dismiss All * fix(tasks): clean tasksOrder also adjust related test expectation * fix(tests): adjust integration expectations * fix(test): ratzen fratzen only * fix lint * fix tests * fix(teams): checklist, notes * handleSharedCompletion: handle error, make sure it is run after the user task has been saved * fix typo * correctly handle errors in handleSharedCompletion when approving a task * fix(teams): improve disabled states * handleSharedCompletion: do not increase completions by 1 manually to adjust for last approval not saved yet * revert changes to config.json.example * fix(teams): more style fixage * add unit tests for findMultipleByIdOrAlias * exclude api v4 route from apidocs * BREAKING(teams): return 202 instead of 401 for approval request * fix(teams): better taskboard sync also re-re-fix checklist borders * scoreTasks: validate body * fix tests, move string to api errors * fix(tests): update expectations for breaking change * start updating api docs, process tasks sequentially to avoid conflicts with user._tmp * do not crash entire bulk operation in case of errors * save task only if modified * fix lint * undo changes to error handling: either all tasks scoring are successfull or none * remove stale code * do not return user._tmp when bulk scoring, it would be the last version only * make sure user._tmp.leveledUp is not lost when bulk scoring * rewards tests * mixed tests * fix tests, allow scoring the same task multiple times * finish integration tests * fix api docs for the bulk score route * refactor(task-modal): lockable label component * wip loading spinner * refactor(teams): move task scoring to mixin * fix(teams): style corrections * fix(btn): fix padding to have height of 32px * implement loading spinner * remove console.log warnings * fix(tasks): spacing and wording corrections * fix(teams): don't bork manager notes * fix(teams): assignment fix and more approval flow revisions * WIP(teams): use tag dropdown control for assignment * finish merge - never throw an error when a group task requires approval (wip - needs tests) * fix taskModal merge * fix merge * fix(task modal): add newline * fix(column.vue): add newline at end of file * mvp yesterdaily modal * fix tests * fix api docs for bulk scoring group tasks * separate task scoring and _tmp handling * handle _tmp when bulk scoring * rya: close modal before calling cron API, prevents issues with modals * rya: fix conflicts with other modals * add sounds, support for group plans, analytics * use asyncResource for group plans * fix lint * streak bonus: add comment about missing in rya * move yesterdailyModal * fix issues with level up modals and rya * add comments for future use, fix level up modals not showing up at levels with a quest drop * handle errors in rya modal * bundle quest and crit notifications Co-authored-by: Phillip Thelen <phillip@habitica.com> Co-authored-by: Phillip Thelen <viirus@pherth.net> Co-authored-by: Sabe Jones <sabrecat@gmail.com> Co-authored-by: negue <eugen.bolz@gmail.com> |
||
|
|
3db2cd49a4 | fix(rate limit); more informative error message | ||
|
|
e7c8833c9a |
API v3 Rate Limiter (#12117)
* simplify ip address management by using the trust proxy express option * add setupExpress file * fix redirects middleware tests * fix lint * short circuit the ip blocking middleware * basic implementation with ip based limiting * improve logging * upgrade apidoc * apidoc: add introduction section * fix lint * fix tests * fix lint * add unit tests for rate limiter * do not send retry-after header when points are available * automatically fix lint * fix more lint issues * use userId as key for rate limit when available |
||
|
|
186b929e59 |
API-v4 route added: 'api/v4/faq' fixes #11801 (#11905)
* feat(api-v4): new /faq route added * refactor(server): change of function name in libs/content.js |
||
|
|
e39eafd3f0 | feat(event): April Foolin | ||
|
|
e8edc9669a | WIP(timetrav): buy BG with Hourglass | ||
|
|
66ecb48cda | move errors |