[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,
exts: ".js"
}],
["@browserify/envify", {global: true}]
["@browserify/envify", { global: true }]
]
};

View file

@ -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

View file

@ -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 (
<>
<h1>Custom Emoji (remote)</h1>
{error &&
{error &&
<div className="error accent">{error}</div>
}
{isLoading
? <Loading/>
? <Loading />
: <>
<ParseFromToot emoji={emoji} emojiCodes={emojiCodes} />
</>

View file

@ -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

View file

@ -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

View file

@ -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

View file

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

View file

@ -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

View file

@ -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
<div className="profile">
<div className="headerimage">
@ -32,7 +32,7 @@ module.exports = function FakeProfile({avatar, header, display_name, username, r
<div className="displayname">{display_name.trim().length > 0 ? display_name : username}</div>
<div className="usernamecontainer">
<div className="username"><span>@{username}</span></div>
{(role && role != "user") &&
{(role && role != "user") &&
<div className={`role ${role}`}>{role}</div>
}
</div>

View file

@ -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 (
<div className="toot expanded">
<div className="contentgrid">
<span className="avatar">
<img src={account.avatar} alt=""/>
<img src={account.avatar} alt="" />
</span>
<span className="displayname">{account.display_name.trim().length > 0 ? account.display_name : account.username}</span>
<span className="username">@{account.username}</span>

View file

@ -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

View file

@ -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 (
<Link href={href}>

View file

@ -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 (
<div className="messagebutton">
<button type="submit" onClick={onClick}>{ label }</button>
{errorMsg.length > 0 &&
<button type="submit" onClick={onClick}>{label}</button>
{errorMsg.length > 0 &&
<div className="error accent">{errorMsg}</div>
}
{statusMsg.length > 0 &&

View file

@ -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 });
}

View file

@ -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 <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
"use strict";
const createError = require("create-error");

View file

@ -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) {

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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);
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}