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

ReadY for Review - Quadraticlands diplomacy (a medley of Aditya/Richard/Owocki Code) #9039

Merged
merged 73 commits into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
c117f4d
zeroclaim-interface-fix #8948
scco May 26, 2021
e37fd4c
zeroclaim-interface-fix
scco May 26, 2021
7f76197
fix linter
scco May 26, 2021
8d30f84
Merge branch 'master' into quadraticlands-diplomacy-richard
scco Jun 4, 2021
4d8892b
initial works on diplomacy mission
scco Jun 6, 2021
5e6d176
updated diplomacy svgs
scco Jun 7, 2021
0701461
quadratic diplomacy interface
scco Jun 7, 2021
8a8c5d6
fix lintings
scco Jun 7, 2021
7c23a63
Merge remote-tracking branch 'upstream/master' into quadraticlands-di…
thelostone-mc Jun 8, 2021
e96abf8
minor fixes
thelostone-mc Jun 8, 2021
44dd940
quadratic diplomacy interface
scco Jun 9, 2021
efe8378
Merge remote-tracking branch 'upstream/master'
scco Jun 10, 2021
d885c12
Merge remote-tracking branch 'upstream/master' into quadraticlands-di…
scco Jun 10, 2021
f0655b4
adding some basic js for vouche validation WIP
scco Jun 10, 2021
59dd0ba
create room css fix
scco Jun 10, 2021
c0373cc
Update diplomacy-create-room.scss
scco Jun 10, 2021
f21869a
read wallet / do calculations for the voucheBar
scco Jun 10, 2021
3348ed8
add readonly on "self members"
scco Jun 10, 2021
d0ed536
links + header sizzle
owocki Jun 11, 2021
b80fca7
dat model tho
owocki Jun 11, 2021
db6ed6b
WIP
Jun 11, 2021
1408814
WIP
Jun 11, 2021
1ead84b
testing
Jun 11, 2021
c98077a
almost there
owocki Jun 11, 2021
5920fba
Merge remote-tracking branch 'upstream/master' into quadraticlands-di…
scco Jun 11, 2021
f785e3a
Merge branch 'master' into quadraticlands-diplomacy-richard
scco Jun 11, 2021
1e846ab
update diplomacy frontend
scco Jun 12, 2021
9118803
some particle love
scco Jun 13, 2021
40935b3
toggle-able member cards that have options for detailed in out data
scco Jun 13, 2021
4be78be
Merge branch 'quadraticlands-diplomacy-richard' of github.com:scco/gi…
owocki Jun 16, 2021
9ef282b
sign atures saved
owocki Jun 16, 2021
2636b52
works
owocki Jun 17, 2021
a32ea84
it works
owocki Jun 17, 2021
3c22db5
invite links
owocki Jun 17, 2021
239bef8
navgation fix
scco Jun 18, 2021
2b938eb
Merge remote-tracking branch 'upstream/master' into quadraticlands-di…
scco Jun 18, 2021
ea3154b
fix section in section for chat-message-box kev invented
scco Jun 18, 2021
d1a6076
Merge branch 'master' into quadraticlands-diplomacy-richard
thelostone-mc Jun 18, 2021
57e4b98
add mergr migration
Jun 18, 2021
0d2ebf3
edits player handle
Jun 18, 2021
6fc1176
small fix
Jun 18, 2021
afc5b7e
refs
Jun 18, 2021
1941e71
small fix
Jun 18, 2021
d94d90b
notification for diplomacy
scco Jun 18, 2021
6e4eb1e
some more interface tweaks
scco Jun 18, 2021
2732dd2
Merge branch 'quadraticlands-diplomacy-richard' of github.com:gitcoin…
scco Jun 18, 2021
0ab0031
Merge branch 'quadraticlands-diplomacy-richard' of github.com:scco/gi…
owocki Jun 19, 2021
2d1f01f
room joining
owocki Jun 19, 2021
60e9d14
merged conflicts
scco Jun 20, 2021
ac057e2
merge fixes and basic playtest
owocki Jun 20, 2021
d24e9be
add better scroll
scco Jun 21, 2021
4dcdd58
fixes migrations and refreshing
owocki Jun 22, 2021
153769c
some improvements see description
scco Jun 22, 2021
6793cbb
wip verification - need adityas help to get it to work
owocki Jun 23, 2021
78c34e1
Merge branch 'quadraticlands-diplomacy-richard' of github.com:scco/gi…
owocki Jun 25, 2021
828a0e9
resolve conflicts
thelostone-mc Jun 28, 2021
5d07268
avoid using reserved name
thelostone-mc Jun 28, 2021
376d8eb
https://github.com/gitcoinco/web/pull/9039#discussion_r659779618
owocki Jun 29, 2021
2f53f95
precompute data
owocki Jun 29, 2021
ff4fce1
a few small things
owocki Jun 29, 2021
ad5d319
qd
owocki Jun 29, 2021
a248206
amount
owocki Jun 29, 2021
cdb7656
it works thx aditya
owocki Jul 2, 2021
10db298
copy
owocki Jul 2, 2021
11fb02c
gs
owocki Jul 2, 2021
d1cb22b
lint fixes
thelostone-mc Jul 5, 2021
476c276
remove default
thelostone-mc Jul 5, 2021
c93a99a
un-needed migrations
thelostone-mc Jul 5, 2021
88f11bf
recreate migrations
thelostone-mc Jul 5, 2021
3188021
wip: profile trust tab
thelostone-mc Jul 5, 2021
ca20f4c
Adds options to have a disabled/an alternative "disconnect" button on…
gdixon Jul 5, 2021
e2c87dd
Merge branch 'master' into quadraticlands-diplomacy-richard
thelostone-mc Jul 9, 2021
aaa170f
hide behind staff
thelostone-mc Jul 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
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.
71 changes: 71 additions & 0 deletions app/assets/v2/js/pages/profile-trust.js
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,77 @@ Vue.component('facebook-verify-modal', {
}
});

Vue.component('qd-modal', {
delimiters: [ '[[', ']]' ],
data: function() {
return {
validationError: '',
forceStep: false,
awaitingResponse: false
};
},
props: {
showValidation: {
type: Boolean,
required: false,
'default': false
},
service: {
type: Object,
required: true
}
},
computed: {
step() {
return this.forceStep || this.validationStep;
}
},
template: `
<b-modal id="twitter-modal" @hide="dismissVerification()" :visible="showValidation" size="lg" body-class="p-0" center hide-header hide-footer>
<template v-slot:default="{ hide }">
<div class="modal-content p-0">
<div class="top rounded-top p-2 text-center" style="background: #0e0333;">
<div class="w-100">
<button @click="dismissVerification()" type="button" class="close position-absolute mt-2 text-white" style="right: 1rem" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="bg-white d-flex mt-4 mx-auto p-1 rounded-circle" style="width: 74px; height: 74px;">
<img class="m-auto w-100" src="/static/v2/images/quadraticlands/mission/diplomacy.svg" alt="QL Diplomacy Logo">
</div>
<h3 class="text-white my-4"> Verify with Quadratic Diplomacy </h3>
</div>
<div class="font-smaller-1 line-height-3 spacer-px-4 spacer-px-lg-6 spacer-py-5">
<div class="mb-4 text-left">
<p class="mb-4 font-subheader text-left">
Use your GTC to strengthen Gitcoin Grants!
</p>
<p class="mb-4 font-subheader text-left">
WHY: The Foundation of Gitcoin Grants is Quadratic Funding, which is itself dependant upon sybil & fraud resistence.
</p>

<button @click="goToVerification" role="button" class="btn btn-primary mb-2 mt-5 px-5 float-right">
Verify Now
</button>
</div>
</div>
</div>
</template>
</b-modal>`,
methods: {
dismissVerification() {
this.$emit('modal-dismissed');
setTimeout(() => {
this.forceStep = false;
}, 1000);
},
goToVerification() {
window.open('/quadraticlands/mission/diplomacy', '_blank')
this.dismissVerification();
}
}
});

if (document.getElementById('gc-trust-manager-app')) {

const trustManagerApp = new Vue({
Expand Down
8 changes: 8 additions & 0 deletions app/assets/v2/js/quadraticlands/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ document.addEventListener('DOMContentLoaded', function() {
});
}

// make noprovider icon also open the menue.
const noproviderIcon = document.getElementById('noproviderIcon');

noproviderIcon.addEventListener('click', () => {
walletProvider.classList.toggle('active');
});


// inside the wallet menu i reused the .provider class
// what was initial there to display all providers
// now with other functions like "change wallet, pick wallet, disconnect"
Expand Down
36 changes: 36 additions & 0 deletions app/assets/v2/js/quadraticlands/mission/diplomacy/hero.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
document.addEventListener('DOMContentLoaded', function() {
// random floor polygones coloring on diplomacy image
polygones = document.querySelectorAll('svg #hero polygon, svg #hero path');
polygones.forEach((p) => {
p.setAttribute('data-kinetics-attraction', '');
p.setAttribute('data-kinetics-attraction-chance', getRandomFloat(0.3, 1));
p.setAttribute('data-kinetics-attraction-force', getRandomFloat(0.7, 1.3));
p.setAttribute('data-kinetics-attraction-grow', getRandomInt(1, 4));
p.setAttribute('data-tone-click-random', '');
p.style.cursor = 'pointer';
});

initToneJs();
window.kinetics = new Kinetics();
window.kinetics.interactionHook();
last = 0;
animate_diplomacy();
});

function animate_diplomacy(now) {
if (!last || now - last >= 60) {
polygone = polygones[Math.floor(Math.random() * polygones.length)];
polygone.animate(
{ fill: [ '#9760FF', '#FA72AF', '#7AFFF7', '#9760FF' ] },
{
duration: 500,
delay: 0,
iterations: 1
}
);

last = now;
}

requestAnimationFrame(animate_diplomacy);
}
22 changes: 22 additions & 0 deletions app/assets/v2/js/quadraticlands/mission/diplomacy/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
document.addEventListener('DOMContentLoaded', function() {

// create hyperlinks to rooms
rooms = document.querySelectorAll('[data-roomlink]');
rooms.forEach((room) => {
room.addEventListener('click', () => {
window.location.href = room.dataset.roomlink;
});
});

// show submit button on user input of create room input field
const create_room = document.getElementById('create_room');
const create_room_button = document.getElementById('create_room_button');

create_room.addEventListener('input', () => {
if (create_room.value == '') {
create_room_button.classList.add('disabled');
} else {
create_room_button.classList.remove('disabled');
}
});
});
Loading