Compare commits

..

11 Commits
3.1.0 ... 3.2.0

Author SHA1 Message Date
Athou
b8e254dab6 release 3.2.0 2023-05-05 11:04:41 +02:00
Athou
4059160d90 update changelog 2023-05-05 11:04:04 +02:00
Athou
e0f242fe22 add welcome page 2023-05-05 09:55:53 +02:00
Athou
05453364ff only apply hover effect for unread entries (same as commafeed v2) 2023-05-05 09:36:23 +02:00
Athou
c3aedd935d move notifications out of the way (#1054) 2023-05-05 09:36:23 +02:00
Athou
99a7f72448 use https for sharing urls 2023-05-04 13:04:30 +02:00
Athou
56ae1eadbc enable redis connections with ACLs 2023-05-04 09:12:02 +02:00
Athou
4828c03bbf restore google analytics feature 2023-05-03 20:49:28 +02:00
Athou
cfc07764b4 extract changelog entry when creating a release 2023-05-02 12:05:20 +02:00
Athou
91938cc3b9 create GitHub release after Docker image has been published 2023-05-01 18:37:18 +02:00
Athou
c62a84a9ea update dependency groups that were moved 2023-05-01 18:34:05 +02:00
48 changed files with 2232 additions and 8434 deletions

View File

@@ -40,19 +40,7 @@ jobs:
name: commafeed.jar
path: commafeed-server/target/commafeed.jar
- name: Create release
uses: softprops/action-gh-release@v1
if: ${{ matrix.java == '8' && github.ref_type == 'tag' }}
with:
name: CommaFeed ${{ github.ref_name }}
body: See changelog at https://github.com/Athou/commafeed/blob/master/CHANGELOG.md
draft: false
prerelease: false
files: |
commafeed-server/target/commafeed.jar
commafeed-server/config.yml.example
# Docker
# Docker
- name: Login to Container Registry
uses: docker/login-action@v2
if: ${{ matrix.java == '8' }}
@@ -79,3 +67,23 @@ jobs:
push: true
platforms: linux/amd64,linux/arm/v7
tags: athou/commafeed:master
# Create GitHub release after Docker image has been published
- name: Extract Changelog Entry
uses: mindsers/changelog-reader-action@v2
if: ${{ matrix.java == '8' && github.ref_type == 'tag' }}
id: changelog_reader
with:
version: ${{ github.ref_name }}
- name: Create GitHub release
uses: softprops/action-gh-release@v1
if: ${{ matrix.java == '8' && github.ref_type == 'tag' }}
with:
name: CommaFeed ${{ github.ref_name }}
body: ${{ steps.changelog_reader.outputs.changes }}
draft: false
prerelease: false
files: |
commafeed-server/target/commafeed.jar
commafeed-server/config.yml.example

View File

@@ -1,8 +1,15 @@
Changelog
=========
# Changelog
3.1.0
-----
## [3.2.0]
- restore the welcome page
- only apply hover effect for unread entries (same as commafeed v2)
- move notifications at the bottom of the screen
- always use https for sharing urls
- add support for redis ACLs
- transition to google analytics v4
## [3.1.0]
- add an even more compact layout
- restore hover effect from commafeed 2.x
@@ -11,8 +18,7 @@ Changelog
- fix for the "Illegal attempt to associate a collection with two open sessions." error
- feed fetching workflow is now orchestrated with rxjava, removing a lot of code
3.0.1
-----
## [3.0.1]
- allow env variable substitution in config.yml
- e.g. having a custom config.yml file with `app.session.path=${SOME_ENV_VAR}` will substitute `SOME_ENV_VAR` with
@@ -20,16 +26,14 @@ Changelog
- allow env variable prefixed with `CF_` to override config.yml properties
- e.g. setting `CF_APP_ALLOWREGISTRATIONS=true` will set `app.allowRegistrations` to `true`
3.0.0
-----
## [3.0.0]
- complete overhaul of the UI
- backend and frontend are now in separate maven modules
- no changes to the api or the database
- Docker images are now automatically built and available at https://hub.docker.com/r/athou/commafeed
2.6.0
-----
## [2.6.0]
- add support for media content as a backup for missing content (useful for youtube feeds)
- correctly follow http error code 308 redirects
@@ -48,8 +52,7 @@ Changelog
- add support for java17+ runtime
- various security improvements
2.5.0
-----
## [2.5.0]
- unread count is now displayed in a favicon badge when supported
- the user agent string for the bot fetching feeds is now configurable
@@ -57,8 +60,7 @@ Changelog
- support for java9+ runtime
- can now properly start from an empty postgresql database
2.4.0
-----
## [2.4.0]
- users were not able to change password or delete account
- fix api key generation
@@ -69,16 +71,14 @@ Changelog
- various internationalization fixes
- security fixes
2.3.0
-----
## [2.3.0]
- dropwizard upgrade 0.9.1
- feed enclosures are hidden if they already displayed in the content
- fix youtube favicons
- various internationalization fixes
2.2.0
-----
## [2.2.0]
- fix youtube and instagram favicon fetching
- mark as read filter was lost when a feed was rearranged with drag&drop
@@ -86,8 +86,7 @@ Changelog
- various performance and dependencies upgrades
- java8 is now required
2.1.0
-----
## [2.1.0]
- dropwizard upgrade to 0.8.0
- you have to remove the "app.contextPath" setting from your yml file, you can optionally use
@@ -99,16 +98,14 @@ Changelog
- facebook feeds now show user favicon instead of facebook favicon
- new dark theme 'nightsky'
2.0.3
-----
## [2.0.3]
- internet explorer ajax cache workaround
- categories are now deletable again
- openshift support is back
- youtube feeds now show user favicon instead of youtube favicon
2.0.2
-----
## [2.0.2]
- api using the api key is now working again
- context path is now configurable in config.yml (see app.contextPath in config.yml.example)
@@ -124,13 +121,11 @@ Changelog
- added link to metrics on the admin settings page
- Rome (rss library) upgrade to 1.5.0
2.0.1
-----
## [2.0.1]
- the redis pool no longer throws an exception when it is unable to aquire a new connection
2.0.0
-----
## [2.0.0]
- The backend has been completely rewritten using Dropwizard instead of TomEE, resulting in a lot less memory
consumption and better overall performances.

File diff suppressed because it is too large Load Diff

View File

@@ -40,6 +40,7 @@
"react-async-hook": "^4.0.0",
"react-contexify": "^6.0.0",
"react-dom": "^18.2.0",
"react-ga4": "^2.1.0",
"react-icons": "^4.7.1",
"react-infinite-scroller": "^1.2.6",
"react-redux": "^8.0.5",

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.commafeed</groupId>
<artifactId>commafeed</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</parent>
<artifactId>commafeed-client</artifactId>
<name>CommaFeed Client</name>

View File

@@ -2,7 +2,6 @@ import { i18n } from "@lingui/core"
import { I18nProvider } from "@lingui/react"
import { ColorScheme, ColorSchemeProvider, MantineProvider } from "@mantine/core"
import { useColorScheme } from "@mantine/hooks"
import useLocalStorage from "use-local-storage"
import { ModalsProvider } from "@mantine/modals"
import { NotificationsProvider } from "@mantine/notifications"
import { Constants } from "app/constants"
@@ -28,8 +27,11 @@ import { LoginPage } from "pages/auth/LoginPage"
import { PasswordRecoveryPage } from "pages/auth/PasswordRecoveryPage"
import { RegistrationPage } from "pages/auth/RegistrationPage"
import React, { useEffect } from "react"
import { HashRouter, Navigate, Route, Routes, useNavigate } from "react-router-dom"
import ReactGA from "react-ga4"
import { HashRouter, Navigate, Route, Routes, useLocation, useNavigate } from "react-router-dom"
import Tinycon from "tinycon"
import useLocalStorage from "use-local-storage"
import { WelcomePage } from "./pages/WelcomePage"
function Providers(props: { children: React.ReactNode }) {
const preferredColorScheme = useColorScheme()
@@ -49,7 +51,7 @@ function Providers(props: { children: React.ReactNode }) {
}}
>
<ModalsProvider>
<NotificationsProvider position="top-center" zIndex={9999}>
<NotificationsProvider position="bottom-right" zIndex={9999}>
<ErrorBoundary>{props.children}</ErrorBoundary>
</NotificationsProvider>
</ModalsProvider>
@@ -66,6 +68,7 @@ function AppRoutes() {
return (
<Routes>
<Route path="/" element={<Navigate to={`/app/category/${Constants.categories.all.id}`} replace />} />
<Route path="welcome" element={<WelcomePage />} />
<Route path="login" element={<LoginPage />} />
<Route path="register" element={<RegistrationPage />} />
<Route path="passwordRecovery" element={<PasswordRecoveryPage />} />
@@ -111,6 +114,21 @@ function RedirectHandler() {
return null
}
function GoogleAnalyticsHandler() {
const location = useLocation()
const googleAnalyticsCode = useAppSelector(state => state.server.serverInfos?.googleAnalyticsCode)
useEffect(() => {
if (googleAnalyticsCode) ReactGA.initialize(googleAnalyticsCode)
}, [googleAnalyticsCode])
useEffect(() => {
ReactGA.send({ hitType: "pageview", page: location.pathname })
}, [location])
return null
}
function FaviconHandler() {
const root = useAppSelector(state => state.tree.rootCategory)
useEffect(() => {
@@ -135,6 +153,7 @@ export function App() {
<>
<FaviconHandler />
<HashRouter>
<GoogleAnalyticsHandler />
<RedirectHandler />
<AppRoutes />
</HashRouter>

View File

@@ -30,7 +30,9 @@ const axiosInstance = axios.create({ baseURL: "./rest", withCredentials: true })
axiosInstance.interceptors.response.use(
response => response,
error => {
if (error.response.status === 401) window.location.hash = "/login"
if (error.response.status === 401 && error.response.data === "Credentials are required to access this resource.") {
window.location.hash = "/welcome"
}
throw error
}
)

View File

@@ -54,13 +54,13 @@ const sharing: {
label: "Twitter",
icon: SiTwitter,
color: "#1D9BF0",
url: (url, desc) => `http://twitter.com/share?text=${desc}&url=${url}`,
url: (url, desc) => `https://twitter.com/share?text=${desc}&url=${url}`,
},
tumblr: {
label: "Tumblr",
icon: SiTumblr,
color: "#375672",
url: (url, desc) => `http://www.tumblr.com/share/link?url=${url}&name=${desc}`,
url: (url, desc) => `https://www.tumblr.com/share/link?url=${url}&name=${desc}`,
},
pocket: {
label: "Pocket",

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

View File

@@ -1,12 +1,15 @@
import { ActionIcon, Button, useMantineTheme } from "@mantine/core"
import { ActionIcon, Button, ButtonVariant, useMantineTheme } from "@mantine/core"
import { ActionIconVariant } from "@mantine/core/lib/ActionIcon/ActionIcon.styles"
import { useMediaQuery } from "@mantine/hooks"
import { forwardRef } from "react"
import { forwardRef, MouseEventHandler, ReactNode } from "react"
interface ActionButtonProps {
className?: string
icon?: React.ReactNode
icon?: ReactNode
label?: string
onClick?: React.MouseEventHandler
onClick?: MouseEventHandler
variant?: ActionIconVariant & ButtonVariant
showLabelOnMobile?: boolean
}
/**
@@ -14,13 +17,15 @@ interface ActionButtonProps {
*/
export const ActionButton = forwardRef<HTMLButtonElement, ActionButtonProps>((props: ActionButtonProps, ref) => {
const theme = useMantineTheme()
const variant = props.variant ?? "subtle"
const mobile = !useMediaQuery(`(min-width: ${theme.breakpoints.lg}px)`)
return mobile ? (
<ActionIcon ref={ref} color={theme.primaryColor} variant="subtle" className={props.className} onClick={props.onClick}>
const iconOnly = !props.showLabelOnMobile && (mobile || !props.label)
return iconOnly ? (
<ActionIcon ref={ref} color={theme.primaryColor} variant={variant} className={props.className} onClick={props.onClick}>
{props.icon}
</ActionIcon>
) : (
<Button ref={ref} variant="subtle" size="xs" className={props.className} leftIcon={props.icon} onClick={props.onClick}>
<Button ref={ref} variant={variant} size="xs" className={props.className} leftIcon={props.icon} onClick={props.onClick}>
{props.label}
</Button>
)

View File

@@ -1,17 +1,17 @@
import { Anchor, Box, createStyles, Divider, Paper } from "@mantine/core"
import { MantineNumberSize } from "@mantine/styles"
import { Constants } from "app/constants"
import { markEntry } from "app/slices/entries"
import { useAppDispatch } from "app/store"
import { Entry, ViewMode } from "app/types"
import React from "react"
import { useSwipeable } from "react-swipeable"
import { MantineNumberSize } from "@mantine/styles"
import { useViewMode } from "../../hooks/useViewMode"
import { FeedEntryBody } from "./FeedEntryBody"
import { FeedEntryCompactHeader } from "./FeedEntryCompactHeader"
import { FeedEntryContextMenu, useFeedEntryContextMenu } from "./FeedEntryContextMenu"
import { FeedEntryFooter } from "./FeedEntryFooter"
import { FeedEntryHeader } from "./FeedEntryHeader"
import { useViewMode } from "../../hooks/useViewMode"
interface FeedEntryProps {
entry: Entry
@@ -34,7 +34,7 @@ const useStyles = createStyles((theme, props: FeedEntryProps & { viewMode?: View
else if (props.viewMode === "cozy") mobileMarginY = 4
let backgroundHoverColor = backgroundColor
if (!props.expanded) {
if (!props.expanded && !props.entry.read) {
backgroundHoverColor = theme.colorScheme === "dark" ? theme.colors.dark[6] : theme.colors.gray[1]
}

View File

@@ -414,6 +414,7 @@ msgstr "تحميل العلامات ..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "تسجيل الدخول"
@@ -689,6 +690,7 @@ msgstr "إظهار تعليمات اختصار لوحة المفاتيح"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "قم بالتسجيل"
@@ -761,6 +763,10 @@ msgstr "تبديل قراءة حالة الإدخال الحالي"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "جرب CommaFeed باستخدام الحساب التجريبي: تجريبي / تجريبي"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "غير مقروءة"

View File

@@ -414,6 +414,7 @@ msgstr "Carregant les etiquetes..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Inicia sessió"
@@ -689,6 +690,7 @@ msgstr "Mostra l'ajuda de la drecera del teclat"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Inscriu-te"
@@ -761,6 +763,10 @@ msgstr "Canvia l'estat de lectura de l'entrada actual"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Proveu CommaFeed amb el compte de demostració: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Sense llegir"

View File

@@ -414,6 +414,7 @@ msgstr "Načítání značek..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Přihlaste se"
@@ -689,6 +690,7 @@ msgstr "Zobrazit nápovědu ke klávesovým zkratkám"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Zaregistrujte se"
@@ -761,6 +763,10 @@ msgstr "Přepne stav čtení aktuálního záznamu"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Vyzkoušejte CommaFeed s demo účtem: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Nepřečteno"

View File

@@ -414,6 +414,7 @@ msgstr "Wrthi'n llwytho tagiau..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Mewngofnodi"
@@ -689,6 +690,7 @@ msgstr "Dangos cymorth llwybr byr bysellfwrdd"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Cofrestrwch"
@@ -761,6 +763,10 @@ msgstr "Toglo statws darllen y cofnod cyfredol"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Rhowch gynnig ar CommaFeed gyda'r cyfrif demo: demo / demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Heb ei ddarllen"

View File

@@ -414,6 +414,7 @@ msgstr "Indlæser tags..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Log ind"
@@ -689,6 +690,7 @@ msgstr "Vis hjælp til tastaturgenveje"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Tilmeld dig"
@@ -761,6 +763,10 @@ msgstr "Skift læsestatus for den aktuelle post"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Prøv CommaFeed med demokontoen: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Ulæst"

View File

@@ -414,6 +414,7 @@ msgstr "Tags werden geladen..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Einloggen"
@@ -689,6 +690,7 @@ msgstr "Tastenkürzel-Hilfe anzeigen"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Melden Sie sich an"
@@ -761,6 +763,10 @@ msgstr "Lesestatus des aktuellen Eintrags umschalten"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Testen Sie CommaFeed mit dem Demokonto: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Ungelesen"

View File

@@ -414,6 +414,7 @@ msgstr "Loading tags..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Log in"
@@ -689,6 +690,7 @@ msgstr "Show keyboard shortcut help"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Sign up"
@@ -761,6 +763,10 @@ msgstr "Toggle read status of current entry"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Try out CommaFeed with the demo account: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr "Try the demo!"
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Unread"

View File

@@ -414,6 +414,7 @@ msgstr "Cargando etiquetas..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Iniciar sesión"
@@ -689,6 +690,7 @@ msgstr "Mostrar ayuda de atajo de teclado"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Registrarse"
@@ -761,6 +763,10 @@ msgstr "Alternar estado de lectura de la entrada actual"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Pruebe CommaFeed con la cuenta demo: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "No leído"

View File

@@ -414,6 +414,7 @@ msgstr "بارگیری برچسب ها..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "وارد شوید"
@@ -689,6 +690,7 @@ msgstr "نمایش راهنمایی میانبر صفحه کلید"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "ثبت نام کنید"
@@ -761,6 +763,10 @@ msgstr "وضعیت خواندن ورودی فعلی را تغییر دهید"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "CommaFeed را با حساب آزمایشی امتحان کنید: دمو/دمو"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "خوانده نشده"

View File

@@ -414,6 +414,7 @@ msgstr "Ladataan tunnisteita..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Kirjaudu sisään"
@@ -689,6 +690,7 @@ msgstr "Näytä pikanäppäimen ohje"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Rekisteröidy"
@@ -761,6 +763,10 @@ msgstr "Vaihda nykyisen merkinnän lukutila"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Kokeile CommaFeediä demotilillä: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Lukematon"

View File

@@ -414,6 +414,7 @@ msgstr "Chargement des tags ..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Connexion"
@@ -689,6 +690,7 @@ msgstr "Montrer les raccourcis clavier"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Créer un compte"
@@ -761,6 +763,10 @@ msgstr "Marquer l'entrée actuelle comme lue/non lue"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Essayez CommaFeed avec le compte de démonstration : demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Non lu"

View File

@@ -414,6 +414,7 @@ msgstr "Cargando etiquetas..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Iniciar sesión"
@@ -689,6 +690,7 @@ msgstr "Mostrar axuda do atallo do teclado"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Rexístrese"
@@ -761,6 +763,10 @@ msgstr "alternar o estado de lectura da entrada actual"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Proba CommaFeed coa conta de demostración: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Sen ler"

View File

@@ -414,6 +414,7 @@ msgstr "Címkék betöltése..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Jelentkezzen be"
@@ -689,6 +690,7 @@ msgstr "A billentyűparancsok súgójának megjelenítése"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Regisztráljon"
@@ -761,6 +763,10 @@ msgstr "Az aktuális bejegyzés olvasási állapotának váltása"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Próbálja ki a CommaFeed-et a demo fiókkal: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Olvasatlan"

View File

@@ -414,6 +414,7 @@ msgstr "Memuat tag..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Masuk"
@@ -689,6 +690,7 @@ msgstr "Tampilkan bantuan pintasan keyboard"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Daftar"
@@ -761,6 +763,10 @@ msgstr "Beralih status baca entri saat ini"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Cobalah CommaFeed dengan akun demo: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Belum Dibaca"

View File

@@ -414,6 +414,7 @@ msgstr "Caricamento tag..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Accedi"
@@ -689,6 +690,7 @@ msgstr "Mostra la guida alle scorciatoie da tastiera"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Iscriviti"
@@ -761,6 +763,10 @@ msgstr "Commuta lo stato di lettura della voce corrente"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Prova CommaFeed con il conto demo: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Non letto"

View File

@@ -414,6 +414,7 @@ msgstr "タグを読み込んでいます..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "ログイン"
@@ -689,6 +690,7 @@ msgstr "キーボード ショートカットのヘルプを表示"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "サインアップ"
@@ -761,6 +763,10 @@ msgstr "現在のエントリの読み取りステータスを切り替えます
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "デモアカウントで CommaFeed を試す: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "未読"

View File

@@ -414,6 +414,7 @@ msgstr "태그 로드 중..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "로그인"
@@ -689,6 +690,7 @@ msgstr "키보드 단축키 도움말 표시"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "가입"
@@ -761,6 +763,10 @@ msgstr "현재 항목의 읽기 상태 전환"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "데모 계정으로 CommaFeed를 사용해 보세요: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "읽지 않음"

View File

@@ -414,6 +414,7 @@ msgstr "Memuatkan tag..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Log masuk"
@@ -689,6 +690,7 @@ msgstr "Tunjukkan bantuan pintasan papan kekunci"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Daftar"
@@ -761,6 +763,10 @@ msgstr "Togol status bacaan entri semasa"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Cuba CommaFeed dengan akaun demo: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Belum dibaca"

View File

@@ -414,6 +414,7 @@ msgstr "Laster tagger..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Logg inn"
@@ -689,6 +690,7 @@ msgstr "Vis hurtigtasthjelp"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Meld deg på"
@@ -761,6 +763,10 @@ msgstr "Veksle lesestatus for gjeldende oppføring"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Prøv CommaFeed med demokontoen: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Ulest"

View File

@@ -414,6 +414,7 @@ msgstr "Tags laden..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Inloggen"
@@ -689,6 +690,7 @@ msgstr "Toon hulp bij sneltoetsen"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Aanmelden"
@@ -761,6 +763,10 @@ msgstr "Toggle leesstatus van huidige invoer"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Probeer CommaFeed uit met het demo-account: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Ongelezen"

View File

@@ -414,6 +414,7 @@ msgstr "Laster tagger..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Logg inn"
@@ -689,6 +690,7 @@ msgstr "Vis hurtigtasthjelp"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Meld deg på"
@@ -761,6 +763,10 @@ msgstr "Veksle lesestatus for gjeldende oppføring"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Prøv CommaFeed med demokontoen: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Ulest"

View File

@@ -414,6 +414,7 @@ msgstr "Ładowanie tagów..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Zaloguj się"
@@ -689,6 +690,7 @@ msgstr "Pokaż pomoc dotyczącą skrótów klawiaturowych"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Zarejestruj się"
@@ -761,6 +763,10 @@ msgstr "Przełącz stan odczytu bieżącego wpisu"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Wypróbuj CommaFeed z kontem demo: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Nieprzeczytane"

View File

@@ -414,6 +414,7 @@ msgstr "Carregando tags..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Entrar"
@@ -689,6 +690,7 @@ msgstr "Mostrar ajuda de atalho de teclado"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Inscreva-se"
@@ -761,6 +763,10 @@ msgstr "Alternar o status de leitura da entrada atual"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Experimente o CommaFeed com a conta demo: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Não lido"

View File

@@ -414,6 +414,7 @@ msgstr "Загрузка тегов..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Войти"
@@ -689,6 +690,7 @@ msgstr "Показать справку по сочетаниям клавиш."
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Зарегистрироваться"
@@ -761,6 +763,10 @@ msgstr "Переключить статус чтения текущей запи
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Попробуйте CommaFeed на демо-счете: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "непрочитано"

View File

@@ -414,6 +414,7 @@ msgstr "Načítavam značky..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Prihláste sa"
@@ -689,6 +690,7 @@ msgstr "Zobraziť pomoc s klávesovými skratkami"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Zaregistrujte sa"
@@ -761,6 +763,10 @@ msgstr "Prepne stav čítania aktuálneho záznamu"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Vyskúšajte CommaFeed s demo účtom: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Neprečítané"

View File

@@ -414,6 +414,7 @@ msgstr "Laddar taggar..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Logga in"
@@ -689,6 +690,7 @@ msgstr "Visa kortkommandohjälp"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Anmäl dig"
@@ -761,6 +763,10 @@ msgstr "Växla lässtatus för aktuell post"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "Prova CommaFeed med demokontot: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Oläst"

View File

@@ -414,6 +414,7 @@ msgstr "Etiketler yükleniyor..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "Giriş"
@@ -689,6 +690,7 @@ msgstr "Klavye kısayolu yardımını göster"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "Kaydolun"
@@ -761,6 +763,10 @@ msgstr "Geçerli girişin okuma durumunu değiştir"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "CommaFeed'i demo hesabıyla deneyin: demo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "Okunmadı"

View File

@@ -414,6 +414,7 @@ msgstr "正在加载标签..."
#: src/pages/auth/LoginPage.tsx
#: src/pages/auth/LoginPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Log in"
msgstr "登录"
@@ -689,6 +690,7 @@ msgstr "显示键盘快捷键帮助"
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/auth/RegistrationPage.tsx
#: src/pages/WelcomePage.tsx
msgid "Sign up"
msgstr "注册"
@@ -761,6 +763,10 @@ msgstr "切换当前条目的读取状态"
msgid "Try out CommaFeed with the demo account: demo/demo"
msgstr "使用演示帐户试用 CommaFeeddemo/demo"
#: src/pages/WelcomePage.tsx
msgid "Try the demo!"
msgstr ""
#: src/components/header/Header.tsx
msgid "Unread"
msgstr "未读"

View File

@@ -0,0 +1,126 @@
import { t } from "@lingui/macro"
import { Anchor, Box, Center, Container, Divider, Group, Image, Title, useMantineColorScheme } from "@mantine/core"
import { useMediaQuery } from "@mantine/hooks"
import welcome_page_dark from "assets/welcome_page_dark.png"
import welcome_page_light from "assets/welcome_page_light.png"
import { useAsyncCallback } from "react-async-hook"
import { SiGithub, TbKey, TbUserPlus } from "react-icons/all"
import { SiTwitter } from "react-icons/si"
import { TbClock, TbMoon, TbSun } from "react-icons/tb"
import { client } from "../app/client"
import { Constants } from "../app/constants"
import { redirectToLogin, redirectToRegistration, redirectToRootCategory } from "../app/slices/redirect"
import { useAppDispatch, useAppSelector } from "../app/store"
import { ActionButton } from "../components/ActionButtton"
import { ButtonToolbar } from "../components/ButtonToolbar"
import { PageTitle } from "./PageTitle"
export function WelcomePage() {
const { colorScheme } = useMantineColorScheme()
const image = colorScheme === "light" ? welcome_page_light : welcome_page_dark
return (
<Container>
<Header />
<Center my="xl">
<Title order={3}>Bloat-free feed reader</Title>
</Center>
<Divider my="xl" />
<Image src={image} />
<Divider my="xl" />
<Footer />
</Container>
)
}
function Header() {
const mobile = !useMediaQuery(`(min-width: ${Constants.layout.mobileBreakpoint}px)`)
if (mobile) {
return (
<>
<PageTitle />
<Center>
<Buttons />
</Center>
</>
)
}
return (
<Group position="apart">
<PageTitle />
<Buttons />
</Group>
)
}
function Buttons() {
const iconSize = 18
const serverInfos = useAppSelector(state => state.server.serverInfos)
const { colorScheme, toggleColorScheme } = useMantineColorScheme()
const dispatch = useAppDispatch()
const login = useAsyncCallback(client.user.login, {
onSuccess: () => {
dispatch(redirectToRootCategory())
},
})
return (
<ButtonToolbar>
{serverInfos?.demoAccountEnabled && (
<ActionButton
label={t`Try the demo!`}
icon={<TbClock size={iconSize} />}
variant="outline"
onClick={() => login.execute({ name: "demo", password: "demo" })}
showLabelOnMobile
/>
)}
<ActionButton
label={t`Log in`}
icon={<TbKey size={iconSize} />}
variant="outline"
onClick={() => dispatch(redirectToLogin())}
showLabelOnMobile
/>
{serverInfos?.allowRegistrations && (
<ActionButton
label={t`Sign up`}
icon={<TbUserPlus size={iconSize} />}
variant="filled"
onClick={() => dispatch(redirectToRegistration())}
showLabelOnMobile
/>
)}
<ActionButton
icon={colorScheme === "dark" ? <TbSun size={18} /> : <TbMoon size={iconSize} />}
onClick={() => toggleColorScheme()}
/>
</ButtonToolbar>
)
}
function Footer() {
return (
<Box>
<Group>
<span>© CommaFeed</span>
<span> - </span>
<Anchor variant="text" href="https://github.com/Athou/commafeed/" target="_blank" rel="noreferrer">
<SiGithub />
</Anchor>
<Anchor variant="text" href="https://twitter.com/CommaFeed" target="_blank" rel="noreferrer">
<SiTwitter />
</Anchor>
</Group>
</Box>
)
}

View File

@@ -125,6 +125,8 @@ logging:
redis:
host: localhost
port: 6379
# username is only required when using ACLs
username:
password:
timeout: 2000
database: 0

View File

@@ -130,6 +130,8 @@ logging:
redis:
host: localhost
port: 6379
# username is only required when using ACLs
username:
password:
timeout: 2000
database: 0

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.commafeed</groupId>
<artifactId>commafeed</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</parent>
<artifactId>commafeed-server</artifactId>
<name>CommaFeed Server</name>
@@ -114,7 +114,7 @@
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.commafeed.CommaFeedApplication</mainClass>
@@ -233,7 +233,7 @@
<dependency>
<groupId>com.commafeed</groupId>
<artifactId>commafeed-client</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</dependency>
<dependency>
@@ -387,7 +387,7 @@
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.7.2</version>
<version>4.3.2</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
@@ -437,7 +437,7 @@
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-servlet</artifactId>
<version>2.10.0</version>
</dependency>
@@ -458,8 +458,8 @@
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.0.33</version>
</dependency>
<dependency>

View File

@@ -1,27 +1,53 @@
package com.commafeed.backend.cache;
import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import redis.clients.jedis.DefaultJedisClientConfig;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.JedisClientConfig;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
import redis.clients.jedis.Protocol;
@Slf4j
@Getter
public class RedisPoolFactory {
private final String host = "localhost";
private final int port = Protocol.DEFAULT_PORT;
private String password;
private final int timeout = Protocol.DEFAULT_TIMEOUT;
private final int database = Protocol.DEFAULT_DATABASE;
private final int maxTotal = 500;
@JsonProperty
private String host = "localhost";
@JsonProperty
private int port = Protocol.DEFAULT_PORT;
@JsonProperty
private String username;
@JsonProperty
private String password;
@JsonProperty
private int timeout = Protocol.DEFAULT_TIMEOUT;
@JsonProperty
private int database = Protocol.DEFAULT_DATABASE;
@JsonProperty
private int maxTotal = 500;
public JedisPool build() {
JedisPoolConfig config = new JedisPoolConfig();
config.setMaxTotal(maxTotal);
JedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setMaxTotal(maxTotal);
return new JedisPool(config, host, port, timeout, StringUtils.trimToNull(password), database);
JedisClientConfig clientConfig = DefaultJedisClientConfig.builder()
.user(username)
.password(password)
.timeoutMillis(timeout)
.database(database)
.build();
return new JedisPool(poolConfig, new HostAndPort(host, port), clientConfig);
}
}

View File

@@ -15,12 +15,12 @@ import io.dropwizard.testing.junit5.DropwizardExtensionsSupport;
@ExtendWith(DropwizardExtensionsSupport.class)
class AuthentificationIT extends PlaywrightTestBase {
private static final DropwizardAppExtension<CommaFeedConfiguration> EXT = new DropwizardAppExtension<CommaFeedConfiguration>(
CommaFeedApplication.class, ResourceHelpers.resourceFilePath("config.test.yml"));
private static final DropwizardAppExtension<CommaFeedConfiguration> EXT = new DropwizardAppExtension<>(CommaFeedApplication.class,
ResourceHelpers.resourceFilePath("config.test.yml"));
@Test
void loginFail() {
page.navigate("http://localhost:" + EXT.getLocalPort());
page.navigate(getLoginPageUrl());
page.locator("[placeholder='User Name or E-mail']").fill("admin");
page.locator("[placeholder='Password']").fill("wrong_password");
page.locator("button:has-text('Log in')").click();
@@ -29,14 +29,14 @@ class AuthentificationIT extends PlaywrightTestBase {
@Test
void loginSuccess() {
page.navigate("http://localhost:" + EXT.getLocalPort());
page.navigate(getLoginPageUrl());
PlaywrightTestUtils.login(page);
PlaywrightAssertions.assertThat(page).hasURL("http://localhost:" + EXT.getLocalPort() + "/#/app/category/all");
}
@Test
void registerFailPasswordTooSimple() {
page.navigate("http://localhost:" + EXT.getLocalPort());
page.navigate(getLoginPageUrl());
page.locator("text=Sign up!").click();
page.locator("[placeholder='User Name']").fill("user");
page.locator("[placeholder='E-mail address']").fill("user@domain.com");
@@ -52,7 +52,7 @@ class AuthentificationIT extends PlaywrightTestBase {
@Test
void registerSuccess() {
page.navigate("http://localhost:" + EXT.getLocalPort());
page.navigate(getLoginPageUrl());
page.locator("text=Sign up!").click();
page.locator("[placeholder='User Name']").fill("user");
page.locator("[placeholder='E-mail address']").fill("user@domain.com");
@@ -60,4 +60,8 @@ class AuthentificationIT extends PlaywrightTestBase {
page.locator("button:has-text('Sign up')").click();
PlaywrightAssertions.assertThat(page).hasURL("http://localhost:" + EXT.getLocalPort() + "/#/app/category/all");
}
private String getLoginPageUrl() {
return "http://localhost:" + EXT.getLocalPort() + "/#/login";
}
}

View File

@@ -43,6 +43,7 @@ class ReadingIT extends PlaywrightTestBase {
void scenario() {
// login
page.navigate("http://localhost:" + EXT.getLocalPort());
page.locator("button:has-text('Log in')").click();
PlaywrightTestUtils.login(page);
PlaywrightAssertions.assertThat(page.locator("text=You don't have any subscriptions yet.")).hasCount(1);

View File

@@ -5,7 +5,7 @@
<groupId>com.commafeed</groupId>
<artifactId>commafeed</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<name>CommaFeed</name>
<packaging>pom</packaging>