Skip to content

Commit

Permalink
Merge stable into release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmz committed Oct 8, 2024
2 parents dd2c15d + 85fbc7f commit 4df487f
Show file tree
Hide file tree
Showing 40 changed files with 3,500 additions and 3,041 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = {
'import/no-extraneous-dependencies': 2,
'import/no-named-as-default': 2,
'import/no-named-as-default-member': 2,
'import/no-unresolved': 2,
'import/no-unresolved': ['error', { ignore: ['^virtual:'] }],
'import/order': [
2,
{ groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'] },
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@ jobs:
with:
url: "https://webhook.freefeed.net/${{ secrets.WEBHOOK_SECRET }}/react-client/beta?version=beta"
method: GET

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
!/.yarn/sdks
!/.yarn/versions
/_dist/
/dev-dist/
/config.json
/coverage
/node_modules
Expand Down
894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.3.1.cjs

This file was deleted.

925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.5.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.3.1.cjs
yarnPath: .yarn/releases/yarn-4.5.0.cjs
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.135.0] - Not released
### Added
- The PWA manifest and the service worker was added. The service worker caches
all site assets, including web fonts. It also caches user profile pictures (up
to 100 entries). The AppUpdated component periodically checks the service
worker for update.
### Changed
- Enable player for video attachments. Add a playback time limit for it.
### Fixed
- The SmartTextarea component now handles the 'onPaste' event more precisely.
When the clipboard contains the text and the image in the same time, both are
pasted.
- The recipients list of a post was determined incorrectly if some of the post
groups were not on the page.

## [1.134.4] - 2024-08-26
### Changed
- The 'Privacy' and 'Terms' pages now renders statically from the Markdown files
Expand Down Expand Up @@ -377,6 +392,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
created the post, or add their @username to the comment you have already started creating.
- Vimeo on demand links support
### Changed
- Take Save out of "more" menu
- The Dropzone library has been replaced with a custom file uploader.
Attachments for posts and comments are now uploaded uniformly. The CreatePost
and PostEditForm components have been redesigned to utilize the new uploader.
Expand Down Expand Up @@ -484,6 +500,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- It is now possible to hide posts by hashtags! Also, the underlying algorithm
allows to add other types of hiding criteria in the future.

### Changed
- Take Save out of "more" menu

## [1.110.0] - 2022-06-29
### Fixed
- The erroneous "Remove from" items has been removed from the post's "More" menu
Expand Down
15 changes: 3 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,9 @@
<title>FreeFeed</title>
<meta name="description" content="FreeFeed is a small and free social network, that enables you to discover and discuss the interesting stuff your friends find on the web">

<link rel="icon" href="/assets/images/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/assets/images/favicon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" sizes="512x512" href="/assets/images/ios/icon_512_512.png" />
<link rel="apple-touch-icon" sizes="256x256" href="/assets/images/ios/icon_256_256.png" />
<link rel="apple-touch-icon" sizes="192x192" href="/assets/images/ios/icon_192_192.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/assets/images/ios/icon_180_180.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/assets/images/ios/icon_152_152.png" />
<link rel="apple-touch-icon" sizes="144x144" href="/assets/images/ios/icon_144_144.png" />
<link rel="apple-touch-icon" sizes="120x120" href="/assets/images/ios/icon_120_120.png" />
<link rel="apple-touch-icon" sizes="114x114" href="/assets/images/ios/icon_114_114.png" />
<link rel="apple-touch-icon" sizes="76x76" href="/assets/images/ios/icon_76_76.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/assets/images/ios/icon_72_72.png" />
<link rel="icon" href="/assets/images/favicon.ico" sizes="48x48">
<link rel="icon" href="/assets/images/favicon.svg" sizes="any" type="image/svg+xml">
<link rel="apple-touch-icon" href="/assets/images/apple-touch-icon-180x180.png">

<noscript>
<style>
Expand Down
70 changes: 36 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactive-pepyatka",
"version": "1.134.4",
"version": "1.135.0",
"description": "",
"main": "index.js",
"dependencies": {
Expand All @@ -11,18 +11,18 @@
"autotrack": "~2.4.1",
"classnames": "~2.5.1",
"custom-event": "~1.0.1",
"date-fns": "~3.6.0",
"debug": "~4.3.6",
"date-fns": "~4.1.0",
"debug": "~4.3.7",
"events": "~3.3.0",
"filesize": "~10.1.4",
"filesize": "~10.1.6",
"final-form": "~4.20.10",
"focus-trap-react": "~10.2.3",
"focus-visible": "~5.2.0",
"iso-639-1": "~3.1.2",
"focus-trap-react": "~10.3.0",
"focus-visible": "~5.2.1",
"iso-639-1": "~3.1.3",
"keycode-js": "~3.1.0",
"local-storage-fallback": "~4.1.2",
"lodash-es": "~4.17.21",
"lru-cache": "~10.3.1",
"lru-cache": "~11.0.1",
"memoize-one": "~6.0.0",
"mousetrap": "~1.6.5",
"photoswipe": "~5.4.4",
Expand All @@ -37,7 +37,7 @@
"react-redux": "~9.1.2",
"react-router": "~3.2.6",
"react-router-redux": "~4.0.8",
"react-select": "~5.8.0",
"react-select": "~5.8.1",
"react-sortablejs": "~6.1.4",
"react-textarea-autosize": "~8.5.3",
"react-use-event-hook": "~0.9.6",
Expand All @@ -46,67 +46,69 @@
"snarkdown": "~2.0.0",
"social-text-tokenizer": "~3.0.0",
"socket.io-client": "~2.3.1",
"sortablejs": "~1.15.2",
"sortablejs": "~1.15.3",
"tabbable": "~6.2.0",
"ua-parser-js": "~1.0.38",
"ua-parser-js": "~1.0.39",
"use-subscription": "~1.8.2",
"validator": "~13.12.0",
"vazirmatn": "^33.0.3",
"whatwg-fetch": "~3.6.20"
},
"devDependencies": {
"@babel/core": "~7.24.9",
"@babel/eslint-parser": "~7.25.1",
"@babel/preset-react": "~7.24.7",
"@babel/core": "~7.25.7",
"@babel/eslint-parser": "~7.25.7",
"@babel/preset-react": "~7.25.7",
"@gfx/zopfli": "~1.0.15",
"@testing-library/dom": "~10.4.0",
"@testing-library/jest-dom": "~6.4.8",
"@testing-library/react": "~16.0.0",
"@testing-library/jest-dom": "~6.5.0",
"@testing-library/react": "~16.0.1",
"@testing-library/react-hooks": "~8.0.1",
"@testing-library/user-event": "~14.5.2",
"@vitejs/plugin-legacy": "~5.4.1",
"@vitejs/plugin-react-swc": "^3.7.0",
"@vitejs/plugin-legacy": "~5.4.2",
"@vitejs/plugin-react-swc": "^3.7.1",
"cross-env": "~7.0.3",
"esbuild": "~0.23.0",
"esbuild": "~0.24.0",
"eslint": "~8.56.0",
"eslint-config-prettier": "~9.1.0",
"eslint-plugin-babel": "~5.3.1",
"eslint-plugin-import": "~2.29.1",
"eslint-plugin-import": "~2.31.0",
"eslint-plugin-lodash": "~8.0.0",
"eslint-plugin-prettier": "~5.2.1",
"eslint-plugin-promise": "~6.4.0",
"eslint-plugin-react": "~7.35.0",
"eslint-plugin-promise": "~7.1.0",
"eslint-plugin-react": "~7.37.1",
"eslint-plugin-react-hooks": "~4.6.2",
"eslint-plugin-unicorn": "~54.0.0",
"eslint-plugin-unicorn": "~56.0.0",
"eslint-plugin-you-dont-need-lodash-underscore": "~6.14.0",
"glob": "~11.0.0",
"gray-matter": "~4.0.3",
"husky": "~8.0.3",
"jsdom": "~24.1.1",
"lint-staged": "~15.2.7",
"jsdom": "~25.0.1",
"lint-staged": "~15.2.10",
"node-html-parser": "~6.1.13",
"npm-run-all": "~4.1.5",
"prettier": "~3.3.3",
"querystring": "~0.2.1",
"react-test-renderer": "~18.3.1",
"remarkable": "~2.0.1",
"rimraf": "~5.0.9",
"sass": "^1.77.8",
"sinon": "~18.0.0",
"stylelint": "~16.7.0",
"rimraf": "~6.0.1",
"sass": "^1.79.4",
"sinon": "~19.0.2",
"stylelint": "~16.9.0",
"stylelint-config-prettier": "~9.0.5",
"stylelint-config-standard-scss": "~13.1.0",
"stylelint-prettier": "~5.0.2",
"stylelint-scss": "~6.4.1",
"terser": "~5.31.3",
"stylelint-scss": "~6.7.0",
"terser": "~5.34.1",
"unexpected": "~13.2.1",
"unexpected-react": "~6.0.2",
"unexpected-sinon": "~11.1.0",
"url": "~0.11.4",
"vite": "~5.3.5",
"vite": "~5.4.8",
"vite-plugin-compression": "~0.5.1",
"vite-plugin-generate-file": "~0.2.0",
"vitest": "~2.0.4"
"vite-plugin-pwa": "^0.20.5",
"vitest": "~2.1.2",
"workbox-window": "^7.1.0"
},
"scripts": {
"start": "vite",
Expand All @@ -128,5 +130,5 @@
"url": "https://github.com/FreeFeed/freefeed-react-client.git"
},
"license": "MIT",
"packageManager": "yarn@4.3.1"
"packageManager": "yarn@4.5.0"
}
Binary file added public/assets/images/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/assets/images/favicon.ico
Binary file not shown.
Binary file removed public/assets/images/ios/icon_114_114.png
Binary file not shown.
Binary file removed public/assets/images/ios/icon_120_120.png
Binary file not shown.
Binary file removed public/assets/images/ios/icon_144_144.png
Binary file not shown.
Binary file removed public/assets/images/ios/icon_152_152.png
Binary file not shown.
Binary file removed public/assets/images/ios/icon_180_180.png
Binary file not shown.
Binary file removed public/assets/images/ios/icon_192_192.png
Binary file not shown.
Binary file removed public/assets/images/ios/icon_256_256.png
Binary file not shown.
Binary file removed public/assets/images/ios/icon_512_512.png
Binary file not shown.
Binary file removed public/assets/images/ios/icon_72_72.png
Binary file not shown.
Binary file removed public/assets/images/ios/icon_76_76.png
Binary file not shown.
Binary file added public/assets/images/maskable-icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/pwa-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/pwa-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/pwa-64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 32 additions & 9 deletions src/components/app-updated.jsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,44 @@
/* global CONFIG */
import { useSelector } from 'react-redux';
import { useRegisterSW } from 'virtual:pwa-register/react';

import { useEvent } from 'react-use-event-hook';
import { useState } from 'react';
import styles from './app-updated.module.scss';
import { ButtonLink } from './button-link';

function reloadPage() {
window.location.reload(true);
}
const { intervalSec } = CONFIG.appVersionCheck;

export function AppUpdated() {
const updated = useSelector((state) => state.appUpdated.updated);
const versionFileUpdated = useSelector((state) => state.appUpdated.updated);
const [swRegistered, setSwRegistered] = useState(false);

const {
needRefresh: [workerUpdated],
updateServiceWorker,
} = useRegisterSW({
onRegistered(r) {
if (r) {
setSwRegistered(true);
setInterval(() => r.update(), intervalSec * 1000);
}
},
});

const reloadPage = useEvent(() => {
if (workerUpdated) {
updateServiceWorker();
// Sometimes the updateServiceWorker doesn't refresh the page, so reload
// it manually after some time
setTimeout(() => window.location.reload(true), 2000);
} else {
window.location.reload(true);
}
});

if (!updated) {
return null;
}
const needRefresh = swRegistered ? workerUpdated : versionFileUpdated;

return (
return needRefresh ? (
<div className={styles.bar}>
<div className={styles.indicator}>
There’s an update for {CONFIG.siteTitle}!{' '}
Expand All @@ -25,5 +48,5 @@ export function AppUpdated() {
when you are ready.
</div>
</div>
);
) : null;
}
2 changes: 1 addition & 1 deletion src/components/footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function Footer({ short }) {
return (
<footer className="footer">
<p role="navigation">
&copy; FreeFeed 1.134.4 (Aug 26, 2024)
&copy; FreeFeed 1.134.4-beta (Sep 3, 2024)
<br />
<Link to="/about">About</Link>
{' | '}
Expand Down
Loading

0 comments on commit 4df487f

Please sign in to comment.