Browse Source

Revert "Merge branch 'chapo-dev-subchapo-links' into 'chapo-dev'"

This reverts merge request !433
unoptim
Stalinist Apologist 2 years ago
parent
commit
93f17c8ad9
  1. 86
      package.json
  2. 4
      src/components/Header.tsx
  3. 2
      src/components/community-dropdown.tsx
  4. 2
      src/components/community-link.tsx
  5. 5
      src/components/navbar.tsx
  6. 13
      src/components/post.tsx
  7. 2568
      yarn.lock

86
package.json

@ -17,110 +17,110 @@
"@emotion/styled": "^10.0.27",
"@pika/react": "^16.13.1",
"@pika/react-dom": "^16.13.1",
"@reach/combobox": "^0.11.2",
"@reach/combobox": "^0.10.5",
"@reach/dialog": "^0.11.2",
"@reach/disclosure": "^0.11.2",
"@reach/menu-button": "^0.11.2",
"@reach/menu-button": "^0.10.5",
"@reach/portal": "^0.11.2",
"@reach/tabs": "^0.11.2",
"@reach/tooltip": "^0.11.2",
"@reach/utils": "^0.11.2",
"@sentry/react": "^5.24.2",
"@sentry/react": "^5.22.3",
"@theme-ui/color": "^0.3.1",
"@theme-ui/presets": "^0.3.0",
"@types/autosize": "^3.0.7",
"@types/js-cookie": "^2.2.6",
"@types/jwt-decode": "^2.2.1",
"@types/markdown-it": "^10.0.2",
"@types/markdown-it": "^10.0.1",
"@types/markdown-it-container": "^2.0.3",
"@types/node": "^14.11.2",
"@types/qs": "^6.9.5",
"@types/react": "^16.9.49",
"@types/node": "^14.0.27",
"@types/qs": "^6.9.4",
"@types/react": "^16.9.44",
"@types/react-dom": "^16.9.8",
"@types/react-router-dom": "^5.1.5",
"@types/testing-library__jest-dom": "^5.9.2",
"@types/theme-ui": "^0.3.6",
"autosize": "^4.0.2",
"axios": "^0.20.0",
"body-scroll-lock": "^3.1.5",
"bootswatch": "^4.5.2",
"axios": "^0.19.2",
"body-scroll-lock": "^3.0.3",
"bootswatch": "^4.5.0",
"choices.js": "^9.0.1",
"classcat": "^4.1.0",
"clone": "^2.1.2",
"emoji-mart": "^3.0.0",
"emoji-short-name": "^1.0.0",
"husky": "^4.3.0",
"i18next": "^19.7.0",
"husky": "^4.2.5",
"i18next": "^19.6.3",
"js-cookie": "^2.2.1",
"jwt-decode": "^2.2.0",
"line-height": "^0.3.1",
"lodash.isequal": "^4.5.0",
"markdown-it": "^11.0.1",
"markdown-it": "^11.0.0",
"markdown-it-container": "^3.0.0",
"markdown-it-emoji": "^1.4.0",
"markdown-it-for-inline": "^0.1.1",
"match-sorter": "^4.2.1",
"moment": "^2.29.0",
"match-sorter": "^4.2.0",
"moment": "^2.27.0",
"parse-domain": "^3.0.2",
"prettier": "^2.1.2",
"prettier": "^2.0.5",
"psl": "^1.8.0",
"qs": "^6.9.4",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-helmet": "^6.1.0",
"react-i18next": "^11.7.3",
"react-i18next": "^11.7.0",
"react-router-dom": "^5.2.0",
"reconnecting-websocket": "^4.4.0",
"register-service-worker": "^1.7.1",
"rxjs": "^6.6.3",
"styled-components": "^5.2.0",
"swr": "^0.3.4",
"terser": "^5.3.2",
"rxjs": "^6.6.2",
"styled-components": "npm:@esm-bundle/styled-components",
"swr": "^0.3.1",
"terser": "^5.0.0",
"theme-ui": "^0.3.1",
"tippy.js": "^6.2.6",
"toastify-js": "^1.9.1",
"toastify-js": "^1.9.0",
"tributejs": "^5.1.3",
"twemoji": "^13.0.1",
"url": "^0.11.0",
"ws": "^7.3.1"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@storybook/addon-info": "^5.3.21",
"@storybook/addon-viewport": "^6.0.21",
"@storybook/react": "^6.0.21",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.0.4",
"@testing-library/user-event": "^12.1.6",
"@types/jest": "^26.0.14",
"@babel/core": "^7.11.1",
"@storybook/addon-info": "^5.3.20",
"@storybook/addon-viewport": "^6.0.19",
"@storybook/react": "^6.0.19",
"@testing-library/jest-dom": "^5.11.3",
"@testing-library/react": "^10.4.8",
"@testing-library/user-event": "^12.1.1",
"@types/jest": "^26.0.10",
"@types/node-fetch": "^2.5.7",
"@types/styled-components": "^5.1.3",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@types/styled-components": "^5.1.2",
"@typescript-eslint/eslint-plugin": "^3.9.0",
"babel-jest": "^26.3.0",
"babel-loader": "^8.1.0",
"babel-preset-react-app": "^9.1.2",
"cssnano": "^4.1.10",
"eslint": "^7.9.0",
"eslint": "^7.6.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-inferno": "^7.20.1",
"eslint-plugin-jane": "^9.0.3",
"eslint-plugin-jane": "^8.0.5",
"eslint-plugin-prettier": "^3.1.4",
"git-describe": "^4.0.4",
"jest": "^26.4.2",
"jest": "^26.4.0",
"jest-environment-jsdom-fourteen": "^1.0.1",
"jest-watch-typeahead": "^0.6.1",
"lint-staged": "^10.4.0",
"jest-watch-typeahead": "^0.6.0",
"lint-staged": "^10.2.11",
"node-fetch": "^2.6.1",
"react-app-polyfill": "^1.0.6",
"react-docgen-typescript-loader": "^3.7.2",
"sortpack": "^2.1.8",
"source-map-loader": "^1.1.0",
"ts-jest": "^26.4.0",
"ts-loader": "^8.0.4",
"ts-node": "^9.0.0",
"sortpack": "^2.1.6",
"source-map-loader": "^1.0.1",
"ts-jest": "^26.1.4",
"ts-loader": "^8.0.2",
"ts-node": "^8.10.2",
"ts-transform-classcat": "^1.0.0",
"ts-transform-inferno": "^4.0.3",
"typescript": "^4.0.3",
"typescript": "^3.9.7",
"vite": "^1.0.0-rc.4",
"vite-plugin-react": "^3.0.2"
},

4
src/components/Header.tsx

@ -60,9 +60,9 @@ const DetailSection = ({ details = {}, children }) => (
export type HeaderProps = {
title?: string;
subtitle?: string | React.ReactNode;
subtitle?: string;
details?: { [key: string]: any };
children?: React.ReactNode;
children?: React.ReactNode; //
};
export default function Header({

2
src/components/community-dropdown.tsx

@ -248,8 +248,6 @@ export class CommunityDropdown extends Component<
return matchSorter(this.state.subscriptions, this.state.filter, {
keys: ['name'],
});
} else {
return [];
}
}

2
src/components/community-link.tsx

@ -26,7 +26,7 @@ export class CommunityLink extends Component<CommunityLinkProps, any> {
let name_: string, link: string;
let local = community.local == null ? true : community.local;
if (local) {
name_ = `/c/${community.name}`;
name_ = community.name;
link = `/c/${community.name}`;
} else {
name_ = `${community.name}@${hostname(community.actor_id)}`;

5
src/components/navbar.tsx

@ -268,7 +268,6 @@ class UnwrappedNavbar extends Component<any, NavbarState> {
mx={2}
ml={3}
color="text"
to="/#"
// className="btn btn-inline"
title={i18n.t('communities')}
id="community-button"
@ -518,8 +517,8 @@ class UnwrappedNavbar extends Component<any, NavbarState> {
async fetchUnreads() {
if (this.currentLocation !== '/inbox') {
const params = new URLSearchParams({
auth: UserService.Instance.auth,
});
auth: UserService.Instance.auth
})
const { data } = await api.get(`user/unread_notifs?${params.toString()}`);
this.setState({ unreadCount: data ? data.unreads : 0 });
}

13
src/components/post.tsx

@ -119,6 +119,13 @@ export class Post extends Component<any, PostState> {
state = this.emptyState;
// constructor(props: any, context: any) {
// super(props, context);
// this.state = this.emptyState;
// }
componentWillUnmount() {
this.subscription.unsubscribe();
window.removeEventListener('scroll', this.debouncedScroll);
@ -232,11 +239,7 @@ export class Post extends Component<any, PostState> {
<>
<Header
title={this.state?.community?.title}
subtitle={
<StyledLink to={`/c/${this.state.post.community_name}`}>
{`/c/${this.state.post.community_name}`}
</StyledLink>
}
subtitle={'/c/' + this.state?.post?.community_name}
details={{
[i18n.t('number_online_label')]: this.state.online,
[i18n.t('members')]: this.state?.community

2568
yarn.lock
File diff suppressed because it is too large
View File

Loading…
Cancel
Save