[chore] Update/add license headers for 2023

This commit is contained in:
f0x 2023-01-13 23:26:57 +00:00
parent ca0fb02330
commit 873fd22cfb
26 changed files with 45 additions and 45 deletions

View file

@ -32,7 +32,7 @@ const prodCfg = {
global: true, global: true,
exts: ".js" exts: ".js"
}], }],
["@browserify/envify", {global: true}] ["@browserify/envify", { global: true }]
] ]
}; };

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -31,7 +31,7 @@ module.exports = function RemoteEmoji() {
data: emoji = [], data: emoji = [],
isLoading, isLoading,
error error
} = query.useGetAllEmojiQuery({filter: "domain:local"}); } = query.useGetAllEmojiQuery({ filter: "domain:local" });
const emojiCodes = React.useMemo(() => { const emojiCodes = React.useMemo(() => {
return new Set(emoji.map((e) => e.shortcode)); return new Set(emoji.map((e) => e.shortcode));
@ -44,7 +44,7 @@ module.exports = function RemoteEmoji() {
<div className="error accent">{error}</div> <div className="error accent">{error}</div>
} }
{isLoading {isLoading
? <Loading/> ? <Loading />
: <> : <>
<ParseFromToot emoji={emoji} emojiCodes={emojiCodes} /> <ParseFromToot emoji={emoji} emojiCodes={emojiCodes} />
</> </>

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -21,7 +21,7 @@
const React = require("react"); const React = require("react");
const { Link } = require("wouter"); const { Link } = require("wouter");
module.exports = function BackButton({to}) { module.exports = function BackButton({ to }) {
return ( return (
<Link to={to}> <Link to={to}>
<a className="button">&lt; back</a> <a className="button">&lt; back</a>

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -20,7 +20,7 @@
const React = require("react"); 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 return ( // Keep in sync with web/template/profile.tmpl
<div className="profile"> <div className="profile">
<div className="headerimage"> <div className="headerimage">

View file

@ -21,14 +21,14 @@
const React = require("react"); const React = require("react");
const Redux = require("react-redux"); const Redux = require("react-redux");
module.exports = function FakeToot({children}) { module.exports = function FakeToot({ children }) {
const account = Redux.useSelector((state) => state.user.profile); const account = Redux.useSelector((state) => state.user.profile);
return ( return (
<div className="toot expanded"> <div className="toot expanded">
<div className="contentgrid"> <div className="contentgrid">
<span className="avatar"> <span className="avatar">
<img src={account.avatar} alt=""/> <img src={account.avatar} alt="" />
</span> </span>
<span className="displayname">{account.display_name.trim().length > 0 ? account.display_name : account.username}</span> <span className="displayname">{account.display_name.trim().length > 0 ? account.display_name : account.username}</span>
<span className="username">@{account.username}</span> <span className="username">@{account.username}</span>

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -21,7 +21,7 @@
const React = require("react"); const React = require("react");
const { Link, useRoute } = require("wouter"); const { Link, useRoute } = require("wouter");
module.exports = function NavButton({href, name}) { module.exports = function NavButton({ href, name }) {
const [isActive] = useRoute(`${href}/:anything?`); const [isActive] = useRoute(`${href}/:anything?`);
return ( return (
<Link href={href}> <Link href={href}>

View file

@ -20,10 +20,10 @@
const React = require("react"); const React = require("react");
module.exports = function Submit({onClick, label, errorMsg, statusMsg}) { module.exports = function Submit({ onClick, label, errorMsg, statusMsg }) {
return ( return (
<div className="messagebutton"> <div className="messagebutton">
<button type="submit" onClick={onClick}>{ label }</button> <button type="submit" onClick={onClick}>{label}</button>
{errorMsg.length > 0 && {errorMsg.length > 0 &&
<div className="error accent">{errorMsg}</div> <div className="error accent">{errorMsg}</div>
} }

View file

@ -73,7 +73,7 @@ function apiCall(method, route, payload, type = "json") {
if (!res.ok) { if (!res.ok) {
if (auth != undefined && (res.status == 401 || res.status == 403)) { if (auth != undefined && (res.status == 401 || res.status == 403)) {
// stored access token is invalid // 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 { } else {
throw new APIError(json.error, { json }); throw new APIError(json.error, { json });
} }

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by
@ -20,7 +20,7 @@
const React = require("react"); 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); const [value, setValue] = React.useState(defaultValue);
function onChange(e) { function onChange(e) {

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -1,6 +1,6 @@
/* /*
GoToSocial 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 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 it under the terms of the GNU Affero General Public License as published by

View file

@ -18,7 +18,7 @@
"use strict"; "use strict";
const {createSlice} = require("@reduxjs/toolkit"); const { createSlice } = require("@reduxjs/toolkit");
const d = require("dotty"); const d = require("dotty");
module.exports = createSlice({ module.exports = createSlice({
@ -27,15 +27,15 @@ module.exports = createSlice({
info: {}, info: {},
}, },
reducers: { reducers: {
setNamedInstanceInfo: (state, {payload}) => { setNamedInstanceInfo: (state, { payload }) => {
let [key, info] = payload; let [key, info] = payload;
state.info[key] = info; state.info[key] = info;
}, },
setInstanceInfo: (state, {payload}) => { setInstanceInfo: (state, { payload }) => {
state.current = payload; state.current = payload;
state.adminSettings = payload; state.adminSettings = payload;
}, },
setAdminSettingsVal: (state, {payload: [key, val]}) => { setAdminSettingsVal: (state, { payload: [key, val] }) => {
d.put(state.adminSettings, key, val); d.put(state.adminSettings, key, val);
} }
} }

View file

@ -18,7 +18,7 @@
"use strict"; "use strict";
const {createSlice} = require("@reduxjs/toolkit"); const { createSlice } = require("@reduxjs/toolkit");
module.exports = createSlice({ module.exports = createSlice({
name: "oauth", name: "oauth",
@ -26,26 +26,26 @@ module.exports = createSlice({
loginState: 'none', loginState: 'none',
}, },
reducers: { reducers: {
setInstance: (state, {payload}) => { setInstance: (state, { payload }) => {
state.instance = payload; state.instance = payload;
}, },
setRegistration: (state, {payload}) => { setRegistration: (state, { payload }) => {
state.registration = payload; state.registration = payload;
}, },
setLoginState: (state, {payload}) => { setLoginState: (state, { payload }) => {
state.loginState = payload; state.loginState = payload;
}, },
login: (state, {payload}) => { login: (state, { payload }) => {
state.token = `${payload.token_type} ${payload.access_token}`; state.token = `${payload.token_type} ${payload.access_token}`;
state.loginState = "login"; state.loginState = "login";
}, },
remove: (state, {_payload}) => { remove: (state, { _payload }) => {
delete state.token; delete state.token;
delete state.registration; delete state.registration;
delete state.isAdmin; delete state.isAdmin;
state.loginState = "none"; state.loginState = "none";
}, },
setAdmin: (state, {payload}) => { setAdmin: (state, { payload }) => {
state.isAdmin = payload; state.isAdmin = payload;
} }
} }

View file

@ -18,14 +18,14 @@
"use strict"; "use strict";
const {createSlice} = require("@reduxjs/toolkit"); const { createSlice } = require("@reduxjs/toolkit");
module.exports = createSlice({ module.exports = createSlice({
name: "temporary", name: "temporary",
initialState: { initialState: {
}, },
reducers: { reducers: {
setStatus: function(state, {payload}) { setStatus: function (state, { payload }) {
state.status = payload; state.status = payload;
} }
} }