mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 13:17:24 +01:00
* WIP(privacy): start of banner * WIP(privacy): layout rough * WIP(privacy): mobile layout, add modal * fix(privacy): implement toggle disable and setting row fold * fix(privacy): clean up a couple of styles * fix(privacy): adjust banner width at mobile sizes * WIP(privacy): remove Loggly echo of Amplitude data * fix(banners): account for privacy in snackbar position * WIP(privacy): dismiss banner * chore(analytics): update to maintaned GA4 library * fix(tests): lint, misuse of apiError * fix(analytics): add debug mode * fix(analytics): load new library on client * WIP(privacy): gtag.js based implementation * fix(analytics): lint issues * fix(lint): one more unused * fix(lint): client errors * feat(privacy): draft workflows * fix(analytics): linting, send needed user values * fix(tests): use mock analytics service in test env * fix(tests): restore previous logic for node env * feat(intro): jump to page 2 onboarding * WIP(auth): revisions to registration flow * WIP(privacy): landing page and banner revisions * WIP(signup): added new username, tos, privacy state * fix(signup): revert debugging logic * WIP(signup): add defaulting and checkbox * wip(signup): move social auth behind username screen * Squashed commit of the following: commit ca0a238e5f008525ed154c5eaf12e44f2fc22b00 Author: Phillip Thelen <phillip@habitica.com> Date: Wed May 7 12:17:20 2025 +0200 make emails lowercase commit a2ce748558ce9134e6825208a7e66d78e720202e Author: Phillip Thelen <phillip@habitica.com> Date: Wed Apr 9 13:27:01 2025 +0200 remove unused import commit cc6ce6c388d9693cf192c4bea733931fc8c31c37 Author: Phillip Thelen <phillip@habitica.com> Date: Wed Apr 9 13:13:03 2025 +0200 add tests for new api route commit 0d40a6230b548625482aa9f6831c93ed9d62533a Author: Kalista Payne <sabrecat@gmail.com> Date: Wed Jun 18 15:50:22 2025 -0500 update social tests commit 79177d6754589b9e54682af8a531b63f60215dab Author: Phillip Thelen <phillip@habitica.com> Date: Wed Apr 9 10:21:51 2025 +0200 new api route to check if an email is available commit 11df73fe07eeb730c2a95593e18e14a931f52429 Author: Phillip Thelen <phillip@habitica.com> Date: Wed Apr 9 10:21:39 2025 +0200 Add field to not register social account when called * Squashed commit of the following: commitb8a2f0b8eeAuthor: CuriousMagpie <eilatan@gmail.com> Date: Thu Jun 20 17:18:30 2024 -0400 update privacy policy * fix(vite): import syntax * feat(auth): precheck on defaulted username * feat(auth): add store action for check-email * feat(auth): check email before proceeding * WIP(login): refactor username screen * WIP(auth): complete login/reg flow * fix(auth): filter out expected 404 * fix(login): use allowRegister with Apple and add z-index to component * fix(login): style corrections and email passthru * Fix edgecase Signed-off-by: Kalista Payne <sabrecat@gmail.com> * fix(auth): correct error behaviors * fix(auth): rewire Apple auth * make check-email check for restricted domains Signed-off-by: Kalista Payne <kalista@habitica.com> * fix(signup): all the style * fix(express): return when responding * fix(error): reduce specificity for restricted domain issue * fix apple auth Signed-off-by: Kalista Payne <kalista@habitica.com> * fix(signup): change from blur to 500ms debounce * fix(login): add missing 200 response in Apple flow * fix(signup): more reconciliation with @phillipthelen's work * fix(signup): now using token not code * fix(reg): don't bail on Apple if we're allowing reg * fix(auth): more reconciliation with @phillipthelen code * feat(copy): privacy policy updates * fix(copy): replace placeholder * fix(vue): use Vite syntax for scss import * fix(static): corrections to copy and css * chore(style): remove excess whitespace * use correct error Signed-off-by: Kalista Payne <kalista@habitica.com> * fix(layout): inputs, add privacy banner * fix(login): button hover, more validation states * fix(login): further layout and UX corrections * fix(static): add back containing div for show/hide * fix(apple): clean out Apple token * fix(settings): only change preference on save * fix(settings): correct save/cancel behavior * fix(layout): consistent use of header/footer * fix(layout): reposition mountains for reg/login/forgot * fix(signup): partial rollback of /username route * refactor(signup): move /username to page * fix(apple): don't overwrite reg method * fix(username): don't skip empty validation * fix(input): don't show valid if no username * fix(login): clean out Apple token if using another method * fix(apple): possible race with token * fix(tests): some housekeeping * fix(config): copypasta * fix(lint): various cleanup * fix(lint): line squeeze * fix(lint): one more v-for * fix(groups): funnel invite flow to new username page * Squashed commit of the following: commit 3c5ba4bf24e4bb7996786520101f27ad66405bce Author: Kalista Payne <kalista@habitica.com> Date: Mon Aug 18 14:38:31 2025 -0500 fix(privacy): update link ref commit9d216f623bAuthor: Kalista Payne <kalista@habitica.com> Date: Mon Aug 18 14:18:22 2025 -0500 fix(privacy-tos): copy edits cont'd commitd744f47140Author: Kalista Payne <kalista@habitica.com> Date: Mon Aug 18 13:43:22 2025 -0500 fix(privacy): copy edits and ToC reflow commit2c3c3fc9ceAuthor: Phillip Thelen <phillip@habitica.com> Date: Mon Aug 18 18:46:24 2025 +0200 lint commitcf363034d5Author: Phillip Thelen <phillip@habitica.com> Date: Mon Aug 18 18:34:54 2025 +0200 fix link commit3afacd2c05Author: Phillip Thelen <phillip@habitica.com> Date: Mon Aug 18 18:34:42 2025 +0200 add updated terms commit258b722499Author: Phillip Thelen <phillip@habitica.com> Date: Mon Aug 18 17:58:42 2025 +0200 put back button to show/hide third party info commit2992e0299bAuthor: Phillip Thelen <phillip@habitica.com> Date: Mon Aug 18 17:58:32 2025 +0200 minor edits commitbb5e252299Author: Kalista Payne <kalista@habitica.com> Date: Sun Aug 17 21:01:50 2025 -0500 fix(privacy): update Section 3 commitc79af7baa8Author: Kalista Payne <kalista@habitica.com> Date: Fri Aug 15 17:28:49 2025 -0500 fix(privacy): various copy edits commit100f2f4574Author: Phillip Thelen <phillip@habitica.com> Date: Fri Aug 15 11:37:37 2025 +0200 add newline commit11d1cfd0d9Author: Phillip Thelen <phillip@habitica.com> Date: Fri Aug 15 11:10:01 2025 +0200 update privacy policy commit59b99badf3Author: Kalista Payne <kalista@habitica.com> Date: Fri Aug 8 14:04:19 2025 -0500 5.38.2 commit78daeb4191Author: Kalista Payne <kalista@habitica.com> Date: Fri Aug 8 13:36:19 2025 -0500 fix(apple): don't run auth middleware during redirect commit93f8d60903Author: Weblate <noreply@weblate.org> Date: Fri Aug 8 10:12:25 2025 +0200 Translated using Weblate (German) Currently translated at 99.4% (185 of 186 strings) Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (186 of 186 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (186 of 186 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (54 of 54 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (243 of 243 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (15 of 15 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (47 of 47 strings) Translated using Weblate (Dutch) Currently translated at 78.0% (2643 of 3385 strings) Translated using Weblate (Dutch) Currently translated at 40.8% (100 of 245 strings) Translated using Weblate (Polish) Currently translated at 89.9% (233 of 259 strings) Translated using Weblate (Dutch) Currently translated at 67.5% (175 of 259 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (914 of 914 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (110 of 110 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (914 of 914 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (914 of 914 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 20.8% (51 of 245 strings) Translated using Weblate (Turkish) Currently translated at 65.9% (60 of 91 strings) Translated using Weblate (Turkish) Currently translated at 65.9% (60 of 91 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 17.9% (44 of 245 strings) Co-authored-by: FingerTiao <787170918@qq.com> Co-authored-by: Jaime Martí <jaumemarti77@icloud.com> Co-authored-by: Karmelkowy <kicimeow.karmelio@gmail.com> Co-authored-by: Linsey Dunya Pastoor <sekai.creations@gmail.com> Co-authored-by: Mete Olmez <metezori27@gmail.com> Co-authored-by: Sefa Uğurlu <ugurlusefa2@gmail.com> Co-authored-by: Summer_GUI <heyang94@163.com> Co-authored-by: Toro Mor <thomas.bizer@gmx.de> Co-authored-by: Weblate <noreply@weblate.org> Co-authored-by: innnko <ayakabooker@gmail.com> Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/challenge/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/tr/ Translate-URL: https://translate.habitica.com/projects/habitica/contrib/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/death/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/defaulttasks/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/faq/nl/ Translate-URL: https://translate.habitica.com/projects/habitica/faq/zh_Hant/ Translate-URL: https://translate.habitica.com/projects/habitica/front/de/ Translate-URL: https://translate.habitica.com/projects/habitica/front/es/ Translate-URL: https://translate.habitica.com/projects/habitica/front/zh_Hans/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translate-URL: https://translate.habitica.com/projects/habitica/generic/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/settings/nl/ Translate-URL: https://translate.habitica.com/projects/habitica/settings/pl/ Translation: Habitica/Backgrounds Translation: Habitica/Challenge Translation: Habitica/Communityguidelines Translation: Habitica/Contrib Translation: Habitica/Death Translation: Habitica/Defaulttasks Translation: Habitica/Faq Translation: Habitica/Front Translation: Habitica/Gear Translation: Habitica/Generic Translation: Habitica/Settings commiteb16fec41eAuthor: Phillip Thelen <phillip@habitica.com> Date: Wed Aug 6 22:08:07 2025 +0200 Add interface to block ip-addresses or clients due to abuse (#15484) * Read IP blocks from database * begin building general blocking solution * add new frontend files * Add UI for managing blockers * correctly reset local data after creating blocker * Tweak wording * Add UI for managing blockers * restructure admin pages * improve test coverage * Improve blocker UI * add blocker to block emails from registration * lint fix * fix * lint fixes * fix import * add new permission for managing blockers * improve permission check * fix managing permissions from admin * improve navbar display for non fullAccess admin * update block error strings * lint fix * add option to errorHandler to skip logging * validate blocker value during input * improve blocker form display * chore(subproj): reconcile habitica-images * fix(scripts): use same Mongo version for dev/test * fix(whitespace): eof * documentation improvements * remove nconf import * remove old test --------- Co-authored-by: Kalista Payne <kalista@habitica.com> Co-authored-by: Kalista Payne <sabrecat@gmail.com> commit47d832bf12Author: Fiz <34069775+Hafizzle@users.noreply.github.com> Date: Tue Aug 5 15:12:44 2025 -0500 Add backend support for Hydra mount (#15482) * chore: update time travelers shop to display seasonal backgrounds * chore: update time travelers banner (note CSS borken rn) * chore: fix borken CSS and update logic in shop * chore: added isSubscribed function, not working * chore: isSubscribed working but no bg for subscribers * chore: logic and css updates * chore: update habitica-images * chore: add check for trinket * chore: more time traveler shop logicking * Add backend support for Hydra mount - Add Dragon-Hydra to special mounts in stable.js - Configure as contributor level 7 reward with canFind: true - Add GIF format support for mount sprites - Enable admin panel granting capability * Fix Vue template errors in timeTravelers component * Fix duplicate template block in timeTravelers component * add CSS for Hydra mount GIF sprites Added CSS rules for Mount_Head_Dragon-Hydra and Mount_Body_Dragon-Hydra GIF sprites * Remove the separate Hydra mount dimension declaration --------- Co-authored-by: CuriousMagpie <eilatan@gmail.com> commitc03ab9855fAuthor: Kalista Payne <kalista@habitica.com> Date: Tue Aug 5 14:31:05 2025 -0500 5.38.1 commit8f96b7b7fdAuthor: Weblate <noreply@weblate.org> Date: Tue Aug 5 13:02:45 2025 +0200 Translated using Weblate (Chinese (Traditional)) Currently translated at 17.1% (42 of 245 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 16.7% (41 of 245 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 16.3% (40 of 245 strings) Translated using Weblate (Polish) Currently translated at 100.0% (914 of 914 strings) Translated using Weblate (Japanese) Currently translated at 98.8% (425 of 430 strings) Translated using Weblate (French) Currently translated at 99.4% (184 of 185 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 15.9% (39 of 245 strings) Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (268 of 268 strings) Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (3385 of 3385 strings) Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (185 of 185 strings) Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (914 of 914 strings) Translated using Weblate (Chinese (Simplified)) Currently translated at 99.8% (3379 of 3385 strings) Translated using Weblate (Polish) Currently translated at 95.5% (128 of 134 strings) Translated using Weblate (Japanese) Currently translated at 94.7% (254 of 268 strings) Translated using Weblate (Polish) Currently translated at 94.0% (126 of 134 strings) Translated using Weblate (Japanese) Currently translated at 98.6% (424 of 430 strings) Translated using Weblate (Japanese) Currently translated at 98.3% (423 of 430 strings) Translated using Weblate (Japanese) Currently translated at 92.5% (798 of 862 strings) Translated using Weblate (Japanese) Currently translated at 92.4% (797 of 862 strings) Translated using Weblate (Japanese) Currently translated at 90.6% (781 of 862 strings) Translated using Weblate (Japanese) Currently translated at 91.9% (3112 of 3385 strings) Translated using Weblate (Japanese) Currently translated at 91.9% (3111 of 3385 strings) Translated using Weblate (Japanese) Currently translated at 94.0% (174 of 185 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (259 of 259 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (8 of 8 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 15.5% (38 of 245 strings) Translated using Weblate (Japanese) Currently translated at 91.6% (3104 of 3385 strings) Translated using Weblate (Japanese) Currently translated at 93.5% (173 of 185 strings) Translated using Weblate (Japanese) Currently translated at 99.6% (279 of 280 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (167 of 167 strings) Translated using Weblate (Japanese) Currently translated at 89.2% (769 of 862 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (914 of 914 strings) Translated using Weblate (Japanese) Currently translated at 94.4% (253 of 268 strings) Translated using Weblate (Japanese) Currently translated at 91.8% (170 of 185 strings) Translated using Weblate (Japanese) Currently translated at 97.9% (421 of 430 strings) Translated using Weblate (Japanese) Currently translated at 91.6% (3104 of 3385 strings) Translated using Weblate (Japanese) Currently translated at 93.6% (251 of 268 strings) Translated using Weblate (Japanese) Currently translated at 90.8% (168 of 185 strings) Translated using Weblate (Japanese) Currently translated at 82.4% (202 of 245 strings) Translated using Weblate (French) Currently translated at 100.0% (268 of 268 strings) Translated using Weblate (French) Currently translated at 100.0% (3385 of 3385 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 15.1% (37 of 245 strings) Translated using Weblate (French) Currently translated at 100.0% (914 of 914 strings) Translated using Weblate (Japanese) Currently translated at 91.3% (3092 of 3385 strings) Translated using Weblate (Japanese) Currently translated at 92.5% (248 of 268 strings) Translated using Weblate (Japanese) Currently translated at 92.5% (248 of 268 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (193 of 193 strings) Translated using Weblate (Croatian) Currently translated at 100.0% (15 of 15 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (167 of 167 strings) Translated using Weblate (Korean) Currently translated at 22.8% (56 of 245 strings) Translated using Weblate (Korean) Currently translated at 47.7% (128 of 268 strings) Translated using Weblate (Croatian) Currently translated at 45.1% (121 of 268 strings) Translated using Weblate (Korean) Currently translated at 71.9% (620 of 862 strings) Translated using Weblate (Croatian) Currently translated at 70.6% (609 of 862 strings) Translated using Weblate (Croatian) Currently translated at 75.0% (6 of 8 strings) Translated using Weblate (Korean) Currently translated at 67.6% (291 of 430 strings) Translated using Weblate (Korean) Currently translated at 52.8% (1788 of 3385 strings) Translated using Weblate (Croatian) Currently translated at 50.3% (1706 of 3385 strings) Translated using Weblate (Croatian) Currently translated at 51.7% (134 of 259 strings) Translated using Weblate (Czech) Currently translated at 92.8% (130 of 140 strings) Translated using Weblate (English (United Kingdom)) Currently translated at 86.9% (233 of 268 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (94 of 94 strings) Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (94 of 94 strings) Translated using Weblate (Danish) Currently translated at 92.1% (105 of 114 strings) Translated using Weblate (Czech) Currently translated at 89.4% (102 of 114 strings) Translated using Weblate (Czech) Currently translated at 83.5% (112 of 134 strings) Translated using Weblate (Spanish (Latin America)) Currently translated at 71.6% (308 of 430 strings) Translated using Weblate (Spanish (Latin America)) Currently translated at 100.0% (245 of 245 strings) Translated using Weblate (Serbian) Currently translated at 84.4% (49 of 58 strings) Translated using Weblate (Bulgarian) Currently translated at 51.4% (144 of 280 strings) Translated using Weblate (Swedish) Currently translated at 66.5% (286 of 430 strings) Translated using Weblate (Serbian) Currently translated at 65.5% (282 of 430 strings) Translated using Weblate (Slovak) Currently translated at 65.5% (282 of 430 strings) Translated using Weblate (Romanian) Currently translated at 66.7% (287 of 430 strings) Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (430 of 430 strings) Translated using Weblate (Danish) Currently translated at 66.0% (284 of 430 strings) Translated using Weblate (Czech) Currently translated at 69.7% (300 of 430 strings) Translated using Weblate (Chinese (Simplified)) Currently translated at 99.7% (3377 of 3385 strings) Translated using Weblate (Swedish) Currently translated at 54.1% (1834 of 3385 strings) Translated using Weblate (Serbian) Currently translated at 50.6% (1714 of 3385 strings) Translated using Weblate (Slovak) Currently translated at 50.0% (1695 of 3385 strings) Translated using Weblate (Romanian) Currently translated at 60.5% (2050 of 3385 strings) Translated using Weblate (Hebrew) Currently translated at 38.4% (1301 of 3385 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (3385 of 3385 strings) Translated using Weblate (Danish) Currently translated at 54.0% (1829 of 3385 strings) Translated using Weblate (Czech) Currently translated at 59.6% (2020 of 3385 strings) Translated using Weblate (Swedish) Currently translated at 75.6% (140 of 185 strings) Translated using Weblate (Serbian) Currently translated at 73.5% (136 of 185 strings) Translated using Weblate (Slovak) Currently translated at 84.8% (157 of 185 strings) Translated using Weblate (Romanian) Currently translated at 78.9% (146 of 185 strings) Translated using Weblate (Portuguese) Currently translated at 82.1% (152 of 185 strings) Translated using Weblate (Italian) Currently translated at 91.8% (170 of 185 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (185 of 185 strings) Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (185 of 185 strings) Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (185 of 185 strings) Translated using Weblate (German) Currently translated at 100.0% (184 of 184 strings) Translated using Weblate (Danish) Currently translated at 77.2% (143 of 185 strings) Translated using Weblate (English (United Kingdom)) Currently translated at 98.7% (242 of 245 strings) Translated using Weblate (Czech) Currently translated at 75.1% (139 of 185 strings) Translated using Weblate (Bulgarian) Currently translated at 74.5% (138 of 185 strings) Translated using Weblate (Czech) Currently translated at 8.1% (20 of 245 strings) Translated using Weblate (Swedish) Currently translated at 72.0% (621 of 862 strings) Translated using Weblate (Serbian) Currently translated at 65.1% (562 of 862 strings) Translated using Weblate (Slovak) Currently translated at 66.9% (577 of 862 strings) Translated using Weblate (Romanian) Currently translated at 77.7% (670 of 862 strings) Translated using Weblate (Portuguese) Currently translated at 70.0% (604 of 862 strings) Translated using Weblate (Polish) Currently translated at 67.1% (579 of 862 strings) Translated using Weblate (Italian) Currently translated at 86.8% (749 of 862 strings) Translated using Weblate (Indonesian) Currently translated at 86.0% (742 of 862 strings) Translated using Weblate (Hebrew) Currently translated at 66.1% (570 of 862 strings) Translated using Weblate (English (United Kingdom)) Currently translated at 98.0% (845 of 862 strings) Translated using Weblate (Danish) Currently translated at 69.9% (603 of 862 strings) Translated using Weblate (Czech) Currently translated at 69.7% (601 of 862 strings) Translated using Weblate (Bulgarian) Currently translated at 66.3% (572 of 862 strings) Translated using Weblate (Serbian) Currently translated at 74.0% (305 of 412 strings) Translated using Weblate (Turkish) Currently translated at 100.0% (193 of 193 strings) Translated using Weblate (Danish) Currently translated at 90.0% (371 of 412 strings) Translated using Weblate (Ukrainian) Currently translated at 100.0% (259 of 259 strings) Translated using Weblate (Swedish) Currently translated at 53.6% (139 of 259 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (259 of 259 strings) Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (259 of 259 strings) Translated using Weblate (Danish) Currently translated at 62.1% (161 of 259 strings) Translated using Weblate (Bulgarian) Currently translated at 54.0% (140 of 259 strings) Translated using Weblate (English (United Kingdom)) Currently translated at 82.8% (222 of 268 strings) Translated using Weblate (English (United Kingdom)) Currently translated at 99.4% (184 of 185 strings) Translated using Weblate (English (United Kingdom)) Currently translated at 98.3% (241 of 245 strings) Translated using Weblate (Japanese) Currently translated at 91.3% (3092 of 3385 strings) Translated using Weblate (Japanese) Currently translated at 88.4% (237 of 268 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (134 of 134 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (259 of 259 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (914 of 914 strings) Translated using Weblate (Japanese) Currently translated at 100.0% (243 of 243 strings) Translated using Weblate (Japanese) Currently translated at 82.4% (202 of 245 strings) Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (259 of 259 strings) Translated using Weblate (Japanese) Currently translated at 87.3% (234 of 268 strings) Translated using Weblate (Japanese) Currently translated at 86.4% (160 of 185 strings) Translated using Weblate (Japanese) Currently translated at 99.8% (913 of 914 strings) Translated using Weblate (German) Currently translated at 100.0% (268 of 268 strings) Translated using Weblate (German) Currently translated at 100.0% (3377 of 3377 strings) Translated using Weblate (German) Currently translated at 100.0% (914 of 914 strings) Translated using Weblate (German) Currently translated at 100.0% (259 of 259 strings) Translated using Weblate (German) Currently translated at 100.0% (259 of 259 strings) Translated using Weblate (German) Currently translated at 100.0% (259 of 259 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (3385 of 3385 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (914 of 914 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (268 of 268 strings) Translated using Weblate (Russian) Currently translated at 88.5% (248 of 280 strings) Translated using Weblate (Spanish) Currently translated at 99.8% (3379 of 3385 strings) Translated using Weblate (German) Currently translated at 100.0% (862 of 862 strings) Co-authored-by: Ayaka Booker <ayakabooker@gmail.com> Co-authored-by: Chaotic Lawful <habitica@eusebius.fr> Co-authored-by: FingerTiao <787170918@qq.com> Co-authored-by: Jaime Martí <jaumemarti77@icloud.com> Co-authored-by: Jan Freihöfer <jan.stauch.is@gmail.com> Co-authored-by: Karmelkowy <kicimeow.karmelio@gmail.com> Co-authored-by: Lio Zam <zerofux@web.de> Co-authored-by: Mika <isekai.chr@gmail.com> Co-authored-by: Sophie LE MASLE <sophiesuff@gmail.com> Co-authored-by: Summer_GUI <heyang94@163.com> Co-authored-by: Vera <verasmolinap@gmail.com> Co-authored-by: Weblate <noreply@weblate.org> Co-authored-by: Zhi Hao Li <zhihaoli000@gmail.com> Co-authored-by: Zuz Q <zuzannakunik@gmail.com> Co-authored-by: innnko <ayakabooker@gmail.com> Co-authored-by: 吳昀錡 <J1120241@gm.fdhs.tyc.edu.tw> Co-authored-by: 潘致翰 <happyq0908@gmail.com> Translate-URL: https://translate.habitica.com/projects/habitica/achievements/es/ Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/de/ Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/es/ Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/fr/ Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/pl/ Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/zh_Hans/ Translate-URL: https://translate.habitica.com/projects/habitica/character/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/character/tr/ Translate-URL: https://translate.habitica.com/projects/habitica/content/da/ Translate-URL: https://translate.habitica.com/projects/habitica/content/sr/ Translate-URL: https://translate.habitica.com/projects/habitica/death/hr/ Translate-URL: https://translate.habitica.com/projects/habitica/faq/cs/ Translate-URL: https://translate.habitica.com/projects/habitica/faq/en_GB/ Translate-URL: https://translate.habitica.com/projects/habitica/faq/es_419/ Translate-URL: https://translate.habitica.com/projects/habitica/faq/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/faq/ko/ Translate-URL: https://translate.habitica.com/projects/habitica/faq/zh_Hant/ Translate-URL: https://translate.habitica.com/projects/habitica/front/bg/ Translate-URL: https://translate.habitica.com/projects/habitica/front/cs/ Translate-URL: https://translate.habitica.com/projects/habitica/front/da/ Translate-URL: https://translate.habitica.com/projects/habitica/front/de/ Translate-URL: https://translate.habitica.com/projects/habitica/front/en_GB/ Translate-URL: https://translate.habitica.com/projects/habitica/front/es/ Translate-URL: https://translate.habitica.com/projects/habitica/front/fr/ Translate-URL: https://translate.habitica.com/projects/habitica/front/it/ Translate-URL: https://translate.habitica.com/projects/habitica/front/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/front/pt/ Translate-URL: https://translate.habitica.com/projects/habitica/front/ro/ Translate-URL: https://translate.habitica.com/projects/habitica/front/sk/ Translate-URL: https://translate.habitica.com/projects/habitica/front/sr/ Translate-URL: https://translate.habitica.com/projects/habitica/front/sv/ Translate-URL: https://translate.habitica.com/projects/habitica/front/zh_Hans/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/cs/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/da/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/de/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/es/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/fr/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/he/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/hr/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/ko/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/ro/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/sk/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/sr/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/sv/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/zh_Hans/ Translate-URL: https://translate.habitica.com/projects/habitica/generic/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/groups/cs/ Translate-URL: https://translate.habitica.com/projects/habitica/groups/da/ Translate-URL: https://translate.habitica.com/projects/habitica/groups/en_GB/ Translate-URL: https://translate.habitica.com/projects/habitica/groups/es_419/ Translate-URL: https://translate.habitica.com/projects/habitica/groups/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/groups/ko/ Translate-URL: https://translate.habitica.com/projects/habitica/groups/ro/ Translate-URL: https://translate.habitica.com/projects/habitica/groups/sk/ Translate-URL: https://translate.habitica.com/projects/habitica/groups/sr/ Translate-URL: https://translate.habitica.com/projects/habitica/groups/sv/ Translate-URL: https://translate.habitica.com/projects/habitica/limited/bg/ Translate-URL: https://translate.habitica.com/projects/habitica/limited/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/limited/ru/ Translate-URL: https://translate.habitica.com/projects/habitica/messages/sr/ Translate-URL: https://translate.habitica.com/projects/habitica/npc/cs/ Translate-URL: https://translate.habitica.com/projects/habitica/npc/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/npc/pl/ Translate-URL: https://translate.habitica.com/projects/habitica/overview/hr/ Translate-URL: https://translate.habitica.com/projects/habitica/overview/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/pets/cs/ Translate-URL: https://translate.habitica.com/projects/habitica/pets/da/ Translate-URL: https://translate.habitica.com/projects/habitica/quests/en_GB/ Translate-URL: https://translate.habitica.com/projects/habitica/quests/es/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/bg/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/cs/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/da/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/de/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/en_GB/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/he/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/hr/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/id/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/it/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/ko/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/pl/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/pt/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/ro/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/sk/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/sr/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/sv/ Translate-URL: https://translate.habitica.com/projects/habitica/settings/bg/ Translate-URL: https://translate.habitica.com/projects/habitica/settings/da/ Translate-URL: https://translate.habitica.com/projects/habitica/settings/de/ Translate-URL: https://translate.habitica.com/projects/habitica/settings/en_GB/ Translate-URL: https://translate.habitica.com/projects/habitica/settings/es/ Translate-URL: https://translate.habitica.com/projects/habitica/settings/hr/ Translate-URL: https://translate.habitica.com/projects/habitica/settings/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/settings/sv/ Translate-URL: https://translate.habitica.com/projects/habitica/settings/uk/ Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/de/ Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/en_GB/ Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/es/ Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/fr/ Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/hr/ Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/ja/ Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/ko/ Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/zh_Hans/ Translate-URL: https://translate.habitica.com/projects/habitica/tasks/cs/ Translation: Habitica/Achievements Translation: Habitica/Backgrounds Translation: Habitica/Character Translation: Habitica/Content Translation: Habitica/Death Translation: Habitica/Faq Translation: Habitica/Front Translation: Habitica/Gear Translation: Habitica/Generic Translation: Habitica/Groups Translation: Habitica/Limited Translation: Habitica/Messages Translation: Habitica/Npc Translation: Habitica/Overview Translation: Habitica/Pets Translation: Habitica/Quests Translation: Habitica/Questscontent Translation: Habitica/Settings Translation: Habitica/Subscriber Translation: Habitica/Tasks commit1dde2674f6Author: Kalista Payne <sabrecat@gmail.com> Date: Mon Jun 16 16:43:56 2025 -0500 fix(content): don't filter out the thing we want commit76122a8889Author: Kalista Payne <sabrecat@gmail.com> Date: Wed Jun 4 14:28:27 2025 -0500 fix(mobile): provide Challenge categories via API commit9e309a875eAuthor: Kalista Payne <kalista@habitica.com> Date: Mon Jul 28 14:15:00 2025 -0500 5.38.0 commit09e3a394b8Author: Kalista Payne <kalista@habitica.com> Date: Mon Jul 28 14:06:45 2025 -0500 5.37.3 commiteba263360fAuthor: Weblate <noreply@weblate.org> Date: Mon Jul 28 21:03:17 2025 +0200 Translated using Weblate (German) Currently translated at 100.0% (134 of 134 strings) Translated using Weblate (German) Currently translated at 100.0% (134 of 134 strings) Translated using Weblate (German) Currently translated at 100.0% (3377 of 3377 strings) Translated using Weblate (German) Currently translated at 100.0% (3377 of 3377 strings) Translated using Weblate (German) Currently translated at 100.0% (3377 of 3377 strings) Translated using Weblate (German) Currently translated at 100.0% (243 of 243 strings) Translated using Weblate (German) Currently translated at 100.0% (184 of 184 strings) Translated using Weblate (German) Currently translated at 98.6% (850 of 862 strings) Translated using Weblate (German) Currently translated at 99.8% (3373 of 3377 strings) Translated using Weblate (German) Currently translated at 99.8% (3373 of 3377 strings) Translated using Weblate (German) Currently translated at 99.8% (3373 of 3377 strings) Translated using Weblate (German) Currently translated at 99.5% (3361 of 3377 strings) Translated using Weblate (German) Currently translated at 99.5% (3361 of 3377 strings) Translated using Weblate (German) Currently translated at 99.5% (3361 of 3377 strings) Translated using Weblate (German) Currently translated at 99.4% (3360 of 3377 strings) Translated using Weblate (German) Currently translated at 100.0% (184 of 184 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (185 of 185 strings) Translated using Weblate (Polish) Currently translated at 67.1% (579 of 862 strings) Translated using Weblate (Polish) Currently translated at 67.1% (579 of 862 strings) Translated using Weblate (Polish) Currently translated at 100.0% (91 of 91 strings) Translated using Weblate (Polish) Currently translated at 100.0% (91 of 91 strings) Translated using Weblate (German) Currently translated at 100.0% (184 of 184 strings) Translated using Weblate (German) Currently translated at 100.0% (184 of 184 strings) Translated using Weblate (German) Currently translated at 100.0% (184 of 184 strings) Translated using Weblate (German) Currently translated at 100.0% (184 of 184 strings) Translated using Weblate (German) Currently translated at 100.0% (184 of 184 strings) Translated using Weblate (German) Currently translated at 100.0% (245 of 245 strings) Translated using Weblate (German) Currently translated at 100.0% (47 of 47 strings) Translated using Weblate (German) Currently translated at 100.0% (193 of 193 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 14.2% (35 of 245 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 13.8% (34 of 245 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 13.0% (32 of 245 strings) Translated using Weblate (Hebrew) Currently translated at 2.0% (5 of 245 strings) Translated using Weblate (Hebrew) Currently translated at 66.1% (570 of 862 strings) Translated using Weblate (Portuguese) Currently translated at 54.1% (1830 of 3377 strings) Co-authored-by: FingerTiao <787170918@qq.com> Co-authored-by: Jaime Martí <jaumemarti77@icloud.com> Co-authored-by: Jan Freihöfer <jan.stauch.is@gmail.com> Co-authored-by: Jonathan Niessen <37.friedrich@gmail.com> Co-authored-by: Karmelkowy <kicimeow.karmelio@gmail.com> Co-authored-by: Katharina <katharinaanna.wilding@gmail.com> Co-authored-by: Laura Fleckenstein <fleckenstein_laura@web.de> Co-authored-by: Omer I.S <omeritzicschwartz@gmail.com> Co-authored-by: Remigiusz Haziak <haziakremigiusz@gmail.com> Co-authored-by: Uwe B <hbtca@tunixgut.de> Co-authored-by: Weblate <noreply@weblate.org> Co-authored-by: Wellinton Cardoso <wmcardoso1@hotmail.com> Co-authored-by: cloudzzy <truskawka412@gmail.com> Co-authored-by: 吳昀錡 <J1120241@gm.fdhs.tyc.edu.tw> Translate-URL: https://translate.habitica.com/projects/habitica/character/de/ Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/pl/ Translate-URL: https://translate.habitica.com/projects/habitica/contrib/de/ Translate-URL: https://translate.habitica.com/projects/habitica/faq/de/ Translate-URL: https://translate.habitica.com/projects/habitica/faq/he/ Translate-URL: https://translate.habitica.com/projects/habitica/faq/zh_Hant/ Translate-URL: https://translate.habitica.com/projects/habitica/front/de/ Translate-URL: https://translate.habitica.com/projects/habitica/front/es/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/de/ Translate-URL: https://translate.habitica.com/projects/habitica/gear/pt/ Translate-URL: https://translate.habitica.com/projects/habitica/generic/de/ Translate-URL: https://translate.habitica.com/projects/habitica/npc/de/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/de/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/he/ Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/pl/ Translation: Habitica/Character Translation: Habitica/Communityguidelines Translation: Habitica/Contrib Translation: Habitica/Faq Translation: Habitica/Front Translation: Habitica/Gear Translation: Habitica/Generic Translation: Habitica/Npc Translation: Habitica/Questscontent commit9550eec718Author: Phillip Thelen <phillip@habitica.com> Date: Mon Jul 28 16:50:38 2025 +0200 Fix 500 when deleting a very old group plan account (#15481) commitf267eb67e9Author: Kalista Payne <kalista@habitica.com> Date: Tue Jul 29 14:12:35 2025 -0500 fix(static): add back missing div for show/hide commit28251f42abAuthor: Kalista Payne <kalista@habitica.com> Date: Thu Jul 24 22:59:01 2025 -0500 feat(privacy): preview page * feat(privacy): respect Global Privacy Control * fix(lint): remove unused component * fix(test): test user opts in to tracking * fix(test): add user pref to more contexts * fix(test): final spot in api-unit * fix(tests): update integrations * chore(privacy): add paragraph to s1, retire separate preview pages * fix(build): route copypasta * fix(router): lingering dead import --------- Signed-off-by: Kalista Payne <sabrecat@gmail.com> Signed-off-by: Kalista Payne <kalista@habitica.com> Co-authored-by: Phillip Thelen <phillip@habitica.com> Co-authored-by: CuriousMagpie <eilatan@gmail.com>
1145 lines
28 KiB
Vue
1145 lines
28 KiB
Vue
<template>
|
|
<b-modal
|
|
id="avatar-modal"
|
|
title
|
|
:size="editing ? 'lg' : 'md'"
|
|
:hide-header="true"
|
|
:hide-footer="true"
|
|
:modal-class="{'page-2': !editing}"
|
|
:no-close-on-esc="!editing"
|
|
:no-close-on-backdrop="!editing"
|
|
>
|
|
<close-x
|
|
v-if="editing"
|
|
@close="close()"
|
|
/>
|
|
<h2
|
|
v-if="editing"
|
|
class="text-center pt-2 mt-4 mb-4"
|
|
>
|
|
{{ $t('editAvatar') }}
|
|
</h2>
|
|
<div
|
|
class="avatar-section d-flex justify-content-center"
|
|
:class="{'page-2': modalPage === 2}"
|
|
>
|
|
<div>
|
|
<div
|
|
v-if="!editing"
|
|
class="user-creation-bg mt-5"
|
|
>
|
|
<avatar
|
|
class="new-user"
|
|
:member="user"
|
|
:avatar-only="true"
|
|
:override-top-padding="'0px'"
|
|
/>
|
|
</div>
|
|
<avatar
|
|
v-else
|
|
:member="user"
|
|
:avatar-only="false"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="modalPage === 2"
|
|
class="section"
|
|
>
|
|
<div
|
|
id="options-nav"
|
|
class="container section text-center customize-menu px-5"
|
|
>
|
|
<div class="row justify-content-around">
|
|
<div
|
|
class="menu-container"
|
|
:class="{active: activeTopPage === 'body'}"
|
|
@click="changeTopPage('body', 'size')"
|
|
>
|
|
<div class="menu-item">
|
|
<div
|
|
class="svg-icon"
|
|
v-html="icons.bodyIcon"
|
|
></div>
|
|
</div>
|
|
<strong v-once>{{ $t('bodyBody') }}</strong>
|
|
<div class="indicator"></div>
|
|
</div>
|
|
<div
|
|
class="menu-container"
|
|
:class="{active: activeTopPage === 'skin'}"
|
|
@click="changeTopPage('skin', 'color')"
|
|
>
|
|
<div class="menu-item">
|
|
<div
|
|
class="svg-icon"
|
|
v-html="icons.skinIcon"
|
|
></div>
|
|
</div>
|
|
<strong v-once>{{ $t('skin') }}</strong>
|
|
<div class="indicator"></div>
|
|
</div>
|
|
<div
|
|
class="menu-container"
|
|
:class="{active: activeTopPage === 'hair'}"
|
|
@click="changeTopPage('hair', 'color')"
|
|
>
|
|
<div class="menu-item">
|
|
<div
|
|
class="svg-icon"
|
|
v-html="icons.hairIcon"
|
|
></div>
|
|
</div>
|
|
<strong v-once>{{ $t('hair') }}</strong>
|
|
<div class="indicator"></div>
|
|
</div>
|
|
<div
|
|
class="menu-container"
|
|
:class="{active: activeTopPage === 'extra'}"
|
|
@click="changeTopPage('extra', 'glasses')"
|
|
>
|
|
<div class="menu-item">
|
|
<div
|
|
class="svg-icon"
|
|
v-html="icons.accessoriesIcon"
|
|
></div>
|
|
</div>
|
|
<strong v-once>{{ $t('extra') }}</strong>
|
|
<div class="indicator"></div>
|
|
</div>
|
|
<div
|
|
v-if="editing"
|
|
class="menu-container"
|
|
:class="{active: activeTopPage === 'backgrounds'}"
|
|
@click="changeTopPage('backgrounds')"
|
|
>
|
|
<div class="menu-item">
|
|
<div
|
|
class="svg-icon"
|
|
v-html="icons.backgroundsIcon"
|
|
></div>
|
|
</div>
|
|
<strong v-once>{{ $t('backgrounds') }}</strong>
|
|
<div class="indicator"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<body-settings
|
|
v-if="activeTopPage === 'body'"
|
|
:editing="editing"
|
|
/>
|
|
<skin-settings
|
|
v-if="activeTopPage === 'skin'"
|
|
:editing="editing"
|
|
/>
|
|
<hairSettings
|
|
v-if="activeTopPage === 'hair'"
|
|
:editing="editing"
|
|
/>
|
|
<extraSettings
|
|
v-if="activeTopPage === 'extra'"
|
|
:editing="editing"
|
|
/>
|
|
<div
|
|
v-if="activeTopPage === 'backgrounds'"
|
|
id="backgrounds"
|
|
class="section customize-section pt-4"
|
|
>
|
|
<div class="row justify-content-center title-row mb-3">
|
|
<strong>{{ $t('incentiveBackgrounds') }}</strong>
|
|
</div>
|
|
<div
|
|
v-if="standardBackgrounds.length < standardBackgroundMax"
|
|
class="row justify-content-center title-row mb-3"
|
|
>
|
|
<div>
|
|
{{ $t('incentiveBackgroundsUnlockedWithCheckins') }}
|
|
</div>
|
|
</div>
|
|
<div class="background-row d-flex justify-content-center mb-4">
|
|
<div
|
|
v-for="bg in standardBackgrounds"
|
|
:id="bg.key"
|
|
:key="bg.key"
|
|
class="background-item"
|
|
:class="{ selected: bg.key === user.preferences.background }"
|
|
@click="unlock('background.' + bg.key)"
|
|
>
|
|
<div
|
|
v-if="bg.key === ''"
|
|
class="incentive-background deselect"
|
|
>
|
|
</div>
|
|
<div
|
|
v-else
|
|
class="incentive-background"
|
|
:class="`background_${bg.key}`"
|
|
>
|
|
<div class="small-rectangle"></div>
|
|
</div>
|
|
<b-popover
|
|
:target="bg.key"
|
|
triggers="hover focus"
|
|
placement="bottom"
|
|
:prevent-overflow="false"
|
|
:content="bg.notes(user.preferences.language)"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="user.purchased.background.birthday_bash"
|
|
>
|
|
<div
|
|
class="row justify-content-center title-row mb-3"
|
|
>
|
|
<strong>{{ $t('eventBackgrounds') }}</strong>
|
|
</div>
|
|
<div
|
|
class="background-row d-flex justify-content-center mb-4"
|
|
>
|
|
<div
|
|
v-for="bg in eventBackgrounds"
|
|
:id="bg.key"
|
|
:key="bg.key"
|
|
class="background-item"
|
|
:class="{selected: bg.key === user.preferences.background}"
|
|
@click="unlock('background.' + bg.key)"
|
|
>
|
|
<Sprite
|
|
class="background"
|
|
:image-name="`icon_background_${bg.key}`"
|
|
/>
|
|
<b-popover
|
|
:target="bg.key"
|
|
triggers="hover focus"
|
|
placement="bottom"
|
|
:prevent-overflow="false"
|
|
:content="bg.notes(user.preferences.language)"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="timeTravelBackgrounds.length > 0"
|
|
:key="`ttbg${timeTravelBackgrounds.length}`"
|
|
>
|
|
<div
|
|
class="row justify-content-center title-row mb-3"
|
|
>
|
|
<strong>{{ $t('timeTravelBackgrounds') }}</strong>
|
|
</div>
|
|
<div
|
|
class="background-row d-flex justify-content-center mb-4"
|
|
>
|
|
<div
|
|
v-for="bg in timeTravelBackgrounds"
|
|
:id="bg.key"
|
|
:key="bg.key"
|
|
class="background-item"
|
|
:class="{selected: bg.key === user.preferences.background}"
|
|
@click="unlock('background.' + bg.key)"
|
|
>
|
|
<Sprite
|
|
class="background"
|
|
:image-name="`icon_background_${bg.key}`"
|
|
/>
|
|
<b-popover
|
|
:target="bg.key"
|
|
triggers="hover focus"
|
|
placement="bottom"
|
|
:prevent-overflow="false"
|
|
:content="bg.notes(user.preferences.language)"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="monthlyBackgrounds.length > 0"
|
|
:key="`monthly${monthlyBackgrounds.length}`"
|
|
>
|
|
<div
|
|
class="row text-center title-row mb-3"
|
|
>
|
|
<strong>{{ $t('monthlyBackgrounds') }}</strong>
|
|
</div>
|
|
<div class="background-row d-flex justify-content-center mx-auto mb-4 px-5">
|
|
<div
|
|
v-for="(bg) in monthlyBackgrounds"
|
|
:id="bg.key"
|
|
:key="bg.key"
|
|
class="background-item"
|
|
:class="{selected: bg.key === user.preferences.background}"
|
|
@click="unlock('background.' + bg.key)"
|
|
>
|
|
<Sprite
|
|
class="background"
|
|
:image-name="`icon_background_${bg.key}`"
|
|
/>
|
|
<b-popover
|
|
:target="bg.key"
|
|
triggers="hover focus"
|
|
placement="bottom"
|
|
:prevent-overflow="false"
|
|
:content="bg.notes(user.preferences.language)"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<customize-banner class="padding-fix" />
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="modalPage === 3 && !editing"
|
|
class="container interests-section"
|
|
>
|
|
<div class="section row">
|
|
<div class="col-12 text-center">
|
|
<h2>{{ $t('wantToWorkOn') }}</h2>
|
|
</div>
|
|
</div>
|
|
<div class="section row">
|
|
<div class="col-6">
|
|
<div class="task-option">
|
|
<div class="custom-control custom-checkbox">
|
|
<input
|
|
id="work"
|
|
v-model="taskCategories"
|
|
class="custom-control-input"
|
|
type="checkbox"
|
|
value="work"
|
|
>
|
|
<label
|
|
v-once
|
|
class="custom-control-label"
|
|
for="work"
|
|
>{{ $t('work') }}</label>
|
|
</div>
|
|
</div>
|
|
<div class="task-option">
|
|
<div class="custom-control custom-checkbox">
|
|
<input
|
|
id="exercise"
|
|
v-model="taskCategories"
|
|
class="custom-control-input"
|
|
type="checkbox"
|
|
value="exercise"
|
|
>
|
|
<label
|
|
v-once
|
|
class="custom-control-label"
|
|
for="exercise"
|
|
>{{ $t('exercise') }}</label>
|
|
</div>
|
|
</div>
|
|
<div class="task-option">
|
|
<div class="custom-control custom-checkbox">
|
|
<input
|
|
id="health_wellness"
|
|
v-model="taskCategories"
|
|
class="custom-control-input"
|
|
type="checkbox"
|
|
value="health_wellness"
|
|
>
|
|
<label
|
|
v-once
|
|
class="custom-control-label"
|
|
for="health_wellness"
|
|
>{{ $t('health_wellness') }}</label>
|
|
</div>
|
|
</div>
|
|
<div class="task-option">
|
|
<div class="custom-control custom-checkbox">
|
|
<input
|
|
id="school"
|
|
v-model="taskCategories"
|
|
class="custom-control-input"
|
|
type="checkbox"
|
|
value="school"
|
|
>
|
|
<label
|
|
v-once
|
|
class="custom-control-label"
|
|
for="school"
|
|
>{{ $t('school') }}</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-6">
|
|
<div class="task-option">
|
|
<div class="custom-control custom-checkbox">
|
|
<input
|
|
id="chores"
|
|
v-model="taskCategories"
|
|
class="custom-control-input"
|
|
type="checkbox"
|
|
value="chores"
|
|
>
|
|
<label
|
|
v-once
|
|
class="custom-control-label"
|
|
for="chores"
|
|
>{{ $t('chores') }}</label>
|
|
</div>
|
|
</div>
|
|
<div class="task-option">
|
|
<div class="custom-control custom-checkbox">
|
|
<input
|
|
id="creativity"
|
|
v-model="taskCategories"
|
|
class="custom-control-input"
|
|
type="checkbox"
|
|
value="creativity"
|
|
>
|
|
<label
|
|
v-once
|
|
class="custom-control-label"
|
|
for="creativity"
|
|
>{{ $t('creativity') }}</label>
|
|
</div>
|
|
</div>
|
|
<div class="task-option">
|
|
<div class="custom-control custom-checkbox">
|
|
<input
|
|
id="self_care"
|
|
v-model="taskCategories"
|
|
class="custom-control-input"
|
|
type="checkbox"
|
|
value="self_care"
|
|
>
|
|
<label
|
|
v-once
|
|
class="custom-control-label"
|
|
for="self_care"
|
|
>{{ $t('self_care') }}</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="!editing"
|
|
class="section d-flex justify-content-center justin-outer-section top"
|
|
>
|
|
<div class="justin-section d-flex align-items-center">
|
|
<div class="featured-label">
|
|
<span class="rectangle"></span>
|
|
<span class="text">Justin</span>
|
|
<span class="rectangle"></span>
|
|
</div>
|
|
<div class="justin-message">
|
|
<div
|
|
class="corner-decoration"
|
|
:style="{top: '-2px', right: '-2px'}"
|
|
></div>
|
|
<div
|
|
class="corner-decoration"
|
|
:style="{top: '-2px', left: '-2px'}"
|
|
></div>
|
|
<div
|
|
class="corner-decoration"
|
|
:style="{bottom: '-2px', right: '-2px'}"
|
|
></div>
|
|
<div
|
|
class="corner-decoration"
|
|
:style="{bottom: '-2px', left: '-2px'}"
|
|
></div>
|
|
<div v-if="modalPage === 2">
|
|
<p v-html="$t('justinIntroMessage1')"></p>
|
|
</div>
|
|
<div v-if="modalPage === 3">
|
|
<p v-once>
|
|
{{ $t('justinIntroMessage3') }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div
|
|
class="npc-justin-textbox"
|
|
:style="{'background-image': imageURL}"
|
|
></div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
v-if="!editing"
|
|
class="section container footer"
|
|
>
|
|
<div class="footer-left">
|
|
<div
|
|
v-if="modalPage > 2"
|
|
class="prev-outer"
|
|
@click="prev()"
|
|
>
|
|
<div
|
|
class="prev-arrow svg-icon"
|
|
v-html="icons.arrowLeft"
|
|
></div>
|
|
<div
|
|
v-once
|
|
class="prev"
|
|
>
|
|
{{ $t('prev') }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="footer-center text-center circles">
|
|
<div
|
|
class="circle"
|
|
:class="{active: modalPage === 2}"
|
|
></div>
|
|
<div
|
|
class="circle"
|
|
:class="{active: modalPage === 3}"
|
|
></div>
|
|
</div>
|
|
<div class="footer-right">
|
|
<div
|
|
v-if="modalPage < 3"
|
|
class="next-outer"
|
|
@click="next()"
|
|
>
|
|
<div
|
|
v-once
|
|
class="next"
|
|
>
|
|
{{ $t('next') }}
|
|
</div>
|
|
<div
|
|
class="next-arrow svg-icon"
|
|
v-html="icons.arrowRight"
|
|
></div>
|
|
</div>
|
|
<div
|
|
v-if="modalPage === 3 && !loading"
|
|
class="next-outer"
|
|
:class="{disabled: taskCategories.length === 0}"
|
|
@click="done()"
|
|
>
|
|
<div
|
|
v-once
|
|
class="next"
|
|
>
|
|
{{ $t('finish') }}
|
|
</div>
|
|
<div
|
|
class="next-arrow svg-icon"
|
|
v-html="icons.arrowRight"
|
|
></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</b-modal>
|
|
</template>
|
|
|
|
<style lang="scss">
|
|
@import '@/assets/scss/colors.scss';
|
|
|
|
$dialogMarginTop: 56px;
|
|
$userCreationBgHeight: 105px;
|
|
|
|
.page-2 {
|
|
&#avatar-modal {
|
|
.modal-dialog.modal-md {
|
|
margin-top: 186px;
|
|
}
|
|
}
|
|
}
|
|
|
|
#avatar-modal {
|
|
h2 {
|
|
color: $purple-300;
|
|
}
|
|
|
|
.avatar {
|
|
cursor: auto;
|
|
|
|
&:not(.new-user)[class*=background] {
|
|
box-shadow: 0px 1px 3px 0px rgba(26, 24, 29, 0.12), 0px 1px 2px 0px rgba(26, 24, 29, 0.24);
|
|
}
|
|
|
|
&.new-user {
|
|
padding-top: 0px;
|
|
padding-left: 30px;
|
|
}
|
|
}
|
|
|
|
.modal-body {
|
|
padding: 0px;
|
|
}
|
|
|
|
.modal-content {
|
|
border-radius: 12px;
|
|
}
|
|
|
|
.first-page-footer {
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.customize-section {
|
|
text-align: center;
|
|
background-color: #f9f9f9;
|
|
border-bottom-left-radius: 12px;
|
|
border-bottom-right-radius: 12px;
|
|
}
|
|
|
|
#creator-background {
|
|
background-color: $purple-200;
|
|
}
|
|
|
|
.corner-decoration {
|
|
position: absolute;
|
|
width: 6px;
|
|
height: 6px;
|
|
background-color: #ffbe5d;
|
|
border: inherit;
|
|
outline: inherit;
|
|
}
|
|
|
|
.small {
|
|
color: $gray-200;
|
|
}
|
|
|
|
h3 {
|
|
color: $gray-100;
|
|
font-weight: 700;
|
|
line-height: 24px;
|
|
}
|
|
|
|
.padding-fix {
|
|
padding-top: 1px;
|
|
}
|
|
|
|
.row.sub-menu + .row.sub-menu {
|
|
margin-top: 0.5em;
|
|
}
|
|
|
|
.welcome-section {
|
|
margin-top: 2.5em;
|
|
margin-bottom: 2.5em;
|
|
|
|
h3 {
|
|
font-size: 20px;
|
|
font-weight: 400;
|
|
color: $gray-200;
|
|
line-height: 1.71;
|
|
}
|
|
}
|
|
|
|
.logo {
|
|
width: 190px;
|
|
margin: 0 auto 1.25em;
|
|
}
|
|
|
|
.user-creation-bg {
|
|
background-image: url('@/assets/creator/creator-hills-bg.png');
|
|
height: $userCreationBgHeight;
|
|
width: 219px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.top {
|
|
position: absolute;
|
|
top: -80px;
|
|
right: 50%;
|
|
left: 50%;
|
|
}
|
|
|
|
.justin-outer-section:not(.top) {
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.avatar-section {
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.justin-section {
|
|
position: relative;
|
|
}
|
|
|
|
.justin-message {
|
|
border-color: #ffa623;
|
|
border-style: solid;
|
|
border-width: 2px;
|
|
outline-color: #b36213;
|
|
outline-style: solid;
|
|
outline-width: 2px;
|
|
position: relative;
|
|
padding: 2em;
|
|
margin: 2px;
|
|
height: 100%;
|
|
width: 400px;
|
|
background: $gray-700;
|
|
|
|
p {
|
|
margin: auto;
|
|
}
|
|
|
|
p + p {
|
|
margin-top: 1em;
|
|
}
|
|
}
|
|
|
|
.npc-justin-textbox {
|
|
position: absolute;
|
|
right: 1rem;
|
|
top: -3.1rem;
|
|
width: 48px;
|
|
height: 48px;
|
|
}
|
|
|
|
.featured-label {
|
|
position: absolute;
|
|
top: -1rem;
|
|
left: 1.5rem;
|
|
border-radius: 2px;
|
|
margin: auto;
|
|
|
|
.text {
|
|
font-size: 12px;
|
|
min-height: auto;
|
|
color: $white;
|
|
}
|
|
}
|
|
|
|
.circles {
|
|
align-self: flex-end;
|
|
}
|
|
|
|
.circle {
|
|
width: 8px;
|
|
height: 8px;
|
|
background-color: #d8d8d8;
|
|
border-radius: 50%;
|
|
display: inline-block;
|
|
margin-right: 1em;
|
|
|
|
&:last-of-type {
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
|
|
.circle.active {
|
|
background-color: $purple-300;
|
|
}
|
|
|
|
.customize-menu {
|
|
.menu-item {
|
|
width: 83px;
|
|
|
|
.svg-icon {
|
|
width: 32px;
|
|
height: 32px;
|
|
margin: 0 auto;
|
|
}
|
|
}
|
|
|
|
.menu-container {
|
|
color: $gray-100;
|
|
}
|
|
|
|
.menu-container:hover, .menu-container.active {
|
|
cursor: pointer;
|
|
color: $purple-300;
|
|
}
|
|
|
|
.indicator {
|
|
display: none;
|
|
}
|
|
|
|
.menu-container.active .indicator{
|
|
width: 0px;
|
|
height: 0px;
|
|
border-left: 12px solid transparent;
|
|
border-right: 12px solid transparent;
|
|
border-bottom: 12px solid $gray-700;
|
|
display: block;
|
|
margin: 0 auto;
|
|
}
|
|
}
|
|
|
|
.interests-section {
|
|
margin-top: 3em;
|
|
margin-bottom: 60px;
|
|
|
|
.task-option {
|
|
margin: 0 auto;
|
|
width: 70%;
|
|
}
|
|
}
|
|
|
|
#backgrounds {
|
|
.background-row {
|
|
flex-wrap: wrap;
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.background-item {
|
|
outline: 4px solid transparent;
|
|
|
|
.background {
|
|
border-radius: 4px;
|
|
object-position: -4px -4px;
|
|
object-fit: none;
|
|
width: 60px;
|
|
height: 60px;
|
|
}
|
|
|
|
.deselect {
|
|
height: 4px;
|
|
display: block;
|
|
opacity: 0.24;
|
|
background: red;
|
|
transform: rotate(-45deg);
|
|
top: 0;
|
|
margin-top: 32px;
|
|
margin-left: -1px;
|
|
border-radius: 0;
|
|
}
|
|
|
|
&:hover {
|
|
outline: 4px solid rgba($purple-300, .25);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
&.selected {
|
|
border-radius: 4px;
|
|
outline: 4px solid $purple-300;
|
|
}
|
|
}
|
|
|
|
strong {
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.incentive-background {
|
|
background-image: none;
|
|
width: 68px;
|
|
height: 68px;
|
|
border-radius: 4px;
|
|
background-color: #92b6bd;
|
|
padding-top: .3em;
|
|
|
|
.small-rectangle {
|
|
width: 60px;
|
|
height: 40px;
|
|
border-radius: 4px;
|
|
margin: 0 auto;
|
|
opacity: .6;
|
|
background: white;
|
|
}
|
|
}
|
|
|
|
.background_violet {
|
|
background-color: #a993ed;
|
|
}
|
|
|
|
.background_blue {
|
|
background-color: #92b6bd;
|
|
}
|
|
|
|
.background_green {
|
|
background-color: #92bd94;
|
|
}
|
|
|
|
.background_purple {
|
|
background-color: #9397bd;
|
|
}
|
|
|
|
.background_red {
|
|
background-color: #b77e80;
|
|
}
|
|
|
|
.background_yellow {
|
|
background-color: #bcbb91;
|
|
}
|
|
|
|
.incentive-background:hover {
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
.footer {
|
|
margin-top: 24px;
|
|
padding-bottom: 24px;
|
|
padding-left: 24px;
|
|
padding-right: 24px;
|
|
bottom: 0;
|
|
width: 100%;
|
|
display: flex;
|
|
|
|
* {
|
|
transition: none !important;
|
|
}
|
|
|
|
.footer-left, .footer-right {
|
|
flex: auto;
|
|
flex-grow: 0;
|
|
width: 30%
|
|
}
|
|
|
|
.footer-center {
|
|
flex: 1;
|
|
}
|
|
|
|
.prev, .next {
|
|
color: $gray-300;
|
|
font-weight: bold;
|
|
display: inline-block;
|
|
padding: 0.4em;
|
|
}
|
|
|
|
.prev {
|
|
padding-left: 16px;
|
|
}
|
|
|
|
.next {
|
|
padding-right: 16px;
|
|
}
|
|
|
|
.prev-outer {
|
|
white-space: nowrap;
|
|
|
|
&:hover {
|
|
cursor: pointer;
|
|
|
|
.prev {
|
|
color: $purple-300;
|
|
}
|
|
|
|
.prev-arrow {
|
|
path {
|
|
fill: $purple-300;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.prev-arrow, .next-arrow {
|
|
width: 32px;
|
|
height: 32px;
|
|
display: inline-block;
|
|
vertical-align: bottom;
|
|
}
|
|
|
|
.next-outer {
|
|
white-space: nowrap;
|
|
flex: 1;
|
|
text-align: right;
|
|
|
|
&:hover {
|
|
cursor: pointer;
|
|
|
|
.next {
|
|
color: $purple-300;
|
|
}
|
|
|
|
.next-arrow {
|
|
path {
|
|
fill: $purple-300;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
import axios from 'axios';
|
|
import forEach from 'lodash/forEach';
|
|
import content from '@/../../common/script/content/index';
|
|
import { mapState } from '@/libs/store';
|
|
import avatar from './avatar';
|
|
import guide from '@/mixins/guide';
|
|
import notifications from '@/mixins/notifications';
|
|
import customizeBanner from './avatarModal/customize-banner';
|
|
import bodySettings from './avatarModal/body-settings';
|
|
import skinSettings from './avatarModal/skin-settings';
|
|
import hairSettings from './avatarModal/hair-settings';
|
|
import extraSettings from './avatarModal/extra-settings';
|
|
import closeX from './ui/closeX';
|
|
|
|
import logoPurple from '@/assets/svg/logo-purple.svg?raw';
|
|
import bodyIcon from '@/assets/svg/body.svg?raw';
|
|
import accessoriesIcon from '@/assets/svg/accessories.svg?raw';
|
|
import skinIcon from '@/assets/svg/skin.svg?raw';
|
|
import hairIcon from '@/assets/svg/hair.svg?raw';
|
|
import backgroundsIcon from '@/assets/svg/backgrounds.svg?raw';
|
|
import gem from '@/assets/svg/gem.svg?raw';
|
|
import hourglass from '@/assets/svg/hourglass.svg?raw';
|
|
import gold from '@/assets/svg/gold.svg?raw';
|
|
import arrowRight from '@/assets/svg/arrow_right.svg?raw';
|
|
import arrowLeft from '@/assets/svg/arrow_left.svg?raw';
|
|
import svgClose from '@/assets/svg/close.svg?raw';
|
|
import { avatarEditorUtilities } from '../mixins/avatarEditUtilities';
|
|
import Sprite from './ui/sprite';
|
|
|
|
export default {
|
|
components: {
|
|
avatar,
|
|
closeX,
|
|
customizeBanner,
|
|
bodySettings,
|
|
extraSettings,
|
|
hairSettings,
|
|
skinSettings,
|
|
Sprite,
|
|
},
|
|
mixins: [guide, notifications, avatarEditorUtilities],
|
|
data () {
|
|
return {
|
|
loading: false,
|
|
allBackgrounds: content.backgroundsFlat,
|
|
eventBackgrounds: [],
|
|
monthlyBackgrounds: [],
|
|
standardBackgrounds: [],
|
|
standardBackgroundMax: 1,
|
|
timeTravelBackgrounds: [],
|
|
|
|
icons: Object.freeze({
|
|
logoPurple,
|
|
bodyIcon,
|
|
accessoriesIcon,
|
|
skinIcon,
|
|
hairIcon,
|
|
backgroundsIcon,
|
|
gem,
|
|
hourglass,
|
|
gold,
|
|
arrowRight,
|
|
arrowLeft,
|
|
close: svgClose,
|
|
}),
|
|
modalPage: 2,
|
|
activeTopPage: 'body',
|
|
activeSubPage: 'size',
|
|
taskCategories: [],
|
|
skinSubMenuItems: [
|
|
{
|
|
id: 'color',
|
|
label: this.$t('color'),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
computed: {
|
|
...mapState({
|
|
user: 'user.data',
|
|
currentEvent: 'worldState.data.currentEvent',
|
|
}),
|
|
editing () {
|
|
return this.$store.state.avatarEditorOptions.editingUser;
|
|
},
|
|
startingPage () {
|
|
return this.$store.state.avatarEditorOptions.startingPage;
|
|
},
|
|
imageURL () {
|
|
return 'url(/static/npc/normal/npc_justin.png)';
|
|
},
|
|
},
|
|
watch: {
|
|
editing () {
|
|
if (this.editing) this.modalPage = 2;
|
|
},
|
|
startingPage () {
|
|
if (!this.$store.state.avatarEditorOptions.startingPage) return;
|
|
this.activeTopPage = this.$store.state.avatarEditorOptions.startingPage;
|
|
this.activeSubPage = this.$store.state.avatarEditorOptions.subpage;
|
|
this.$store.state.avatarEditorOptions.startingPage = '';
|
|
this.$store.state.avatarEditorOptions.subpage = '';
|
|
},
|
|
},
|
|
mounted () {
|
|
this.updateBackgrounds();
|
|
if (this.editing) this.modalPage = 2;
|
|
},
|
|
methods: {
|
|
close () {
|
|
this.$root.$emit('bv::hide::modal', 'avatar-modal');
|
|
},
|
|
updateBackgrounds () {
|
|
this.eventBackgrounds = [];
|
|
this.monthlyBackgrounds = [];
|
|
this.standardBackgrounds = [
|
|
{ key: '', notes: () => this.$t('noBackground') },
|
|
];
|
|
this.timeTravelBackgrounds = [];
|
|
forEach(this.allBackgrounds, bg => {
|
|
if (bg.set === 'incentiveBackgrounds') {
|
|
this.standardBackgroundMax += 1;
|
|
}
|
|
if (this.user.purchased.background[bg.key]) {
|
|
if (bg.set === 'eventBackgrounds') {
|
|
this.eventBackgrounds.push(bg);
|
|
} else if (bg.set === 'incentiveBackgrounds') {
|
|
this.standardBackgrounds.push(bg);
|
|
} else if (bg.set === 'timeTravelBackgrounds') {
|
|
this.timeTravelBackgrounds.push(bg);
|
|
} else {
|
|
this.monthlyBackgrounds.push(bg);
|
|
}
|
|
}
|
|
});
|
|
},
|
|
prev () {
|
|
this.modalPage -= 1;
|
|
},
|
|
next () {
|
|
this.modalPage += 1;
|
|
},
|
|
changeTopPage (page, subpage) {
|
|
if (page === 'backgrounds') {
|
|
this.updateBackgrounds();
|
|
}
|
|
this.activeTopPage = page;
|
|
if (subpage) this.activeSubPage = subpage;
|
|
},
|
|
changeSubPage (page) {
|
|
this.activeSubPage = page;
|
|
},
|
|
async done () {
|
|
this.loading = true;
|
|
|
|
let tasksToCreate = [
|
|
...content.tasksByCategory.defaults.map(t => ({
|
|
...t,
|
|
text: t.text(),
|
|
notes: t.notes && t.notes(),
|
|
})),
|
|
];
|
|
this.taskCategories.forEach(category => {
|
|
tasksToCreate = tasksToCreate.concat(content.tasksByCategory[category].map(t => ({
|
|
...t,
|
|
text: t.text(),
|
|
notes: t.notes && t.notes(),
|
|
})));
|
|
});
|
|
|
|
// @TODO: Move to the action
|
|
const response = await axios.post('/api/v4/tasks/user', tasksToCreate);
|
|
const tasks = response.data.data;
|
|
tasks.forEach(task => {
|
|
this.$store.state.user.data.tasksOrder[`${task.type}s`].unshift(task._id);
|
|
this.$store.state.tasks.data[`${task.type}s`].unshift(task);
|
|
});
|
|
|
|
this.$root.$emit('bv::hide::modal', 'avatar-modal');
|
|
if (this.$route.path !== '/') {
|
|
this.$router.push('/');
|
|
}
|
|
|
|
// NOTE: it's important this flag is set AFTER the onboarding default tasks
|
|
// have been created or it'll break the onboarding guide achievement for creating a task
|
|
this.$store.dispatch('user:set', {
|
|
'flags.welcomed': true,
|
|
});
|
|
|
|
// @TODO: This is a timeout to ensure dom is loaded
|
|
window.setTimeout(() => {
|
|
this.initTour();
|
|
this.goto('intro', 0);
|
|
}, 1000);
|
|
},
|
|
},
|
|
};
|
|
</script>
|