Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5935cbbf54 | ||
|
|
7e94b0047c | ||
|
|
6dd1939c5e |
@@ -5,6 +5,7 @@ const config = {
|
|||||||
playgroundEndpoint: "http://127.0.0.1:17000/playground",
|
playgroundEndpoint: "http://127.0.0.1:17000/playground",
|
||||||
port: 8080,
|
port: 8080,
|
||||||
root: "http://localhost:8080",
|
root: "http://localhost:8080",
|
||||||
|
trustedProxy: null,
|
||||||
auth0: {
|
auth0: {
|
||||||
secret: "INVALID_SECRET",
|
secret: "INVALID_SECRET",
|
||||||
clientId: "",
|
clientId: "",
|
||||||
|
|||||||
@@ -16,12 +16,13 @@
|
|||||||
so you can still read it (or back it up) before leaving the page.
|
so you can still read it (or back it up) before leaving the page.
|
||||||
</p>
|
</p>
|
||||||
</annotation>
|
</annotation>
|
||||||
<post for(post in state.log.posts)
|
<post for(post in state.log.posts | status-var=loop)
|
||||||
key=post.id
|
key=post.id
|
||||||
on-move("movePost", post)
|
on-move("movePost", post)
|
||||||
on-remove("removePost", post)
|
on-remove("removePost", post)
|
||||||
on-edited("postEdited")
|
on-edited("postEdited")
|
||||||
user=input.user
|
user=input.user
|
||||||
|
prev=(state.log.posts[loop.getIndex() - 1] || {})
|
||||||
post=post
|
post=post
|
||||||
characters=state.log.characters
|
characters=state.log.characters
|
||||||
last=(post.position === state.log.posts.length)
|
last=(post.position === state.log.posts.length)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
div.logs-content {
|
div.logs-content {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
max-width: 75ch;
|
max-width: 95ch;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
||||||
div.header {
|
div.header {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<div if(!state.removed) class=["post", component.kindClass("post-type")]>
|
$ const multipart = (input.post.nick == input.prev.nick && input.prev.multipart !== false);
|
||||||
|
|
||||||
|
<div if(!state.removed) class=["post", component.kindClass("post-type"), multipart ? "multipart" : null]>
|
||||||
<div class="post-meta-row">
|
<div class="post-meta-row">
|
||||||
<div class="options color-menu">
|
<div class="options color-menu">
|
||||||
<if-permitted user=input.user permission="post.move">
|
<if-permitted user=input.user permission="post.move">
|
||||||
@@ -24,7 +26,8 @@
|
|||||||
<markdown class="post-content post-scene" source=state.text />
|
<markdown class="post-content post-scene" source=state.text />
|
||||||
</div>
|
</div>
|
||||||
<div if(input.post.kind === "action") class="post-body color-text">
|
<div if(input.post.kind === "action") class="post-body color-text">
|
||||||
<markdown class="post-content post-action" source=(state.shortName + state.nameSuffix + " " + state.text) />
|
$ const prefix = (!multipart ? state.shortName + state.nameSuffix + " " : "");
|
||||||
|
<markdown class="post-content post-action" source=(prefix + state.text) />
|
||||||
</div>
|
</div>
|
||||||
<div if(input.post.kind === "text") class="post-body color-text">
|
<div if(input.post.kind === "text") class="post-body color-text">
|
||||||
<markdown class="post-content post-text" source=state.text />
|
<markdown class="post-content post-text" source=state.text />
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ div.post {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
width: calc(100% - 35.5ch);
|
width: calc(100% - 35.5ch);
|
||||||
max-width: 75ch;
|
max-width: 95ch;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -53,4 +53,14 @@ div.post {
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
div.post.multipart {
|
||||||
|
margin-top: -1.25em;
|
||||||
|
|
||||||
|
div.post-meta {
|
||||||
|
span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<include("../layout", {title: "Logs", site: "logs"})>
|
<include("../layout", {title: "Logs", site: "logs"})>
|
||||||
<@body>
|
<@body>
|
||||||
<background src="/assets/images/bg.png" opacity=0.25 />
|
<background src="/assets/images/bg.png" opacity=0.125 />
|
||||||
<page log=input.log user=input.user selected=input.selected />
|
<page log=input.log user=input.user selected=input.selected />
|
||||||
</@body>
|
</@body>
|
||||||
</include>
|
</include>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
.story-content {
|
.story-content {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
max-width: 75ch;
|
max-width: 95ch;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<include("../layout", {title: "Stories", site: "story"})>
|
<include("../layout", {title: "Stories", site: "story"})>
|
||||||
<@body>
|
<@body>
|
||||||
<background src="/assets/images/bg.png" opacity=0.25 />
|
<background src="/assets/images/bg.png" opacity=0.125 />
|
||||||
<page story=input.story categories=input.categories user=input.user selected=input.selected />
|
<page story=input.story categories=input.categories user=input.user selected=input.selected />
|
||||||
</@body>
|
</@body>
|
||||||
</include>
|
</include>
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gisle/rpdata-frontend",
|
"name": "@gisle/rpdata-frontend",
|
||||||
"version": "1.0.3",
|
"version": "1.0.6",
|
||||||
"description": "RPData (www.aiterp.net) frontend/proxy",
|
"description": "RPData (www.aiterp.net) frontend/proxy",
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+1
-6
@@ -17,12 +17,7 @@ router.get("/login", saveReferer, passport.authenticate("auth0", {scope: "openid
|
|||||||
res.redirect("/")
|
res.redirect("/")
|
||||||
})
|
})
|
||||||
|
|
||||||
router.get("/error", (req, res) => {
|
router.get("/callback", passport.authenticate("auth0"), (req, res) => {
|
||||||
console.error(req)
|
|
||||||
res.status(500).end("Something went wrong.")
|
|
||||||
})
|
|
||||||
|
|
||||||
router.get("/callback", passport.authenticate("auth0", { failureRedirect: "/auth/error" }), (req, res) => {
|
|
||||||
if (req.user == null) {
|
if (req.user == null) {
|
||||||
throw new Error("user null");
|
throw new Error("user null");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ lasso.configure({
|
|||||||
outputDir: "./.static", // Place all generated JS/CSS/etc. files into the "static" dir
|
outputDir: "./.static", // Place all generated JS/CSS/etc. files into the "static" dir
|
||||||
bundlingEnabled: isProduction, // Only enable bundling in production
|
bundlingEnabled: isProduction, // Only enable bundling in production
|
||||||
minify: isProduction, // Only minify JS and CSS code in production
|
minify: isProduction, // Only minify JS and CSS code in production
|
||||||
fingerprintsEnabled: true, // Only add fingerprints to URLs in production
|
fingerprintsEnabled: isProduction, // Only add fingerprints to URLs in production
|
||||||
|
|
||||||
require: {
|
require: {
|
||||||
builtins: {
|
builtins: {
|
||||||
@@ -54,6 +54,11 @@ lasso.configure({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Set trusted proxy
|
||||||
|
if (config.trustedProxy != null) {
|
||||||
|
app.set('trust proxy', config.trustedProxy)
|
||||||
|
}
|
||||||
|
|
||||||
// Apply middleware
|
// Apply middleware
|
||||||
app.use(markoExpress())
|
app.use(markoExpress())
|
||||||
app.use(session)
|
app.use(session)
|
||||||
|
|||||||
Reference in New Issue
Block a user