Merge branch 'main' into patch-1

This commit is contained in:
Jay
2021-09-03 12:44:59 -05:00
committed by GitHub
34 changed files with 1000 additions and 327 deletions

View File

@@ -217,7 +217,6 @@ let methods = {
if(!header)
return translations.EN;
let paramPackData = this.decodeParamPack(header);
console.log(paramPackData.language_id)
switch (paramPackData.language_id) {
case '0':
return translations.JA

View File

@@ -4,10 +4,10 @@ const logger = require('../../../../logger');
const util = require('../../../../authentication');
const config = require('../../../../config.json');
const { COMMUNITY } = require('../../../../models/communities');
const { POST } = require('../../../../models/post');
var router = express.Router();
const moment = require('moment');
var multer = require('multer');
const sharp = require("sharp");
const snowflake = require('node-snowflake').Snowflake;
var storage = multer.memoryStorage();
var upload = multer({ storage: storage });
@@ -158,14 +158,14 @@ router.post('/communities/:communityID/update', upload.fields([{name: 'browserIc
community.icon = req.body.icon;
if(req.files.browserIcon) {
community.browser_icon = `data:image/png;base64,${await sharp(req.files.browserIcon[0].buffer).resize({ height: 128, width: 128 }).toBuffer().toString('base64')}`;
community.browser_thumbnail = `data:image/png;base64,${await sharp(req.files.browserIcon[0].buffer).resize({ height: 128, width: 128 }).toBuffer().toString('base64')}`;
community.browser_icon = `data:image/png;base64,${req.files.browserIcon[0].buffer.toString('base64')}`;
community.browser_thumbnail = `data:image/png;base64,${req.files.browserIcon[0].buffer.toString('base64')}`;
}
if(req.files.CTRbrowserHeader)
community.CTR_browser_header = `data:image/png;base64,${await sharp(req.files.CTRbrowserHeader[0].buffer).resize({ height: 220, width: 400 }).toBuffer().toString('base64')}`;
community.CTR_browser_header = `data:image/png;base64,${req.files.CTRbrowserHeader[0].buffer.toString('base64')}`;
if(req.files.WiiUbrowserHeader)
community.WiiU_browser_header = `data:image/png;base64,${await sharp(req.files.WiiUbrowserHeader[0].buffer).resize({ height: 328, width: 1498 }).toBuffer().toString('base64')}`;
community.WiiU_browser_header = `data:image/png;base64,${req.files.WiiUbrowserHeader[0].buffer.toString('base64')}`;
if(req.body.is_recommended)
community.is_recommended = req.body.is_recommended;
@@ -216,13 +216,14 @@ router.post('/communities/new', upload.fields([{name: 'browserIcon', maxCount: 1
JSON.parse(JSON.stringify(req.files));
let browserIcon, CTRHeader, WiiUHeader, thumb;
if(req.files.browserIcon) {
browserIcon = await sharp(req.files.browserIcon[0].buffer).resize({ height: 128, width: 128 }).toBuffer();
thumb = await sharp(req.files.browserIcon[0].buffer).resize({ height: 75, width: 75 }).toBuffer();
browserIcon = `data:image/png;base64,${req.files.browserIcon[0].buffer.toString('base64')}`;
thumb = `data:image/png;base64,${req.files.browserIcon[0].buffer.toString('base64')}`;
}
if(req.files.CTRbrowserHeader)
CTRHeader = await sharp(req.files.CTRbrowserHeader[0].buffer).resize({ height: 220, width: 400 }).toBuffer();
CTRHeader = `data:image/png;base64,${req.files.CTRbrowserHeader[0].buffer.toString('base64')}`;
if(req.files.WiiUbrowserHeader)
WiiUHeader = await sharp(req.files.WiiUbrowserHeader[0].buffer).resize({ height: 328, width: 1498 }).toBuffer();
WiiUHeader = `data:image/png;base64,${req.files.WiiUbrowserHeader[0].buffer.toString('base64')}`;
const document = {
empathy_count: 0,
id: snowflake.nextId(),
@@ -282,9 +283,6 @@ router.post('/communities/:communityID/sub/new', upload.fields([{name: 'browserI
let browserIcon, CTRHeader, WiiUHeader, thumb;
if(req.files.browserIcon) {
browserIcon = `data:image/png;base64,${req.files.browserIcon[0].buffer.toString('base64')}`;
thumb = await sharp(req.files.browserIcon[0].buffer)
.resize({ height: 75, width: 75 })
.toBuffer();
}
else {
browserIcon = community.browser_icon;
@@ -315,7 +313,7 @@ router.post('/communities/:communityID/sub/new', upload.fields([{name: 'browserI
community_id: snowflake.nextId(),
is_recommended: req.body.is_recommended,
browser_icon: browserIcon,
browser_thumbnail: `data:image/png;base64,${thumb.toString('base64')}`,
browser_thumbnail: thumb,
CTR_browser_header: CTRHeader,
WiiU_browser_header: WiiUHeader,
};
@@ -591,4 +589,79 @@ router.get('/notifications', function (req, res) {
});
});
router.post('/posts/new', upload.none(), 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) {
logger.audit('[' + user.user_id + ' - ' + user.pid + '] attempted to create a community and is not authorized');
throw new Error('Invalid credentials supplied');
}
let community = await database.getCommunityByID(req.body.olive_community_id);
let appData = "";
if (req.body.app_data) {
appData = req.body.app_data.replace(/\0/g, "").trim();
}
let painting = "", paintingURI = "";
if (req.body.painting && req.body.painting !== 'eJztwTEBACAMA7DCNRlIQRbu4ZoEviTJTNvjZNUFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL55fYLL3w==') {
painting = req.body.painting.replace(/\0/g, "").trim();
paintingURI = await util.data.processPainting(painting);
}
let screenshot = "";
if (req.body.screenshot) {
screenshot = req.body.screenshot.replace(/\0/g, "").trim();
}
const document = {
title_id: community.title_id[0],
community_id: community.community_id,
screen_name: user.user_id,
body: req.body.body,
app_data: appData,
painting: painting,
painting_uri: paintingURI,
screenshot: screenshot,
country_id: 49,
created_at: new Date(),
feeling_id: req.body.emotion,
id: snowflake.nextId(),
is_autopost: req.body.is_autopost,
is_spoiler: req.body.is_spoiler,
is_app_jumpable: req.body.is_app_jumpable,
language_id: req.body.language_id,
mii: user.mii,
mii_face_url: user.pfp_uri,
pid: pid,
platform_id: 0,
region_id: 2,
verified: user.official
};
const newPost = new POST(document);
newPost.save();
res.sendStatus(200);
logger.audit('[' + user.user_id + ' - ' + user.pid + '] created community ' + newCommunity.name);
}
else
throw new Error('Invalid account ID or password');
}).catch(error =>
{
res.statusCode = 400;
let response = {
error_code: 400,
message: error.message
};
res.send(response);
});
});
module.exports = router;

View File

@@ -220,6 +220,51 @@ router.get('/audit', upload.none(), function (req, res) {
});
router.get('/announcements', upload.none(), function (req, res) {
database.connect().then(async e => {
if(req.cookies.token === null)
{
res.redirect('/login');
return;
}
let pid = util.data.processServiceToken(req.cookies.token);
if(pid === null)
{
res.redirect('/login');
return;
}
let user = await database.getUserByPID(pid);
let community = await database.getCommunityByID('announcements');
let newPosts = await database.getNewPostsByCommunity(community, 100);
let totalNumPosts = await database.getTotalPostsByCommunity(community);
res.render('admin/admin_announcements.ejs', {
community: community,
newPosts: newPosts,
totalNumPosts: totalNumPosts,
user: user,
account_server: config.account_server_domain.slice(8),
});
}).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('/communities/new', upload.none(), function (req, res) {
var communityID = req.query.CID;
database.connect().then(async e => {
@@ -563,6 +608,47 @@ router.get('/users/:userID/edit', upload.none(), function (req, res) {
});
router.get('/posts/new', upload.none(), function (req, res) {
database.connect().then(async e => {
if(req.cookies.token === null)
{
res.redirect('/login');
return;
}
let pid = util.data.processServiceToken(req.cookies.token);
if(pid === null)
{
res.redirect('/login');
return;
}
let user = await database.getUserByPID(pid);
let community = await database.getCommunityByID('announcements');
res.render('admin/admin_new_post.ejs', {
community: community,
user: user,
account_server: config.account_server_domain.slice(8),
});
}).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('/login', upload.none(), function (req, res) {
database.connect().then(async e => {
@@ -658,9 +744,9 @@ router.post('/login', upload.none(), function (req, res) {
else
{
console.log(body)
res.statusCode = 400;
res.statusCode = 403;
let response = {
error_code: 400,
error_code: 403,
message: 'Invalid account ID or password'
};
res.send(response);
@@ -673,9 +759,9 @@ router.post('/login', upload.none(), function (req, res) {
}).catch(error =>
{
res.statusCode = 400;
res.statusCode = 504;
let response = {
error_code: 400,
error_code: 504,
message: error.message
};
res.send(response);

View File

@@ -9,7 +9,7 @@ var upload = multer({ dest: 'uploads/' });
var router = express.Router();
router.get('/', 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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {
let popularCommunities = await database.getMostPopularCommunities(9);
@@ -39,7 +39,7 @@ router.get('/', function (req, res) {
});
router.get('/all', 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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {
let communities = await database.getCommunities(90);
@@ -65,7 +65,7 @@ router.get('/all', function (req, res) {
});
router.get('/announcements', 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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {
let pid = util.data.processServiceToken(req.headers["x-nintendo-servicetoken"]);
@@ -103,14 +103,15 @@ router.get('/announcements', function (req, res) {
});
router.get('/:communityID/:type', 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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
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);
console.log(req.params.communityID)
if(req.params.communityID === 'announcements')
res.redirect('/communities/announcements')
let community = await database.getCommunityByID(req.params.communityID.toString());
let newPosts = await database.getNumberNewCommunityPostsByID(community, 5);
let totalNumPosts = await database.getTotalPostsByCommunity(community)
@@ -143,7 +144,7 @@ router.get('/:communityID/:type', function (req, res) {
});
router.get('/:communityID/:type/loadPosts', 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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {
let pid = util.data.processServiceToken(req.headers["x-nintendo-servicetoken"]);

View File

@@ -7,11 +7,9 @@ var moment = require('moment');
var router = express.Router();
router.get('/', 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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
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)
@@ -51,7 +49,7 @@ router.get('/', function (req, res) {
});
router.get('/loadposts', 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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {
let pid = util.data.processServiceToken(req.headers["x-nintendo-servicetoken"]);

View File

@@ -7,7 +7,7 @@ var moment = require('moment');
var router = express.Router();
router.get('/', 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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {

View File

@@ -7,7 +7,7 @@ var moment = require('moment');
var router = express.Router();
router.get('/', 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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {

View File

@@ -100,6 +100,7 @@ router.post('/new', upload.none(), async function (req, res, next) {
pid: pid,
platform_id: paramPackData.platform_id,
region_id: paramPackData.region_id,
verified: usrObj.official
};
const newPost = new POST(document);
newPost.save();

View File

@@ -7,7 +7,7 @@ var moment = require('moment');
var router = express.Router();
router.get('/', 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,miiverse.cc,,2|https,miiverse.cc,,2');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {
let pid = util.data.processServiceToken(req.headers["x-nintendo-servicetoken"]);
@@ -82,7 +82,7 @@ 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.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
res.render('portal/first_run.ejs', {
cdnURL: config.CDN_domain,

View File

@@ -9,7 +9,7 @@ var upload = multer({ dest: 'uploads/' });
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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {
let pid = util.data.processServiceToken(req.headers["x-nintendo-servicetoken"]);
@@ -83,7 +83,7 @@ router.post('/me', upload.none(), function (req, res) {
});
router.get('/show', 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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
var userID = req.query.pid;
if(userID === 'me') {
@@ -133,7 +133,7 @@ router.get('/show', function (req, res) {
});
router.get('/loadPosts', 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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {
let pid = util.data.processServiceToken(req.headers["x-nintendo-servicetoken"]);
@@ -182,7 +182,7 @@ 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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {
let user = await database.getUserByPID(req.query.pid);
@@ -221,7 +221,7 @@ router.get('/following', function (req, res) {
});
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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {
let user = await database.getUserByPID(req.query.pid);
@@ -258,7 +258,7 @@ router.get('/followers', function (req, res) {
});
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');
res.header('X-Nintendo-WhiteList', config.whitelist);
let lang = util.data.processLanguage(req.headers["x-nintendo-parampack"]);
database.connect().then(async e => {
let user = await database.getUserByPID(req.query.pid);

View File

@@ -1,126 +1,126 @@
{
"language": "German",
"language": "Deutsch",
"global": {
"user_page": "User Page",
"activity_feed": "Activity Feed",
"user_page": "Nutzerprofil",
"activity_feed": "Aktivitätsfeed",
"communities": "Communities",
"messages": "Messages",
"notifications": "Notifications",
"go_back": "Go Back",
"back": "Back",
"messages": "Nachrichten",
"notifications": "Benachrichtigungen",
"go_back": "Gehe Zurück",
"back": "Zurück",
"yeahs": "Yeahs",
"more": "Load More Posts",
"no_posts": "No Posts",
"private": "Private",
"close": "Close",
"save": "Save",
"exit": "Exit",
"next": "Next"
"more": "Lade weitere Beiträge",
"no_posts": "Keine Beiträge",
"private": "Privat",
"close": "Schließen",
"save": "Speichern",
"exit": "Verlassen",
"next": "Weiter"
},
"all_communities": {
"text": "All Communities",
"announcements": "Announcements",
"ann_string": "Click here to view recent announcements!",
"popular_places": "Popular Places",
"new_communities": "New Communities",
"show_all": "Show All",
"search": "Search communities..."
"text": "Alle Communities",
"announcements": "Ankündigungen",
"ann_string": "Klicke hier, um die letzten Ankündigungen anzusehen!",
"popular_places": "Beliebte Orte",
"new_communities": "Neue Communities",
"show_all": "Alle anzeigen",
"search": "Communities Suchen..."
},
"community": {
"follow": "Follow Community",
"following": "Following",
"followers": "Followers",
"posts": "Posts",
"follow": "Community Folgen",
"following": "Folgen",
"followers": "Folgende",
"posts": "Beiträge",
"tags": "Tags",
"recent": "Recent Posts",
"popular": "Popular Posts",
"verified": "Verified Posts",
"new": "New Post"
"recent": "Kürzliche Beiträge",
"popular": "Beliebte Beiträge",
"verified": "Verifizierter Beitrag",
"new": "Neuer Beitrag"
},
"user_page": {
"country": "Country",
"birthday": "Birthday",
"game_experience": "Game Experience",
"posts": "Posts",
"friends": "Friends",
"following": "Following",
"followers": "Followers",
"follow_user": "Follow",
"following_user": "Following",
"befriend": "Befriend",
"pending": "Pending",
"unfriend": "Unfriend",
"no_friends": "No Friends",
"no_following": "Not Following Anyone",
"no_followers": "No Followers"
"country": "Land",
"birthday": "Geburtstag",
"game_experience": "Spielerfahrung",
"posts": "Beiträge",
"friends": "Freunde",
"following": "Folge",
"followers": "Folgende",
"follow_user": "Folgen",
"following_user": "Folge",
"befriend": "Anfreunden",
"pending": "Ausstehend",
"unfriend": "Freundschaft Beenden",
"no_friends": "Keine Freunde",
"no_following": "Folge Niemanden",
"no_followers": "Keine Folgenden"
},
"user_settings": {
"profile_settings": "Profile Settings",
"show_country": "Show Country on Profile",
"show_birthday": "Show Birthday on Profile",
"show_game": "Show Game Experience on Profile",
"show_comment": "Show Comment on Profile",
"profile_comment": "Profile Comment",
"swearing": "Profile comment cannot contain explicit language."
"profile_settings": "Profileinstellungen",
"show_country": "Zeige Land im Profil",
"show_birthday": "Zeige Geburtstag im Profil",
"show_game": "Zeige Spielerfahrung im Profil",
"show_comment": "Zeige Kommentar im Profil",
"profile_comment": "Profilkommentar",
"swearing": "Profilkommentar darf keine explizite Sprache enthalten."
},
"activity_feed": {
"empty": "It's empty here. Try following someone!"
"empty": "Es ist ganz schön leer hier. Versuche, jemandem zu Folgen!"
},
"notifications": {
"none": "No notifications.",
"new_follower": "followed you!"
"none": "Keine Benachrichtigungen.",
"new_follower": "folgt dir!"
},
"new_post": {
"new_post_text": "New Post",
"post_to": "Post to",
"text_hint": "Tap here to make a post.",
"swearing": "Post cannot contain explicit language."
"new_post_text": "Neuer Beitrag",
"post_to": "Beitragen zu",
"text_hint": "Hier tippen, um einen Beitrag zu erstellen.",
"swearing": "Beitrag darf keine explizite Sprache enthalten."
},
"messages": {
"coming_soon": "Messages isn't ready yet. Check back soon!"
"coming_soon": "Nachrichten sind noch nicht fertig. Schau später noch einmal vorbei!"
},
"setup": {
"welcome": "Welcome to Juxtaposition!",
"welcome_text": "Juxt is a gaming community that connects people from all over the world using Mii characters. Use Juxt to share your gaming experiences and meet people from around the world.",
"beta": "Beta Disclaimer",
"welcome": "Willkommen bei Juxtaposition!",
"welcome_text": "Juxt ist eine Gaming-Community, die Menschen aus der ganzen Welt durch Mii-Charaktäre miteinander verbindet. Verwende Juxt zum teilen deiner Spielerfahrung und zum Treffen von Personen aus aller Welt.",
"beta": "Beta-Haftungsausschluss",
"beta_text": {
"fisrt": "You are about to try out the first public beta of Juxt. This means that a lot is still up in the air, and a lot can change at any time.",
"second": "This can and may include a total wipe of the database at the conclusion or during the beta period.",
"fisrt": "Du bist dabei, die erste öffentliche Beta von Juxt auszuprobieren. Das bedeutet, dass einige Dinge noch fehlen oder ungeklärt sind und dass sich jederzeit noch etwas ändern kann.",
"second": "Dies kann und wird eine vollständige Löschung der Datenbank während der Betaphase oder am Ende dieser beinhalten.",
"third": "The website, its software and all content found on it are provided on an “as is” and “as available” basis. The Pretendo Network does not give any warranties, whether express or implied, as to the suitability or usability of the website, its software or any of its content."
},
"info": "What is Juxtaposition?",
"info_text": "Juxt is a user-driven gaming community where you can interact with people\n all over the world. You can write or draw posts in game communities or send messages directly to your friends.",
"rules": "Juxt Rules",
"info": "Was ist Juxtaposition?",
"info_text": "Juxt ist eine Benutzergesteuerte Gaming-Community, auf der du mit Nutzern\n aus aller Welt kommunizeren kannst. Du kannst Beiträge in Spiel-Communities Malen oder Zeichnen und Direkt-Nachrichten an deine Freunde senden.",
"rules": "Juxt Regeln",
"rules_text": {
"first": "The following are some important guidelines for making Juxt a fun and enjoyable experience for everyone. The Juxt Code of Conduct contains detailed information, so please read it carefully.",
"second": "Posts Can Be Viewed Around the World",
"third": "Juxt contains many gaming communities where people from all over the world can share their thoughts. When you post in a community, remember that everyone can see it, so please express yourself in a way that everyone can enjoy. Use common sense, and think before you post. Juxt is a service that is also accessible from the Internet, so bear in mind that people who don't use Juxt may also see your posts. Additionally, any comments you make on your friends posts will be seen not by just your friends but by people around the world, too. Please keep this in mind.",
"fourth": "Be Nice to One Another",
"fifth": "In order to keep Juxt a fun place for everyone, we ask that you be considerate to other users. Help us keep Juxt an enjoyable experience by not posting anything inappropriate or offensive.",
"sixth": "Do Not Post Personal Information—Yours or Others",
"seventh": "Remember, knowing someone in Juxt isnt the same as knowing them in real life. Never share your e-mail address, home address, work or school name, or other personally identifying information with anyone on Juxt, and never share anyone else's information either. Additionally, if someone you meet in Juxt invites you to meet him or her in the real world, do not accept. Juxt is an online community and should not be used to arrange real-world meet-ups.",
"eighth": "Dont Post Spoilers",
"ninth": "Some people come to Juxt looking for tips and tricks for games, but others want to discover a game's secrets all on their own. Posts that reveal secrets of a game or its story are called \"spoilers.\" If you're posting something about a game that might be a spoiler, be sure to check the Spoilers box before sending your post. This way, people who don't want to be spoiled won't see your post.",
"tenth": "Code of Conduct Violations",
"eleventh": "Our goal is to keep Juxt fun and enjoyable for everyone. In the event that someone violates the Juxt Code of Conduct, we will take appropriate action, up to and including blocking the offending user or console.",
"twelfth": "Have You Played That Game?",
"thirteenth": "If you're posting in the community for a game you've played, your posts will have an icon indicating that you've played it."
"first": "Es folgen einige wichtige Regeln, damit Juxt ein Angenehmer Ort für jeden bleibt. Die Juxt-Regeln enthalten detaillierte Informationen, also lies ihn bitte sorgfältig durch.",
"second": "Beiträge können auf der gesamten Welt angesehen werden",
"third": "Juxt enthält viele Gaming-Communitys, in denen Menschen aus aller Welt ihre Gedanken und Erfahrungen austauschen können. Denke daran, dass, wenn du einen Beitrag in einer Community erstellst, dass jeder ihn sehen kann, daher drück dich bitte so aus, dass es jeder verstehen kann. Verwende deinen Verstand und denke bevor du Beiträge postest. Juxt ist ein Dienst, auf den auch über das Internet zugegriffen werden kann. Denke also daran, dass auch Personen, die Juxt nicht verwenden, deine Beiträge sehen können. Zusätzlich, jeder Kommentar, den du unter den Beitrag deines Freundes schreibst, kann auch von anderen Personen gelesen werden.",
"fourth": "Sei nett zu anderen",
"fifth": "Damit Juxt ein schöner Ort für jeden bleibt, bitten wir dich, auf andere Rücksicht zu nehmen. Hilf uns, Juxt zu einem tollen Erlebnis zu machen, indem du keine Unangemessenen oder Anstößigen Inhalte postest.",
"sixth": "Veröffentliche keine Persönlichen Daten, weder deine noch die von anderen",
"seventh": "Denke daran, dass es etwas anderes ist, jemanden im echten Leben zu kennen, als jemanden auf Juxt zu kennen. Teile keine E-Mail Adressen, Wohnadressen, Namen deiner Schule / deines Arbeitsortes oder andere Persönlich Identifizierende Informationen an andere auf Juxt weiter und teile auch nicht diese Informationen von anderen. Wenn dich jemand, den du in Juxt triffst, einladen, ihn oder sie in der realen Welt zu treffen, solltest du es nicht akzeptieren. Juxt ist eine Online-Community und sollte nicht dazu verwendet werden, um Treffen in der realen Welt zu arrangieren.",
"eighth": "Keine Spoiler Posten",
"ninth": "Manche Leute kommen zu Juxt, um Tipps und Tricks für Spiele zu finden, andere möchten die Geheimnisse eines Spiels allein herausfinden. Posts, die Geheimnisse eines Spiels oder seiner Geschichte enthüllen, heißen \"Spoiler\". Wenn du etwas über ein Spiel postest, das möglicherweise ein Spoiler ist, markiere es bitte als Spoiler, bevor du deinen Beitrag sendest. Auf diese Weise werden Leute, die keine Spoiler sehen wollen, deinen Beitrag nicht sehen.",
"tenth": "Regelverstöße",
"eleventh": "Unser Ziel ist es, dass Juxt jedem Spaß machen kann. Falls jemand gegen die Regeln von Juxt verstößt, werden wir geeignete Maßnahmen ergreifen, bis hin zur Sperrung des Benutzers oder der Konsole.",
"twelfth": "Hast du das Spiel gespielt?",
"thirteenth": "Wenn du in der Community für ein Spiel postest, wewlches du gespielt hast, werden deine Beiträge mit einem besonderen Symbol angezeigt, welches anzeigt, dass du es gespielt hast."
},
"experience": "Game Experience",
"experience": "Spielerfahrung",
"experience_text": {
"info": "Please tell us how you would describe your level of experience with games. You can change this setting later.",
"beginner": "Beginner",
"intermediate": "Intermediate",
"expert": "Expert"
"info": "Wie würdest du deinen Erfahrunsstand mit Spielen beschreiben? Du kannst diese Einstellung später ändern.",
"beginner": "Anfänger",
"intermediate": "Fortgeschritten",
"expert": "Experte"
},
"google": "Google Analytics",
"google_text": "Juxtaposition uses Google Analytics in order to track how users are using our service. The data collected includes but is not limited to time of visit, pages visited, and time spent on the site. This data is not attached to you in any way, and is not used for advertisements by us or Google.",
"ready": "Ready to Start Using Juxt",
"ready_text": "First check out some communities and see what people from all over the world are posting about. Take this opportunity to familiarize yourself with Juxt. You might make some new discoveries along the way!",
"done": "Have fun in Juxt!",
"done_button": "Let's Go!",
"guest": "Guest Mode",
"guest_text": "We can't verify your account at the moment, which likely means your are currently logging in with a Nintendo Network account. You will still be able to browse juxt, but you will not be able to Yeah! posts or make posts of your own till you log in with a Pretendo Network account. For more information check the Discord server.",
"guest_button": "I Understand"
"google_text": "Juxtaposition verwendet Google Analytics, um herauszufinden, wie unser Service verwendet wird. Die gesammelten Daten enthalten unter anderem: Besuchszeit, besuchte Seiten und Zeit, die auf der Webseite verbracht wurde. Diese Daten werden nicht mit dir in Verbindung gebracht und auch nicht für Werbezwecke von Juxt oder Google verwendet.",
"ready": "Bereit zur Nutzung von Juxt",
"ready_text": "Schau dir erstmal einige Communities an und worüber andere Nutzer aus aller Welt Beitragen. Nutze diese Gelegenheut, um dich mit Juxt vertraut zu machen. Du könntest auf deinem Weg einige neue Entdeckungen machen!",
"done": "Viel Spaß mit Juxt!",
"done_button": "Los Geht's!",
"guest": "Gastmodus",
"guest_text": "Wir können dich aktuell nicht verifizieren, da du duch wahrscheinlich mit einem Nintendo Network Account anmeldest. Du kannst dich trotzdem auf Juxt umsehen, aber du kannst keine Beiträge mit Yeah! versehen oder eigene Beiträge posten, bis du dich mit eienm Pretendo Network Account anmeldest. Für weitere Informationen, schau auf unseren Discord Server.",
"guest_button": "Verstanden"
}
}
}

View File

@@ -23,7 +23,7 @@
"ann_string": "¡Pulsa para ver los anuncios recientes!",
"popular_places": "Lugares Populares",
"new_communities": "Nuevas Comunidades",
"show_all": "Ver todo",
"show_all": "Mostrar todo",
"search": "Buscar comunidades..."
},
"community": {

View File

@@ -1,126 +1,126 @@
{
"language": "Italian",
"language": "Italiano",
"global": {
"user_page": "User Page",
"activity_feed": "Activity Feed",
"communities": "Communities",
"messages": "Messages",
"notifications": "Notifications",
"go_back": "Go Back",
"back": "Back",
"yeahs": "Yeahs",
"more": "Load More Posts",
"no_posts": "No Posts",
"private": "Private",
"close": "Close",
"save": "Save",
"exit": "Exit",
"next": "Next"
"user_page": "Pagina utente",
"activity_feed": "Feed attività",
"communities": "Community",
"messages": "Messaggi",
"notifications": "Notifiche",
"go_back": "Torna indietro",
"back": "Indietro",
"yeahs": "Sìì",
"more": "Carica più post",
"no_posts": "Nessun post",
"private": "Privato",
"close": "Chiudi",
"save": "Salva",
"exit": "Esci",
"next": "Avanti"
},
"all_communities": {
"text": "All Communities",
"announcements": "Announcements",
"ann_string": "Click here to view recent announcements!",
"popular_places": "Popular Places",
"new_communities": "New Communities",
"show_all": "Show All",
"search": "Search communities..."
"text": "Tutte le community",
"announcements": "Comunicazioni",
"ann_string": "Clicca qui per visualizzare le comunicazioni più recenti!",
"popular_places": "Luoghi popolari",
"new_communities": "Nuove community",
"show_all": "Mostra tutto",
"search": "Cerca community..."
},
"community": {
"follow": "Follow Community",
"following": "Following",
"followers": "Followers",
"posts": "Posts",
"tags": "Tags",
"recent": "Recent Posts",
"popular": "Popular Posts",
"verified": "Verified Posts",
"new": "New Post"
"follow": "Segui community",
"following": "Stanno seguendo",
"followers": "Follower",
"posts": "Post",
"tags": "Tag",
"recent": "Post recenti",
"popular": "Post popolari",
"verified": "Post verificati",
"new": "Nuovo post"
},
"user_page": {
"country": "Country",
"birthday": "Birthday",
"game_experience": "Game Experience",
"posts": "Posts",
"friends": "Friends",
"following": "Following",
"followers": "Followers",
"follow_user": "Follow",
"following_user": "Following",
"befriend": "Befriend",
"pending": "Pending",
"unfriend": "Unfriend",
"no_friends": "No Friends",
"no_following": "Not Following Anyone",
"no_followers": "No Followers"
"country": "Nazione",
"birthday": "Compleanno",
"game_experience": "Esperienza di gioco",
"posts": "Post",
"friends": "Amici",
"following": "Sta seguendo",
"followers": "Follower",
"follow_user": "Segui",
"following_user": "Stai seguendo",
"befriend": "Chiedi amicizia",
"pending": "In attesa",
"unfriend": "Rimuovi amicizia",
"no_friends": "Nessun amico",
"no_following": "Non sta seguendo nessuno",
"no_followers": "Nessun follower"
},
"user_settings": {
"profile_settings": "Profile Settings",
"show_country": "Show Country on Profile",
"show_birthday": "Show Birthday on Profile",
"show_game": "Show Game Experience on Profile",
"show_comment": "Show Comment on Profile",
"profile_comment": "Profile Comment",
"swearing": "Profile comment cannot contain explicit language."
"profile_settings": "Impostazioni del profilo",
"show_country": "Mostra nazione sul profilo",
"show_birthday": "Mostra compleanno sul profilo",
"show_game": "Mostra esperienza di gioco sul profilo",
"show_comment": "Mostra commento sul profilo",
"profile_comment": "Commento sul profilo",
"swearing": "Il commento sul profilo non deve contenere linguaggio esplicito."
},
"activity_feed": {
"empty": "It's empty here. Try following someone!"
"empty": "È vuoto qui. Prova a seguire qualcuno!"
},
"notifications": {
"none": "No notifications.",
"new_follower": "followed you!"
"none": "Nessuna notifica.",
"new_follower": "ti ha seguito!"
},
"new_post": {
"new_post_text": "New Post",
"post_to": "Post to",
"text_hint": "Tap here to make a post.",
"swearing": "Post cannot contain explicit language."
"new_post_text": "Nuovo post",
"post_to": "Posta su",
"text_hint": "Tocca qui per postare.",
"swearing": "Il post non deve contenere linguaggio esplicito."
},
"messages": {
"coming_soon": "Messages isn't ready yet. Check back soon!"
"coming_soon": "La funzionalità Messaggi non è ancora pronta. Ricontrolla presto!"
},
"setup": {
"welcome": "Welcome to Juxtaposition!",
"welcome_text": "Juxt is a gaming community that connects people from all over the world using Mii characters. Use Juxt to share your gaming experiences and meet people from around the world.",
"beta": "Beta Disclaimer",
"welcome": "Benvenuto a Juxtaposition!",
"welcome_text": "Juxt è una community gaming che connette persone da tutto il mondo attraverso personaggi Mii. Usa Juxt per condividere le tue esperienze di gioco ed incontrare persone da tutto il mondo.",
"beta": "Disclaimer beta",
"beta_text": {
"fisrt": "You are about to try out the first public beta of Juxt. This means that a lot is still up in the air, and a lot can change at any time.",
"second": "This can and may include a total wipe of the database at the conclusion or during the beta period.",
"third": "The website, its software and all content found on it are provided on an “as is” and “as available” basis. The Pretendo Network does not give any warranties, whether express or implied, as to the suitability or usability of the website, its software or any of its content."
"fisrt": "Stai per provare la prima beta pubblica di Juxt. Ciò significa che molte cose non sono ancora finalizzate, e possono cambiare in qualunque momento.",
"second": "Questo può e potrebbe includere una cancellazione completa del database alla fine o durante il periodo di beta.",
"third": "Il sito web, il suo software e tutto il contenuto presente in esso sono forniti “nello stato in cui si trovano” e “secondo disponibilità”. Pretendo Network non fornisce nessuna garanzia, esplicita o implicita, per quanto riguarda l'idoneità o l'utilizzo del sito, il software o il suo contenuto."
},
"info": "What is Juxtaposition?",
"info_text": "Juxt is a user-driven gaming community where you can interact with people\n all over the world. You can write or draw posts in game communities or send messages directly to your friends.",
"rules": "Juxt Rules",
"info": "Cos'è Juxtaposition?",
"info_text": "Juxt è una comunità gaming guidata dagli utenti dove puoi interagire con persone\n da tutto il mondo. Puoi scrivere o disegnare post nella comunità di un gioco o mandare messaggi diretti ai tuoi amici.",
"rules": "Regole di Juxt",
"rules_text": {
"first": "The following are some important guidelines for making Juxt a fun and enjoyable experience for everyone. The Juxt Code of Conduct contains detailed information, so please read it carefully.",
"second": "Posts Can Be Viewed Around the World",
"third": "Juxt contains many gaming communities where people from all over the world can share their thoughts. When you post in a community, remember that everyone can see it, so please express yourself in a way that everyone can enjoy. Use common sense, and think before you post. Juxt is a service that is also accessible from the Internet, so bear in mind that people who don't use Juxt may also see your posts. Additionally, any comments you make on your friends posts will be seen not by just your friends but by people around the world, too. Please keep this in mind.",
"fourth": "Be Nice to One Another",
"fifth": "In order to keep Juxt a fun place for everyone, we ask that you be considerate to other users. Help us keep Juxt an enjoyable experience by not posting anything inappropriate or offensive.",
"sixth": "Do Not Post Personal Information—Yours or Others",
"seventh": "Remember, knowing someone in Juxt isnt the same as knowing them in real life. Never share your e-mail address, home address, work or school name, or other personally identifying information with anyone on Juxt, and never share anyone else's information either. Additionally, if someone you meet in Juxt invites you to meet him or her in the real world, do not accept. Juxt is an online community and should not be used to arrange real-world meet-ups.",
"eighth": "Dont Post Spoilers",
"ninth": "Some people come to Juxt looking for tips and tricks for games, but others want to discover a game's secrets all on their own. Posts that reveal secrets of a game or its story are called \"spoilers.\" If you're posting something about a game that might be a spoiler, be sure to check the Spoilers box before sending your post. This way, people who don't want to be spoiled won't see your post.",
"tenth": "Code of Conduct Violations",
"eleventh": "Our goal is to keep Juxt fun and enjoyable for everyone. In the event that someone violates the Juxt Code of Conduct, we will take appropriate action, up to and including blocking the offending user or console.",
"twelfth": "Have You Played That Game?",
"thirteenth": "If you're posting in the community for a game you've played, your posts will have an icon indicating that you've played it."
"first": "Di seguito elencate sono delle importanti linee guida per rendere Juxt un'esperienza divertente e piacevole per tutti. Il codice di condotta di Juxt contiene informazioni dettagliate, quindi leggilo attentamente, per favore.",
"second": "I post possono essere visualizzati da tutto il mondo",
"third": "Juxt contiene diverse comunità gaming dove persone da tutto il mondo possono condividere le loro opinioni. Quando posti in una community, ricordati che chiunque può vederlo, quindi esprimiti in un modo che possa piacere a tutti. Usa il buon senso, e pensa prima di postare. Juxt è un servizio che è anche accessibile via Internet, quindi tieni a mente che i tuoi post potrebbero essere visualizzati anche da persone che non utilizzano Juxt. Inoltre, qualunque commento che scrivi su un post di un tuo amico potra essere visto non solo dai tuoi amici, ma anche da persone da tutto il mondo. Per favore tienilo a mente.",
"fourth": "Sii gentile con gli altri utenti",
"fifth": "Ti chiediamo di essere rispettoso degli altri utenti, in modo che Juxt rimanga un luogo divertente per tutti. Non postare niente di inappropriato o offensivo, in modo da aiutarci a mantenere Juxt un'esperienza piacevole.",
"sixth": "Non postare informazioni personali - Tue o degli altri",
"seventh": "Ricorda, conoscere qualcuno su Juxt non è come conoscersi nella realtà. Non condividere con nessuno su Juxt il tuo indirizzo e-mail, indirizzo di casa, nome della tua scuola o luogo di lavoro, o altre informazioni personali, e lo stesso vale per le informazioni personali di altri utenti. Inoltre, se qualcuno che conosci su Juxt ti offre di incontrarlo nel mondo reale, non accettare. Juxt è una comunità online e non deve essere usata per organizzare incontri nel mondo reale.",
"eighth": "Non postare spoiler",
"ninth": "Alcune persone visitano Juxt per trovare suggerimenti e trucchi per i giochi, ma altre vogliono scoprire i segreti di un gioco da sole. Post che rivelano i segreti di un gioco o della sua storia sono detti \"spoiler\". Se stai postando qualcosa che potrebbe essere uno spoiler, assicurati di selezionare la casella Spoiler prima di inviare il tuo post. In questo modo il tuo post non sarà visibile agli utenti che non vogliono vedere spoiler.",
"tenth": "Violazioni del Codice di Condotta",
"eleventh": "Il nostro obiettivo è rendere Juxt divertente e piacevole per tutti. Nel caso in cui qualcuno violi il Codice di Condotta, prenderemo i provvedimenti opportuni, fino a bloccare l'utente o la console incriminati.",
"twelfth": "Hai mai giocato a quel gioco?",
"thirteenth": "Se stai postando nella comunità di un gioco a cui hai giocato, i tuoi post avranno un'icona per indicare che ci hai giocato."
},
"experience": "Game Experience",
"experience": "Esperienza di gioco",
"experience_text": {
"info": "Please tell us how you would describe your level of experience with games. You can change this setting later.",
"beginner": "Beginner",
"intermediate": "Intermediate",
"expert": "Expert"
"info": "Per favore, seleziona come descriveresti il tuo livello di esperienza con i giochi. Potrai cambiare la tua selezione in qualunque momento.",
"beginner": "Principiante",
"intermediate": "Intermedio",
"expert": "Esperto"
},
"google": "Google Analytics",
"google_text": "Juxtaposition uses Google Analytics in order to track how users are using our service. The data collected includes but is not limited to time of visit, pages visited, and time spent on the site. This data is not attached to you in any way, and is not used for advertisements by us or Google.",
"ready": "Ready to Start Using Juxt",
"ready_text": "First check out some communities and see what people from all over the world are posting about. Take this opportunity to familiarize yourself with Juxt. You might make some new discoveries along the way!",
"done": "Have fun in Juxt!",
"done_button": "Let's Go!",
"guest": "Guest Mode",
"guest_text": "We can't verify your account at the moment, which likely means your are currently logging in with a Nintendo Network account. You will still be able to browse juxt, but you will not be able to Yeah! posts or make posts of your own till you log in with a Pretendo Network account. For more information check the Discord server.",
"guest_button": "I Understand"
"google_text": "Juxtaposition utilizza Google Analytics per tracciare il modo in cui gli utenti utilizzano il nostro servizio. I dati raccolti includono ma non si limitano a: momento della visita, pagine visitate e tempo passato sul sito. Questi dati non sono ricollegabili a te in alcun modo, e non sono utilizzati per finalità pubblicitarie da noi o Google.",
"ready": "Pronto a iniziare a usare Juxt",
"ready_text": "Per primaa cosa dai un'occhiata a qualche community e scopri di cosa stanno parlando persone da tutto il mondo. Cogli questa opportunità per familiarizzarti con Juxt. Potresti scoprire nuove cose starda facendo!",
"done": "Divertiti in Juxt!",
"done_button": "Andiamo!",
"guest": "Modalità ospite",
"guest_text": "Non è stato possibile verificare il tuo account; è probabile che tu stia tentando di accedere con un account Nintendo Network. Potrai comunque esplorare Juxt, ma non potrai aggiungere Sìì! ai post o postare tu stesso fino a quando non accederai con un account Pretendo Network. Per maggiori informazioni, controlla il server Discord.",
"guest_button": "Ho capito"
}
}
}

View File

@@ -0,0 +1,164 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Juxt Admin Panel</title>
<link rel="stylesheet" type="text/css" href="/css/juxt.css">
</head>
<body>
<h2 style="display: inline-block; margin-left: 20px">Juxt Admin Panel - <%= user.user_id %></h2> <img style="width: 57px; display: inline-block; position: absolute; right: 8px;" src="http://mii-images.cdn.<%= account_server %>/<%= user.pid %>/normal_face.png">
<div class="row">
<div class="left" style="background-color:#bbb;max-width: 10%;">
<ul id="myMenu">
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>
</div>
<div class="right" style="background-color:#ddd;">
<h2><%= community.name %></h2>
<div class="community-page-info-container">
<table>
<tbody>
<tr>
<td>
<img class="community-page-info-icon" src="/icons/<%= community.community_id %>.png">
</td>
<td>
<h4 class="community-page-description"><%= community.description %></h4>
</td>
</tr>
</tbody>
</table>
<button type="button" style="margin-left: 20px; width: 760px; <%if(community.type === 1){%>display: none;<%}%>" onclick="window.location='/posts/new'">New Post</button>
<button type="button" style="margin-left: 20px; width: 760px" onclick="window.location='/communities/<%= community.community_id %>/edit'">Edit</button>
<div class="community-page-margin-line"></div>
<table class="community-page-table-wrapper">
<tbody>
<tr>
<td>
<div class="community-page-shaded-info-container">
<h4 class="community-page-table-label">Followers</h4>
<h4 class="community-page-table-text"><%= community.followers %></h4>
</div>
</td>
<td>
<div class="community-page-shaded-info-container">
<h4 class="community-page-table-label">Posts</h4>
<h4 class="community-page-table-text"><%=totalNumPosts%></h4>
</div>
</td>
<td>
<div class="community-page-shaded-info-container" style="width: 275px;">
<h4 class="community-page-table-label">Tags</h4>
<h4 class="community-page-table-text">N/A</h4>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="community-page-posts-wrapper">
<% newPosts.forEach(function(post) { %>
<div id="<%= post.id %>">
<div class="post-user-info-wrapper">
<%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>
<%} else {%>
<img class="community-page-post-user-icon" 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="display: none;"></span>
<%}%>
<h2 class="community-page-post-username" onclick="loadUserProfile(<%=post.pid%>)"><%= post.screen_name %></h2>
<h4 class="community-page-post-time-stamp"><%= post.created_at %></h4>
<div class="community-page-post-yeah-button-wrapper">
<div class="community-page-post-yeah-button" onclick="deletePost(event, '<%= post.id %>')"></div>
</div>
<div id="yeah-<%= post.id %>" class="community-page-post-yeah-count"><%= post.empathy_count %> Yeahs</div>
</div>
<div class="community-page-post-wrapper">
<% if(post.body !== '' && post.painting === '' && post.screenshot === '' && !post.url) { %>
<h3><%= post.body %></h3>
<%} else { %>
<% if(post.screenshot !== '') { %>
<img class="community-page-post-screenshot" src="data:image/png;base64,<%= post.screenshot %>">
<%}%>
<% if(post.painting !== '') { %>
<img class="community-page-post-painting" src="<%= post.painting_uri %>">
<%}%>
<% if(post.url) { %>
<iframe width="760" height="427.5" src="<%= post.url %>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<%}%>
<% if(post.body) { %>
<div class="community-page-post-text-overlay">
<h3><%= post.body %></h3>
</div>
<%}%>
<%}%>
</div>
</div>
<% }); %>
</div>
</div>
</div>
<script>
function deletePost(event, postID) {
if (event.shiftKey) {
var post = document.getElementById(postID);
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState === 4 && this.status === 200) {
post.style.display = 'none';
}
else if (this.readyState === 4){
alert('Error: "' + this.statusText + '"\nPlease send code to Jemma on Discord with what you were doing');
}
};
xhttp.open("POST", "/v1/posts/" + postID + '/delete', true);
xhttp.send();
} else {
if(confirm('Delete post?')) {
var post = document.getElementById(postID);
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState === 4 && this.status === 200) {
post.style.display = 'none';
}
else if (this.readyState === 4){
alert('Error: "' + this.statusText + '"\nPlease send code to Jemma on Discord with what you were doing');
}
};
xhttp.open("POST", "/v1/posts/" + postID + '/delete', true);
xhttp.send();
}
}
}
function loadUserPosts() {
var id = document.getElementsByClassName('post-user-info-wrapper')[document.getElementsByClassName('post-user-info-wrapper').length - 1].id
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 && this.status === 204)
{
document.getElementById('load-more-posts-button').style.display = 'none';
}
else if (this.readyState === 4){
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.send();
}
</script>
</body>
</html>

View File

@@ -15,6 +15,7 @@
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>

View File

@@ -34,6 +34,7 @@
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>

View File

@@ -15,6 +15,7 @@
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>

View File

@@ -15,6 +15,7 @@
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>

View File

@@ -15,6 +15,7 @@
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>

View File

@@ -15,6 +15,7 @@
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>

View File

@@ -15,6 +15,7 @@
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>

View File

@@ -15,6 +15,7 @@
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>

View File

@@ -15,6 +15,7 @@
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>

View File

@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Edit - <%= community.name %></title>
<link rel="stylesheet" type="text/css" href="/css/juxt.css">
</head>
<body>
<h2 style="display: inline-block; margin-left: 20px">Juxt Admin Panel - <%= user.user_id %></h2> <img style="width: 57px; display: inline-block; position: absolute; right: 8px;" src="http://mii-images.cdn.<%= account_server %>/<%= user.pid %>/normal_face.png">
<div class="row">
<div class="left" style="background-color:#bbb;max-width: 10%;">
<ul id="myMenu">
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>
</div>
<div class="right" style="background-color:#ddd;">
<h2>New Announcement</h2>
<form action="/v1/posts/new" class="post-emotion-radio" enctype="multipart/form-data" target="formSubmitFrame" method="post">
<table>
<tr>
<td>
<img class="post-user-icon" src="https://mii-images.cdn.<%= account_server %>/<%= user.pid %>/normal_face.png">
<input type="hidden" id="olive_title_id" name="olive_title_id" value="<%= community.title_id[0] %>">
<input type="hidden" id="olive_community_id" name="olive_community_id" value="<%= community.community_id %>">
<input type="hidden" id="_post_type" name="_post_type" value="body">
</td>
<td>
<div class="post-emotions-wrapper">
<label for="post-emotion-0">
<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" 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" 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" 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" 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" onclick="changeMiiImageReaction(this)">
<span class="post-emotion-5"></span>
</label>
</div>
<div class="post-emotions-arrow-left"></div>
</td>
<td>
<label class="checkbox-container checkbox-post">Spoilers
<input type="checkbox" id="spoiler" name="spoiler" value="true" onclick="wiiuSound.playSoundByName('SE_WAVE_MENU', 1);">
<span class="checkmark"></span>
</label>
<div class="post-screenshot-picker" onclick="loadScreenshots()">
<div class="post-screenshot-picker-icon"></div>
<div class="post-screenshot-picker-dropdown">
<div><img src="" class="post-screenshot-preview" id="post-top-screen-preview" onclick="document.getElementById('screenshot-value').value = wiiuMainApplication.getScreenShot(true);"></div>
<div><img src="" class="post-screenshot-preview" id="post-bottom-screen-preview" onclick="document.getElementById('screenshot-value').value = wiiuMainApplication.getScreenShot(false);"></div>
<div onclick="document.getElementById('screenshot-value').value = ''; loadScreenshots()">No Screenshot</div>
<input type="hidden" id="screenshot-value" name="screenshot" value="">
</div>
</div>
</td>
</tr>
<tr>
<td rowspan="2" id="post-text-input">
<textarea class="post-textarea" id="comment" name="body" placeholder="Enter text here" rows="4" cols="50"></textarea>
</td>
<td rowspan="2" id="post-painting-input" style="display: none;">
<div class="post-memo">
<img class="post-memo-preview" id="memo" width="640px" height="240px" src="" style="display: none;" onclick="newPainting(false)">
<input type="hidden" id="memo-value" name="painting" value="">
</div>
</td>
<br>
</tr>
<tr style="height: 70px">
<td>
<input type="submit" value="Post" class="submit-button" style="margin-left: -124px;" onclick="wiiuSound.playSoundByName('SE_WAVE_MENU', 1);wiiuSound.playSoundByName('BGM_OLV_MAIN_LOOP_NOWAIT', 3);">
</td>
</tr>
</table>
</form>
<iframe name="formSubmitFrame"></iframe>
</div>
</div>
</body>
</html>

View File

@@ -34,6 +34,7 @@
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>

View File

@@ -15,6 +15,7 @@
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>
@@ -33,7 +34,7 @@
<td>
<div class="community-page-shaded-info-container">
<h4 class="community-page-table-label">Country</h4>
<h4 class="community-page-table-text">N/A</h4>
<h4 class="community-page-table-text"><%=user.country%></h4>
</div>
</td>
<td>

View File

@@ -34,6 +34,7 @@
<li><a href="/">Home</a></li>
<li><a href="/communities">Communities</a></li>
<li><a href="/audit">Audit Log</a></li>
<li><a href="/announcements">Announcements</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/discovery">Discovery</a></li>
</ul>

File diff suppressed because one or more lines are too long

View File

@@ -31,7 +31,10 @@
<li id="nav-bar-exit" onclick="exit()"><a href=""><%= lang.global.close %></a></li>
</menu>
<div id="main">
<div class="community-page-header" style="background-image: url('/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-follow-button-wrapper" style="display: none">
<p class="community-page-follow-button-text" id="<%= community.community_id %>" onclick="followCommunity(this)"><%= lang.community.follow %></p>
</div>
<div class="community-page-info-container" style="min-height: 150px">
<img class="community-page-info-icon" src="/icons/<%= community.community_id %>.png">
<h2 class="community-page-title"><%= community.name %></h2>
@@ -46,10 +49,10 @@
<% newPosts.forEach(function(post) { %>
<div class="post-user-info-wrapper" id="<%= post.id %>">
<%if(post.verified) {%>
<img class="community-page-post-user-icon verified" src="https://mii-images.cdn.<%= account_server %>/<%= user.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 %>)">
<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 %>">
<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.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 %>)">
<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 %>">
<span class="community-page-verified-user-badge community-page-verified" style="display: none;"></span>
<%}%>
<h2 class="community-page-post-username" onclick="loadUserProfile(<%= post.pid %>)"><%= post.screen_name %></h2>

View File

@@ -1,85 +0,0 @@
<table class="community-page-posts-header">
<tbody>
<tr>
<td>
<h4 id="recent-tab" onclick="loadPosts(0)" class="community-page-posts-header-tab active"><%= lang.community.recent %></h4>
</td>
<td>
<h4 id="popular-tab" onclick="loadPosts(1)" class="community-page-posts-header-tab"><%= lang.community.popular %></h4>
</td>
<td>
<h4 id="verified-tab" onclick="loadPosts(2)" class="community-page-posts-header-tab"><%= lang.community.verified %></h4>
</td>
</tr>
</tbody>
</table>
<% newPosts.forEach(function(post) { %>
<div class="post-user-info-wrapper">
<%if(post.verified) {%>
<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 %>">
<span class="community-page-verified-user-badge community-page-verified" style="" data-pjax="/users/show?pid=<%= post.pid %>"></span>
<%} else {%>
<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 %>">
<span class="community-page-verified-user-badge community-page-verified" style="display: none;" data-pjax="/users/show?pid=<%= post.pid %>"></span>
<%}%>
<h2 class="community-page-post-username" data-pjax="/users/show?pid=<%= post.pid %>"><%= post.screen_name %></h2>
<h4 class="community-page-post-time-stamp"><%= moment(post.created_at).fromNow() %></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>
<div id="yeah-<%= post.id %>" class="community-page-post-yeah-count"><%= post.empathy_count %> <%= lang.global.yeahs %></div>
</div>
<%if(post.screenshot !== '' && post.painting === '' && post.url === '' && post.body === '') {%>
<div class="community-page-post-wrapper">
<p>Screenshot Only:</p>
<img id="<%= post.id %>" class="community-page-post-screenshot" src="data:image/png;base64,<%= post.screenshot %>">
</div>
<% } else if(post.painting !== '' && post.screenshot === '' && post.url === '') {%>
<div class="community-page-post-wrapper">
<p>Painting Only:</p>
<img id="<%= post.id%>" class="community-page-post-painting" src="<%= post.painting_uri %>">
</div>
<% } else if(post.url !== '' && post.screenshot === '' && post.painting === '' && post.body === '') {%>
<div class="community-page-post-wrapper">
<p>Video Only:</p>
<iframe width="760" height="427.5" src="<%= post.url %>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
<% } else if(post.body !== '' && post.screenshot === '' && post.painting === '' && post.url === '') {%>
<div class="community-page-post-wrapper">
<p>Text Only:</p>
<h3><%= post.body %></h3>
</div>
<% } else if(post.screenshot !== '' && post.body !== '' && post.painting === '' && post.url === '') {%>
<div class="community-page-post-wrapper">
<p>Screenshot and Body:</p>
<img id="<%= post.id %>" class="community-page-post-screenshot" src="data:image/png;base64,<%= post.screenshot %>">
<div class="community-page-post-text-overlay">
<h3><%= post.body %></h3>
</div>
</div>
<% } else if(post.screenshot !== '' && post.painting !== '' && post.url === '') {%>
<div class="community-page-post-wrapper">
<p>Screenshot and Painting:</p>
<img id="<%= post.id %>" class="community-page-post-screenshot" src="data:image/png;base64,<%= post.screenshot %>">
<img id="<%= post.id%>" class="community-page-post-painting" src="<%= post.painting_uri %>">
</div>
<% } else if(post.url !== '' && post.body !== '' && post.screenshot === '' && post.painting === '') {%>
<div class="community-page-post-wrapper">
<p>Video and Body:</p>
<iframe width="760" height="427.5" src="<%= post.url %>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<div class="community-page-post-text-overlay">
<h3><%= post.body %></h3>
</div>
</div>
<% } else if(post.url !== '' && post.painting !== '' && post.screenshot === '' && post.body === '') {%>
<div class="community-page-post-wrapper">
<p>Video and Painting:</p>
<iframe width="760" height="427.5" src="<%= post.url %>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<img id="<%= post.id%>" class="community-page-post-painting" src="<%= post.painting_uri %>">
</div>
<%}%>
<br>
<br>
<% }); %>
<img src="" onerror="wiiuBrowser.showLoadingIcon(!1)">

View File

@@ -6,8 +6,8 @@
@font-face {
font-family: 'Conv_Poppins-Light';
src: url('https://portal-cdn.olv.pretendo.cc/fonts/Poppins-Light.eot');
src: local('☺'), url('https://portal-cdn.olv.pretendo.cc/fonts/Poppins-Light.woff') format('woff'), url('https://portal-cdn.olv.pretendo.cc/fonts/Poppins-Light.ttf') format('truetype'), url('https://portal-cdn.olv.pretendo.cc/fonts/Poppins-Light.svg') format('svg');
src: url('https://portal.cdn.olv.pretendo.cc/fonts/Poppins-Light.eot');
src: local('☺'), url('http://portal.cdn.pretendo.cc/fonts/Poppins-Light.woff') format('woff'), url('http://portal.cdn.pretendo.cc/fonts/Poppins-Light.ttf') format('truetype'), url('http://portal.cdn.olv.pretendo.cc/fonts/Poppins-Light.svg') format('svg');
font-weight: normal;
font-style: normal;
}

View File

@@ -9,7 +9,6 @@
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-195842548-1', 'auto');
ga('send', 'pageview');
</script>
@@ -24,7 +23,7 @@
</style>
<script>
var experience = 0;
var google-analytics = false;
var notifications = false;
function selectExperience(type) {
document.getElementById('beginner').classList.remove('selected');
document.getElementById('intermediate').classList.remove('selected');
@@ -42,7 +41,6 @@
document.getElementById("expert").classList.add('selected');
experience = 2;
break;
}
wiiuSound.playSoundByName("SE_OLV_OK", 1);
}

View File

@@ -100,7 +100,13 @@
<p class="user-page-follow-button-text" onclick="showOverlay()"><%= lang.user_settings.profile_settings %></p>
</div>
</div>
<img class="community-page-info-icon" src="https://mii-images.cdn.<%= account_server %>/<%= user.pid %>/normal_face.png">
<%if(user.official) {%>
<img class="community-page-info-icon verified" src="https://mii-images.cdn.<%= account_server %>/<%= user.pid %>/normal_face.png">
<span class="community-page-verified-user-badge community-page-verified" style="margin-left: 110px;margin-top: 5px;"></span>
<%} else {%>
<img class="community-page-info-icon" src="https://mii-images.cdn.<%= account_server %>/<%= user.pid %>/normal_face.png">
<span class="community-page-verified-user-badge community-page-verified" style="display: none;"></span>
<%}%>
<h2 class="community-page-title"><%= user.user_id %></h2>
<h4 class="community-page-description"><%if(user.profile_comment_visibility){%> <%= user.profile_comment %> <%}else {%><%= lang.global.private %><%}%></h4>
<div class="community-page-margin-line"></div>

View File

@@ -56,7 +56,13 @@
</div>
<%}%>
</div>
<img class="community-page-info-icon" src="https://mii-images.cdn.<%= account_server %>/<%= user.pid %>/normal_face.png">
<%if(user.official) {%>
<img class="community-page-info-icon verified" src="https://mii-images.cdn.<%= account_server %>/<%= user.pid %>/normal_face.png">
<span class="community-page-verified-user-badge community-page-verified" style="margin-left: 110px;margin-top: 5px;"></span>
<%} else {%>
<img class="community-page-info-icon" src="https://mii-images.cdn.<%= account_server %>/<%= user.pid %>/normal_face.png">
<span class="community-page-verified-user-badge community-page-verified" style="display: none;"></span>
<%}%>
<h2 class="community-page-title"><%= user.user_id %></h2>
<h4 class="community-page-description"><%= user.profile_comment %></h4>
<div class="community-page-margin-line"></div>