Skip to content

Commit 446b409

Browse files
authored
Merge pull request #334 from pawelmalak/feature
Version 2.3.0
2 parents baac780 + 2b5b349 commit 446b409

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1309
-222
lines changed

.dev/build_dev.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker build -t flame:dev -f .docker/Dockerfile .

.dev/build_latest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
docker build -t pawelmalak/flame -t "pawelmalak/flame:$1" -f .docker/Dockerfile "$2" \
1+
docker build -t pawelmalak/flame -t "pawelmalak/flame:$1" -f .docker/Dockerfile . \
22
&& docker push pawelmalak/flame && docker push "pawelmalak/flame:$1"

.dev/build_multiarch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ docker buildx build \
33
-f .docker/Dockerfile.multiarch \
44
-t pawelmalak/flame:multiarch \
55
-t "pawelmalak/flame:multiarch$1" \
6-
--push "$2"
6+
--push .

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PORT=5005
22
NODE_ENV=development
3-
VERSION=2.2.2
3+
VERSION=2.3.0
44
PASSWORD=flame_password
55
SECRET=e02eb43d69953658c6d07311d6313f2d4467672cb881f96b29368ba1f3f4da4b

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
### v2.3.0 (2022-03-25)
2+
- Added custom theme editor ([#246](https://github.com/pawelmalak/flame/issues/246))
3+
- Added option to set secondary search provider ([#295](https://github.com/pawelmalak/flame/issues/295))
4+
- Fixed bug where pressing Enter with empty search bar would redirect to search results ([#325](https://github.com/pawelmalak/flame/issues/325))
5+
- Fixed bug where user could create empty app or bookmark which was causing page to go blank ([#332](https://github.com/pawelmalak/flame/issues/332))
6+
- Added new theme: Mint
7+
18
### v2.2.2 (2022-03-21)
29
- Added option to get user location directly from the app ([#287](https://github.com/pawelmalak/flame/issues/287))
310
- Fixed bug with local search not working when using prefix ([#289](https://github.com/pawelmalak/flame/issues/289))

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Flame is self-hosted startpage for your server. Its design is inspired (heavily)
1111
- 📌 Pin your favourite items to the homescreen for quick and easy access
1212
- 🔍 Integrated search bar with local filtering, 11 web search providers and ability to add your own
1313
- 🔑 Authentication system to protect your settings, apps and bookmarks
14-
- 🔨 Dozens of options to customize Flame interface to your needs, including support for custom CSS and 15 built-in color themes
14+
- 🔨 Dozens of options to customize Flame interface to your needs, including support for custom CSS, 15 built-in color themes and custom theme builder
1515
- ☀️ Weather widget with current temperature, cloud coverage and animated weather status
1616
- 🐳 Docker integration to automatically pick and add apps based on their labels
1717

api.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ api.use('/api/categories', require('./routes/category'));
2222
api.use('/api/bookmarks', require('./routes/bookmark'));
2323
api.use('/api/queries', require('./routes/queries'));
2424
api.use('/api/auth', require('./routes/auth'));
25+
api.use('/api/themes', require('./routes/themes'));
2526

2627
// Custom error handler
2728
api.use(errorHandler);

client/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
REACT_APP_VERSION=2.2.2
1+
REACT_APP_VERSION=2.3.0

client/src/App.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { actionCreators, store } from './store';
1010
import { State } from './store/reducers';
1111

1212
// Utils
13-
import { checkVersion, decodeToken } from './utility';
13+
import { checkVersion, decodeToken, parsePABToTheme } from './utility';
1414

1515
// Routes
1616
import { Home } from './components/Home/Home';
@@ -31,7 +31,7 @@ export const App = (): JSX.Element => {
3131
const { config, loading } = useSelector((state: State) => state.config);
3232

3333
const dispath = useDispatch();
34-
const { fetchQueries, setTheme, logout, createNotification } =
34+
const { fetchQueries, setTheme, logout, createNotification, fetchThemes } =
3535
bindActionCreators(actionCreators, dispath);
3636

3737
useEffect(() => {
@@ -51,9 +51,12 @@ export const App = (): JSX.Element => {
5151
}
5252
}, 1000);
5353

54+
// load themes
55+
fetchThemes();
56+
5457
// set user theme if present
5558
if (localStorage.theme) {
56-
setTheme(localStorage.theme);
59+
setTheme(parsePABToTheme(localStorage.theme));
5760
}
5861

5962
// check for updated
@@ -68,7 +71,7 @@ export const App = (): JSX.Element => {
6871
// If there is no user theme, set the default one
6972
useEffect(() => {
7073
if (!loading && !localStorage.theme) {
71-
setTheme(config.defaultTheme, false);
74+
setTheme(parsePABToTheme(config.defaultTheme), false);
7275
}
7376
}, [loading]);
7477

client/src/components/Apps/AppForm/AppForm.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ export const AppForm = ({ modalHandler }: Props): JSX.Element => {
1818
const { appInUpdate } = useSelector((state: State) => state.apps);
1919

2020
const dispatch = useDispatch();
21-
const { addApp, updateApp, setEditApp } = bindActionCreators(
22-
actionCreators,
23-
dispatch
24-
);
21+
const { addApp, updateApp, setEditApp, createNotification } =
22+
bindActionCreators(actionCreators, dispatch);
2523

2624
const [useCustomIcon, toggleUseCustomIcon] = useState<boolean>(false);
2725
const [customIcon, setCustomIcon] = useState<File | null>(null);
@@ -58,6 +56,17 @@ export const AppForm = ({ modalHandler }: Props): JSX.Element => {
5856
const formSubmitHandler = (e: SyntheticEvent<HTMLFormElement>): void => {
5957
e.preventDefault();
6058

59+
for (let field of ['name', 'url', 'icon'] as const) {
60+
if (/^ +$/.test(formData[field])) {
61+
createNotification({
62+
title: 'Error',
63+
message: `Field cannot be empty: ${field}`,
64+
});
65+
66+
return;
67+
}
68+
}
69+
6170
const createFormData = (): FormData => {
6271
const data = new FormData();
6372

0 commit comments

Comments
 (0)