* update selectUserModal.vue
* more updates to selectUserModal.vue, typo fix in subscriber.json
* remove exact sizing for selectUserModal.vue
* update to size for selectUserModal.vue
* added sendGiftModal.vue file
* updates to selectUser & sendGift modals
* making the modals go & position cursor
* working working working
* added a return to method
* avatar display & placeholder profile.name and username
* subscription-options added
* added menu row & started on gem options
* Added selectPage function, have not tested.
* updated habitica-images
* state changes
* bringing in gem counter
* arranging elements
* state changes, gem input boxes
* styling sendGiftModal.vue
* more sendGiftModal.vue styling and new close.svg icon
* more styling!
* and more styling of send own gems part of page
* images update
* more styling of own gems & some attempts to adjust :class on the menu
* styling styling styling
* replace +/- svg, styling
* styling, mostly
* new SVGs
* stylin'
* reverting svg changes
* no more stylin'
* finally got the +/- icons to show up...but they're the wrong color
* solved svg icon color problem! :)
* habitica-images
* working on sendGift part of button
* trying to make it do math, failing
* more attempts at math
* +/- buttons work on gem pages & cost calculation on buyGems
* trying to get hover colors working on +/- svgs
* formatted dollar amount as currency
* css/html for subscription-options & payments-buttons simplified
* swag at payments-buttons parameter (not tested)
* send gems from own balance works!
* working on starting page
* increment gem amount limited to maxGems and not < 0
* uncommented onHide()
* got bg color on sub options to work! yay!
* payment buttons!
* making g1g1 look good
* position modal on page properly & code clean-up
* Changes as requested!
* small color update
* fixed ternary function
* chore(html): indentation and comments
* fix(fn): correct catch for under-0
* chore(json): whitespace
* update gem styling; add linebreak to notifications.vue bc linter
* updating subscriptionOptions
* snackbar css fix
* reverting commit e16c12f
* removing merge conflict markers
* just a little comment
* fixed some navigation, clear input field on selectPage, cleaned up code; another try at subscriptionOption.vue
* merge upstream/develop
* update selectPage() to disable Gems menu items when on 'ownGems' or 'buyGems' states
* working on subscriptionOptions.vue logic
* fix(script): changed props & added updateSubscriptionData()
* fix(script): forgot to call updateSubscriptionData()
* fix(scripts): corrected :userReceivingGift on sendGiftModal.vue
* fix(scripts): correct props userReceivingGift to an Object
* fix(scripts): corrected v-if & revised props
* fix(style/html/whitespace): updated css for close.svg and added missing </div>
* style(radio-buttons): updated focus states and added hover states
* style(radio-buttons): refined focus and hover states
* fix(function): changed buyGemsLink to buyGems; still working on menu
* style(radio buttons): ensured consistent display of radio buttons through-out site; still struggling with hover states
* style(radio buttons): updated focus/active/hover to match design & removed unnecessary code
* fix: set default subscription option to 1 month
* fix(function): add default amounts to gem states when modal selected from user profile
* fix(build): use develop package json
* fix: SCSS commenting & abstracted setGemsDefault()
* fix(packages): revert to develop
* fix: remove unnecessary console.log statement
Co-authored-by: SabreCat <sabe@habitica.com>
* update selectUserModal.vue
* more updates to selectUserModal.vue, typo fix in subscriber.json
* remove exact sizing for selectUserModal.vue
* update to size for selectUserModal.vue
* added sendGiftModal.vue file
* updates to selectUser & sendGift modals
* making the modals go & position cursor
* working working working
* added a return to method
* avatar display & placeholder profile.name and username
* subscription-options added
* added menu row & started on gem options
* Added selectPage function, have not tested.
* updated habitica-images
* state changes
* bringing in gem counter
* arranging elements
* state changes, gem input boxes
* styling sendGiftModal.vue
* more sendGiftModal.vue styling and new close.svg icon
* more styling!
* and more styling of send own gems part of page
* images update
* more styling of own gems & some attempts to adjust :class on the menu
* styling styling styling
* replace +/- svg, styling
* styling, mostly
* new SVGs
* stylin'
* reverting svg changes
* no more stylin'
* finally got the +/- icons to show up...but they're the wrong color
* solved svg icon color problem! :)
* habitica-images
* working on sendGift part of button
* trying to make it do math, failing
* more attempts at math
* +/- buttons work on gem pages & cost calculation on buyGems
* trying to get hover colors working on +/- svgs
* formatted dollar amount as currency
* css/html for subscription-options & payments-buttons simplified
* swag at payments-buttons parameter (not tested)
* send gems from own balance works!
* working on starting page
* increment gem amount limited to maxGems and not < 0
* uncommented onHide()
* got bg color on sub options to work! yay!
* payment buttons!
* making g1g1 look good
* position modal on page properly & code clean-up
* Changes as requested!
* small color update
* fixed ternary function
* chore(html): indentation and comments
* fix(fn): correct catch for under-0
* chore(json): whitespace
Co-authored-by: SabreCat <sabe@habitica.com>
* 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 26fdcbbee5
* move Timestamp/Cron/Auth/etc details to a new component (fixed)
* move Avatar and Drops section to a new component
* move Party and Quest section to a new component
* move Contributor Details to new component, add checkbox for admin, add preview
This adds a markdown-enabled preview of the Contributions textarea.
It also removes the code that automatically set contributor.admin
to true when the Tier was above 7.
That feature wasn't secure because the Tier can be accidentally
changed if you scroll while the cursor is over the Tier form field
(we accidentally demoted a Socialite once by doing that and if
we'd scrolled in the other direction we would have given her
admin privileges).
Instead there's now a checkbox for giving moderator-level privileges.
We'll want that anyway when we move to a system of selected
privileges for each admin instead of all admin privileges being
given to all mods/staff.
There's also a commented-out checkbox for giving Bailey CMS
privileges, for when we're ready to use that. The User model doesn't
yet have support for it.
* move Privileges and Gems section to a new component
* rename formatItems to getItemDescription; make other minor fixes
* remove an outdated test description
This "pended" explanation probably wasn't needed after "x" was
removed from "describe" in 2ab76db27c
* add newsPoster Bailey CMS permission to User model and Admin Panel
* move formatDate from mixins to filters
* make lint fixes
* remove development comments from hall.js
I'll be handling the TODO comment and I've left in my "XXX" marker
to remind me
* fix bug in Hall's castItemVal: mounts are null not false
* move Items section to a new component and delete Update Items section
The Update Items section is no longer needed because the new Items
component has in-place editing.
* remove unused imports
* add "secret" field to "Privileges, Gem Balance" section.
Also move the markdownPreview style from contributorDetails.vue to
index.vue since it's used in two components now.
* show non-Standard never-owned Pets and Mounts in Items section
* redirect non-admin users away from admin-only page
This completes the work started in commit a4f9c754ad
It now allows admins to access the page when coming from another
page on the site or from a direct link, including if the admin user
isn't logged in yet.
* display memberCount for party
* add secret.text field to Contributor Details
This is in addition to showing it in the Privileges section because
the secret text could be about either troublesome behaviour or
contributions.
* allow user to be loaded into Admin Panel via a URL
This includes:
- router config has a child route for the admin panel with a
Username/ID as a parameter
- loadHero code moved from top-level index page into a new
"user support" index page
- links in the Hall changed to point to admin panel route
- admin panel link added to admin section of user profile modal
* keep list of known titles on their own lines
* sort heroFields alphabetically
No actual changes.
* return all flags for use in Admin Panel and fix Hall tests for flags
Future Admin Panel changes will display more flags.
NB 'flags' wasn't in the tests before, even though two optional
flags were being fetched.
The tests weren't failing because the test users hadn't been given
data for those optional flags.
The primary reason for this change now is to fix the tests.
* show part of the API Token in the Admin Panel
* send full hero object into cronAndAuth.vue
This is a prelude to allowing this component to change the hero.
* split heroAdminFields string into two: one for fetching data and one for showing it
This is because apiToken must be fetched but not shown,
while apiTokenObscured is calculated (not fetched) and shown.
* let admin change a user's API Token
* restore sanity
* remove code to show obscured version of API Token
It will return with tighter permissions for viewing it.
* add Custom Day Start time (CDS) to Timestamps, Time Zone... section
* commit lint's automatic fixes - one for admin-panel changes in hall.js
The other fixes aren't related to this PR but I figured they may
as well go live.
* apply fixes from paglias's comments, excluding style/CSS changesd
The comments that this PR fixes start at
https://github.com/HabitRPG/habitica/pull/12035#pullrequestreview-500422316
Style fixes will be in a future commit.
* fix styles/CSS
* allow profile modal to close when using admin panel link
Also removes an empty components block.
* prevent Admin Panel being used without new userSupport privilege
Also adds initial support for other contributor.priv privileges
and changes Debug Menu to add userSupport privilege
* don't do this: this.hero = { ...hero };
* enhance quest error messages
* redirect to admin-panel home page when using "Save and Clear Data"
The user's ID / name is still in the form for easy refetching.
* create ensurePriv function, use in api.getHeroParty
* fix lint problems and integration tests
* add page title to top-level Admin Panel
Also add more details to a router comment (consistent with a similar
comment) in case it helps anyone.
* fix tests
* display Moderation Notes above Contributions
* lint fix
* remove placeholder code for new privileges
I had planned to have each of these implemented in stages, but
paglias wanted it all done at once. I'm afraid that's too big a
project for me to take on in a single PR so I'm cancelling
the plans for adjusting the privileges.
* Improve permission handling
* Don't report timezone error on first day
* fix lint error
* .
* Fix lint error
* fix failing tests
* Fix more tests
* .
* ..
* ...
* fix(admin): always include permissions when querying user
also remove unnecessary failing test case
* permission improvements
* show transactions in admin panel
* fix lint errors
* fix permission check
* fix(panel): missing mixin, handle empty perms object
Co-authored-by: Alys <alice.harris@oldgods.net>
Co-authored-by: SabreCat <sabe@habitica.com>
* WIP: report a bug api/ui
* fix lint
* add USER_USERNAME
* extend sendTxn tests / checks + fix bug report email
* fix lint
* add more checks to sendTxn - fix bug-report variables
* fix lint / ci
* fix test: reset email config url
* fix test stub
* fix tests
* refactor the variables checks
* lint.
* move bug-report page as a modal
* send user_email to the email
* show true/false instead 1/0
* fix issues
* fix footer report bug email if not logged in
* fix styles/margins
* prefill user's email
* show facebook email if local email not existing
* bugReportSuccessModal.vue
* add BROWSER_UA to mail properties
* extract bugReportLogic to its own lib file for unit test
* test api validators
* fix lint
* i18n string updates (issue #9210)
* change offHand to offHandCapitalized
* added removeTasks to challenge.json
* added hairBangs back to character.json
* added hairBangs back to character.json
* more hairBangs nonsense
* added hairBangs to hair-settings.vue, removed same from character.json
* changed levelUp to levelup in levelUp.vue and achievements.json
* fix duplicate string values
* fixed different strings with same content in different files
* updated test/api/v3 and test/api/v4 with messageTaskNotFound
* Delete POST-tasks_taskId_checklist_itemId_score.test.js
File got copied to a new directory, doesn't need to be here.
* fix: userID token in patrons.vue and heroes.vue
* removed: unused clock of code
* Restored eggsItemType to inventory.json
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
This is a temporary measure until we can get the form working again.
This has NOT been approved by any of Habitica's staff.
It's just being proposed for consideration.
The changes are:
- remove link from Help menu
- replace link in Contacts page with mailto admin@habitica.com without changing the visible text of the link
- replace link in Tavern sidebar with mailto admin@habitica.com using the visible text from the Contacts page
* 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
* 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>