diff --git a/README.md b/README.md index 85e9ef2..0a06bd4 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Options: --open Automatically open app in web browser. Use --no-open to disable. [boolean] [default: true] --offline Don't try to connect to scuttlebutt peers or pubs. This can be - changed on the 'meta' page while Oasis is running. + changed on the 'settings' page while Oasis is running. [boolean] [default: false] --host Hostname for web app to listen on [string] [default: "localhost"] --port Port for web app to listen on [number] [default: 3000] diff --git a/src/cli.js b/src/cli.js index 3455757..896f09a 100644 --- a/src/cli.js +++ b/src/cli.js @@ -17,7 +17,7 @@ module.exports = () => }) .options("offline", { describe: - "Don't try to connect to scuttlebutt peers or pubs. This can be changed on the 'meta' page while Oasis is running.", + "Don't try to connect to scuttlebutt peers or pubs. This can be changed on the 'settings' page while Oasis is running.", default: false, type: "boolean" }) diff --git a/src/index.js b/src/index.js index 9a9e094..59653b1 100755 --- a/src/index.js +++ b/src/index.js @@ -55,7 +55,7 @@ const { listView, markdownView, mentionsView, - metaView, + settingsView, popularView, privateView, publishView, @@ -357,7 +357,7 @@ router }; ctx.body = await image({ blobId, imageSize: Number(imageSize) }); }) - .get("/meta/", async ctx => { + .get("/settings/", async ctx => { const theme = ctx.cookies.get("theme") || defaultTheme; const getMeta = async ({ theme }) => { const status = await meta.status(); @@ -369,7 +369,7 @@ router }) ); - return metaView({ status, peers: peersWithNames, theme, themeNames }); + return settingsView({ status, peers: peersWithNames, theme, themeNames }); }; ctx.body = await getMeta({ theme }); }) @@ -386,7 +386,7 @@ router }; ctx.body = await likes({ feed }); }) - .get("/meta/readme/", async ctx => { + .get("/settings/readme/", async ctx => { const status = async text => { return markdownView({ text }); }; @@ -566,22 +566,22 @@ router const referer = new URL(ctx.request.header.referer); ctx.redirect(referer); }) - .post("/meta/conn/start", koaBody(), async ctx => { + .post("/settings/conn/start", koaBody(), async ctx => { await meta.connStart(); - ctx.redirect("/meta"); + ctx.redirect("/settings"); }) - .post("/meta/conn/stop", koaBody(), async ctx => { + .post("/settings/conn/stop", koaBody(), async ctx => { await meta.connStop(); - ctx.redirect("/meta"); + ctx.redirect("/settings"); }) - .post("/meta/conn/restart", koaBody(), async ctx => { + .post("/settings/conn/restart", koaBody(), async ctx => { await meta.connRestart(); - ctx.redirect("/meta"); + ctx.redirect("/settings"); }) - .post("/meta/invite/accept", koaBody(), async ctx => { + .post("/settings/invite/accept", koaBody(), async ctx => { const invite = String(ctx.request.body.invite); await meta.acceptInvite(invite); - ctx.redirect("/meta"); + ctx.redirect("/settings"); }); const { host } = config; diff --git a/src/views/index.js b/src/views/index.js index f29a36d..64c537e 100644 --- a/src/views/index.js +++ b/src/views/index.js @@ -110,7 +110,7 @@ const template = (...elements) => { navLink({ href: "/mentions", emoji: "💬", text: i18n.mentions }), navLink({ href: "/inbox", emoji: "✉️", text: i18n.private }), navLink({ href: "/search", emoji: "🔍", text: i18n.search }), - navLink({ href: "/meta", emoji: "⚙", text: i18n.settings }) + navLink({ href: "/settings", emoji: "⚙", text: i18n.settings }) ) ), main({ id: "content" }, elements) @@ -450,7 +450,7 @@ exports.publishView = () => { ); }; -exports.metaView = ({ status, peers, theme, themeNames }) => { +exports.settingsView = ({ status, peers, theme, themeNames }) => { const max = status.sync.since; const progressElements = Object.entries(status.sync.plugins).map(e => { @@ -460,17 +460,17 @@ exports.metaView = ({ status, peers, theme, themeNames }) => { }); const startButton = form( - { action: "/meta/conn/start", method: "post" }, + { action: "/settings/conn/start", method: "post" }, button({ type: "submit" }, i18n.startNetworking) ); const restartButton = form( - { action: "/meta/conn/restart", method: "post" }, + { action: "/settings/conn/restart", method: "post" }, button({ type: "submit" }, i18n.restartNetworking) ); const stopButton = form( - { action: "/meta/conn/stop", method: "post" }, + { action: "/settings/conn/stop", method: "post" }, button({ type: "submit" }, i18n.stopNetworking) ); @@ -538,7 +538,7 @@ exports.metaView = ({ status, peers, theme, themeNames }) => { section( { class: "message" }, h1(i18n.settings), - p(i18n.settingsIntro({ readmeUrl: "/meta/readme" })), + p(i18n.settingsIntro({ readmeUrl: "/settings/readme" })), h2(i18n.theme), p(i18n.themeIntro), form( @@ -566,7 +566,7 @@ exports.metaView = ({ status, peers, theme, themeNames }) => { h3(i18n.invites), p(i18n.invitesDescription), form( - { action: "/meta/invite/accept", method: "post" }, + { action: "/settings/invite/accept", method: "post" }, input({ name: "invite", type: "text" }), button({ type: "submit" }, i18n.acceptInvite) ),