mirror of
https://github.com/PretendoNetwork/juxtaposition-ui.git
synced 2026-09-11 10:55:32 -05:00
Implemented showing followers and following users and communties on profile pages. Fixed a bug with storing followed communities and users that would not store the entire ID in the user document.
This commit is contained in:
committed by
jay.poff@outlook.com
parent
e82a3a87f9
commit
bcd16ee62a
File diff suppressed because one or more lines are too long
@@ -70,19 +70,19 @@ const UserSchema = new Schema({
|
||||
default: false
|
||||
},
|
||||
likes: {
|
||||
type: [Number],
|
||||
type: [String],
|
||||
default: [0]
|
||||
},
|
||||
followed_communities: {
|
||||
type: [Number],
|
||||
type: [String],
|
||||
default: [0]
|
||||
},
|
||||
followed_users: {
|
||||
type: [Number],
|
||||
type: [String],
|
||||
default: [0]
|
||||
},
|
||||
following_users: {
|
||||
type: [Number],
|
||||
type: [String],
|
||||
default: [0]
|
||||
},
|
||||
followers: {
|
||||
@@ -250,8 +250,8 @@ UserSchema.methods.upFollower = async function() {
|
||||
|
||||
UserSchema.methods.downFollower = async function() {
|
||||
const followers = this.get('followers');
|
||||
this.set('followers', followers - 1);
|
||||
|
||||
if(followers > 0)
|
||||
this.set('followers', followers - 1);
|
||||
await this.save();
|
||||
};
|
||||
|
||||
@@ -264,8 +264,8 @@ UserSchema.methods.upFollowing = async function() {
|
||||
|
||||
UserSchema.methods.downFollowing = async function() {
|
||||
const following = this.get('following');
|
||||
this.set('following', following - 1);
|
||||
|
||||
if(following > 0)
|
||||
this.set('following', following - 1);
|
||||
await this.save();
|
||||
};
|
||||
|
||||
|
||||
@@ -405,6 +405,60 @@ router.get('/users/all', function (req, res) {
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/users/loadPosts', function (req, res) {
|
||||
database.connect().then(async e => {
|
||||
if(req.cookies.token === null)
|
||||
throw new Error('No service token supplied');
|
||||
|
||||
let pid = util.data.processServiceToken(req.cookies.token);
|
||||
|
||||
if(pid === null)
|
||||
throw new Error('Invalid credentials supplied');
|
||||
|
||||
let user = await database.getUserByPID(pid);
|
||||
|
||||
if(user !== null)
|
||||
{
|
||||
if(config.authorized_PNIDs.indexOf(user.pid) === -1)
|
||||
throw new Error('Invalid credentials supplied');
|
||||
|
||||
let post = await database.getPostByID(req.query.postID);
|
||||
let newPosts = await database.getUserPostsAfterTimestamp(post, 5);
|
||||
let communityMap = await util.data.getCommunityHash();
|
||||
if(newPosts.length > 0)
|
||||
{
|
||||
res.render('portal/more_posts.ejs', {
|
||||
communityMap: communityMap,
|
||||
moment: moment,
|
||||
user: user,
|
||||
newPosts: newPosts,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
res.sendStatus(204);
|
||||
}
|
||||
}
|
||||
else
|
||||
throw new Error('Invalid account ID or password');
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
res.set("Content-Type", "application/xml");
|
||||
res.statusCode = 400;
|
||||
response = {
|
||||
result: {
|
||||
has_error: 1,
|
||||
version: 1,
|
||||
code: 400,
|
||||
error_code: 15,
|
||||
message: "SERVER_ERROR"
|
||||
}
|
||||
};
|
||||
res.send("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + xml(response));
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/users/:userID', function (req, res) {
|
||||
database.connect().then(async e => {
|
||||
if(req.cookies.token === null)
|
||||
|
||||
@@ -32,6 +32,7 @@ router.get('/', function (req, res) {
|
||||
* 2 - Temporary Ban
|
||||
* 3 - Forever Ban
|
||||
*/
|
||||
console.log(user.account_status)
|
||||
if(user.account_status !== 0)
|
||||
{
|
||||
res.render('ctr/ban_notification.ejs', {
|
||||
|
||||
@@ -16,7 +16,8 @@ router.get('/', function (req, res) {
|
||||
res.render('portal/communities.ejs', {
|
||||
// EJS variable and server-side variable
|
||||
popularCommunities: popularCommunities,
|
||||
newCommunities: newCommunities
|
||||
newCommunities: newCommunities,
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}).catch(error => {
|
||||
res.set("Content-Type", "application/xml");
|
||||
@@ -40,6 +41,7 @@ router.get('/all', function (req, res) {
|
||||
let communities = await database.getCommunities(90);
|
||||
res.render('portal/all_communities.ejs', {
|
||||
communities: communities,
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}).catch(error => {
|
||||
res.set("Content-Type", "application/xml");
|
||||
@@ -74,6 +76,7 @@ router.get('/announcements', function (req, res) {
|
||||
user: user,
|
||||
totalNumPosts: totalNumPosts,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
@@ -111,6 +114,7 @@ router.get('/:communityID/:type', function (req, res) {
|
||||
totalNumPosts: totalNumPosts,
|
||||
user: user,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
@@ -165,6 +169,7 @@ router.get('/:communityID/:type/loadPosts', function (req, res) {
|
||||
user: user,
|
||||
newPosts: posts,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -192,19 +197,20 @@ router.post('/follow', upload.none(), function (req, res) {
|
||||
database.connect().then(async e => {
|
||||
let pid = util.data.processServiceToken(req.headers["x-nintendo-servicetoken"]);
|
||||
let community = await database.getCommunityByID(req.body.communityID);
|
||||
if(pid === null)
|
||||
pid = 1000000000;
|
||||
if(pid === null) {
|
||||
throw "Guest Accounts Cannot Follow Communities";
|
||||
}
|
||||
let user = await database.getUserByPID(pid);
|
||||
if(req.body.type === 'true' && user !== null && user.followed_communities.indexOf(community.id) === -1)
|
||||
if(req.body.type === 'true' && user !== null && user.followed_communities.indexOf(community.community_id) === -1)
|
||||
{
|
||||
community.upFollower();
|
||||
user.addToCommunities(community.id);
|
||||
user.addToCommunities(community.community_id);
|
||||
res.sendStatus(200);
|
||||
}
|
||||
else if(req.body.type === 'false' && user !== null && user.followed_communities.indexOf(community.id) !== -1)
|
||||
else if(req.body.type === 'false' && user !== null && user.followed_communities.indexOf(community.community_id) !== -1)
|
||||
{
|
||||
community.downFollower();
|
||||
user.removeFromCommunities(community.id);
|
||||
user.removeFromCommunities(community.community_id);
|
||||
res.sendStatus(200);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -24,6 +24,7 @@ router.get('/', function (req, res) {
|
||||
posts: posts,
|
||||
communityMap: communityMap,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
user.notification_list.filter(noti => noti.read === false).forEach(function(notification) {
|
||||
notification.read = true;
|
||||
@@ -69,6 +70,7 @@ router.get('/loadposts', function (req, res) {
|
||||
user: user,
|
||||
newPosts: posts,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2,6 +2,7 @@ var express = require('express');
|
||||
var xml = require('object-to-xml');
|
||||
const database = require('../../../../database');
|
||||
const util = require('../../../../authentication');
|
||||
const config = require('../../../../config.json');
|
||||
var moment = require('moment');
|
||||
var router = express.Router();
|
||||
|
||||
@@ -18,6 +19,7 @@ router.get('/', function (req, res) {
|
||||
res.render('portal/messages.ejs', {
|
||||
moment: moment,
|
||||
user: user,
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
user.notification_list.filter(noti => noti.read === false).forEach(function(notification) {
|
||||
notification.read = true;
|
||||
|
||||
@@ -2,6 +2,7 @@ var express = require('express');
|
||||
var xml = require('object-to-xml');
|
||||
const database = require('../../../../database');
|
||||
const util = require('../../../../authentication');
|
||||
const config = require('../../../../config.json');
|
||||
var moment = require('moment');
|
||||
var router = express.Router();
|
||||
|
||||
@@ -18,6 +19,7 @@ router.get('/', function (req, res) {
|
||||
res.render('portal/notifications.ejs', {
|
||||
moment: moment,
|
||||
user: user,
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
user.notification_list.filter(noti => noti.read === false).forEach(function(notification) {
|
||||
notification.read = true;
|
||||
|
||||
@@ -69,12 +69,9 @@ router.post('/new', upload.none(), async function (req, res, next) {
|
||||
if (req.body.app_data) {
|
||||
appData = req.body.app_data.replace(/\0/g, "").trim();
|
||||
}
|
||||
let painting = "";
|
||||
if (req.body.painting) {
|
||||
let painting = "", paintingURI = "";
|
||||
if (req.body.painting && req.body.painting !== 'eJztwTEBACAMA7DCNRlIQRbu4ZoEviTJTNvjZNUFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL55fYLL3w==') {
|
||||
painting = req.body.painting.replace(/\0/g, "").trim();
|
||||
}
|
||||
let paintingURI = "";
|
||||
if (req.body.painting) {
|
||||
paintingURI = await util.data.processPainting(painting);
|
||||
}
|
||||
let screenshot = "";
|
||||
|
||||
@@ -2,6 +2,7 @@ var express = require('express');
|
||||
var xml = require('object-to-xml');
|
||||
const database = require('../../../../database');
|
||||
const util = require('../../../../authentication');
|
||||
const config = require('../../../../config.json');
|
||||
var moment = require('moment');
|
||||
var router = express.Router();
|
||||
|
||||
@@ -12,42 +13,51 @@ router.get('/', function (req, res) {
|
||||
let user = null;
|
||||
if(pid === null)
|
||||
{
|
||||
res.render('portal/guest_notice.ejs', {});
|
||||
res.render('portal/guest_notice.ejs', {
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
user = await database.getUserByPID(pid);
|
||||
if(user === null)
|
||||
{
|
||||
res.render('portal/first_run.ejs', {});
|
||||
}
|
||||
if(moment(user.ban_lift_date).format('YYYY-MM-DD') <= moment().format('YYYY-MM-DD') && user.account_status !== 3) {
|
||||
user.account_status = 0;
|
||||
user.save()
|
||||
}
|
||||
/**
|
||||
* Account Status
|
||||
* 0 - Fine
|
||||
* 1 - Limited from Posting
|
||||
* 2 - Temporary Ban
|
||||
* 3 - Forever Ban
|
||||
*/
|
||||
if(user.account_status !== 0)
|
||||
{
|
||||
res.render('portal/ban_notification.ejs', {
|
||||
user: user,
|
||||
moment: moment
|
||||
res.render('portal/first_run.ejs', {
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
let popularCommunities = await database.getMostPopularCommunities(9);
|
||||
let newCommunities = await database.getNewCommunities(6);
|
||||
res.render('portal/communities.ejs', {
|
||||
popularCommunities: popularCommunities,
|
||||
newCommunities: newCommunities
|
||||
});
|
||||
else {
|
||||
if(moment(user.ban_lift_date).format('YYYY-MM-DD') <= moment().format('YYYY-MM-DD') && user.account_status !== 3) {
|
||||
user.account_status = 0;
|
||||
user.save()
|
||||
}
|
||||
/**
|
||||
* Account Status
|
||||
* 0 - Fine
|
||||
* 1 - Limited from Posting
|
||||
* 2 - Temporary Ban
|
||||
* 3 - Forever Ban
|
||||
*/
|
||||
if(user.account_status !== 0)
|
||||
{
|
||||
res.render('portal/ban_notification.ejs', {
|
||||
user: user,
|
||||
moment: moment,
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
let popularCommunities = await database.getMostPopularCommunities(9);
|
||||
let newCommunities = await database.getNewCommunities(6);
|
||||
res.render('portal/communities.ejs', {
|
||||
popularCommunities: popularCommunities,
|
||||
newCommunities: newCommunities,
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
@@ -68,7 +78,9 @@ router.get('/', function (req, res) {
|
||||
|
||||
router.get('/first', function (req, res) {
|
||||
res.header('X-Nintendo-WhiteList','1|http,youtube.com,,2|https,youtube.com,,2|http,.youtube.com,,2|https,.youtube.com,,2|http,.ytimg.com,,2|https,.ytimg.com,,2|http,.googlevideo.com,,2|https,.googlevideo.com,,2|https,youtube.com,/embed/,6|https,youtube.com,/e/,6|https,youtube.com,/v/,6|https,www.youtube.com,/embed/,6|https,www.youtube.com,/e/,6|https,www.youtube.com,/v/,6|https,youtube.googleapis.com,/e/,6|https,youtube.googleapis.com,/v/,6|http,maps.googleapis.com,/maps/api/streetview,2|https,maps.googleapis.com,/maps/api/streetview,2|http,cbk0.google.com,/cbk,2|https,cbk0.google.com,/cbk,2|http,cbk1.google.com,/cbk,2|https,cbk1.google.com,/cbk,2|http,cbk2.google.com,/cbk,2|https,cbk2.google.com,/cbk,2|http,cbk3.google.com,/cbk,2|https,cbk3.google.com,/cbk,2|https,.cloudfront.net,,2|https,www.google-analytics.com,/,2|https,stats.g.doubleclick.net,,2|https,www.google.com,/ads/,2|https,ssl.google-analytics.com,,2|http,fonts.googleapis.com,,2|fonts.googleapis.com,,2|https,www.googletagmanager.com,,2|http,pretendo.cc,,2|https,pretendo.cc,,2');
|
||||
res.render('portal/first_run.ejs', {});
|
||||
res.render('portal/first_run.ejs', {
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
});
|
||||
|
||||
router.post('/newUser', function (req, res) {
|
||||
|
||||
@@ -10,39 +10,24 @@ var router = express.Router();
|
||||
|
||||
router.get('/me', function (req, res) {
|
||||
res.header('X-Nintendo-WhiteList','1|http,youtube.com,,2|https,youtube.com,,2|http,pretendo.cc,,2|https,pretendo.cc,,2');
|
||||
var isAJAX = ((req.query.ajax+'').toLowerCase() === 'true')
|
||||
database.connect().then(async e => {
|
||||
|
||||
//let paramPackData = util.data.decodeParamPack(req.headers["x-nintendo-parampack"]);
|
||||
let pid = util.data.processServiceToken(req.headers["x-nintendo-servicetoken"]);
|
||||
if(pid === null)
|
||||
pid = 1000000000;
|
||||
let user = await database.getUserByPID(pid);
|
||||
let newPosts = await database.getNumberUserPostsByID(pid, 1);
|
||||
let newPosts = await database.getNumberUserPostsByID(pid, 10);
|
||||
let numPosts = await database.getTotalPostsByUserID(pid);
|
||||
let communityMap = await util.data.getCommunityHash();
|
||||
if(isAJAX) {
|
||||
res.render('portal/me_page_ajax.ejs', {
|
||||
// EJS variable and server-side variable
|
||||
communityMap: communityMap,
|
||||
moment: moment,
|
||||
user: user,
|
||||
newPosts: newPosts,
|
||||
numPosts: numPosts,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
});
|
||||
}
|
||||
else {
|
||||
res.render('portal/me_page.ejs', {
|
||||
// EJS variable and server-side variable
|
||||
communityMap: communityMap,
|
||||
moment: moment,
|
||||
user: user,
|
||||
newPosts: newPosts,
|
||||
numPosts: numPosts,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
});
|
||||
}
|
||||
res.render('portal/me_page.ejs', {
|
||||
communityMap: communityMap,
|
||||
moment: moment,
|
||||
user: user,
|
||||
newPosts: newPosts,
|
||||
numPosts: numPosts,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
@@ -69,15 +54,14 @@ router.post('/me', upload.none(), function (req, res) {
|
||||
let user = await database.getUserByPID(pid);
|
||||
|
||||
user.country_visibility = !!req.body.country;
|
||||
|
||||
user.birthday_visibility = !!req.body.birthday;
|
||||
|
||||
user.game_skill_visibility = !!req.body.experience;
|
||||
|
||||
user.profile_comment_visibility = !!req.body.commentShow;
|
||||
|
||||
if (req.body.comment)
|
||||
user.setProfileComment(req.body.comment);
|
||||
else
|
||||
user.setProfileComment('');
|
||||
|
||||
res.redirect('/users/me');
|
||||
|
||||
@@ -126,6 +110,7 @@ router.get('/show', function (req, res) {
|
||||
numPosts: numPosts,
|
||||
parentUser: parentUser,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
@@ -152,7 +137,12 @@ router.get('/loadPosts', function (req, res) {
|
||||
if(pid === null)
|
||||
pid = 1000000000;
|
||||
let user = await database.getUserByPID(pid);
|
||||
let newPosts = await database.getUserPostsAfterTimestamp(post, 5);
|
||||
let newPosts = '';
|
||||
if(post !== null)
|
||||
newPosts = await database.getUserPostsAfterTimestamp(post, 10);
|
||||
else
|
||||
newPosts = await database.getNumberUserPostsByID(req.query.pid, 10);
|
||||
|
||||
let communityMap = await util.data.getCommunityHash();
|
||||
if(newPosts.length > 0)
|
||||
{
|
||||
@@ -162,6 +152,7 @@ router.get('/loadPosts', function (req, res) {
|
||||
user: user,
|
||||
newPosts: newPosts,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -185,6 +176,117 @@ router.get('/loadPosts', function (req, res) {
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/following', function (req, res) {
|
||||
res.header('X-Nintendo-WhiteList','1|http,youtube.com,,2|https,youtube.com,,2|http,.youtube.com,,2|https,.youtube.com,,2|http,.ytimg.com,,2|https,.ytimg.com,,2|http,.googlevideo.com,,2|https,.googlevideo.com,,2|https,youtube.com,/embed/,6|https,youtube.com,/e/,6|https,youtube.com,/v/,6|https,www.youtube.com,/embed/,6|https,www.youtube.com,/e/,6|https,www.youtube.com,/v/,6|https,youtube.googleapis.com,/e/,6|https,youtube.googleapis.com,/v/,6|http,maps.googleapis.com,/maps/api/streetview,2|https,maps.googleapis.com,/maps/api/streetview,2|http,cbk0.google.com,/cbk,2|https,cbk0.google.com,/cbk,2|http,cbk1.google.com,/cbk,2|https,cbk1.google.com,/cbk,2|http,cbk2.google.com,/cbk,2|https,cbk2.google.com,/cbk,2|http,cbk3.google.com,/cbk,2|https,cbk3.google.com,/cbk,2|https,.cloudfront.net,,2|https,www.google-analytics.com,/,2|https,stats.g.doubleclick.net,,2|https,www.google.com,/ads/,2|https,ssl.google-analytics.com,,2|http,fonts.googleapis.com,,2|fonts.googleapis.com,,2|https,www.googletagmanager.com,,2');
|
||||
database.connect().then(async e => {
|
||||
let user = await database.getUserByPID(req.query.pid);
|
||||
let followers = user.followed_users;
|
||||
let communities = user.followed_communities;
|
||||
let communityMap = await util.data.getCommunityHash();
|
||||
let userMap = await util.data.getUserHash();
|
||||
|
||||
if(followers[0] === '0')
|
||||
followers.splice(0, 1);
|
||||
if(communities[0] === '0')
|
||||
communities.splice(0, 1);
|
||||
|
||||
if(user.following > 0)
|
||||
{
|
||||
res.render('portal/following_list.ejs', {
|
||||
moment: moment,
|
||||
user: user,
|
||||
followers: followers,
|
||||
communities: communities,
|
||||
communityMap: communityMap,
|
||||
userMap: userMap,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
res.send('<p class="no-posts-text"> Not following anyone.</p>')
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
res.send('<p class="no-posts-text"> Not following anyone.</p>')
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/followers', function (req, res) {
|
||||
res.header('X-Nintendo-WhiteList','1|http,youtube.com,,2|https,youtube.com,,2|http,.youtube.com,,2|https,.youtube.com,,2|http,.ytimg.com,,2|https,.ytimg.com,,2|http,.googlevideo.com,,2|https,.googlevideo.com,,2|https,youtube.com,/embed/,6|https,youtube.com,/e/,6|https,youtube.com,/v/,6|https,www.youtube.com,/embed/,6|https,www.youtube.com,/e/,6|https,www.youtube.com,/v/,6|https,youtube.googleapis.com,/e/,6|https,youtube.googleapis.com,/v/,6|http,maps.googleapis.com,/maps/api/streetview,2|https,maps.googleapis.com,/maps/api/streetview,2|http,cbk0.google.com,/cbk,2|https,cbk0.google.com,/cbk,2|http,cbk1.google.com,/cbk,2|https,cbk1.google.com,/cbk,2|http,cbk2.google.com,/cbk,2|https,cbk2.google.com,/cbk,2|http,cbk3.google.com,/cbk,2|https,cbk3.google.com,/cbk,2|https,.cloudfront.net,,2|https,www.google-analytics.com,/,2|https,stats.g.doubleclick.net,,2|https,www.google.com,/ads/,2|https,ssl.google-analytics.com,,2|http,fonts.googleapis.com,,2|fonts.googleapis.com,,2|https,www.googletagmanager.com,,2');
|
||||
database.connect().then(async e => {
|
||||
let user = await database.getUserByPID(req.query.pid);
|
||||
let followers = user.following_users;
|
||||
let communities = [];
|
||||
let communityMap = await util.data.getCommunityHash();
|
||||
let userMap = await util.data.getUserHash();
|
||||
|
||||
if(followers[0] === '0')
|
||||
followers.splice(0, 1);
|
||||
|
||||
if(user.followers > 0)
|
||||
{
|
||||
res.render('portal/following_list.ejs', {
|
||||
moment: moment,
|
||||
user: user,
|
||||
followers: followers,
|
||||
communities: communities,
|
||||
communityMap: communityMap,
|
||||
userMap: userMap,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
res.send('<p class="no-posts-text">No Followers</p>')
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
res.send('<p class="no-posts-text"> No Followers.</p>')
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/friends', function (req, res) {
|
||||
res.header('X-Nintendo-WhiteList','1|http,youtube.com,,2|https,youtube.com,,2|http,.youtube.com,,2|https,.youtube.com,,2|http,.ytimg.com,,2|https,.ytimg.com,,2|http,.googlevideo.com,,2|https,.googlevideo.com,,2|https,youtube.com,/embed/,6|https,youtube.com,/e/,6|https,youtube.com,/v/,6|https,www.youtube.com,/embed/,6|https,www.youtube.com,/e/,6|https,www.youtube.com,/v/,6|https,youtube.googleapis.com,/e/,6|https,youtube.googleapis.com,/v/,6|http,maps.googleapis.com,/maps/api/streetview,2|https,maps.googleapis.com,/maps/api/streetview,2|http,cbk0.google.com,/cbk,2|https,cbk0.google.com,/cbk,2|http,cbk1.google.com,/cbk,2|https,cbk1.google.com,/cbk,2|http,cbk2.google.com,/cbk,2|https,cbk2.google.com,/cbk,2|http,cbk3.google.com,/cbk,2|https,cbk3.google.com,/cbk,2|https,.cloudfront.net,,2|https,www.google-analytics.com,/,2|https,stats.g.doubleclick.net,,2|https,www.google.com,/ads/,2|https,ssl.google-analytics.com,,2|http,fonts.googleapis.com,,2|fonts.googleapis.com,,2|https,www.googletagmanager.com,,2');
|
||||
database.connect().then(async e => {
|
||||
let user = await database.getUserByPID(req.query.pid);
|
||||
let friends = null;
|
||||
let userMap = await util.data.getUserHash();
|
||||
|
||||
if(friends)
|
||||
{
|
||||
res.render('portal/following_list.ejs', {
|
||||
moment: moment,
|
||||
user: user,
|
||||
friends: friends,
|
||||
userMap: userMap,
|
||||
account_server: config.account_server_domain.slice(8),
|
||||
cdnURL: config.CDN_domain,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
res.send('<p class="no-posts-text">No Friends</p>')
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
res.set("Content-Type", "application/xml");
|
||||
res.statusCode = 400;
|
||||
response = {
|
||||
result: {
|
||||
has_error: 1,
|
||||
version: 1,
|
||||
code: 400,
|
||||
error_code: 15,
|
||||
message: "SERVER_ERROR"
|
||||
}
|
||||
};
|
||||
res.send("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + xml(response));
|
||||
});
|
||||
});
|
||||
|
||||
router.post('/follow', upload.none(), function (req, res) {
|
||||
database.connect().then(async e => {
|
||||
let pid = util.data.processServiceToken(req.headers["x-nintendo-servicetoken"]);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
var express = require('express');
|
||||
var router = express.Router();
|
||||
var xml = require('object-to-xml');
|
||||
const database = require('../../../../database');
|
||||
const util = require('../../../../authentication');
|
||||
var path = require('path');
|
||||
@@ -108,89 +109,91 @@ router.get('/notifications.json', function (req, res) {
|
||||
database.connect().then(async e => {
|
||||
let pid = util.data.processServiceToken(req.headers["x-nintendo-servicetoken"]);
|
||||
if(pid === null)
|
||||
pid = 1000000000;
|
||||
let user = await database.getUserByPID(pid);
|
||||
res.send(
|
||||
{
|
||||
message_count: 0,
|
||||
notification_count: user.notification_list.filter(notification => notification.read === false).length,
|
||||
"messages": [
|
||||
res.sendStatus(403);
|
||||
else {
|
||||
let user = await database.getUserByPID(pid);
|
||||
if(user.notification_list) {
|
||||
res.send(
|
||||
{
|
||||
"screen_name": "JayDaBirb",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": true,
|
||||
"is_read": false,
|
||||
"created_at": "2020-04-29 01:04:80",
|
||||
"feeling_id": 1,
|
||||
"id": 1255383017044709400,
|
||||
"message_content": "https://invite.gg/pretendo"
|
||||
},
|
||||
{
|
||||
"screen_name": "PNID_Test06",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": false,
|
||||
"is_read": true,
|
||||
"created_at": "2020-05-18 02:17:50",
|
||||
"feeling_id": 1,
|
||||
"id": 1244384456055709400,
|
||||
"message_content": "Testing message number 2 updated"
|
||||
},
|
||||
{
|
||||
"screen_name": "PNID_Test14",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": false,
|
||||
"is_read": true,
|
||||
"created_at": "2020-05-18 02:17:50",
|
||||
"feeling_id": 1,
|
||||
"id": 1244384118059519400,
|
||||
"message_content": "Testing message number 3"
|
||||
},
|
||||
{
|
||||
"screen_name": "PNID_Test65",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": false,
|
||||
"is_read": true,
|
||||
"created_at": "2020-05-18 02:17:50",
|
||||
"feeling_id": 1,
|
||||
"id": 1244465118055709400,
|
||||
"message_content": "Did you know our Miiverse fork is called Juxt? pretty cool huh? ;)"
|
||||
},
|
||||
{
|
||||
"screen_name": "AnotherTestUser",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": false,
|
||||
"is_read": true,
|
||||
"created_at": "2020-05-18 02:17:50",
|
||||
"feeling_id": 1,
|
||||
"id": 1244384118792519400,
|
||||
"message_content": "Frick frack tic tak"
|
||||
},
|
||||
{
|
||||
"screen_name": "WowAnotherUserHuh",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": false,
|
||||
"is_read": true,
|
||||
"created_at": "2020-05-18 02:17:50",
|
||||
"feeling_id": 1,
|
||||
"id": 1244384648059589400,
|
||||
"message_content": "Hey kid want some meme?"
|
||||
},
|
||||
{
|
||||
"screen_name": "OkayLastOneIPromise",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": false,
|
||||
"is_read": true,
|
||||
"created_at": "2020-05-18 02:17:50",
|
||||
"feeling_id": 1,
|
||||
"id": 1244386594569545800,
|
||||
"message_content": "I promise this is the last time I'll ask for mod pls I'm sorry"
|
||||
message_count: 0,
|
||||
notification_count: user.notification_list.filter(notification => notification.read === false).length,
|
||||
"messages": [
|
||||
{
|
||||
"screen_name": "JayDaBirb",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": true,
|
||||
"is_read": false,
|
||||
"created_at": "2020-04-29 01:04:80",
|
||||
"feeling_id": 1,
|
||||
"id": 1255383017044709400,
|
||||
"message_content": "https://invite.gg/pretendo"
|
||||
},
|
||||
{
|
||||
"screen_name": "PNID_Test06",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": false,
|
||||
"is_read": true,
|
||||
"created_at": "2020-05-18 02:17:50",
|
||||
"feeling_id": 1,
|
||||
"id": 1244384456055709400,
|
||||
"message_content": "Testing message number 2 updated"
|
||||
},
|
||||
{
|
||||
"screen_name": "PNID_Test14",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": false,
|
||||
"is_read": true,
|
||||
"created_at": "2020-05-18 02:17:50",
|
||||
"feeling_id": 1,
|
||||
"id": 1244384118059519400,
|
||||
"message_content": "Testing message number 3"
|
||||
},
|
||||
{
|
||||
"screen_name": "PNID_Test65",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": false,
|
||||
"is_read": true,
|
||||
"created_at": "2020-05-18 02:17:50",
|
||||
"feeling_id": 1,
|
||||
"id": 1244465118055709400,
|
||||
"message_content": "Did you know our Miiverse fork is called Juxt? pretty cool huh? ;)"
|
||||
},
|
||||
{
|
||||
"screen_name": "AnotherTestUser",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": false,
|
||||
"is_read": true,
|
||||
"created_at": "2020-05-18 02:17:50",
|
||||
"feeling_id": 1,
|
||||
"id": 1244384118792519400,
|
||||
"message_content": "Frick frack tic tak"
|
||||
},
|
||||
{
|
||||
"screen_name": "WowAnotherUserHuh",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": false,
|
||||
"is_read": true,
|
||||
"created_at": "2020-05-18 02:17:50",
|
||||
"feeling_id": 1,
|
||||
"id": 1244384648059589400,
|
||||
"message_content": "Hey kid want some meme?"
|
||||
},
|
||||
{
|
||||
"screen_name": "OkayLastOneIPromise",
|
||||
"mii_face_url": "http://mii-images.account.pretendo.cc/",
|
||||
"is_official": false,
|
||||
"is_read": true,
|
||||
"created_at": "2020-05-18 02:17:50",
|
||||
"feeling_id": 1,
|
||||
"id": 1244386594569545800,
|
||||
"message_content": "I promise this is the last time I'll ask for mod pls I'm sorry"
|
||||
}
|
||||
],
|
||||
}
|
||||
],
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
res.set("Content-Type", "application/xml");
|
||||
res.statusCode = 400;
|
||||
response = {
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<%} else { %>
|
||||
<% newPosts.forEach(function(post) { %>
|
||||
<div id="<%= post.id %>">
|
||||
<div class="post-user-info-wrapper">
|
||||
<div class="post-user-info-wrapper" id="<%= post.id %>">
|
||||
<%if(post.verified) {%>
|
||||
<img class="community-page-post-user-icon verified" src="http://mii-images.cdn.<%= account_server %>/<%= post.pid %>/<% if(post.feeling_id === 1) {%>smile_open_mouth.png<%} else if(post.feeling_id === 2 ) {%>wink_left.png<%} else if(post.feeling_id === 3 ) {%>surprise_open_mouth.png<%} else if(post.feeling_id === 4 ) {%>frustrated.png<%} else if(post.feeling_id === 5 ) {%>sorrow.png<%} else {%>normal_face.png<%}%>" onclick="loadUserProfile(<%=post.pid%>)">
|
||||
<span class="community-page-verified-user-badge community-page-verified" style=""></span>
|
||||
@@ -159,7 +159,7 @@
|
||||
alert('Error: "' + this.statusText + '"\nPlease send code to Jemma on Discord with what you were doing');
|
||||
}
|
||||
};
|
||||
xhttp.open("GET", "/users/loadPosts" + '?postID=' + id, true);
|
||||
xhttp.open("GET", "/v1/users/loadPosts" + '?postID=' + id, true);
|
||||
xhttp.send();
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
<% posts.forEach(function(post) { %>
|
||||
<div class="post-user-info-wrapper" id="<%= post.id %>">
|
||||
<%if(post.verified) {%>
|
||||
<img class="community-page-post-user-icon verified" src="<%= post.mii_face_url %>" onclick="pjax.loadUrl('/users/show?pid=<%= post.pid %>')">
|
||||
<img class="community-page-post-user-icon verified" src="https://mii-images.cdn.<%= account_server %>/<%= post.pid %>/<% if(post.feeling_id === 1) {%>smile_open_mouth.png<%} else if(post.feeling_id === 2 ) {%>wink_left.png<%} else if(post.feeling_id === 3 ) {%>surprise_open_mouth.png<%} else if(post.feeling_id === 4 ) {%>frustrated.png<%} else if(post.feeling_id === 5 ) {%>sorrow.png<%} else {%>normal_face.png<%}%>" data-pjax="/users/show?pid=<%= post.pid %>" onclick="pjax.loadUrl('/users/show?pid=<%= post.pid %>')">
|
||||
<span class="community-page-verified-user-badge community-page-verified" style=""></span>
|
||||
<%} else {%>
|
||||
<img class="community-page-post-user-icon" src="<%= post.mii_face_url %>" onclick="pjax.loadUrl('/users/show?pid=<%= post.pid %>')">
|
||||
<img class="community-page-post-user-icon" src="https://mii-images.cdn.<%= account_server %>/<%= post.pid %>/<% if(post.feeling_id === 1) {%>smile_open_mouth.png<%} else if(post.feeling_id === 2 ) {%>wink_left.png<%} else if(post.feeling_id === 3 ) {%>surprise_open_mouth.png<%} else if(post.feeling_id === 4 ) {%>frustrated.png<%} else if(post.feeling_id === 5 ) {%>sorrow.png<%} else {%>normal_face.png<%}%>" data-pjax="/users/show?pid=<%= post.pid %>" onclick="pjax.loadUrl('/users/show?pid=<%= post.pid %>')">
|
||||
<span class="community-page-verified-user-badge community-page-verified" style="display: none;"></span>
|
||||
<%}%>
|
||||
<h2 class="community-page-post-username" data-pjax="/users/show?pid=<%= post.pid %>"><%= post.screen_name %></h2>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="https://portal-cdn.olv.pretendo.cc/css/juxt.css">
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/pjax.min.js"></script>
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/juxt.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%= cdnURL %>/css/juxt.css">
|
||||
<script src="<%= cdnURL %>/js/pjax.min.js"></script>
|
||||
<script src="<%= cdnURL %>/js/juxt.js"></script>
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-279PNEDGEE"></script>
|
||||
<script>
|
||||
@@ -45,7 +45,7 @@
|
||||
<% for(var i = 0; i < communities.length; i++) {%>
|
||||
<td>
|
||||
<div class="community-list-wrapper" data-pjax="/communities/<%= communities[i].community_id %>/new">
|
||||
<img class="community-list-icon" src="https://portal-cdn.olv.pretendo.cc/icons/<%= communities[i].community_id %>.png">
|
||||
<img class="community-list-icon" src="<%= cdnURL %>/icons/<%= communities[i].community_id %>.png">
|
||||
<h2 class="community-list-title"><%= communities[i].name %></h2>
|
||||
<h4 class="community-list-followers"><%= communities[i].followers %> followers</h4>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="https://portal-cdn.olv.pretendo.cc/css/juxt.css">
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/pjax.min.js"></script>
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/juxt.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%= cdnURL %>/css/juxt.css">
|
||||
<script src="<%= cdnURL %>/js/pjax.min.js"></script>
|
||||
<script src="<%= cdnURL %>/js/juxt.js"></script>
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-279PNEDGEE"></script>
|
||||
<script>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="https://portal-cdn.olv.pretendo.cc/css/juxt.css">
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/pjax.min.js"></script>
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/juxt.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%= cdnURL %>/css/juxt.css">
|
||||
<script src="<%= cdnURL %>/js/pjax.min.js"></script>
|
||||
<script src="<%= cdnURL %>/js/juxt.js"></script>
|
||||
<!-- Google Analytics -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
@@ -50,7 +50,7 @@
|
||||
<% for(var i = 0; i < popularCommunities.length; i++) {%>
|
||||
<td>
|
||||
<div class="community-list-wrapper" data-pjax="/communities/<%= popularCommunities[i].community_id %>/new">
|
||||
<img class="community-list-icon" src="https://portal-cdn.olv.pretendo.cc/icons/<%= popularCommunities[i].community_id %>.png">
|
||||
<img class="community-list-icon" src="<%= cdnURL %>/icons/<%= popularCommunities[i].community_id %>.png">
|
||||
<h2 class="community-list-title"><%= popularCommunities[i].name %></h2>
|
||||
<h4 class="community-list-followers"><%= popularCommunities[i].followers %> followers</h4>
|
||||
</div>
|
||||
@@ -72,7 +72,7 @@
|
||||
<% for(var j = 0; j < newCommunities.length; j++) {%>
|
||||
<td>
|
||||
<div class="community-list-wrapper" data-pjax="/communities/<%= newCommunities[j].community_id %>/new">
|
||||
<img class="community-list-icon" src="https://portal-cdn.olv.pretendo.cc/icons/<%= newCommunities[j].community_id %>.png">
|
||||
<img class="community-list-icon" src="<%= cdnURL %>/icons/<%= newCommunities[j].community_id %>.png">
|
||||
<h2 class="community-list-title"><%= newCommunities[j].name %></h2>
|
||||
<h4 class="community-list-followers"><%= newCommunities[j].followers %> followers</h4>
|
||||
</div>
|
||||
@@ -88,6 +88,6 @@
|
||||
</div>
|
||||
<img src="" onerror="wiiuBrowser.showLoadingIcon(!1);window.scroll(0, 0);">
|
||||
</div>
|
||||
<body onload="stopLoading();wiiuSound.playSoundByName('BGM_OLV_MAIN', 3);">
|
||||
<body onload="stopLoading();">
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="https://portal-cdn.olv.pretendo.cc/css/juxt.css">
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/pjax.min.js"></script>
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/juxt.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%= cdnURL %>/css/juxt.css">
|
||||
<script src="<%= cdnURL %>/js/pjax.min.js"></script>
|
||||
<script src="<%= cdnURL %>/js/juxt.js"></script>
|
||||
<!-- Google Analytics -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
@@ -47,27 +47,27 @@
|
||||
<td>
|
||||
<div class="post-emotions-wrapper">
|
||||
<label for="post-emotion-0">
|
||||
<input type="radio" name="emotion" id="post-emotion-0" value="0" checked>
|
||||
<input type="radio" name="emotion" id="post-emotion-0" value="0" onclick="changeMiiImageReaction(this)" checked>
|
||||
<span class="post-emotion-0"></span>
|
||||
</label>
|
||||
<label for="post-emotion-1">
|
||||
<input type="radio" name="emotion" id="post-emotion-1" value="1">
|
||||
<input type="radio" name="emotion" id="post-emotion-1" value="1" onclick="changeMiiImageReaction(this)">
|
||||
<span class="post-emotion-1"></span>
|
||||
</label>
|
||||
<label for="post-emotion-2">
|
||||
<input type="radio" name="emotion" id="post-emotion-2" value="2">
|
||||
<input type="radio" name="emotion" id="post-emotion-2" value="2" onclick="changeMiiImageReaction(this)">
|
||||
<span class="post-emotion-2"></span>
|
||||
</label>
|
||||
<label for="post-emotion-3">
|
||||
<input type="radio" name="emotion" id="post-emotion-3" value="3">
|
||||
<input type="radio" name="emotion" id="post-emotion-3" value="3" onclick="changeMiiImageReaction(this)">
|
||||
<span class="post-emotion-3"></span>
|
||||
</label>
|
||||
<label for="post-emotion-4">
|
||||
<input type="radio" name="emotion" id="post-emotion-4" value="4">
|
||||
<input type="radio" name="emotion" id="post-emotion-4" value="4" onclick="changeMiiImageReaction(this)">
|
||||
<span class="post-emotion-4"></span>
|
||||
</label>
|
||||
<label for="post-emotion-5">
|
||||
<input type="radio" name="emotion" id="post-emotion-5" value="5">
|
||||
<input type="radio" name="emotion" id="post-emotion-5" value="5" onclick="changeMiiImageReaction(this)">
|
||||
<span class="post-emotion-5"></span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -128,7 +128,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="community-page-header" style="background-image: url('https://portal-cdn.olv.pretendo.cc/banner/<%= community.community_id %>.png')"></div>
|
||||
<div class="community-page-header" style="background-image: url('<%= cdnURL %>/banner/<%= community.community_id %>.png')"></div>
|
||||
<div class="community-page-header-overlay"></div>
|
||||
<div class="community-page-back-button" onclick="window.history.back()">
|
||||
<p class="user-page-back-button-text">Go back</p>
|
||||
@@ -139,7 +139,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="community-page-info-container">
|
||||
<%if(user.followed_communities.indexOf(community.id) !== -1){ %>
|
||||
<%if(user.followed_communities.indexOf(community.community_id) !== -1){ %>
|
||||
<div class="community-page-follow-button-wrapper selected">
|
||||
<p class="community-page-follow-button-text" id="<%= community.community_id %>" onclick="followCommunity(this)" style="color: #FFFFFF">Following</p>
|
||||
</div>
|
||||
@@ -148,7 +148,7 @@
|
||||
<p class="community-page-follow-button-text" id="<%= community.community_id %>" onclick="followCommunity(this)">Follow Community</p>
|
||||
</div>
|
||||
<%}%>
|
||||
<img class="community-page-info-icon" src="https://portal-cdn.olv.pretendo.cc/icons/<%= community.community_id %>.png">
|
||||
<img class="community-page-info-icon" src="<%= cdnURL %>/icons/<%= community.community_id %>.png">
|
||||
<h2 class="community-page-title"><%= community.name %></h2>
|
||||
<h4 class="community-page-description"><%= community.description %></h4>
|
||||
<div class="community-page-margin-line"></div>
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
:root {
|
||||
--PN_Purple: #673DB6;
|
||||
--PN_DARK_PURPLE: #4f279b;
|
||||
--PN_GREEN: #1F8A42;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Conv_Poppins-Light';
|
||||
src: url('https://portal-cdn.olv.pretendo.cc/fonts/Poppins-Light.eot');
|
||||
@@ -1160,11 +1166,12 @@ h4 {
|
||||
}
|
||||
|
||||
.no-posts-text {
|
||||
margin-left: 43%;
|
||||
font-size: xx-large;
|
||||
color: rgba(113,141,148,1);
|
||||
padding-bottom: 65px;
|
||||
padding-top: 50px;
|
||||
padding-bottom: 0;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 123px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
@@ -1207,19 +1214,23 @@ iframe {
|
||||
.user-page-back-button {
|
||||
z-index: 3;
|
||||
position: absolute;
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMoAAAA4CAYAAAC8P2e6AAAABHNCSVQICAgIfAhkiAAAA0pJREFUeF7tnTFIlVEUx895Q0tEQlM0OfgkbC1cIgia8vl80BbYEi5R0KbgKCWNtT1tEVqCMFBXQRq0gmhQlIRcApeKJ5KE1LvxPSJB1D7hcc+5fr+3KZd3zv2d/4+7fN99KiJS6ar3aUmHNUiPqHRk/+MDgUITCNIIKiuhGcZn1odmtVKeHChpmC40FDYPgSMINIPWtL88sagqvZCCAAQOJhCCLGm1XG+I6lkgQQAChxAIYUur3RMBQBCAwNEEEIWEQCAHAUTJAYklEEAUMgCBHAQQJQcklkAAUcgABHIQQJQckFgCAUQhAxDIQQBRckBiCQTci3L6zCm5//haa1LPRhbkx/YuU4NAdAKuRckkGZu6KZ0Xz7XAPH+0JDNTy9EhURACbkXZL0k2qtHBOVl+t8nUIBCdgEtRDpLk6ciCzE+vRwdEQQhkBNyJgiQE0yMBV6IgiceI0JOrEwVJCKRnAi5OFCTxHBF6c3GiIAlBTIGA6YmCJClEhB5NTxQkIYApETA5UZAkpYjQq8mJkkny5GVVLnTuXfzyqv5RPrz50taJ7Gzvysba97Z+J19WXALRT5QX7wclkyXGZ/ntpozemYtRihonnEB0UV6v3Y2GNHvS+PblqWj1KHRyCUQX5d7YVblxq/sf0Z87v+Tz6ldp/m7/9WLz0594PuzkZjfqzqKLku3ueq1LHvx9xyT7e2P1W+vJYN41iTp7ih2DgIkoyHKMCbHUBQEzUZDFxfxpIicBU1GQJeeUWGZOwFwUZDHPAA3kIOBCFGTJMSmWmBJwIwqymOaA4v8h4EoUZCGvXgm4EwVZvEal2H25FOUwWR7W+E3WYsfVbvduRTlIFq4ssgtK0Su7FmW/LFyAV/S42u3fvSgZmktXzrcIcUukXVCKXjkJUYo+JPZvTwBR7GdABwkQQJQEhkSL9gQQxX4GdJAAAURJYEi0aE8AUexnQAcJEECUBIZEi/YEEMV+BnSQAAFESWBItGhPAFHsZ0AHCRDQarneENW9+00TaJoWIRCVQAhb2l+eWFSV3qiFKQaBhAiEIEtaKU8OlDTwokdCg6PVuASaQWualax01fu0pMMapEdUOuK2QTUIOCQQpBFUVkIzjM+sD83+AQT5cLAQHn9qAAAAAElFTkSuQmCC')
|
||||
0 0;
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMoAAAA4CAYAAAC8P2e6AAAABHNCSVQICAgIfAhkiAAAApFJREFUeF7tnEFKA0EQRTMn0Fu41RuYmyiewFu49ACCOYY7s3SpN1FwKYzVMEIWGVKZlF3V1S8gCVLT0/9VPTRkMsOKBwQgcJDAcLCCAghAYIUoDAEEFAQQRQGJEgggCjMAAQUBRFFAogQCiMIMQEBBAFEUkCiBAKIwAxBQEEAUBSRKIIAozAAEFAQQRQGJEgggCjMAAQWB8KKM43guOZ6nLLfDMHwqclECAVMCoUWZJHmVxJdT6nsR5dGUAItBQEEgrCh7JClx1iLKVpGLEgiYEggpyowk5d+ujWl6FoOAkkA4UZBE2TnKqhIIJQqSVO09JzuCQBhRkOSIrlFanUAIUZCket854ZEE3EVBkiM7RrkLAVdRkMSl55x0AQE3UZBkQbc4xI2AiyhI4tZvTryQQHVRJkneZL8XO3t+kNcvCzPMHfYlH1C+G6/Jcp0S8BClXNR4Von3VmRZVzoXp0lMwEOUsSLP8lelXH3MAwInEfAQ5Ul2fLez6295/SE/Pycl2X/whuvD/oFqh0tWF6UwlvcpN/L09x2T8qvyXqJcGcx3TTocwhYiu4iCLC2MBnvcJeAmCrIwiC0RcBUFWVoalb736i4KsvQ9gK2kDyEKsrQyLv3uM4woyNLvELaQPJQoyNLCyPS5x3CiIEufgxg9dUhR5mSRDySvogNlfzkJhBVlRhZuWZRzDsOnCi3KHlm4AV74kcq5wfCiTLJcl2fuEplzCFtI1YQoLYBkj7kJIEru/pLOiACiGIFkmdwEECV3f0lnRABRjECyTG4CiJK7v6QzIoAoRiBZJjcBRMndX9IZEUAUI5Ask5sAouTuL+mMCCCKEUiWyU0AUXL3l3RGBBDFCCTL5CaAKLn7SzojAr8hSp45a6PXBwAAAABJRU5ErkJggg==')
|
||||
-5px 0;
|
||||
background-repeat: no-repeat !important;
|
||||
background-color: #4f279b;
|
||||
border: 2px solid #4f279b;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
width: 150px;
|
||||
height: 45px;
|
||||
background-size: 100%;
|
||||
min-width: 100px;
|
||||
height: 40px;
|
||||
background-size: 145px;
|
||||
margin-left: -15px;
|
||||
margin-top: -295px;
|
||||
}
|
||||
|
||||
.user-page-back-button-text {
|
||||
padding-left: 55px;
|
||||
padding-right: 15px;
|
||||
margin-top: 6px;
|
||||
color: white;
|
||||
font-size: large;
|
||||
@@ -1512,6 +1523,7 @@ iframe {
|
||||
border-bottom-left-radius: 0;
|
||||
margin-left: -4px;
|
||||
padding: 10px;
|
||||
font-size: xx-large;
|
||||
}
|
||||
|
||||
.post-memo {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="https://portal-cdn.olv.pretendo.cc/css/juxt.css">
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/pjax.min.js"></script>
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/juxt.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%= cdnURL %>/css/juxt.css">
|
||||
<script src="<%= cdnURL %>/js/pjax.min.js"></script>
|
||||
<script src="<%= cdnURL %>/js/juxt.js"></script>
|
||||
<!-- Global site tag (gtag.js) - Google Analytics Testing-->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-195842548-1"></script>
|
||||
<script>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="https://portal-cdn.olv.pretendo.cc/css/juxt.css">
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/pjax.min.js"></script>
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/juxt.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%= cdnURL %>/css/juxt.css">
|
||||
<script src="<%= cdnURL %>/js/pjax.min.js"></script>
|
||||
<script src="<%= cdnURL %>/js/juxt.js"></script>
|
||||
<!-- Google Analytics -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
|
||||
27
src/webfiles/portal/following_list.ejs
Normal file
27
src/webfiles/portal/following_list.ejs
Normal file
@@ -0,0 +1,27 @@
|
||||
<style>
|
||||
.post-user-info-wrapper {
|
||||
margin-left: 30px;
|
||||
}
|
||||
</style>
|
||||
<% followers.forEach(function(user) { %>
|
||||
<div class="post-user-info-wrapper" id="<%= user %>">
|
||||
<%if(user.official) {%>
|
||||
<img class="community-page-post-user-icon verified" src="https://mii-images.cdn.<%= account_server %>/<%= user %>/normal_face.png" data-pjax="/users/show?pid=<%= user %>">
|
||||
<span class="community-page-verified-user-badge community-page-verified" style=""></span>
|
||||
<%} else {%>
|
||||
<img class="community-page-post-user-icon" src="https://mii-images.cdn.<%= account_server %>/<%= user %>/normal_face.png" data-pjax="/users/show?pid=<%= user %>">
|
||||
<span class="community-page-verified-user-badge community-page-verified" style="display: none;"></span>
|
||||
<%}%>
|
||||
<h2 class="community-page-post-username" data-pjax="/users/show?pid=<%= user %>"><%= userMap.get(user) %></h2>
|
||||
</div>
|
||||
<br>
|
||||
<% }); %>
|
||||
|
||||
<% communities.forEach(function(community) { %>
|
||||
<div class="post-user-info-wrapper" id="<%= community %>">
|
||||
<img class="community-page-post-user-icon" src="<%= cdnURL %>/icons/<%= community %>.png" data-pjax="/communities/<%= community %>/new">
|
||||
<h2 class="community-page-post-username" data-pjax="/communities/<%= community %>/new"><%= communityMap.get(community) %></h2>
|
||||
</div>
|
||||
<br>
|
||||
<% }); %>
|
||||
<img src="" onerror="initCommunityUsers()">
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="https://portal-cdn.olv.pretendo.cc/css/juxt.css">
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/pjax.min.js"></script>
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/juxt.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%= cdnURL %>/css/juxt.css">
|
||||
<script src="<%= cdnURL %>/js/pjax.min.js"></script>
|
||||
<script src="<%= cdnURL %>/js/juxt.js"></script>
|
||||
<!-- Google Analytics -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
|
||||
@@ -104,6 +104,10 @@ function stopLoading() {
|
||||
if (typeof wiiuBrowser !== 'undefined'
|
||||
&& typeof wiiuBrowser.endStartUp !== 'undefined') {
|
||||
wiiuBrowser.endStartUp();
|
||||
wiiuSound.playSoundByName('BGM_OLV_MAIN', 3);
|
||||
setTimeout(function() {
|
||||
wiiuSound.playSoundByName('BGM_OLV_MAIN_LOOP_NOWAIT', 3);
|
||||
},90000);
|
||||
}
|
||||
}
|
||||
function exit() {
|
||||
@@ -613,7 +617,8 @@ function loadFeedPosts() {
|
||||
wiiuSound.playSoundByName("SE_WAVE_MENU", 1);
|
||||
wiiuBrowser.showLoadingIcon(!1);
|
||||
}
|
||||
function switchUserPageTabs(type) {
|
||||
function switchUserPageTabs(type, id) {
|
||||
var typeDomain = '';
|
||||
document.getElementById('user-page-posts-tab').classList.remove('selected');
|
||||
document.getElementById('user-page-friends-tab').classList.remove('selected');
|
||||
document.getElementById('user-page-following-tab').classList.remove('selected');
|
||||
@@ -627,21 +632,36 @@ function switchUserPageTabs(type) {
|
||||
case 0:
|
||||
document.getElementById("user-page-posts-tab").classList.add('selected');
|
||||
document.getElementById("user-page-posts-triangle").classList.add('selected');
|
||||
typeDomain = 'loadPosts';
|
||||
break;
|
||||
case 1:
|
||||
document.getElementById("user-page-friends-tab").classList.add('selected');
|
||||
document.getElementById("user-page-friends-triangle").classList.add('selected');
|
||||
typeDomain = 'friends';
|
||||
break;
|
||||
case 2:
|
||||
document.getElementById("user-page-following-tab").classList.add('selected');
|
||||
document.getElementById("user-page-following-triangle").classList.add('selected');
|
||||
typeDomain = 'following';
|
||||
break;
|
||||
case 3:
|
||||
document.getElementById("user-page-followers-tab").classList.add('selected');
|
||||
document.getElementById("user-page-followers-triangle").classList.add('selected');
|
||||
typeDomain = 'followers';
|
||||
break;
|
||||
|
||||
}
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState === 4 && this.status === 200) {
|
||||
document.getElementsByClassName('community-page-posts-wrapper')[0].innerHTML = this.responseText;
|
||||
}
|
||||
else if (this.readyState === 4){
|
||||
wiiuErrorViewer.openByCodeAndMessage(5983000 + this.status, 'Error: "' + this.statusText + '"\nPlease send code to Jemma on Discord with what you were doing');
|
||||
}
|
||||
};
|
||||
xhttp.open("GET", "/users/" + typeDomain + '?pid=' + id, true);
|
||||
xhttp.send();
|
||||
wiiuSound.playSoundByName("SE_OLV_OK", 1);
|
||||
}
|
||||
function swapPostType(type) {
|
||||
@@ -699,6 +719,35 @@ function searchCommunities() {
|
||||
}
|
||||
}
|
||||
}
|
||||
function changeMiiImageReaction(element) {
|
||||
if(element.checked) {
|
||||
var pfp = document.getElementsByClassName('post-user-icon')[0];
|
||||
var newPfp;
|
||||
switch (element.value) {
|
||||
case '1':
|
||||
newPfp = 'smile_open_mouth.png'
|
||||
break;
|
||||
case '2':
|
||||
newPfp = 'wink_left.png'
|
||||
break;
|
||||
case '3':
|
||||
newPfp = 'surprise_open_mouth.png'
|
||||
break;
|
||||
case '4':
|
||||
newPfp = 'frustrated.png'
|
||||
break;
|
||||
case '5':
|
||||
newPfp = 'sorrow.png'
|
||||
break;
|
||||
default:
|
||||
newPfp = 'normal_face.png'
|
||||
break;
|
||||
}
|
||||
pfp.src = pfp.src.substring(0, pfp.src.lastIndexOf('/') + 1) + newPfp;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
checkForUpdates();
|
||||
function checkForUpdates() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="https://portal-cdn.olv.pretendo.cc/css/juxt.css">
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/pjax.min.js"></script>
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/juxt.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%= cdnURL %>/css/juxt.css">
|
||||
<script src="<%= cdnURL %>/js/pjax.min.js"></script>
|
||||
<script src="<%= cdnURL %>/js/juxt.js"></script>
|
||||
<!-- Google Analytics -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
@@ -151,25 +151,25 @@
|
||||
<table class="user-page-tab-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td onclick="switchUserPageTabs(0)">
|
||||
<td onclick="switchUserPageTabs(0, '<%= user.pid %>')">
|
||||
<div class="user-page-tab left selected" id="user-page-posts-tab">
|
||||
<%=numPosts%> Posts
|
||||
</div>
|
||||
<div class="user-page-tab-triangle selected" id="user-page-posts-triangle"></div>
|
||||
</td>
|
||||
<td onclick="switchUserPageTabs(1)">
|
||||
<td onclick="switchUserPageTabs(1, '<%= user.pid %>')">
|
||||
<div class="user-page-tab" id="user-page-friends-tab">
|
||||
0 Friends
|
||||
</div>
|
||||
<div class="user-page-tab-triangle" id="user-page-friends-triangle"></div>
|
||||
</td>
|
||||
<td onclick="switchUserPageTabs(2)">
|
||||
<td onclick="switchUserPageTabs(2, '<%= user.pid %>')">
|
||||
<div class="user-page-tab" id="user-page-following-tab">
|
||||
<%= user.following %> Following
|
||||
</div>
|
||||
<div class="user-page-tab-triangle" id="user-page-following-triangle"></div>
|
||||
</td>
|
||||
<td onclick="switchUserPageTabs(3)">
|
||||
<td onclick="switchUserPageTabs(3, '<%= user.pid %>')">
|
||||
<div class="user-page-tab right" id="user-page-followers-tab">
|
||||
<%= user.followers %> Followers
|
||||
</div>
|
||||
@@ -197,7 +197,7 @@
|
||||
<h4 class="community-page-post-time-stamp"><%= moment(post.created_at).fromNow()%> - <a data-pjax="/communities/<%=communityMap.get(post.title_id + '-id')%>"><%= communityMap.get(post.title_id) %></a></h4>
|
||||
|
||||
<div class="community-page-post-yeah-button-wrapper">
|
||||
<div class="community-page-post-yeah-button" onclick="yeah(this.parentNode, <%= post.id %>)"></div>
|
||||
<div class="community-page-post-yeah-button" onclick="yeah(this.parentNode, '<%= post.id %>')"></div>
|
||||
</div>
|
||||
<div id="yeah-<%= post.id %>" class="community-page-post-yeah-count"><%= post.empathy_count %> Yeahs</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="https://portal-cdn.olv.pretendo.cc/css/juxt.css">
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/pjax.min.js"></script>
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/juxt.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%= cdnURL %>/css/juxt.css">
|
||||
<script src="<%= cdnURL %>/js/pjax.min.js"></script>
|
||||
<script src="<%= cdnURL %>/js/juxt.js"></script>
|
||||
<!-- Google Analytics -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="https://portal-cdn.olv.pretendo.cc/css/juxt.css">
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/pjax.min.js"></script>
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/juxt.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%= cdnURL %>/css/juxt.css">
|
||||
<script src="<%= cdnURL %>/js/pjax.min.js"></script>
|
||||
<script src="<%= cdnURL %>/js/juxt.js"></script>
|
||||
<!-- Google Analytics -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="https://portal-cdn.olv.pretendo.cc/css/juxt.css">
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/pjax.min.js"></script>
|
||||
<script src="https://portal-cdn.olv.pretendo.cc/js/juxt.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%= cdnURL %>/css/juxt.css">
|
||||
<script src="<%= cdnURL %>/js/pjax.min.js"></script>
|
||||
<script src="<%= cdnURL %>/js/juxt.js"></script>
|
||||
<!-- Google Analytics -->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
@@ -89,25 +89,25 @@
|
||||
<table class="user-page-tab-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td onclick="switchUserPageTabs(0)">
|
||||
<td onclick="switchUserPageTabs(0, '<%= user.pid %>')">
|
||||
<div class="user-page-tab left selected" id="user-page-posts-tab">
|
||||
<%=numPosts%> Posts
|
||||
</div>
|
||||
<div class="user-page-tab-triangle selected" id="user-page-posts-triangle"></div>
|
||||
</td>
|
||||
<td onclick="switchUserPageTabs(1)">
|
||||
<td onclick="switchUserPageTabs(1, '<%= user.pid %>')">
|
||||
<div class="user-page-tab" id="user-page-friends-tab">
|
||||
0 Friends
|
||||
</div>
|
||||
<div class="user-page-tab-triangle" id="user-page-friends-triangle"></div>
|
||||
</td>
|
||||
<td onclick="switchUserPageTabs(2)">
|
||||
<td onclick="switchUserPageTabs(2, '<%= user.pid %>')">
|
||||
<div class="user-page-tab" id="user-page-following-tab">
|
||||
<%= user.following %> Following
|
||||
</div>
|
||||
<div class="user-page-tab-triangle" id="user-page-following-triangle"></div>
|
||||
</td>
|
||||
<td onclick="switchUserPageTabs(3)">
|
||||
<td onclick="switchUserPageTabs(3, '<%= user.pid %>')">
|
||||
<div class="user-page-tab right" id="user-page-followers-tab">
|
||||
<%= user.followers %> Followers
|
||||
</div>
|
||||
@@ -135,7 +135,7 @@
|
||||
<h4 class="community-page-post-time-stamp"><%= moment(post.created_at).fromNow()%> - <a data-pjax="/communities/<%=communityMap.get(post.title_id + '-id')%>"><%= communityMap.get(post.title_id) %></a></h4>
|
||||
|
||||
<div class="community-page-post-yeah-button-wrapper <%if(user.likes.indexOf(post.id) !== -1){ %> selected <%}%>">
|
||||
<div class="community-page-post-yeah-button" onclick="yeah(this.parentNode, <%= post.id %>)"></div>
|
||||
<div class="community-page-post-yeah-button" onclick="yeah(this.parentNode, '<%= post.id %>')"></div>
|
||||
</div>
|
||||
<div id="yeah-<%= post.id %>" class="community-page-post-yeah-count"><%= post.empathy_count %> Yeahs</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user