diff --git a/commafeed-client/package-lock.json b/commafeed-client/package-lock.json
index c0dd1f63..18314d2e 100644
--- a/commafeed-client/package-lock.json
+++ b/commafeed-client/package-lock.json
@@ -34,6 +34,7 @@
"react-infinite-scroller": "^1.2.6",
"react-redux": "^8.0.4",
"react-router-dom": "^6.4.2",
+ "react-swipeable": "^7.0.0",
"swagger-ui-react": "^4.15.2",
"tinycon": "^0.6.8"
},
@@ -8657,6 +8658,14 @@
"react-dom": ">=16.8"
}
},
+ "node_modules/react-swipeable": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/react-swipeable/-/react-swipeable-7.0.0.tgz",
+ "integrity": "sha512-NI7KGfQ6gwNFN0Hor3vytYW3iRfMMaivGEuxcADOOfBCx/kqwXE8IfHFxEcxSUkxCYf38COLKYd9EMYZghqaUA==",
+ "peerDependencies": {
+ "react": "^16.8.3 || ^17 || ^18"
+ }
+ },
"node_modules/react-syntax-highlighter": {
"version": "15.5.0",
"resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz",
@@ -16321,6 +16330,12 @@
"react-router": "6.4.2"
}
},
+ "react-swipeable": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/react-swipeable/-/react-swipeable-7.0.0.tgz",
+ "integrity": "sha512-NI7KGfQ6gwNFN0Hor3vytYW3iRfMMaivGEuxcADOOfBCx/kqwXE8IfHFxEcxSUkxCYf38COLKYd9EMYZghqaUA==",
+ "requires": {}
+ },
"react-syntax-highlighter": {
"version": "15.5.0",
"resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz",
diff --git a/commafeed-client/package.json b/commafeed-client/package.json
index c2e40755..8fe48df6 100644
--- a/commafeed-client/package.json
+++ b/commafeed-client/package.json
@@ -41,6 +41,7 @@
"react-infinite-scroller": "^1.2.6",
"react-redux": "^8.0.4",
"react-router-dom": "^6.4.2",
+ "react-swipeable": "^7.0.0",
"swagger-ui-react": "^4.15.2",
"tinycon": "^0.6.8"
},
diff --git a/commafeed-client/src/components/KeyboardShortcutsHelp.tsx b/commafeed-client/src/components/KeyboardShortcutsHelp.tsx
index b3ec60c0..e6fcb8ae 100644
--- a/commafeed-client/src/components/KeyboardShortcutsHelp.tsx
+++ b/commafeed-client/src/components/KeyboardShortcutsHelp.tsx
@@ -103,6 +103,8 @@ export function KeyboardShortcutsHelp() {
M
+ ,
+ Swipe header to the right
|
diff --git a/commafeed-client/src/components/content/FeedEntry.tsx b/commafeed-client/src/components/content/FeedEntry.tsx
index f7fcf9c4..c1561dd2 100644
--- a/commafeed-client/src/components/content/FeedEntry.tsx
+++ b/commafeed-client/src/components/content/FeedEntry.tsx
@@ -1,8 +1,10 @@
import { Anchor, Box, createStyles, Divider, Paper } from "@mantine/core"
import { Constants } from "app/constants"
-import { useAppSelector } from "app/store"
+import { markEntry } from "app/slices/entries"
+import { useAppDispatch, useAppSelector } from "app/store"
import { Entry } from "app/types"
import React from "react"
+import { useSwipeable } from "react-swipeable"
import { FeedEntryBody } from "./FeedEntryBody"
import { FeedEntryCompactHeader } from "./FeedEntryCompactHeader"
import { FeedEntryFooter } from "./FeedEntryFooter"
@@ -45,8 +47,14 @@ const useStyles = createStyles((theme, props: FeedEntryProps) => {
export function FeedEntry(props: FeedEntryProps) {
const { classes } = useStyles(props)
const viewMode = useAppSelector(state => state.user.settings?.viewMode)
+ const dispatch = useAppDispatch()
+
const compactHeader = viewMode === "title" && !props.expanded
+ const swipeHandlers = useSwipeable({
+ onSwipedRight: () => dispatch(markEntry({ entry: props.entry, read: !props.entry.read })),
+ })
+
return (
-
+
{compactHeader && }
{!compactHeader && }
diff --git a/commafeed-client/src/locales/ar/messages.po b/commafeed-client/src/locales/ar/messages.po
index e62f4b91..6f7841ef 100644
--- a/commafeed-client/src/locales/ar/messages.po
+++ b/commafeed-client/src/locales/ar/messages.po
@@ -681,6 +681,10 @@ msgstr "الاشتراك في موجز ويب"
msgid "Success"
msgstr "النجاح"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "التبديل إلى النسق الداكن"
diff --git a/commafeed-client/src/locales/ca/messages.po b/commafeed-client/src/locales/ca/messages.po
index c44d5c93..a76603e5 100644
--- a/commafeed-client/src/locales/ca/messages.po
+++ b/commafeed-client/src/locales/ca/messages.po
@@ -681,6 +681,10 @@ msgstr "Subscriu-te al canal"
msgid "Success"
msgstr "Éxit"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Canvia al tema fosc"
diff --git a/commafeed-client/src/locales/cs/messages.po b/commafeed-client/src/locales/cs/messages.po
index cb64b73b..d76b165b 100644
--- a/commafeed-client/src/locales/cs/messages.po
+++ b/commafeed-client/src/locales/cs/messages.po
@@ -681,6 +681,10 @@ msgstr "Přihlaste se k odběru kanálu"
msgid "Success"
msgstr "Úspěch"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Přepněte na tmavý motiv"
diff --git a/commafeed-client/src/locales/cy/messages.po b/commafeed-client/src/locales/cy/messages.po
index a43d5ea1..25b8999f 100644
--- a/commafeed-client/src/locales/cy/messages.po
+++ b/commafeed-client/src/locales/cy/messages.po
@@ -681,6 +681,10 @@ msgstr "Tanysgrifio i'r porthiant"
msgid "Success"
msgstr "Llwyddiant"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Newid i thema dywyll"
diff --git a/commafeed-client/src/locales/da/messages.po b/commafeed-client/src/locales/da/messages.po
index 8bf97f78..80fb258a 100644
--- a/commafeed-client/src/locales/da/messages.po
+++ b/commafeed-client/src/locales/da/messages.po
@@ -681,6 +681,10 @@ msgstr "Abonner på feedet"
msgid "Success"
msgstr "Succes"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Skift til mørkt tema"
diff --git a/commafeed-client/src/locales/de/messages.po b/commafeed-client/src/locales/de/messages.po
index 1ee61ff0..5300e87c 100644
--- a/commafeed-client/src/locales/de/messages.po
+++ b/commafeed-client/src/locales/de/messages.po
@@ -681,6 +681,10 @@ msgstr "Feed abonnieren"
msgid "Success"
msgstr "Erfolg"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Zum dunklen Design wechseln"
diff --git a/commafeed-client/src/locales/en/messages.po b/commafeed-client/src/locales/en/messages.po
index 6f9b4456..8fd0e0de 100644
--- a/commafeed-client/src/locales/en/messages.po
+++ b/commafeed-client/src/locales/en/messages.po
@@ -681,6 +681,10 @@ msgstr "Subscribe to the feed"
msgid "Success"
msgstr "Success"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr "Swipe header to the right"
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Switch to dark theme"
diff --git a/commafeed-client/src/locales/es/messages.po b/commafeed-client/src/locales/es/messages.po
index 636ca0d2..68e879b7 100644
--- a/commafeed-client/src/locales/es/messages.po
+++ b/commafeed-client/src/locales/es/messages.po
@@ -681,6 +681,10 @@ msgstr "Suscríbete a la fuente"
msgid "Success"
msgstr "Éxito"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Cambiar a tema oscuro"
diff --git a/commafeed-client/src/locales/fa/messages.po b/commafeed-client/src/locales/fa/messages.po
index 2462dc95..a55eb5e6 100644
--- a/commafeed-client/src/locales/fa/messages.po
+++ b/commafeed-client/src/locales/fa/messages.po
@@ -681,6 +681,10 @@ msgstr "در فید مشترک شوید"
msgid "Success"
msgstr "موفقیت"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "تغییر به تم تیره"
diff --git a/commafeed-client/src/locales/fi/messages.po b/commafeed-client/src/locales/fi/messages.po
index 17b62655..c754e61b 100644
--- a/commafeed-client/src/locales/fi/messages.po
+++ b/commafeed-client/src/locales/fi/messages.po
@@ -681,6 +681,10 @@ msgstr "Tilaa syöte"
msgid "Success"
msgstr "Onnistui"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Vaihda tummaan teemaan"
diff --git a/commafeed-client/src/locales/fr/messages.po b/commafeed-client/src/locales/fr/messages.po
index f74c5fab..a0eb78bc 100644
--- a/commafeed-client/src/locales/fr/messages.po
+++ b/commafeed-client/src/locales/fr/messages.po
@@ -681,6 +681,10 @@ msgstr "S'abonner au flux"
msgid "Success"
msgstr "Succès"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr "Faire glisser le titre vers la droite"
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Activer le mode sombre"
diff --git a/commafeed-client/src/locales/gl/messages.po b/commafeed-client/src/locales/gl/messages.po
index 8ae60343..be900e77 100644
--- a/commafeed-client/src/locales/gl/messages.po
+++ b/commafeed-client/src/locales/gl/messages.po
@@ -681,6 +681,10 @@ msgstr "Subscríbete ao feed"
msgid "Success"
msgstr "Éxito"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Cambiar ao tema escuro"
diff --git a/commafeed-client/src/locales/hu/messages.po b/commafeed-client/src/locales/hu/messages.po
index d27b88e8..bcf25549 100644
--- a/commafeed-client/src/locales/hu/messages.po
+++ b/commafeed-client/src/locales/hu/messages.po
@@ -681,6 +681,10 @@ msgstr "Feliratkozás a hírfolyamra"
msgid "Success"
msgstr "Siker"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Váltás sötét témára"
diff --git a/commafeed-client/src/locales/id/messages.po b/commafeed-client/src/locales/id/messages.po
index d6e905a4..77f9126c 100644
--- a/commafeed-client/src/locales/id/messages.po
+++ b/commafeed-client/src/locales/id/messages.po
@@ -681,6 +681,10 @@ msgstr "Berlangganan umpan"
msgid "Success"
msgstr "Sukses"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Beralih ke tema gelap"
diff --git a/commafeed-client/src/locales/it/messages.po b/commafeed-client/src/locales/it/messages.po
index 6b30ef1d..f4bdeed1 100644
--- a/commafeed-client/src/locales/it/messages.po
+++ b/commafeed-client/src/locales/it/messages.po
@@ -681,6 +681,10 @@ msgstr "Iscriviti al feed"
msgid "Success"
msgstr "Successo"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Passa al tema scuro"
diff --git a/commafeed-client/src/locales/ja/messages.po b/commafeed-client/src/locales/ja/messages.po
index b9a8f505..83701597 100644
--- a/commafeed-client/src/locales/ja/messages.po
+++ b/commafeed-client/src/locales/ja/messages.po
@@ -681,6 +681,10 @@ msgstr "フィードを購読する"
msgid "Success"
msgstr "成功"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "ダークテーマに切り替え"
diff --git a/commafeed-client/src/locales/ko/messages.po b/commafeed-client/src/locales/ko/messages.po
index 53cc3731..fdd27b68 100644
--- a/commafeed-client/src/locales/ko/messages.po
+++ b/commafeed-client/src/locales/ko/messages.po
@@ -681,6 +681,10 @@ msgstr "피드 구독"
msgid "Success"
msgstr "성공"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "어두운 테마로 전환"
diff --git a/commafeed-client/src/locales/ms/messages.po b/commafeed-client/src/locales/ms/messages.po
index 9a8e430f..b5f52a1f 100644
--- a/commafeed-client/src/locales/ms/messages.po
+++ b/commafeed-client/src/locales/ms/messages.po
@@ -681,6 +681,10 @@ msgstr "Langgan suapan"
msgid "Success"
msgstr "Kejayaan"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Tukar kepada tema gelap"
diff --git a/commafeed-client/src/locales/nb/messages.po b/commafeed-client/src/locales/nb/messages.po
index 76d8a97a..8d642b53 100644
--- a/commafeed-client/src/locales/nb/messages.po
+++ b/commafeed-client/src/locales/nb/messages.po
@@ -681,6 +681,10 @@ msgstr "Abonner på feeden"
msgid "Success"
msgstr "Suksess"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Bytt til mørkt tema"
diff --git a/commafeed-client/src/locales/nl/messages.po b/commafeed-client/src/locales/nl/messages.po
index d9bf9c0d..71df84e4 100644
--- a/commafeed-client/src/locales/nl/messages.po
+++ b/commafeed-client/src/locales/nl/messages.po
@@ -681,6 +681,10 @@ msgstr "Abonneer je op de feed"
msgid "Success"
msgstr "Succes"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Overschakelen naar donker thema"
diff --git a/commafeed-client/src/locales/nn/messages.po b/commafeed-client/src/locales/nn/messages.po
index 25638a26..8dd32f93 100644
--- a/commafeed-client/src/locales/nn/messages.po
+++ b/commafeed-client/src/locales/nn/messages.po
@@ -681,6 +681,10 @@ msgstr "Abonner på feeden"
msgid "Success"
msgstr "Suksess"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Bytt til mørkt tema"
diff --git a/commafeed-client/src/locales/pl/messages.po b/commafeed-client/src/locales/pl/messages.po
index 5c21cfcf..047d0991 100644
--- a/commafeed-client/src/locales/pl/messages.po
+++ b/commafeed-client/src/locales/pl/messages.po
@@ -681,6 +681,10 @@ msgstr "Subskrybuj kanał"
msgid "Success"
msgstr "Sukces"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Przełącz na ciemny motyw"
diff --git a/commafeed-client/src/locales/pt/messages.po b/commafeed-client/src/locales/pt/messages.po
index fdc2c683..0788d067 100644
--- a/commafeed-client/src/locales/pt/messages.po
+++ b/commafeed-client/src/locales/pt/messages.po
@@ -681,6 +681,10 @@ msgstr "Inscrever-se no feed"
msgid "Success"
msgstr "Sucesso"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Mudar para tema escuro"
diff --git a/commafeed-client/src/locales/ru/messages.po b/commafeed-client/src/locales/ru/messages.po
index 0a2011a6..ce286150 100644
--- a/commafeed-client/src/locales/ru/messages.po
+++ b/commafeed-client/src/locales/ru/messages.po
@@ -681,6 +681,10 @@ msgstr "Подписаться на ленту"
msgid "Success"
msgstr "Успех"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Переключиться на темную тему"
diff --git a/commafeed-client/src/locales/sk/messages.po b/commafeed-client/src/locales/sk/messages.po
index be2dfc94..42dd1a03 100644
--- a/commafeed-client/src/locales/sk/messages.po
+++ b/commafeed-client/src/locales/sk/messages.po
@@ -681,6 +681,10 @@ msgstr "Prihláste sa na odber kanála"
msgid "Success"
msgstr "Úspech"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Prepnúť na tmavú tému"
diff --git a/commafeed-client/src/locales/sv/messages.po b/commafeed-client/src/locales/sv/messages.po
index ba3a6797..41211a4c 100644
--- a/commafeed-client/src/locales/sv/messages.po
+++ b/commafeed-client/src/locales/sv/messages.po
@@ -681,6 +681,10 @@ msgstr "Prenumerera på flödet"
msgid "Success"
msgstr "Framgång"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Byt till mörkt tema"
diff --git a/commafeed-client/src/locales/tr/messages.po b/commafeed-client/src/locales/tr/messages.po
index 94c2ffea..b1e6beed 100644
--- a/commafeed-client/src/locales/tr/messages.po
+++ b/commafeed-client/src/locales/tr/messages.po
@@ -681,6 +681,10 @@ msgstr "beslemeye abone olun"
msgid "Success"
msgstr "Başarı"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "Karanlık temaya geç"
diff --git a/commafeed-client/src/locales/zh/messages.po b/commafeed-client/src/locales/zh/messages.po
index 346dd81f..9fee4477 100644
--- a/commafeed-client/src/locales/zh/messages.po
+++ b/commafeed-client/src/locales/zh/messages.po
@@ -681,6 +681,10 @@ msgstr "订阅订阅源"
msgid "Success"
msgstr "成功"
+#: src/components/KeyboardShortcutsHelp.tsx
+msgid "Swipe header to the right"
+msgstr ""
+
#: src/components/header/ProfileMenu.tsx
msgid "Switch to dark theme"
msgstr "切换到深色主题"