Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gpg/grants landing #8500

Merged
merged 300 commits into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
300 commits
Select commit Hold shift + click to select a range
32ec6af
Updates css href's -> scss (app/dashboard/templates/profiles/tribes-v…
gdixon Feb 9, 2021
a9523be
Updates css href's -> scss (app/dataviz/templates/dataviz/admin_graph…
gdixon Feb 9, 2021
5f430c0
Updates css href's -> scss (app/dataviz/templates/dataviz/circles.html)
gdixon Feb 9, 2021
c2743b8
Updates css href's -> scss (app/dataviz/templates/dataviz/draggable.h…
gdixon Feb 9, 2021
49f98fa
Updates css href's -> scss (app/dataviz/templates/dataviz/graph.html)
gdixon Feb 9, 2021
f2e65ef
Updates css href's -> scss (app/dataviz/templates/dataviz/heatmap.html)
gdixon Feb 9, 2021
6e794eb
Updates css href's -> scss (app/dataviz/templates/dataviz/index.html)
gdixon Feb 9, 2021
6654469
Updates css href's -> scss (app/dataviz/templates/dataviz/mesh.html)
gdixon Feb 9, 2021
18f1f14
Updates css href's -> scss (app/dataviz/templates/dataviz/spiral.html)
gdixon Feb 9, 2021
aacb9aa
Updates css href's -> scss (app/dataviz/templates/dataviz/steamgraph.…
gdixon Feb 9, 2021
1d4aace
Updates css href's -> scss (app/dataviz/templates/dataviz/sunburst.html)
gdixon Feb 9, 2021
f59e439
Updates css href's -> scss (app/dataviz/templates/stats.html)
gdixon Feb 9, 2021
a46749c
Updates css href's -> scss (app/faucet/templates/bulk_DM.html)
gdixon Feb 9, 2021
02740e5
Updates css href's -> scss (app/faucet/templates/bulk_email.html)
gdixon Feb 9, 2021
a92d596
Updates css href's -> scss (app/faucet/templates/process_faucet_reque…
gdixon Feb 9, 2021
02f3161
Updates css href's -> scss (app/grants/templates/grants/_new.html)
gdixon Feb 9, 2021
2a56cb2
Updates css href's -> scss (app/grants/templates/grants/cancel.html)
gdixon Feb 9, 2021
6b0260a
Updates css href's -> scss (app/grants/templates/grants/cart-vue.html)
gdixon Feb 9, 2021
cefed32
Updates css href's -> scss (app/grants/templates/grants/detail/_index…
gdixon Feb 9, 2021
387d4f1
Updates css href's -> scss (app/grants/templates/grants/detail/index.…
gdixon Feb 9, 2021
3ae3ad1
Updates css href's -> scss (app/grants/templates/grants/faq.html)
gdixon Feb 9, 2021
3793eaa
Updates css href's -> scss (app/grants/templates/grants/index.html)
gdixon Feb 9, 2021
5a0ad6e
Updates css href's -> scss (app/grants/templates/grants/ingest-contri…
gdixon Feb 9, 2021
7e7f99c
Updates css href's -> scss (app/grants/templates/grants/new-whitelabe…
gdixon Feb 9, 2021
9ead662
Updates css href's -> scss (app/grants/templates/grants/new.html)
gdixon Feb 9, 2021
861708f
Updates css href's -> scss (app/grants/templates/grants/new_match.html)
gdixon Feb 9, 2021
d821c72
Updates css href's -> scss (app/grants/templates/grants/quickstart.html)
gdixon Feb 9, 2021
66b80f3
Updates css href's -> scss (app/kudos/templates/kudos_about.html)
gdixon Feb 9, 2021
61f790a
Updates css href's -> scss (app/kudos/templates/kudos_details.html)
gdixon Feb 9, 2021
c079bf8
Updates css href's -> scss (app/kudos/templates/kudos_marketplace.html)
gdixon Feb 9, 2021
3891d0c
Updates css href's -> scss (app/kudos/templates/transaction/base.html)
gdixon Feb 9, 2021
4394ecd
Updates css href's -> scss (app/kudos/templates/receive_bulk.html)
gdixon Feb 9, 2021
1a19c9c
Updates css href's -> scss (app/ptokens/templates/buy_a_token.html)
gdixon Feb 9, 2021
dfc3ab4
Updates css href's -> scss (app/ptokens/templates/personal_tokens.html)
gdixon Feb 9, 2021
66de6c1
Updates css href's -> scss (app/ptokens/templates/ptokens_buy_faq.html)
gdixon Feb 9, 2021
760fedd
Updates css href's -> scss (app/ptokens/templates/ptokens_faq.html)
gdixon Feb 9, 2021
654b900
Updates css href's -> scss (app/ptokens/templates/ptokens_make_faq.html)
gdixon Feb 9, 2021
cccfe07
Updates css href's -> scss (app/quests/templates/quests/base.html)
gdixon Feb 9, 2021
4d9c8a3
Updates css href's -> scss (app/quests/templates/quests/new.html)
gdixon Feb 9, 2021
f405117
Updates css href's -> scss (app/quests/templates/quests/types/example…
gdixon Feb 9, 2021
c174bf5
Updates css href's -> scss (app/quests/templates/quests/types/quiz_st…
gdixon Feb 9, 2021
1eb57e4
Updates css href's -> scss (app/retail/templates/about.html)
gdixon Feb 9, 2021
60611d6
Updates css href's -> scss (app/retail/templates/activity.html)
gdixon Feb 9, 2021
523e0aa
Updates css href's -> scss (app/retail/templates/admin/base.html)
gdixon Feb 9, 2021
a04d1ae
Updates css href's -> scss (app/retail/templates/admin/index.html)
gdixon Feb 9, 2021
178bfb8
Updates css href's -> scss (app/retail/templates/avatar_landing.html)
gdixon Feb 9, 2021
013a419
Updates css href's -> scss (app/retail/templates/base.html)
gdixon Feb 9, 2021
6e42dfb
Updates css href's -> scss (app/retail/templates/bounties/contributor…
gdixon Feb 9, 2021
31358ab
Updates css href's -> scss (app/retail/templates/bounties/contributor…
gdixon Feb 9, 2021
0327d15
Updates css href's -> scss (app/retail/templates/bounties/contributor…
gdixon Feb 9, 2021
406a741
Updates css href's -> scss (app/retail/templates/bounties/funder.html)
gdixon Feb 9, 2021
6f41336
Updates css href's -> scss (app/retail/templates/emails_unsubscribed.…
gdixon Feb 9, 2021
882acc0
Updates css href's -> scss (app/retail/templates/emails/recap/weekly_…
gdixon Feb 9, 2021
4763718
Updates css href's -> scss (app/retail/templates/emails/shared_templa…
gdixon Feb 9, 2021
eb949b1
Updates css href's -> scss (app/retail/templates/home/index.html)
gdixon Feb 9, 2021
26b47b4
Updates css href's -> scss (app/retail/templates/home/index2020.html)
gdixon Feb 9, 2021
ac0c5bf
Updates css href's -> scss (app/retail/templates/how_it_works/index.h…
gdixon Feb 9, 2021
4260ab4
Updates css href's -> scss (app/retail/templates/leaderboard.html)
gdixon Feb 9, 2021
48ecc31
Updates css href's -> scss (app/retail/templates/mission.html)
gdixon Feb 9, 2021
2a26d8a
Updates css href's -> scss (app/retail/templates/newkudos.html)
gdixon Feb 9, 2021
1143c9d
Updates css href's -> scss (app/retail/templates/newtoken.html)
gdixon Feb 9, 2021
c67ab7d
Updates css href's -> scss (app/retail/templates/presskit.html)
gdixon Feb 9, 2021
bf71669
Updates css href's -> scss (app/retail/templates/process_accesscode_r…
gdixon Feb 9, 2021
a4d71d3
Updates css href's -> scss (app/retail/templates/products.html)
gdixon Feb 9, 2021
f346b88
Updates css href's -> scss (app/retail/templates/resend_tip.html)
gdixon Feb 9, 2021
febd5f2
Updates css href's -> scss (app/retail/templates/results.html)
gdixon Feb 9, 2021
1dda631
Updates css href's -> scss (app/retail/templates/tribes/landing.html)
gdixon Feb 9, 2021
4df1321
Updates css href's -> scss (app/retail/templates/vision.html)
gdixon Feb 9, 2021
533272a
Updates css href's -> scss (app/townsquare/templates/townsquare/index…
gdixon Feb 9, 2021
4df3971
Updates css href's -> scss (app/townsquare/templates/townsquare/new.h…
gdixon Feb 9, 2021
810352a
Updates css href's -> scss (app/townsquare/templates/townsquare/offer…
gdixon Feb 9, 2021
39d2c83
Renames quill-snow.scss -> quill.snow.scss
gdixon Feb 9, 2021
49be179
Adds misc .css (as .scss) from other locations
gdixon Feb 9, 2021
a12c0e2
Adds stylelint-scss
gdixon Feb 9, 2021
713cb12
Runs stylelint --fix
gdixon Feb 9, 2021
43c0dc3
Merge branch 'master' of https://github.com/gitcoinco/web into gpg/ne…
gdixon Feb 10, 2021
23ec5f0
Updates stylelint
gdixon Feb 10, 2021
86be017
Drops preload
gdixon Feb 10, 2021
27a64aa
Drops .css from test case
gdixon Feb 10, 2021
640df4e
Inline typography.scss (but still exclude from premailer)
gdixon Feb 10, 2021
f14b7b9
Restore mocked_requests param
gdixon Feb 10, 2021
32f2fb4
Drop .scss from admin
gdixon Feb 10, 2021
6de3b8d
merge
octavioamu Feb 10, 2021
8485cea
Adds collectstatic to travis
gdixon Feb 10, 2021
35d1314
Drop typography.scss from email templates
gdixon Feb 10, 2021
2dc0c08
Adds collectstatic again but with --disable-collectfast flag
gdixon Feb 10, 2021
521b986
remove css files
octavioamu Feb 10, 2021
2b5fea5
Adds missing stylesheet
gdixon Feb 10, 2021
de188fb
Fixes global btn override on quests
gdixon Feb 10, 2021
f16a44b
Fixes class name
gdixon Feb 10, 2021
73a44d4
Drops missing stylesheet
gdixon Feb 10, 2021
3ae6633
Extends block
gdixon Feb 10, 2021
1710238
Compress stylesheets offline in production
gdixon Feb 10, 2021
780c7d1
bundle js files and cleanup
octavioamu Feb 10, 2021
a935a4f
remove duplicates
octavioamu Feb 10, 2021
b29f409
avoid using jquery-old in most pages
octavioamu Feb 10, 2021
f4c8275
fix jsrender where is used
octavioamu Feb 10, 2021
856ca60
move select2 to jquery extras
octavioamu Feb 10, 2021
ce84892
Tidy up
gdixon Feb 11, 2021
a1cfb6b
Fixes indentation
gdixon Feb 11, 2021
3c83a6b
Fixes indentation
gdixon Feb 11, 2021
2d09d73
sass variables overwrites and cleanup
octavioamu Feb 11, 2021
23bf00a
sass variables overwrites and cleanup
octavioamu Feb 11, 2021
0733106
Merge branch 'gpg/new-components' of https://github.com/gitcoinco/web…
gdixon Feb 11, 2021
0f8a216
start nav styles
octavioamu Feb 11, 2021
f8771c1
nav icons
octavioamu Feb 11, 2021
684e8a6
add custom variables
octavioamu Feb 11, 2021
847dc6e
Fixes footer to the bottom of the screen (using flexbox)
gdixon Feb 12, 2021
16fdf23
Hides #top_nav_notification until .ready (stops el from showing empty…
gdixon Feb 12, 2021
bb93d40
Fixes linting
gdixon Feb 12, 2021
a4746db
fix wallet icon
octavioamu Feb 12, 2021
0242b55
Merge branch 'master' into gpg/new-components
gdixon Feb 15, 2021
7cb8421
Fixes naming convention for variables/mixins
gdixon Feb 15, 2021
3d9db76
Adds new fonts (Libre Franklin & Miriam Libre)
gdixon Feb 15, 2021
6b816d2
Updates the remaining nav's, replaces logos and makes provider-icon r…
gdixon Feb 15, 2021
43f32ef
Merge branch 'master' into gpg/new-components
gdixon Feb 15, 2021
ffa17e3
Override bootstrap font definitions
gdixon Feb 16, 2021
db070de
Drops Futura and Muli font definitions and files
gdixon Feb 16, 2021
c7424a3
Implements hot-module-reloading
gdixon Feb 17, 2021
8ab341f
Moves livereload to requirements/test.txt
gdixon Feb 17, 2021
157781d
Moves dj_static to requirements/test.txt
gdixon Feb 17, 2021
de78859
Merge branch 'master' into gpg/new-components
gdixon Feb 22, 2021
4c8b7e3
Fixes indentation
gdixon Feb 22, 2021
4c29a87
Fixes closing tags and adds footer to base
gdixon Feb 22, 2021
9ff79b4
Merge branch 'master' into gpg/new-components
octavioamu Feb 23, 2021
c5e4b92
add font variants support
octavioamu Feb 23, 2021
79a8706
fix font type
octavioamu Feb 23, 2021
996ff4a
move typography and css cleanup
octavioamu Feb 23, 2021
b5a3342
Fixes page overflowing on profile
gdixon Feb 24, 2021
64108a7
Merge branch 'master' into gpg/new-components
gdixon Feb 24, 2021
884177a
Tidies up navs
gdixon Feb 25, 2021
05c5e7a
Fixes fonts, colours and containers
gdixon Feb 25, 2021
4a3846b
Fixes gh-login position on landingpage
gdixon Feb 25, 2021
4d06f24
Fixes spacing of gh-login on main nav
gdixon Feb 25, 2021
434148e
Re-enables cart and switches styles to regular (fas->far)
gdixon Feb 25, 2021
6388372
Merge branch 'master' into gpg/new-components
gdixon Feb 25, 2021
d104659
Adds button variables and assigns colors
gdixon Feb 26, 2021
ebdf6b1
First batch of btn replacements
gdixon Feb 26, 2021
14afee0
Second batch of btn replacements
gdixon Feb 26, 2021
2df6c50
Drops .btn definitions that conflict with bootstrap
gdixon Feb 26, 2021
72b9ede
Merge pull request #8448 from gitcoinco/gpg/new-buttons
octavioamu Feb 26, 2021
3b3ce5f
font base increase
octavioamu Feb 26, 2021
137f5ed
Merge branch 'master' into gpg/new-components
gdixon Feb 26, 2021
3d65f4c
fix funder page
octavioamu Feb 26, 2021
dbc78ee
Changes more .btn-gc-*'s over to .btn-*
gdixon Feb 26, 2021
240e514
Tidy up variables
gdixon Mar 1, 2021
e09c9c7
Adds labels to navbar icons in mobile view
gdixon Mar 1, 2021
f391be0
Makes notification dot responsive (em->rem)
gdixon Mar 1, 2021
efb3f61
Drops surplus container
gdixon Mar 1, 2021
fa7d1b9
Updates townsquare (mobile and darkmode)
gdixon Mar 2, 2021
1fc48c2
Makes 'find a tribe' button more responsive
gdixon Mar 2, 2021
1f8ad2f
Fixes <a> tag colors
gdixon Mar 2, 2021
d33c1ba
Fixes Join Hackathon 401 error (missing mailchimp config in staging)
gdixon Mar 2, 2021
e2a49ef
Updates to products page
gdixon Mar 2, 2021
f3a449c
Drops line-height definition on p tag's
gdixon Mar 2, 2021
42ae14c
change main grants page
octavioamu Mar 2, 2021
51d3af8
Use a version of the animated logo for townsquare/mission nav (dirty/…
gdixon Mar 2, 2021
6fabf6c
Ensures logo is initially white during load (for dark-mode)
gdixon Mar 2, 2021
00092c1
Fixes positioning of townsquare logo for mobile view
gdixon Mar 3, 2021
fefab6c
Darkens modal background for hackathons onboarding
gdixon Mar 3, 2021
53a5371
Updates colors on townsquare (text/onboarding modal)
gdixon Mar 3, 2021
fc9c1e3
Merge branch 'master' into gpg/new-components
gdixon Mar 3, 2021
4653785
Merge branch 'master' into gpg/new-components
gdixon Mar 3, 2021
412a7a7
Fixes grants collapse icon positioning and truncates long category names
gdixon Mar 3, 2021
f954daf
Changes "Search Grant" -> "Filter Grants" on sidebar searchKeyword input
gdixon Mar 3, 2021
4da71e2
add new styles
octavioamu Mar 4, 2021
0a267bb
Merge branch 'gpg/new-components' into gpg/grants-landing
octavioamu Mar 4, 2021
abde93a
Merge branch 'master' into gpg/grants-landing
octavioamu Mar 4, 2021
88c3e16
Merge branch 'master' into gpg/grants-landing
octavioamu Mar 4, 2021
94090dd
fix banners and ui
octavioamu Mar 5, 2021
5694537
banner to static and fav grants
octavioamu Mar 5, 2021
227a986
Merge branch 'master' into gpg/grants-landing
octavioamu Mar 5, 2021
3eb5c77
multiple changes from issue 8483
octavioamu Mar 5, 2021
3106b44
Alters grants details page to match the new design
gdixon Mar 5, 2021
4aa6de9
Removes "View all" from Latest Collections
gdixon Mar 5, 2021
238e8bc
Refactors and updates styles to keep side-cart functional
gdixon Mar 5, 2021
706beaf
Merge branch 'master' into gpg/grants-landing
octavioamu Mar 5, 2021
6d0e305
Merge pull request #8495 from gitcoinco/gpg/reduced-spec-grants-details
gdixon Mar 5, 2021
4cabee2
add grant type is_visible to control the sidebar filters
octavioamu Mar 5, 2021
e8cfcba
add white bg to edit grant
octavioamu Mar 5, 2021
1e841fb
add refresh type cache admin
octavioamu Mar 5, 2021
1ddfcb0
landing filters to follow is visible on types
octavioamu Mar 5, 2021
4cef3b6
fix bugs with collections and layout changes
octavioamu Mar 6, 2021
8e698ad
filters always visibles for clr routes, hide add all in all grants
octavioamu Mar 6, 2021
7adb8ba
change collection bg color
octavioamu Mar 6, 2021
f9c7777
fix add to collection dropdown
octavioamu Mar 6, 2021
5750bcc
add not clr card
octavioamu Mar 6, 2021
fd56283
Fixes padding, floats and gaps
gdixon Mar 6, 2021
01c7f3f
Fixes linting errors
gdixon Mar 6, 2021
656b627
fix wrong var
octavioamu Mar 6, 2021
e5b0ebd
align button and remove animation that only exist on profile.css
octavioamu Mar 6, 2021
8d49da0
Drops headers
gdixon Mar 6, 2021
dc6e0de
Fixes region and drops positive_round_contributor_count (using "all" …
gdixon Mar 6, 2021
294ab2b
Minor indentation fix
gdixon Mar 6, 2021
5dd24b7
Fixes UnboundLocalError in get_grants
gdixon Mar 6, 2021
ee8acc5
fix filters on clr when going to collections
octavioamu Mar 7, 2021
2dbe117
Implement post-checkout Grants Modal Redesign and Refactor (#8428)
apbendi Mar 1, 2021
a10914c
Reintroduces collections modal
gdixon Mar 7, 2021
035591c
Fixes contribution modals
gdixon Mar 7, 2021
51c97d8
Fixes order of inclusions to make the modals in funding.js work
gdixon Mar 7, 2021
cc259be
Merge branch 'gpg/grants-landing' of github.com:gitcoinco/web into gp…
octavioamu Mar 7, 2021
9c0f946
no link on title collection and remove thanks modal from landing
octavioamu Mar 7, 2021
6582e02
Separates thanks and collection modals and diverts contribution succe…
gdixon Mar 7, 2021
16d6eb3
Ensure donation amount can be parsed even when empty
gdixon Mar 7, 2021
145ad2e
Tidies up modals (padding, responsive view and image)
gdixon Mar 7, 2021
e4c4f4b
Stops sidebar (cart) from changing the layout
gdixon Mar 7, 2021
4247017
Fixes sidebar select2 styles
gdixon Mar 7, 2021
9425dfb
Fixes margins
gdixon Mar 7, 2021
0793626
Tidies up margins and positions on activity/townsquare
gdixon Mar 7, 2021
f74d50f
Moves sidebar styles and adds z-index
gdixon Mar 7, 2021
1974f4b
Adds more margin to end of About section
gdixon Mar 7, 2021
343b92e
Fixes Hackathon sponsor tribes follow buttons
gdixon Mar 7, 2021
af7beda
Fixes web3 modal z-index (so that its above navbars menu)
gdixon Mar 7, 2021
c537d86
Fixes margins on Hackathon areas sticky header
gdixon Mar 7, 2021
e83c873
Updates various b-buttons variant attr (so that they don't default to…
gdixon Mar 7, 2021
73db662
hide active QF card on collection page
thelostone-mc Mar 7, 2021
c831cc8
fix follow button position on list view
thelostone-mc Mar 7, 2021
e9cfa6d
add missing chain logo on grant card
thelostone-mc Mar 7, 2021
7048fc1
ensure followed grants + idle grants show up on clr page
thelostone-mc Mar 7, 2021
a46cd17
recreate cards
octavioamu Mar 8, 2021
f5b37ec
fix value
octavioamu Mar 8, 2021
98bcf21
show active round section in CLR page
thelostone-mc Mar 8, 2021
fb5331f
show custom % in active state on entering custom amount
thelostone-mc Mar 8, 2021
c9b9ec4
adds the ability to access grants API data via API KEYs
owocki Mar 5, 2021
1b9bb69
fix is collection
octavioamu Mar 8, 2021
9da7010
recreate migration
thelostone-mc Mar 8, 2021
a3c6da4
Brings back Sybil Profile and Stats tabs
gdixon Mar 8, 2021
0c3ad92
Tidies up region/category/sub-category columns
gdixon Mar 8, 2021
ea7f281
Merge pull request #8494 from gitcoinco/kevin/api_key
octavioamu Mar 8, 2021
ca1695f
fix migration
octavioamu Mar 8, 2021
ffc14b2
Switches collections static image for robot static image
gdixon Mar 8, 2021
b8ad3d9
fix logic fetching tokens
octavioamu Mar 8, 2021
8899414
Clear only the checked-out data from the cart after successful checkout
gdixon Mar 8, 2021
9c1a98e
Drops surplus console.log messages
gdixon Mar 8, 2021
c490c8d
fix filters when moving around my collections
octavioamu Mar 8, 2021
40f660e
Drops surplus console.log messages
gdixon Mar 8, 2021
68ff265
Switches collections static image for space-funding-woman
gdixon Mar 8, 2021
f98ce2b
change rsk logo
octavioamu Mar 8, 2021
c3e020f
Changes grant creation message prompt to success (green)
gdixon Mar 8, 2021
2ee84d1
Fixes follow button on tribes
gdixon Mar 8, 2021
1f63447
Merge remote-tracking branch 'origin' into gpg/grants-landing
gdixon Mar 8, 2021
24ea05b
remove collection to add if already on it
octavioamu Mar 8, 2021
f2bb41d
fix bug when on collection click filters
octavioamu Mar 8, 2021
a58fcc2
Tidies up quests (for mobile)
gdixon Mar 9, 2021
44a2bbc
Tidies up hackathon dashboard
gdixon Mar 9, 2021
797bc66
Hides sidebar filters by default on bounties explorer (for mobile/tab…
gdixon Mar 9, 2021
6af609b
Tidies up grants (for mobile)
gdixon Mar 9, 2021
932bf6d
Fixes sub-catagory counts for CLRs and adds management buttons to upd…
gdixon Mar 9, 2021
18192fa
Makes follow/unfollow buttons consistent (btn-primary/btn-success)
gdixon Mar 9, 2021
821c0a2
Fixes linting issues
gdixon Mar 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion app/assets/v2/images/chains/rsk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/v2/images/grants/rocket.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 26 additions & 1 deletion app/assets/v2/js/cart-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class CartData {
}

static share_url(title) {
const donations = this.loadCart();
const checkedOut = this.loadCheckedOut();
const donations = (checkedOut.length > 0 ? checkedOut : this.loadCart());
let bulk_add_cart = 'https://gitcoin.co/grants/cart/bulk-add/';

let network = document.web3network;
Expand Down Expand Up @@ -244,4 +245,28 @@ class CartData {
localStorage.setItem('grants_cart', JSON.stringify(list));
applyCartMenuStyles();
}

static loadCheckedOut() {
const checkedOutList = localStorage.getItem('contributions_were_successful');

if (!checkedOutList) {
return [];
}

const parsedCheckout = JSON.parse(checkedOutList);

if (!Array.isArray(parsedCheckout)) {
return [];
}

return parsedCheckout;
}

static setCheckedOut(list) {
localStorage.setItem('contributions_were_successful', JSON.stringify(list));
}

static clearCheckedOut() {
localStorage.removeItem('contributions_were_successful');
}
}
80 changes: 13 additions & 67 deletions app/assets/v2/js/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@ Vue.component('grants-cart', {
// Checkout, zkSync
zkSyncUnsupportedTokens: [], // Used to inform user which tokens in their cart are not on zkSync
zkSyncEstimatedGasCost: undefined, // Used to tell user which checkout method is cheaper
isZkSyncDown: false, // disable zkSync when true
// Collection
showCreateCollection: false,
collectionTitle: '',
collectionDescription: '',
collections: [],
selectedCollection: null
isZkSyncDown: false // disable zkSync when true
};
},

Expand Down Expand Up @@ -132,17 +126,6 @@ Vue.component('grants-cart', {
return document.contxt.github_handle;
},

// Determine when activate the save collection button
isValidCollection() {
if (this.selectedCollection !== null) {
return true;
} else if (this.collectionTitle.length > 3 && this.collectionDescription.length < 140) {
return true;
}

return false;
},

// Percentage of donation that goes to Gitcoin
gitcoinFactor() {
return Number(this.gitcoinFactorRaw) / 100;
Expand Down Expand Up @@ -188,7 +171,7 @@ Vue.component('grants-cart', {
let gitcoinFactor = String(100 - (100 * this.gitcoinFactor));
const donations = this.grantsByTenant.map((grant, index) => {
const tokenDetails = this.getTokenByName(grant.grant_donation_currency);
const amount = parseUnits(String(grant.grant_donation_amount), tokenDetails.decimals)
const amount = parseUnits(String(grant.grant_donation_amount || 0), tokenDetails.decimals)
.mul(gitcoinFactor)
.div(100);

Expand Down Expand Up @@ -570,7 +553,7 @@ Vue.component('grants-cart', {

this.grantsByTenant.forEach(grant => {
// Scale up number by 1e18 to use BigNumber, multiply by scaleFactor
const totalDonationAmount = parseEther(String(grant.grant_donation_amount))
const totalDonationAmount = parseEther(String(grant.grant_donation_amount || 0))
.mul(String(scaleFactor * 100))
.div('100');

Expand Down Expand Up @@ -658,7 +641,7 @@ Vue.component('grants-cart', {
priority: 1
};
}
return this.currentTokens.filter(token => token.name === name)[0];
return this.filterByChainId.filter(token => token.name === name)[0];
},

async applyAmountToAllGrants(grant) {
Expand Down Expand Up @@ -1079,15 +1062,20 @@ Vue.component('grants-cart', {
* success alert
*/
async finalizeCheckout() {
// Number of items descides the timeout time
const timeout_amount = 1500 + (this.grantsByTenant.length * 500);
// Clear cart, redirect back to grants page, and show success alert
localStorage.setItem('contributions_were_successful', 'true');
localStorage.setItem('contributions_count', String(this.grantsByTenant.length));
let timeout_amount = 1500 + (CartData.loadCart().length * 500);

CartData.setCheckedOut(this.grantsByTenant);
// Remove each grant from the cart which has just been checkout
this.grantsByTenant.forEach((grant) => {
CartData.removeIdFromCart(grant.grant_id);
});

setTimeout(function() {
_alert('Contributions saved', 'success', 1000);
setTimeout(function() {
window.location.href = `${window.location.origin}/grants`;
window.location.href = `${window.location.origin}/grants/explorer`;
}, 500);
}, timeout_amount);
},
Expand Down Expand Up @@ -1246,45 +1234,7 @@ Vue.component('grants-cart', {
return cartData;
}
return false;
},

// ================== Start collection logic ==================
createCollection: async function() {
const csrfmiddlewaretoken = document.querySelector('[name=csrfmiddlewaretoken]').value;
const cart = CartData.loadCart();
const grantIds = cart.map(grant => grant.grant_id);
let response;

const body = {
collectionTitle: this.collectionTitle,
collectionDescription: this.collectionDescription,
grants: grantIds
};

if (this.selectedCollection) {
body['collection'] = this.selectedCollection;
}

try {

response = await fetchData('/grants/v1/api/collections/new', 'POST', body, {'X-CSRFToken': csrfmiddlewaretoken});
const redirect = `/grants/collections?collection_id=${response.collection.id}`;

_alert('Congratulations, your new collection was created successfully!', 'success');
this.cleanCollectionModal();
this.showCreateCollection = false;

window.location = redirect;

} catch (e) {
_alert(e.msg, 'error');
}
},
cleanCollectionModal: function() {
this.collectionTitle = '';
this.collectionDescription = '';
}
// ================== End collection logic ==================
},

watch: {
Expand Down Expand Up @@ -1431,10 +1381,6 @@ Vue.component('grants-cart', {

// Show user cart now
this.isLoading = false;

const collections_response = await fetchData('/grants/v1/api/collections/');

this.collections = collections_response.collections;
},

beforeDestroy() {
Expand Down
Loading