mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-02-05 15:47:47 +01:00
[chore] Update/add license headers for 2023
This commit is contained in:
parent
ca0fb02330
commit
873fd22cfb
26 changed files with 45 additions and 45 deletions
|
@ -32,7 +32,7 @@ const prodCfg = {
|
|||
global: true,
|
||||
exts: ".js"
|
||||
}],
|
||||
["@browserify/envify", {global: true}]
|
||||
["@browserify/envify", { global: true }]
|
||||
]
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
@ -44,7 +44,7 @@ module.exports = function RemoteEmoji() {
|
|||
<div className="error accent">{error}</div>
|
||||
}
|
||||
{isLoading
|
||||
? <Loading/>
|
||||
? <Loading />
|
||||
: <>
|
||||
<ParseFromToot emoji={emoji} emojiCodes={emojiCodes} />
|
||||
</>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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">< back</a>
|
||||
|
|
|
@ -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 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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}>
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
|
||||
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>
|
||||
<button type="submit" onClick={onClick}>{label}</button>
|
||||
{errorMsg.length > 0 &&
|
||||
<div className="error accent">{errorMsg}</div>
|
||||
}
|
||||
|
|
|
@ -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 });
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue