From 873fd22cfba5dc3e22c7951e1e0171533aa0d524 Mon Sep 17 00:00:00 2001 From: f0x Date: Fri, 13 Jan 2023 23:26:57 +0000 Subject: [PATCH] [chore] Update/add license headers for 2023 --- web/source/index.js | 2 +- .../settings/admin/emoji/local/use-shortcode.js | 2 +- web/source/settings/admin/emoji/remote/index.js | 6 +++--- web/source/settings/admin/federation/detail.js | 2 +- .../settings/admin/federation/import-export.js | 2 +- web/source/settings/admin/federation/overview.js | 2 +- web/source/settings/components/back-button.jsx | 2 +- web/source/settings/components/check-list.jsx | 2 +- web/source/settings/components/fake-profile.jsx | 4 ++-- web/source/settings/components/fake-toot.jsx | 4 ++-- web/source/settings/components/form/inputs.jsx | 2 +- web/source/settings/components/nav-button.jsx | 2 +- web/source/settings/components/submit.jsx | 6 +++--- web/source/settings/lib/api/index.js | 2 +- web/source/settings/lib/errors.js | 6 +++--- web/source/settings/lib/form/bool.jsx | 4 ++-- web/source/settings/lib/form/check-list.jsx | 2 +- web/source/settings/lib/form/radio.jsx | 2 +- web/source/settings/lib/form/submit.js | 2 +- .../settings/lib/query/admin/import-export.js | 2 +- web/source/settings/lib/query/admin/index.js | 2 +- web/source/settings/lib/query/lib.js | 2 +- web/source/settings/lib/query/user.js | 2 +- web/source/settings/redux/reducers/instances.js | 8 ++++---- web/source/settings/redux/reducers/oauth.js | 14 +++++++------- web/source/settings/redux/reducers/temporary.js | 4 ++-- 26 files changed, 45 insertions(+), 45 deletions(-) diff --git a/web/source/index.js b/web/source/index.js index 7ad57104b..d093745a8 100644 --- a/web/source/index.js +++ b/web/source/index.js @@ -32,7 +32,7 @@ const prodCfg = { global: true, exts: ".js" }], - ["@browserify/envify", {global: true}] + ["@browserify/envify", { global: true }] ] }; diff --git a/web/source/settings/admin/emoji/local/use-shortcode.js b/web/source/settings/admin/emoji/local/use-shortcode.js index a8ac30dc1..ba6c7c6cd 100644 --- a/web/source/settings/admin/emoji/local/use-shortcode.js +++ b/web/source/settings/admin/emoji/local/use-shortcode.js @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/admin/emoji/remote/index.js b/web/source/settings/admin/emoji/remote/index.js index fb1e05083..f3bb325e9 100644 --- a/web/source/settings/admin/emoji/remote/index.js +++ b/web/source/settings/admin/emoji/remote/index.js @@ -31,7 +31,7 @@ module.exports = function RemoteEmoji() { data: emoji = [], isLoading, error - } = query.useGetAllEmojiQuery({filter: "domain:local"}); + } = query.useGetAllEmojiQuery({ filter: "domain:local" }); const emojiCodes = React.useMemo(() => { return new Set(emoji.map((e) => e.shortcode)); @@ -40,11 +40,11 @@ module.exports = function RemoteEmoji() { return ( <>

Custom Emoji (remote)

- {error && + {error &&
{error}
} {isLoading - ? + ? : <> diff --git a/web/source/settings/admin/federation/detail.js b/web/source/settings/admin/federation/detail.js index 6d695a67e..7324a42a5 100644 --- a/web/source/settings/admin/federation/detail.js +++ b/web/source/settings/admin/federation/detail.js @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/admin/federation/import-export.js b/web/source/settings/admin/federation/import-export.js index ccaa36086..b4be09506 100644 --- a/web/source/settings/admin/federation/import-export.js +++ b/web/source/settings/admin/federation/import-export.js @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/admin/federation/overview.js b/web/source/settings/admin/federation/overview.js index d89e954f0..3c1c6e891 100644 --- a/web/source/settings/admin/federation/overview.js +++ b/web/source/settings/admin/federation/overview.js @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/components/back-button.jsx b/web/source/settings/components/back-button.jsx index d95f82a73..9e849dee0 100644 --- a/web/source/settings/components/back-button.jsx +++ b/web/source/settings/components/back-button.jsx @@ -21,7 +21,7 @@ const React = require("react"); const { Link } = require("wouter"); -module.exports = function BackButton({to}) { +module.exports = function BackButton({ to }) { return ( < back diff --git a/web/source/settings/components/check-list.jsx b/web/source/settings/components/check-list.jsx index 0f5267dfc..1276d5dbf 100644 --- a/web/source/settings/components/check-list.jsx +++ b/web/source/settings/components/check-list.jsx @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/components/fake-profile.jsx b/web/source/settings/components/fake-profile.jsx index 81c717e23..c326605d9 100644 --- a/web/source/settings/components/fake-profile.jsx +++ b/web/source/settings/components/fake-profile.jsx @@ -20,7 +20,7 @@ const React = require("react"); -module.exports = function FakeProfile({avatar, header, display_name, username, role}) { +module.exports = function FakeProfile({ avatar, header, display_name, username, role }) { return ( // Keep in sync with web/template/profile.tmpl
@@ -32,7 +32,7 @@ module.exports = function FakeProfile({avatar, header, display_name, username, r
{display_name.trim().length > 0 ? display_name : username}
@{username}
- {(role && role != "user") && + {(role && role != "user") &&
{role}
}
diff --git a/web/source/settings/components/fake-toot.jsx b/web/source/settings/components/fake-toot.jsx index 836ac62f8..c552f3332 100644 --- a/web/source/settings/components/fake-toot.jsx +++ b/web/source/settings/components/fake-toot.jsx @@ -21,14 +21,14 @@ const React = require("react"); const Redux = require("react-redux"); -module.exports = function FakeToot({children}) { +module.exports = function FakeToot({ children }) { const account = Redux.useSelector((state) => state.user.profile); return (
- + {account.display_name.trim().length > 0 ? account.display_name : account.username} @{account.username} diff --git a/web/source/settings/components/form/inputs.jsx b/web/source/settings/components/form/inputs.jsx index 5934e2a64..eef375ee8 100644 --- a/web/source/settings/components/form/inputs.jsx +++ b/web/source/settings/components/form/inputs.jsx @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/components/nav-button.jsx b/web/source/settings/components/nav-button.jsx index 127193471..ef4717c89 100644 --- a/web/source/settings/components/nav-button.jsx +++ b/web/source/settings/components/nav-button.jsx @@ -21,7 +21,7 @@ const React = require("react"); const { Link, useRoute } = require("wouter"); -module.exports = function NavButton({href, name}) { +module.exports = function NavButton({ href, name }) { const [isActive] = useRoute(`${href}/:anything?`); return ( diff --git a/web/source/settings/components/submit.jsx b/web/source/settings/components/submit.jsx index 2a1b864e3..a095e2f1b 100644 --- a/web/source/settings/components/submit.jsx +++ b/web/source/settings/components/submit.jsx @@ -20,11 +20,11 @@ const React = require("react"); -module.exports = function Submit({onClick, label, errorMsg, statusMsg}) { +module.exports = function Submit({ onClick, label, errorMsg, statusMsg }) { return (
- - {errorMsg.length > 0 && + + {errorMsg.length > 0 &&
{errorMsg}
} {statusMsg.length > 0 && diff --git a/web/source/settings/lib/api/index.js b/web/source/settings/lib/api/index.js index 89f12cc80..8cf26f718 100644 --- a/web/source/settings/lib/api/index.js +++ b/web/source/settings/lib/api/index.js @@ -73,7 +73,7 @@ function apiCall(method, route, payload, type = "json") { if (!res.ok) { if (auth != undefined && (res.status == 401 || res.status == 403)) { // stored access token is invalid - throw new AuthenticationError("401: Authentication error", {json, status: res.status}); + throw new AuthenticationError("401: Authentication error", { json, status: res.status }); } else { throw new APIError(json.error, { json }); } diff --git a/web/source/settings/lib/errors.js b/web/source/settings/lib/errors.js index 85302f18e..1ff1d6ffc 100644 --- a/web/source/settings/lib/errors.js +++ b/web/source/settings/lib/errors.js @@ -12,10 +12,10 @@ 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 . + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . */ - + "use strict"; const createError = require("create-error"); diff --git a/web/source/settings/lib/form/bool.jsx b/web/source/settings/lib/form/bool.jsx index 3f17d4ffe..b124abd50 100644 --- a/web/source/settings/lib/form/bool.jsx +++ b/web/source/settings/lib/form/bool.jsx @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 @@ -20,7 +20,7 @@ const React = require("react"); -module.exports = function useBoolInput({name, Name}, {defaultValue=false} = {}) { +module.exports = function useBoolInput({ name, Name }, { defaultValue = false } = {}) { const [value, setValue] = React.useState(defaultValue); function onChange(e) { diff --git a/web/source/settings/lib/form/check-list.jsx b/web/source/settings/lib/form/check-list.jsx index 3b1287e11..7d7e3aea9 100644 --- a/web/source/settings/lib/form/check-list.jsx +++ b/web/source/settings/lib/form/check-list.jsx @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/lib/form/radio.jsx b/web/source/settings/lib/form/radio.jsx index a00eba693..47ab6c726 100644 --- a/web/source/settings/lib/form/radio.jsx +++ b/web/source/settings/lib/form/radio.jsx @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/lib/form/submit.js b/web/source/settings/lib/form/submit.js index 738ed1c12..79a685cf1 100644 --- a/web/source/settings/lib/form/submit.js +++ b/web/source/settings/lib/form/submit.js @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/lib/query/admin/import-export.js b/web/source/settings/lib/query/admin/import-export.js index 20c691d9a..94e462bd2 100644 --- a/web/source/settings/lib/query/admin/import-export.js +++ b/web/source/settings/lib/query/admin/import-export.js @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/lib/query/admin/index.js b/web/source/settings/lib/query/admin/index.js index 545bb754f..b52bf378d 100644 --- a/web/source/settings/lib/query/admin/index.js +++ b/web/source/settings/lib/query/admin/index.js @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/lib/query/lib.js b/web/source/settings/lib/query/lib.js index ec353575a..93a3c5cf4 100644 --- a/web/source/settings/lib/query/lib.js +++ b/web/source/settings/lib/query/lib.js @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/lib/query/user.js b/web/source/settings/lib/query/user.js index 40b31c6e7..702844e7d 100644 --- a/web/source/settings/lib/query/user.js +++ b/web/source/settings/lib/query/user.js @@ -1,6 +1,6 @@ /* GoToSocial - Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org + Copyright (C) 2021-2023 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 diff --git a/web/source/settings/redux/reducers/instances.js b/web/source/settings/redux/reducers/instances.js index c58f068ca..906b827b8 100644 --- a/web/source/settings/redux/reducers/instances.js +++ b/web/source/settings/redux/reducers/instances.js @@ -18,7 +18,7 @@ "use strict"; -const {createSlice} = require("@reduxjs/toolkit"); +const { createSlice } = require("@reduxjs/toolkit"); const d = require("dotty"); module.exports = createSlice({ @@ -27,15 +27,15 @@ module.exports = createSlice({ info: {}, }, reducers: { - setNamedInstanceInfo: (state, {payload}) => { + setNamedInstanceInfo: (state, { payload }) => { let [key, info] = payload; state.info[key] = info; }, - setInstanceInfo: (state, {payload}) => { + setInstanceInfo: (state, { payload }) => { state.current = payload; state.adminSettings = payload; }, - setAdminSettingsVal: (state, {payload: [key, val]}) => { + setAdminSettingsVal: (state, { payload: [key, val] }) => { d.put(state.adminSettings, key, val); } } diff --git a/web/source/settings/redux/reducers/oauth.js b/web/source/settings/redux/reducers/oauth.js index 129115c9e..da6f77031 100644 --- a/web/source/settings/redux/reducers/oauth.js +++ b/web/source/settings/redux/reducers/oauth.js @@ -18,7 +18,7 @@ "use strict"; -const {createSlice} = require("@reduxjs/toolkit"); +const { createSlice } = require("@reduxjs/toolkit"); module.exports = createSlice({ name: "oauth", @@ -26,26 +26,26 @@ module.exports = createSlice({ loginState: 'none', }, reducers: { - setInstance: (state, {payload}) => { + setInstance: (state, { payload }) => { state.instance = payload; }, - setRegistration: (state, {payload}) => { + setRegistration: (state, { payload }) => { state.registration = payload; }, - setLoginState: (state, {payload}) => { + setLoginState: (state, { payload }) => { state.loginState = payload; }, - login: (state, {payload}) => { + login: (state, { payload }) => { state.token = `${payload.token_type} ${payload.access_token}`; state.loginState = "login"; }, - remove: (state, {_payload}) => { + remove: (state, { _payload }) => { delete state.token; delete state.registration; delete state.isAdmin; state.loginState = "none"; }, - setAdmin: (state, {payload}) => { + setAdmin: (state, { payload }) => { state.isAdmin = payload; } } diff --git a/web/source/settings/redux/reducers/temporary.js b/web/source/settings/redux/reducers/temporary.js index 0155f097a..dba1422c2 100644 --- a/web/source/settings/redux/reducers/temporary.js +++ b/web/source/settings/redux/reducers/temporary.js @@ -18,14 +18,14 @@ "use strict"; -const {createSlice} = require("@reduxjs/toolkit"); +const { createSlice } = require("@reduxjs/toolkit"); module.exports = createSlice({ name: "temporary", initialState: { }, reducers: { - setStatus: function(state, {payload}) { + setStatus: function (state, { payload }) { state.status = payload; } }