diff --git a/.docker/Dockerfile b/.docker/Dockerfile index a0e1488..701547e 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14 as builder +FROM node:16 as builder WORKDIR /app @@ -16,7 +16,7 @@ RUN mkdir -p ./public ./data \ && mv ./client/build/* ./public \ && rm -rf ./client -FROM node:14-alpine +FROM node:16-alpine COPY --from=builder /app /app diff --git a/.docker/Dockerfile.multiarch b/.docker/Dockerfile.multiarch index 6d4c34a..289308e 100644 --- a/.docker/Dockerfile.multiarch +++ b/.docker/Dockerfile.multiarch @@ -1,4 +1,4 @@ -FROM node:14-alpine3.11 as builder +FROM node:16-alpine3.11 as builder WORKDIR /app @@ -17,7 +17,7 @@ RUN mkdir -p ./public ./data \ && mv ./client/build/* ./public \ && rm -rf ./client -FROM node:14-alpine3.11 +FROM node:16-alpine3.11 COPY --from=builder /app /app diff --git a/.env b/.env index 9f1bd80..db3637d 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ PORT=5005 NODE_ENV=development -VERSION=2.0.1 +VERSION=2.1.0 PASSWORD=flame_password SECRET=e02eb43d69953658c6d07311d6313f2d4467672cb881f96b29368ba1f3f4da4b \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8543534..9d63c11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +### v2.1.1 (TBA) +- Changed some messages and buttons to make it easier to open bookmarks editor ([#239](https://github.com/pawelmalak/flame/issues/239)) + +### v2.1.0 (2021-11-26) +- Added option to set custom order for bookmarks ([#43](https://github.com/pawelmalak/flame/issues/43)) and ([#187](https://github.com/pawelmalak/flame/issues/187)) +- Added support for .ico files for custom icons ([#209](https://github.com/pawelmalak/flame/issues/209)) +- Empty apps and categories sections will now be hidden from guests ([#210](https://github.com/pawelmalak/flame/issues/210)) +- Fixed bug with fahrenheit degrees being displayed as float ([#221](https://github.com/pawelmalak/flame/issues/221)) +- Fixed bug with alphabetical order not working for bookmarks until the page was refreshed ([#224](https://github.com/pawelmalak/flame/issues/224)) +- Added option to change visibilty of apps, categories and bookmarks directly from table view +- Password input will now autofocus when visiting /settings/app + ### v2.0.1 (2021-11-19) - Added option to display humidity in the weather widget ([#136](https://github.com/pawelmalak/flame/issues/136)) - Added option to set default theme for all new users ([#165](https://github.com/pawelmalak/flame/issues/165)) diff --git a/client/.env b/client/.env index aac1ed1..d6fe0e5 100644 --- a/client/.env +++ b/client/.env @@ -1 +1 @@ -REACT_APP_VERSION=2.0.1 \ No newline at end of file +REACT_APP_VERSION=2.1.0 \ No newline at end of file diff --git a/client/src/components/Actions/TableActions.module.css b/client/src/components/Actions/TableActions.module.css new file mode 100644 index 0000000..69028a9 --- /dev/null +++ b/client/src/components/Actions/TableActions.module.css @@ -0,0 +1,12 @@ +.TableActions { + display: flex; + align-items: center; +} + +.TableAction { + width: 22px; +} + +.TableAction:hover { + cursor: pointer; +} diff --git a/client/src/components/Actions/TableActions.tsx b/client/src/components/Actions/TableActions.tsx new file mode 100644 index 0000000..6d9460c --- /dev/null +++ b/client/src/components/Actions/TableActions.tsx @@ -0,0 +1,81 @@ +import { Icon } from '../UI'; +import classes from './TableActions.module.css'; + +interface Entity { + id: number; + name: string; + isPinned?: boolean; + isPublic: boolean; +} + +interface Props { + entity: Entity; + deleteHandler: (id: number, name: string) => void; + updateHandler: (id: number) => void; + pinHanlder?: (id: number) => void; + changeVisibilty: (id: number) => void; + showPin?: boolean; +} + +export const TableActions = (props: Props): JSX.Element => { + const { + entity, + deleteHandler, + updateHandler, + pinHanlder, + changeVisibilty, + showPin = true, + } = props; + + const _pinHandler = pinHanlder || function () {}; + + return ( +
- No apps match your search criteria -
- ); - } else { - apps = ( -- There are no pinned applications. You can pin them from the{' '} - /applications menu -
- ); - } + if (props.searching || props.apps.length) { + if (!props.apps.length) { + apps =+
You can drag and drop single rows to reorder application
) : (- Custom order is disabled. You can change it in{' '} - settings + Custom order is disabled. You can change it in the{' '} + settings
)} -- No bookmarks match your search criteria -
- ); + if (categories.length) { + if (searching && !categories[0].bookmarks.length) { + bookmarks =
+
+
You can drag and drop single rows to reorder categories
- ) : ( -- Custom order is disabled. You can change it in{' '} - settings -
- )} -- {category.name} - | -- {category.isPublic ? 'Visible' : 'Hidden'} - | - {!snapshot.isDragging && ( -
-
- deleteCategoryHandler(category)
- }
- onKeyDown={(e) =>
- keyboardActionHandler(
- e,
- category,
- deleteCategoryHandler
- )
- }
- tabIndex={0}
- >
-
-
- props.updateHandler(category)
- }
- tabIndex={0}
- >
-
- pinCategory(category)}
- onKeyDown={(e) =>
- keyboardActionHandler(
- e,
- category,
- pinCategory
- )
- }
- tabIndex={0}
- >
- {category.isPinned ? (
-
- |
- )}
-
{bookmark.bookmark.name} | -{bookmark.bookmark.url} | -{bookmark.bookmark.icon} | -{bookmark.bookmark.isPublic ? 'Visible' : 'Hidden'} | -{bookmark.categoryName} | -
- deleteBookmarkHandler(bookmark.bookmark)}
- tabIndex={0}
- >
-
- props.updateHandler(bookmark.bookmark)}
- tabIndex={0}
- >
-
- |
-