From 8b4a848bc836ac173e4677175261c83c28dd0763 Mon Sep 17 00:00:00 2001 From: f0x Date: Wed, 7 Sep 2022 13:51:16 +0200 Subject: [PATCH] settings panel restructuring --- internal/web/panels.go | 23 +++ internal/web/profile.go | 1 + internal/web/thread.go | 1 + internal/web/web.go | 3 + web/source/css/_colors.css | 12 +- web/source/frontend/index.js | 5 - web/source/index.js | 22 ++- web/source/package.json | 3 +- .../admin/customization.js} | 52 +----- web/source/settings-panel/admin/federation.js | 23 +++ web/source/settings-panel/admin/settings.js | 23 +++ web/source/settings-panel/components/auth.js | 97 +++++++++++ web/source/settings-panel/index.js | 145 ++++++++++++++++ .../{panels => settings-panel}/lib/oauth.js | 0 .../{panels => settings-panel}/lib/panel.js | 0 .../old}/admin/README.md | 0 .../old}/admin/blocks.js | 0 .../old}/admin/index.js | 0 .../old}/admin/settings.js | 0 .../old}/admin/style.css | 0 .../old/admin}/user/basic.js | 0 .../old/admin}/user/index.js | 0 .../old/admin}/user/languages.js | 0 .../old/admin}/user/posts.js | 0 .../old/admin}/user/security.js | 0 .../old/admin}/user/style.css | 0 web/source/settings-panel/style.css | 158 ++++++++++++++++++ .../settings-panel/user/customization.js | 23 +++ web/source/settings-panel/user/profile.js | 23 +++ web/source/settings-panel/user/settings.js | 23 +++ web/source/yarn.lock | 5 + web/template/frontend.tmpl | 3 +- 32 files changed, 583 insertions(+), 62 deletions(-) rename web/source/{panels/base.css => settings-panel/admin/customization.js} (55%) create mode 100644 web/source/settings-panel/admin/federation.js create mode 100644 web/source/settings-panel/admin/settings.js create mode 100644 web/source/settings-panel/components/auth.js create mode 100644 web/source/settings-panel/index.js rename web/source/{panels => settings-panel}/lib/oauth.js (100%) rename web/source/{panels => settings-panel}/lib/panel.js (100%) rename web/source/{panels => settings-panel/old}/admin/README.md (100%) rename web/source/{panels => settings-panel/old}/admin/blocks.js (100%) rename web/source/{panels => settings-panel/old}/admin/index.js (100%) rename web/source/{panels => settings-panel/old}/admin/settings.js (100%) rename web/source/{panels => settings-panel/old}/admin/style.css (100%) rename web/source/{panels => settings-panel/old/admin}/user/basic.js (100%) rename web/source/{panels => settings-panel/old/admin}/user/index.js (100%) rename web/source/{panels => settings-panel/old/admin}/user/languages.js (100%) rename web/source/{panels => settings-panel/old/admin}/user/posts.js (100%) rename web/source/{panels => settings-panel/old/admin}/user/security.js (100%) rename web/source/{panels => settings-panel/old/admin}/user/style.css (100%) create mode 100644 web/source/settings-panel/style.css create mode 100644 web/source/settings-panel/user/customization.js create mode 100644 web/source/settings-panel/user/profile.js create mode 100644 web/source/settings-panel/user/settings.js diff --git a/internal/web/panels.go b/internal/web/panels.go index fdec87a33..cb9f32748 100644 --- a/internal/web/panels.go +++ b/internal/web/panels.go @@ -27,6 +27,29 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/gtserror" ) +func (m *Module) SettingsPanelHandler(c *gin.Context) { + host := config.GetHost() + instance, err := m.processor.InstanceGet(c.Request.Context(), host) + if err != nil { + api.ErrorHandler(c, gtserror.NewErrorInternalError(err), m.processor.InstanceGet) + return + } + + c.HTML(http.StatusOK, "frontend.tmpl", gin.H{ + "instance": instance, + "stylesheets": []string{ + assetsPathPrefix + "/Fork-Awesome/css/fork-awesome.min.css", + assetsPathPrefix + "/dist/_colors.css", + assetsPathPrefix + "/dist/base.css", + assetsPathPrefix + "/dist/settings-panel-style.css", + }, + "javascript": []string{ + assetsPathPrefix + "/dist/bundle.js", + assetsPathPrefix + "/dist/settings.js", + }, + }) +} + func (m *Module) UserPanelHandler(c *gin.Context) { host := config.GetHost() instance, err := m.processor.InstanceGet(c.Request.Context(), host) diff --git a/internal/web/profile.go b/internal/web/profile.go index 67407f8e4..a949a4f74 100644 --- a/internal/web/profile.go +++ b/internal/web/profile.go @@ -117,6 +117,7 @@ func (m *Module) profileGETHandler(c *gin.Context) { "show_back_to_top": showBackToTop, "stylesheets": stylesheets, "javascript": []string{ + "/assets/dist/bundle.js", "/assets/dist/frontend.js", }, }) diff --git a/internal/web/thread.go b/internal/web/thread.go index b7e1bef3d..e66ccdeec 100644 --- a/internal/web/thread.go +++ b/internal/web/thread.go @@ -119,6 +119,7 @@ func (m *Module) threadGETHandler(c *gin.Context) { "ogMeta": ogBase(instance).withStatus(status), "stylesheets": stylesheets, "javascript": []string{ + "/assets/dist/bundle.js", "/assets/dist/frontend.js", }, }) diff --git a/internal/web/web.go b/internal/web/web.go index a74fc8e19..727f6c94a 100644 --- a/internal/web/web.go +++ b/internal/web/web.go @@ -76,6 +76,9 @@ func (m *Module) Route(s router.Router) error { c.Redirect(http.StatusMovedPermanently, adminPanelPath) }) + s.AttachHandler(http.MethodGet, "/settings", m.SettingsPanelHandler) + s.AttachHandler(http.MethodGet, "/settings/*panel", m.SettingsPanelHandler) + s.AttachHandler(http.MethodGet, userPanelpath, m.UserPanelHandler) // redirect /user/ to /user s.AttachHandler(http.MethodGet, userPanelpath+"/", func(c *gin.Context) { diff --git a/web/source/css/_colors.css b/web/source/css/_colors.css index 1544e6ad0..0ef5450f0 100644 --- a/web/source/css/_colors.css +++ b/web/source/css/_colors.css @@ -76,4 +76,14 @@ $boxshadow_border: 0.08rem solid $sloth_gray2_darker5; $profile_avatar_border: 0.2rem solid $border_accent; -$input_bg: $sloth_gray2_darker3; \ No newline at end of file +$input_bg: $sloth_gray2_darker3; + +$settings-nav-bg: $bg_accent; +$settings-nav-header-fg: $sloth_gray2_darker15; +$settings-nav-header-bg: $sloth_orange2; + +$settings-nav-bg-active: $sloth_gray2_darker3; +$settings-nav-fg-active: $fg; + +$settings-nav-bg-hover: $sloth_gray2; +/* $settings-nav-fg-hover: $sloth_gray2; */ \ No newline at end of file diff --git a/web/source/frontend/index.js b/web/source/frontend/index.js index 5c53a31bf..2a54d52b6 100644 --- a/web/source/frontend/index.js +++ b/web/source/frontend/index.js @@ -18,11 +18,6 @@ "use strict"; - -// WARNING: currently dependencies get deduplicated with factor-bundle, but -// our frontend templates don't load the common bundle.js since it contains React etc -// so we can't use any dependencies that would deduplicate with the other files - const Photoswipe = require("photoswipe/dist/umd/photoswipe.umd.min.js"); const PhotoswipeLightbox = require("photoswipe/dist/umd/photoswipe-lightbox.umd.min.js"); const PhotoswipeCaptionPlugin = require("photoswipe-dynamic-caption-plugin").default; diff --git a/web/source/index.js b/web/source/index.js index 20e8ee623..b24db1c4d 100644 --- a/web/source/index.js +++ b/web/source/index.js @@ -38,8 +38,9 @@ const splitCSS = require("./lib/split-css.js"); const bundles = { "./frontend/index.js": "frontend.js", - "./panels/admin/index.js": "admin-panel.js", - "./panels/user/index.js": "user-panel.js", + "./settings-panel/index.js": "settings.js", + // "./panels/admin/index.js": "admin-panel.js", + // "./panels/user/index.js": "user-panel.js", }; const postcssPlugins = [ @@ -50,6 +51,18 @@ const postcssPlugins = [ "postcss-color-mod-function" ].map((plugin) => require(plugin)()); +let uglifyifyInProduction; + +if (process.env.NODE_ENV != "development") { + console.log("uglifyify'ing production bundles"); + uglifyifyInProduction = [ + require("uglifyify"), { + global: true, + exts: ".js" + } + ]; +} + const browserifyConfig = { transform: [ [ @@ -69,10 +82,7 @@ const browserifyConfig = { exclude: /node_modules\/(?!photoswipe-dynamic-caption-plugin)/, } ], - [require("uglifyify"), { - global: true, - exts: ".js" - }] + uglifyifyInProduction ], plugin: [ [require("icssify"), { diff --git a/web/source/package.json b/web/source/package.json index 691b68183..a12d6fe77 100644 --- a/web/source/package.json +++ b/web/source/package.json @@ -35,7 +35,8 @@ "react": "^17.0.1", "react-dom": "^17.0.1", "reactify": "^1.1.1", - "uglifyify": "^5.0.2" + "uglifyify": "^5.0.2", + "wouter": "^2.8.0-alpha.2" }, "devDependencies": { "@f0x52/eslint-config-react": "^1.1.0", diff --git a/web/source/panels/base.css b/web/source/settings-panel/admin/customization.js similarity index 55% rename from web/source/panels/base.css rename to web/source/settings-panel/admin/customization.js index 2d76ed080..7ba93f7f7 100644 --- a/web/source/panels/base.css +++ b/web/source/settings-panel/admin/customization.js @@ -16,52 +16,8 @@ along with this program. If not, see . */ -body { - grid-template-rows: auto 1fr; -} +"use strict"; -.capitalize { - text-transform: capitalize; -} - -section { - margin-bottom: 1rem; -} - -input, select, textarea { - box-sizing: border-box; -} - -.error { - font-weight: bold; -} - -.hidden { - display: none; -} - -.messagebutton { - margin-top: 1rem; - display: flex; - gap: 1rem; - align-items: center; - - button { - white-space: nowrap; - } -} - -.notImplemented { - border: 2px solid rgb(70, 79, 88); - background: repeating-linear-gradient( - -45deg, - #525c66, - #525c66 10px, - rgb(70, 79, 88) 10px, - rgb(70, 79, 88) 20px - ) !important; -} - -.mono { - font-family: monospace; -} +module.exports = function AdminCustomization() { + return "admin customization"; +}; diff --git a/web/source/settings-panel/admin/federation.js b/web/source/settings-panel/admin/federation.js new file mode 100644 index 000000000..7b3c91460 --- /dev/null +++ b/web/source/settings-panel/admin/federation.js @@ -0,0 +1,23 @@ +/* + GoToSocial + Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +"use strict"; + +module.exports = function UserProfile() { + return "federation"; +}; \ No newline at end of file diff --git a/web/source/settings-panel/admin/settings.js b/web/source/settings-panel/admin/settings.js new file mode 100644 index 000000000..53c5a1538 --- /dev/null +++ b/web/source/settings-panel/admin/settings.js @@ -0,0 +1,23 @@ +/* + GoToSocial + Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +"use strict"; + +module.exports = function UserProfile() { + return "admin settings"; +}; \ No newline at end of file diff --git a/web/source/settings-panel/components/auth.js b/web/source/settings-panel/components/auth.js new file mode 100644 index 000000000..ea6b61eac --- /dev/null +++ b/web/source/settings-panel/components/auth.js @@ -0,0 +1,97 @@ +/* + GoToSocial + Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +"use strict"; + +const Promise = require("bluebird"); +const React = require("react"); + +const oauthLib = require("../lib/oauth"); + +module.exports = function Auth({setOauth}) { + const [ instance, setInstance ] = React.useState(""); + + React.useEffect(() => { + let isStillMounted = true; + // check if current domain runs an instance + let thisUrl = new URL(window.location.origin); + thisUrl.pathname = "/api/v1/instance"; + Promise.try(() => { + return fetch(thisUrl.href); + }).then((res) => { + if (res.status == 200) { + return res.json(); + } + }).then((json) => { + if (json && json.uri && isStillMounted) { + setInstance(json.uri); + } + }).catch((e) => { + console.log("error checking instance response:", e); + }); + + return () => { + // cleanup function + isStillMounted = false; + }; + }, []); + + function doAuth() { + return Promise.try(() => { + return new URL(instance); + }).catch(TypeError, () => { + return new URL(`https://${instance}`); + }).then((parsedURL) => { + let url = parsedURL.toString(); + let oauth = oauthLib({ + instance: url, + client_name: "GotoSocial", + scope: ["admin"], + website: window.location.href + }); + setOauth(oauth); + setInstance(url); + return oauth.register().then(() => { + return oauth; + }); + }).then((oauth) => { + return oauth.authorize(); + }).catch((e) => { + console.log("error authenticating:", e); + }); + } + + function updateInstance(e) { + if (e.key == "Enter") { + doAuth(); + } else { + setInstance(e.target.value); + } + } + + return ( +
+

OAUTH Login:

+
e.preventDefault()}> + + + +
+
+ ); +}; \ No newline at end of file diff --git a/web/source/settings-panel/index.js b/web/source/settings-panel/index.js new file mode 100644 index 000000000..c2586d12e --- /dev/null +++ b/web/source/settings-panel/index.js @@ -0,0 +1,145 @@ +/* + GoToSocial + Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +"use strict"; + +const Promise = require("bluebird"); +const React = require("react"); +const ReactDom = require("react-dom"); +const { Link, Route, Switch, useRoute, Redirect } = require("wouter"); + +const Auth = require("./components/auth"); +const oauthLib = require("./lib/oauth"); + +require("./style.css"); + +const nav = { + "User": [ + ["Profile", require("./user/profile.js")], + ["Settings", require("./user/settings.js")], + ["Customization", require("./user/customization.js")] + ], + "Admin": [ + ["Instance Settings", require("./admin/settings.js")], + ["Federation", require("./admin/federation.js")], + ["Customization", require("./admin/customization.js")] + ] +}; + +function urlSafe(str) { + return str.toLowerCase().replace(/\s+/g, "-"); +} + +// TODO: nested categories? +const sidebar = []; +const panelRouter = []; + +Object.entries(nav).forEach(([category, entries]) => { + let base = `/settings/${urlSafe(category)}`; + + // Category header goes to first page in category + panelRouter.push( + + + + ); + + let links = entries.map(([name, component]) => { + let url = `${base}/${urlSafe(name)}`; + + panelRouter.push( + + ); + + return ; + }); + + sidebar.push( + + + +

{category}

+
+ + +
+ ); +}); + +function NavButton({href, name}) { + const [isActive] = useRoute(href); + return ( + + + {name} + + + ); +} + +function App() { + const [oauth, setOauth] = React.useState(); + const [hasAuth, setAuth] = React.useState(false); + const [oauthState, _setOauthState] = React.useState(localStorage.getItem("oauth")); + + React.useEffect(() => { + let state = localStorage.getItem("oauth"); + if (state != undefined) { + state = JSON.parse(state); + let restoredOauth = oauthLib(state.config, state); + Promise.try(() => { + return restoredOauth.callback(); + }).then(() => { + setAuth(true); + }); + setOauth(restoredOauth); + } + }, [setAuth, setOauth]); + + if (!hasAuth && oauth && oauth.isAuthorized()) { + setAuth(true); + } + + if (oauth && oauth.isAuthorized()) { + return ( + <> +
+ {sidebar} + +
+
+ + {panelRouter} + +
+ + ); + } else if (oauthState != undefined) { + return ( +
+ processing oauth... +
+ ); + } else { + return ; + } +} + +ReactDom.render(, document.getElementById("root")); \ No newline at end of file diff --git a/web/source/panels/lib/oauth.js b/web/source/settings-panel/lib/oauth.js similarity index 100% rename from web/source/panels/lib/oauth.js rename to web/source/settings-panel/lib/oauth.js diff --git a/web/source/panels/lib/panel.js b/web/source/settings-panel/lib/panel.js similarity index 100% rename from web/source/panels/lib/panel.js rename to web/source/settings-panel/lib/panel.js diff --git a/web/source/panels/admin/README.md b/web/source/settings-panel/old/admin/README.md similarity index 100% rename from web/source/panels/admin/README.md rename to web/source/settings-panel/old/admin/README.md diff --git a/web/source/panels/admin/blocks.js b/web/source/settings-panel/old/admin/blocks.js similarity index 100% rename from web/source/panels/admin/blocks.js rename to web/source/settings-panel/old/admin/blocks.js diff --git a/web/source/panels/admin/index.js b/web/source/settings-panel/old/admin/index.js similarity index 100% rename from web/source/panels/admin/index.js rename to web/source/settings-panel/old/admin/index.js diff --git a/web/source/panels/admin/settings.js b/web/source/settings-panel/old/admin/settings.js similarity index 100% rename from web/source/panels/admin/settings.js rename to web/source/settings-panel/old/admin/settings.js diff --git a/web/source/panels/admin/style.css b/web/source/settings-panel/old/admin/style.css similarity index 100% rename from web/source/panels/admin/style.css rename to web/source/settings-panel/old/admin/style.css diff --git a/web/source/panels/user/basic.js b/web/source/settings-panel/old/admin/user/basic.js similarity index 100% rename from web/source/panels/user/basic.js rename to web/source/settings-panel/old/admin/user/basic.js diff --git a/web/source/panels/user/index.js b/web/source/settings-panel/old/admin/user/index.js similarity index 100% rename from web/source/panels/user/index.js rename to web/source/settings-panel/old/admin/user/index.js diff --git a/web/source/panels/user/languages.js b/web/source/settings-panel/old/admin/user/languages.js similarity index 100% rename from web/source/panels/user/languages.js rename to web/source/settings-panel/old/admin/user/languages.js diff --git a/web/source/panels/user/posts.js b/web/source/settings-panel/old/admin/user/posts.js similarity index 100% rename from web/source/panels/user/posts.js rename to web/source/settings-panel/old/admin/user/posts.js diff --git a/web/source/panels/user/security.js b/web/source/settings-panel/old/admin/user/security.js similarity index 100% rename from web/source/panels/user/security.js rename to web/source/settings-panel/old/admin/user/security.js diff --git a/web/source/panels/user/style.css b/web/source/settings-panel/old/admin/user/style.css similarity index 100% rename from web/source/panels/user/style.css rename to web/source/settings-panel/old/admin/user/style.css diff --git a/web/source/settings-panel/style.css b/web/source/settings-panel/style.css new file mode 100644 index 000000000..36c7708f6 --- /dev/null +++ b/web/source/settings-panel/style.css @@ -0,0 +1,158 @@ +/* + GoToSocial + Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +body { + grid-template-rows: auto 1fr; +} + +.content { + grid-column: 1 / span 3; /* stretch entire width, to fit panel + sidebar nav */ +} + +section { + grid-column: 2; +} + +#root { + display: grid; + grid-template-columns: 1fr min(92%, 90ch) 1fr; + + section { + border-left: none; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + + .sidebar { + align-self: start; // vertical + justify-self: end; // horizontal + background: $settings-nav-bg; + border: $boxshadow_border; + box-shadow: $boxshadow; + border-radius: $br; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + display: flex; + flex-direction: column; + + a { + text-decoration: none; + } + + a:first-child h2 { + border-top-left-radius: $br; + } + + h2 { + margin: 0; + padding: 0.5rem; + font-size: 0.9rem; + font-weight: bold; + text-transform: uppercase; + color: $settings-nav-header-fg; + background: $settings-nav-header-bg; + border-bottom: 0.1rem solid $sloth_gray2_darker7; + } + + nav { + display: flex; + flex-direction: column; + + a { + border-bottom: 0.1rem solid $sloth_gray2_darker3; + padding: 1rem; + text-decoration: none; + transition: 0.1s; + color: $fg; + + &:hover { + color: $settings-nav-fg-hover; + background: $settings-nav-bg-hover; + } + + &.active { + color: $settings-nav-fg-active; + background: $settings-nav-bg-active; + font-weight: bold; + text-decoration: underline; + } + + /* reserve space for bold version of the element, so .active doesn't + change container size */ + &::after { + font-weight: bold; + text-decoration: underline; + display: block; + content: attr(data-content); + height: 1px; + color: transparent; + overflow: hidden; + visibility: hidden; + } + } + } + + + nav:last-child a:last-child { + border-bottom-left-radius: $br; + border-bottom: none; + } + } +} + +.capitalize { + text-transform: capitalize; +} + +section { + margin-bottom: 1rem; +} + +input, select, textarea { + box-sizing: border-box; +} + +.error { + font-weight: bold; +} + +.hidden { + display: none; +} + +.messagebutton { + margin-top: 1rem; + display: flex; + gap: 1rem; + align-items: center; + + button { + white-space: nowrap; + } +} + +.notImplemented { + border: 2px solid rgb(70, 79, 88); + background: repeating-linear-gradient( + -45deg, + #525c66, + #525c66 10px, + rgb(70, 79, 88) 10px, + rgb(70, 79, 88) 20px + ) !important; +} diff --git a/web/source/settings-panel/user/customization.js b/web/source/settings-panel/user/customization.js new file mode 100644 index 000000000..cb68a9cfe --- /dev/null +++ b/web/source/settings-panel/user/customization.js @@ -0,0 +1,23 @@ +/* + GoToSocial + Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +"use strict"; + +module.exports = function UserProfile() { + return "user customization"; +}; \ No newline at end of file diff --git a/web/source/settings-panel/user/profile.js b/web/source/settings-panel/user/profile.js new file mode 100644 index 000000000..517f60cdc --- /dev/null +++ b/web/source/settings-panel/user/profile.js @@ -0,0 +1,23 @@ +/* + GoToSocial + Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +"use strict"; + +module.exports = function UserProfile() { + return "user profile"; +}; \ No newline at end of file diff --git a/web/source/settings-panel/user/settings.js b/web/source/settings-panel/user/settings.js new file mode 100644 index 000000000..edc0c546f --- /dev/null +++ b/web/source/settings-panel/user/settings.js @@ -0,0 +1,23 @@ +/* + GoToSocial + Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +"use strict"; + +module.exports = function UserProfile() { + return "user settings"; +}; \ No newline at end of file diff --git a/web/source/yarn.lock b/web/source/yarn.lock index 08ab095bf..41a2e6398 100644 --- a/web/source/yarn.lock +++ b/web/source/yarn.lock @@ -6357,6 +6357,11 @@ word-wrap@^1.2.3, word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== +wouter@^2.8.0-alpha.2: + version "2.8.0-alpha.2" + resolved "https://registry.yarnpkg.com/wouter/-/wouter-2.8.0-alpha.2.tgz#d57dfbd23b964b8bd848f2ed3eb2b38cf3c00e00" + integrity sha512-aPsL5m5rW9RiceClOmGj6t5gn9Ut2TJVr98UDi1u9MIRNYiYVflg6vFIjdDYJ4IAyH0JdnkSgGwfo0LQS3k2zg== + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" diff --git a/web/template/frontend.tmpl b/web/template/frontend.tmpl index b667bc191..20c1d61c9 100644 --- a/web/template/frontend.tmpl +++ b/web/template/frontend.tmpl @@ -1,5 +1,6 @@ {{ template "header.tmpl" .}}
-
+
+
{{ template "footer.tmpl" .}} \ No newline at end of file