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

feat: jury moderation #1027

Open
wants to merge 132 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
057d248
Add 2 new badges for sharks and moderators
julien-rg Feb 8, 2023
362c0e8
Create the new "jury" feed
julien-rg Feb 13, 2023
f433408
Add Yes/No buttons for jury posts
julien-rg Feb 13, 2023
9b72725
Add reason for jury post
julien-rg Feb 14, 2023
8f6bdc7
Send a transaction when jury votes
julien-rg Feb 16, 2023
3712507
Remove share when jury has voted
julien-rg Feb 21, 2023
52b7b18
Remove useless HTML
julien-rg Feb 21, 2023
205971f
Fix issue with ModVote validation
julien-rg Feb 21, 2023
b695fc2
jury loc, dialog
Apr 28, 2023
f669a70
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.g…
Apr 28, 2023
b14c145
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.g…
May 15, 2023
6ce8344
jury types comment userinfo video
May 23, 2023
e4b9f28
video ads for peertube
Jun 5, 2023
fc8afd1
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.g…
Jun 26, 2023
f9fc903
ads
Jun 27, 2023
975590c
ads only ru
Jun 27, 2023
3b4b4a8
share ads without double
Jun 27, 2023
8772713
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.g…
Jun 27, 2023
8244431
Merge branch 'video_ads' into jury-moderation
Jun 27, 2023
3234326
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.g…
Oct 31, 2023
9ff564b
jury merge fix
Oct 31, 2023
d2b346b
=bannercomment
Nov 6, 2023
4e44137
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.g…
Nov 6, 2023
9be4a1f
initvideo
Nov 7, 2023
2595a78
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Nov 13, 2023
cec91af
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Nov 15, 2023
bc99951
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Nov 15, 2023
2d97476
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Nov 15, 2023
0ebf487
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Nov 18, 2023
ca3b129
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Nov 21, 2023
ab4772e
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Nov 25, 2023
9db1d8f
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Nov 27, 2023
e593b25
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Nov 27, 2023
b2d702f
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Nov 28, 2023
2bc6076
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Dec 6, 2023
b05d4f2
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Dec 25, 2023
fb94455
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Dec 26, 2023
9f55538
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Dec 29, 2023
a08dabe
addActionAndSendIfCan
j-bitmaker Dec 29, 2023
3acbb65
getbans
j-bitmaker Dec 29, 2023
e48d24f
enddate
j-bitmaker Dec 29, 2023
4d71ab8
max ban
j-bitmaker Dec 29, 2023
13df5e6
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Jan 8, 2024
3a9041a
getbans
j-bitmaker Jan 12, 2024
ae4c61a
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Jan 23, 2024
487ec86
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Jan 24, 2024
0acbfa8
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Jan 26, 2024
9e4d846
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Jan 26, 2024
6cecc43
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Jan 31, 2024
13af000
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Jan 31, 2024
2f1c2d3
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.g…
j-bitmaker Feb 1, 2024
b1f2108
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 2, 2024
c1b9ba8
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 8, 2024
280d395
v
maxgithubprofile Feb 8, 2024
264b966
Update kit.js
maxgithubprofile Feb 8, 2024
4eaf7a8
Update kit.js
maxgithubprofile Feb 8, 2024
f302e41
Update sdk.js
maxgithubprofile Feb 8, 2024
99fb81b
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 9, 2024
9af4456
Merge branch 'master' into barteron2
maxgithubprofile Feb 9, 2024
649e803
Update kit.js
maxgithubprofile Feb 9, 2024
07a18db
v
maxgithubprofile Feb 9, 2024
4c682d3
v
maxgithubprofile Feb 9, 2024
5cc352d
Update sdk.js
maxgithubprofile Feb 9, 2024
bd25a5d
Update index.js
maxgithubprofile Feb 9, 2024
f954e6a
Update index.js
maxgithubprofile Feb 9, 2024
af00347
Update proxies.js
maxgithubprofile Feb 9, 2024
2fcefd6
Update proxy.js
maxgithubprofile Feb 9, 2024
956e3e9
Update proxy.js
maxgithubprofile Feb 9, 2024
4d2a402
Update remotelight.js
maxgithubprofile Feb 9, 2024
b70bfca
v
maxgithubprofile Feb 9, 2024
44b38f7
Update sdk.js
maxgithubprofile Feb 9, 2024
e895129
Update Bastyon.json
maxgithubprofile Feb 9, 2024
e9e1474
Update Bastyon.json
maxgithubprofile Feb 10, 2024
fcb2fde
Update index.js
maxgithubprofile Feb 10, 2024
7c46c79
v
maxgithubprofile Feb 10, 2024
b3ae1fb
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 13, 2024
a9ba252
Merge branch 'master' into barteron2
maxgithubprofile Feb 13, 2024
dca5e46
v
maxgithubprofile Feb 13, 2024
e95c983
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 14, 2024
843f381
Merge branch 'master' into barteron2
maxgithubprofile Feb 14, 2024
58862c6
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 16, 2024
aed2568
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 16, 2024
5921bd4
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 16, 2024
e372ec3
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.g…
j-bitmaker Feb 16, 2024
e929763
init change commentjury
j-bitmaker Feb 17, 2024
ed5ae39
article
j-bitmaker Feb 17, 2024
a10711b
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 20, 2024
a340fa8
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 20, 2024
dd3eaec
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 21, 2024
cb6af40
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 21, 2024
de1bd39
Merge branch 'master' into barteron2
maxgithubprofile Feb 21, 2024
8ae1d44
Add vote method for barteron (#1202)
LEV7n Feb 21, 2024
f593710
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 21, 2024
a11be90
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 21, 2024
7b24eb8
notifications, animated
j-bitmaker Feb 21, 2024
80e44e7
Merge branch 'master' into jury-moderation
j-bitmaker Feb 22, 2024
e5c9f17
ban clbk
j-bitmaker Feb 22, 2024
7ef063d
enddate max
j-bitmaker Feb 22, 2024
40afd0e
+
j-bitmaker Feb 22, 2024
2fbd70a
Merge branch 'master' into barteron2
maxgithubprofile Feb 23, 2024
ce275f5
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.gui
maxgithubprofile Feb 23, 2024
192c147
Merge branch 'master' into barteron2
maxgithubprofile Feb 23, 2024
08f5a66
Resolve deploy conflict barteron2 and jury-moderation
shpingalet007 Feb 23, 2024
b6df636
comlaint loc
j-bitmaker Feb 23, 2024
5957b00
Merge branch 'master' into jury-moderation
j-bitmaker Feb 23, 2024
c952416
blocked
j-bitmaker Feb 24, 2024
3c2ae21
Merge branch 'barteron2' into jury-moderation
j-bitmaker Feb 26, 2024
6b450d3
Merge branch 'jury-moderation' of https://github.com/j-bitmaker/pocke…
j-bitmaker Feb 26, 2024
fa92898
noty txt; sort
j-bitmaker Feb 27, 2024
daaed4f
c
j-bitmaker Feb 27, 2024
18eb438
hide showads
j-bitmaker Feb 27, 2024
dff5b65
noty txt; sort
j-bitmaker Feb 27, 2024
c338606
c
j-bitmaker Feb 27, 2024
3f26f68
hide showads
j-bitmaker Feb 27, 2024
4e78d41
Merge remote-tracking branch 'origin/master' into barteron2
shpingalet007 Feb 29, 2024
cb10ded
Merge branch 'barteron2' into jury-moderation
shpingalet007 Feb 29, 2024
7181942
Merge branch 'jury-moderation' of https://github.com/j-bitmaker/pocke…
j-bitmaker Feb 29, 2024
6480818
reputation
j-bitmaker Mar 4, 2024
9bcba48
platform
j-bitmaker Mar 10, 2024
49f037e
getbans
j-bitmaker Mar 11, 2024
20a7085
noty txt; sort
j-bitmaker Feb 27, 2024
a86a7c3
c
j-bitmaker Feb 27, 2024
97ae941
noty txt; sort
j-bitmaker Feb 27, 2024
b970b7b
hide showads
j-bitmaker Feb 27, 2024
5ff7fad
reputation
j-bitmaker Mar 4, 2024
b1ce092
platform
j-bitmaker Mar 10, 2024
d18c78b
getbans
j-bitmaker Mar 11, 2024
060fc62
Merge branch 'master' into jury-moderation
shpingalet007 Mar 29, 2024
d2f19cf
Merge branch 'master' into barteron2
shpingalet007 Mar 29, 2024
4fa23ba
Merge branch 'barteron2' into jury-moderation
shpingalet007 Mar 29, 2024
f86e6d8
Merge branch 'jury-moderation' of https://github.com/j-bitmaker/pocke…
j-bitmaker Apr 8, 2024
1237ecb
Merge branch 'master' of https://github.com/pocketnetteam/pocketnet.g…
j-bitmaker Apr 8, 2024
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
18 changes: 13 additions & 5 deletions components/application/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var application = (function(){

var primary = deep(p, 'history');

var el, ed, application, appdata;
var el, ed, application, appdata, curpath;

var actions = {
gotohome : function(){
Expand Down Expand Up @@ -82,13 +82,16 @@ var application = (function(){
if(!p.data) return
if(!application) return

if (p.application == application.manifest.id && p.data.encoded){

if (p.application == application.manifest.id/* && p.data.encoded*/){

self.app.nav.api.history.addRemoveParameters([], {
p: p.data.encoded
}, {
replaceState: p.data.replace
})

curpath = actions.getpath()

}
},
Expand Down Expand Up @@ -215,6 +218,7 @@ var application = (function(){
},
frameremote : function(clbk){
var src = application.manifest.scope + '/' + (actions.getpath() || application.manifest.start || '')
curpath = actions.getpath()

/*if(window.testpocketnet){
src = src + '?testnetwork=true'
Expand Down Expand Up @@ -309,15 +313,17 @@ var application = (function(){
return
}

if (p && application && application.manifest.id == id) {
if (application && application.manifest.id == id) {

var decoded = actions.getpath()

if (decoded){
if (decoded == curpath) return

curpath = decoded

self.app.apps.emit('changestate', {
route : decoded
}, application.manifest.id)
}


}
Expand Down Expand Up @@ -398,6 +404,8 @@ var application = (function(){

state.load();

curpath = ''

el = {};
el.c = p.el.find('#' + self.map.id);

Expand Down
9 changes: 6 additions & 3 deletions components/authorn/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1410,13 +1410,16 @@ var authorn = (function(){
author.me = self.app.user.isItMe(author.address)

//var me = self.app.platform.psdk.userInfo.getmy()


var maxEnding = Math.max(...Object.values(author.data.bans || {}));

var endDate = new Date(new Date().getTime() + ((maxEnding - app.platform.currentBlock) * 60 * 1000 / (window.testpocketnet ? 2 : 1))) ;

var blocked = endDate > new Date();


if(
self.app.platform.sdk.user.reputationBlocked(address) ||
!author.data
!author.data || (blocked && !author.me)
){
return redir(author.me ? 'userpage?id=test' : 'page404')
}
Expand Down
8 changes: 7 additions & 1 deletion components/leftpanel/templates/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@
</span>
</div>


<% if (app.platform.sdk.user.isjury()) { %>
<div class="tab">
<span class="pcenterLabel <% if(r == 'jury' && pathname=='index') {%> active <% } %>">
<a href="index?r=jury" handler="true"><i class="fas fa-balance-scale"></i><span class="text"><%=e('jury')%></span></a>
</span>
</div>
<% } %>


</div>
Expand Down
151 changes: 151 additions & 0 deletions components/lenta/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
#lenta .shareinlenta.rendered .sharecnt {
display: block;
}
#lenta .adsCheckbox {
padding-right: 1em;
}
#lenta .optimizationTip {
height: 150px;
display: flex;
Expand Down Expand Up @@ -173,11 +176,144 @@
padding-bottom: 0;
border-radius: 12px;
}
#lenta .share.animated {
border: 2px solid transparent;
animation: running-border 4s linear;
}
@keyframes running-border {
0% {
border-color: transparent;
}
50% {
border-color: rgb(var(--color-bg-ac-bright));
}
100% {
border-color: transparent;
}
}
#lenta .share .shareSpacer {
display: none;
height: 400px;
padding: 0 2em;
}
#lenta .share .commentJury {
padding-bottom: 2em;
}
#lenta .share .commentJury .commentWrapper {
margin-top: 0.5em;
}
#lenta .share .commentJury .commentWrapper .commentBody {
padding-top: 0.5em;
padding-left: 4.5em;
}
#lenta .share .commentJury .commentWrapper .commentBody .author {
display: flex;
align-items: flex-start;
justify-content: space-between;
margin-top: 5px;
}
#lenta .share .commentJury .commentWrapper .commentBody .author > span {
margin-left: 5px;
margin-right: 5px;
}
#lenta .share .commentJury .commentWrapper .commentBody .author > a {
margin-right: 5px;
display: flex;
}
#lenta .share .userJury .userWrapper {
margin-top: 2em;
margin-left: auto;
margin-right: auto;
margin-bottom: 1em;
border: 1px solid rgba(var(--color-medium-theme), 0.8);
width: 250px;
cursor: default;
z-index: 999;
background: rgb(var(--background-total-theme));
border-radius: 12px;
padding: 1em 0.5em;
}
#lenta .share .userJury .userWrapper .topInfo {
display: flex;
flex-direction: column;
align-items: center;
}
#lenta .share .userJury .userWrapper .topInfo .iconWrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100px;
float: none;
}
#lenta .share .userJury .userWrapper .topInfo .iconWrapper .usericon {
display: flex;
justify-content: center;
align-items: center;
margin-left: auto;
margin-right: auto;
height: 85px;
width: 85px;
cursor: pointer;
}
#lenta .share .userJury .userWrapper .topInfo .iconWrapper .usericon .letter {
font-size: 2em;
}
#lenta .share .userJury .userWrapper .topInfo .label {
margin-top: 20px;
padding-left: 7px;
}
#lenta .share .userJury .userWrapper .topInfo .label .name {
cursor: pointer;
max-width: 300px!important;
}
#lenta .share .userJury .userWrapper .topInfo .label .reputation {
font-size: 0.8em;
color: #8E90A6;
text-align: center;
}
#lenta .share .userJury .userWrapper .topInfo .label .reputation .value {
color: rgb(var(--color-bg-ac-bright));
font-weight: 700;
}
#lenta .share .userJury .userWrapper .follow {
display: flex;
padding: 0.5em 3em;
text-align: center;
}
#lenta .share .userJury .userWrapper .follow .followers {
padding-right: 1.5em;
}
#lenta .share .userJury .userWrapper .follow .value {
font-weight: 700;
}
#lenta .share .userJury .userWrapper .aboutWrapper {
margin-top: 1em;
text-align: center;
}
#lenta .share .userJury .userWrapper .subscribeWrapper {
padding: 0.5em;
}
#lenta .share .userJury .userWrapper .subscribeWrapper button {
width: 100%;
border-radius: 8px;
padding: 8px 16px;
}
#lenta .share .userJury .userWrapper .subscribeWrapper .unsubscribe {
display: none;
background: rgb(var(--color-good));
border: 1px solid rgb(var(--color-good));
}
#lenta .share .userJury .userWrapper .subscribeWrapper .unsubscribe:hover {
color: rgb(var(--color-good));
border: 1px solid rgb(var(--color-good));
background: #fff;
}
#lenta .share .userJury .userWrapper .subscribeWrapper.following .unsubscribe {
display: block;
}
#lenta .share .userJury .userWrapper .subscribeWrapper.following .subscribe {
display: none;
}
#lenta .share .images {
max-width: 590px;
}
Expand Down Expand Up @@ -341,6 +477,21 @@
#lenta.sharesEnded .loadmore {
display: none;
}
#lenta .jury-text {
text-align: center;
margin-top: 20px;
padding-top: 20px;
}
#lenta .jury-buttons {
display: flex;
justify-content: center;
margin-top: 20px;
margin-bottom: 10px;
}
#lenta .jury-buttons button {
margin-left: 5px;
margin-right: 5px;
}
.commentRegisterDiv .commentRegister {
background-color: rgb(var(--background-total-theme));
padding: 1em 1em 2em 1em;
Expand Down
Loading