Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ services:
minio-setup:
image: minio/mc
depends_on:
- minio
minio:
condition: service_healthy
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
Expand All @@ -77,8 +78,11 @@ services:

account:
image: ghcr.io/pretendonetwork/account:sha-99aec60
restart: unless-stopped
ports:
- "8123:8123" # grpc
links:
- mongo
environment:
PN_ACT_CONFIG_REDIS_URL: redis://redis:6379
PN_ACT_CONFIG_HTTP_PORT: 8000
Expand All @@ -96,6 +100,7 @@ services:

friends:
image: ghcr.io/pretendonetwork/friends:sha-5560c1d
restart: unless-stopped
ports:
- "8124:8124" # grpc
environment:
Expand Down
1 change: 1 addition & 0 deletions .docker/mitmproxy-local.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

s3_domains = [
"cdn.pretendo.cc",
"r2-cdn.pretendo.cc"
]

def request(flow: http.HTTPFlow):
Expand Down
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"html.format.unformatted": "%,%_,%=,%-,%#,%%,-%,_%,a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,math,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,slot,small,span,strong,sub,sup,svg,template,textarea,time,u,var,video,wbr",
"emmet.includeLanguages": {
"ejs": "html",
},
"javascript.preferences.importModuleSpecifier": "non-relative",
"typescript.preferences.importModuleSpecifier": "non-relative",
}
9 changes: 9 additions & 0 deletions apps/juxtaposition-ui/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"watch": [
"src/"
],
"ext": "js,ts,ejs,json,css",
"env": {
"NODE_ENV": "development"
}
}
13 changes: 11 additions & 2 deletions apps/juxtaposition-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"license": "AGPL-3.0-only",
"main": "./dist/server.js",
"scripts": {
"dev": "tsup --watch --onSuccess \"node --enable-source-maps dist/server.js\"",
"dev": "nodemon --exec 'npm run dev:buildrun'",
"dev:buildrun": "run-s dev:build start",
"dev:build": "tsup",
"ejslint": "ejslint **/*.ejs",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"build": "tsup && tsc --noEmit",
Expand Down Expand Up @@ -40,6 +43,7 @@
"pino": "^9.6.0",
"pino-http": "^10.4.0",
"pino-pretty": "^13.0.0",
"pjax": "^0.2.8",
"pngjs": "^7.0.0",
"prom-client": "^15.1.3",
"redis": "^4.7.0",
Expand All @@ -50,10 +54,15 @@
"devDependencies": {
"@pretendonetwork/eslint-config": "^0.0.8",
"@types/node": "^22.13.8",
"browserslist": "^4.24.5",
"browserslist-to-esbuild": "^2.1.1",
"ejs-lint": "^2.0.1",
"esbuild-fix-imports-plugin": "^1.0.20",
"eslint": "^9.21.0",
"globals": "^16.0.0",
"tsup": "^8.4.0",
"nodemon": "^3.1.10",
"npm-run-all": "^4.1.5",
"tsup": "^8.5.0",
"typescript": "^5.7.3"
}
}
1 change: 0 additions & 1 deletion apps/juxtaposition-ui/src/webfiles/ctr/css/juxt.min.css

This file was deleted.

2 changes: 1 addition & 1 deletion apps/juxtaposition-ui/src/webfiles/ctr/first_run.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="/css/juxt.min.css">
<link rel="stylesheet" type="text/css" href="/css/juxt.css">
<title>First Run</title>
</head>
<style>
Expand Down
2 changes: 1 addition & 1 deletion apps/juxtaposition-ui/src/webfiles/ctr/js/juxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function initPostModules() {
cave.toolbar_setCallback(99, back);
}
cave.transition_end();
/* global initNewPost -- Defined in juxt.min.js */
/* global initNewPost -- Defined in juxt.js */
initNewPost();
}
}
Expand Down
1 change: 0 additions & 1 deletion apps/juxtaposition-ui/src/webfiles/ctr/js/juxt.min.js

This file was deleted.

1 change: 0 additions & 1 deletion apps/juxtaposition-ui/src/webfiles/ctr/js/pjax.min.js

This file was deleted.

6 changes: 3 additions & 3 deletions apps/juxtaposition-ui/src/webfiles/ctr/partials/head.ejs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="/css/juxt.min.css">
<link rel="stylesheet" type="text/css" href="/css/juxt.css">
<script src="/js/debug.js"></script>
<script src="/js/pjax.min.js"></script>
<script src="/js/juxt.min.js"></script>
<script src="/js/pjax.js"></script>
<script src="/js/juxt.js"></script>
<title><%= title %></title>
</head>
1 change: 0 additions & 1 deletion apps/juxtaposition-ui/src/webfiles/portal/css/juxt.min.css

This file was deleted.

3 changes: 1 addition & 2 deletions apps/juxtaposition-ui/src/webfiles/portal/guest_notice.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<html>
<head>
<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>
<script src="<%= cdnURL %>/js/juxt.global.js"></script>
</head>
<style>
body {
Expand Down
18 changes: 12 additions & 6 deletions apps/juxtaposition-ui/src/webfiles/portal/js/juxt.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Pjax from 'pjax';

var pjax;
setInterval(checkForUpdates, 30000);
setInterval(input, 100);
Expand Down Expand Up @@ -274,7 +276,6 @@ function hideScreenShots() {
document.getElementById('screenshot-toggle').checked = false;
}

// eslint-disable-next-line no-unused-vars -- Used by src/webfiles/portal/partials/new_post.ejs
function chooseScreenShot(value) {
var screenshot = document.getElementById('screenshot-value');
switch (value) {
Expand All @@ -292,8 +293,8 @@ function chooseScreenShot(value) {
}
hideScreenShots();
}
window.chooseScreenShot = chooseScreenShot;

// eslint-disable-next-line no-unused-vars -- Used in src/webfiles/portal/community.ejs and src/webfiles/portal/user_page.ejs
function follow(el) {
var id = el.getAttribute('data-community-id');
var count = document.getElementById('followers');
Expand All @@ -318,8 +319,8 @@ function follow(el) {
count.innerText = element.count;
});
}
window.follow = follow;

// eslint-disable-next-line no-unused-vars -- Used in src/webfiles/portal/partials/new_post.ejs
function newPainting(reset) {
wiiuMemo.open(reset);
setTimeout(function () {
Expand All @@ -330,6 +331,8 @@ function newPainting(reset) {
}
}, 250);
}
window.newPainting = newPainting;

function stopLoading() {
if (typeof wiiuBrowser !== 'undefined' &&
typeof wiiuBrowser.endStartUp !== 'undefined') {
Expand All @@ -341,8 +344,8 @@ function stopLoading() {
wiiuBrowser.lockUserOperation(false);
}
}
window.stopLoading = stopLoading;

// eslint-disable-next-line no-unused-vars -- Used in src/webfiles/portal/partials/nav_bar.ejs
function exit() {
wiiu.gamepad.update();

Expand All @@ -353,8 +356,8 @@ function exit() {
wiiuBrowser.closeApplication();
}
}
window.exit = exit;

// eslint-disable-next-line no-unused-vars -- Used in src/webfiles/portal/partials/post_template.ejs
function deletePost(post) {
var id = post.getAttribute('data-post');
if (!id) {
Expand All @@ -372,8 +375,8 @@ function deletePost(post) {
});
}
}
window.deletePost = deletePost;

// eslint-disable-next-line no-unused-vars -- Used in src/webfiles/portal/partials/post_template.ejs
function reportPost(post) {
var id = post.getAttribute('data-post');
var button = document.getElementById('report-launcher');
Expand All @@ -388,6 +391,8 @@ function reportPost(post) {
console.log(id.replace(/(\d{3})(\d{4})(\d{3})(\d{4})(\d{3})(\d{4})/, '$1-$2-$3-$4-$5-$6'));
button.click();
}
window.reportPost = reportPost;

function checkForUpdates() {
GET('/users/notifications.json', function updates(data) {
var notificationObj = JSON.parse(data.responseText);
Expand Down Expand Up @@ -464,6 +469,7 @@ function back() {
document.getElementById('nav-menu').style.display = 'block';
}
}
window.back = back;

function input() {
wiiu.gamepad.update();
Expand Down
Loading