Added support for .ico files
This commit is contained in:
parent
089ace562a
commit
8941f8f2f4
6 changed files with 17 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
### v2.0.2 (TBA)
|
||||||
|
- Added support for .ico files for custom icons ([#209](https://github.com/pawelmalak/flame/issues/209))
|
||||||
|
- Added option to pin apps and categories directly from table view
|
||||||
|
|
||||||
|
|
||||||
### v2.0.1 (2021-11-19)
|
### 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 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))
|
- Added option to set default theme for all new users ([#165](https://github.com/pawelmalak/flame/issues/165))
|
||||||
|
|
|
@ -154,7 +154,7 @@ export const AppForm = ({ app, modalHandler }: Props): JSX.Element => {
|
||||||
id="icon"
|
id="icon"
|
||||||
required
|
required
|
||||||
onChange={(e) => fileChangeHandler(e)}
|
onChange={(e) => fileChangeHandler(e)}
|
||||||
accept=".jpg,.jpeg,.png,.svg"
|
accept=".jpg,.jpeg,.png,.svg,.ico"
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
@ -146,6 +146,7 @@ export const BookmarksForm = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ModalForm modalHandler={modalHandler} formHandler={formSubmitHandler}>
|
<ModalForm modalHandler={modalHandler} formHandler={formSubmitHandler}>
|
||||||
|
{/* NAME */}
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<label htmlFor="name">Bookmark Name</label>
|
<label htmlFor="name">Bookmark Name</label>
|
||||||
<input
|
<input
|
||||||
|
@ -159,6 +160,7 @@ export const BookmarksForm = ({
|
||||||
/>
|
/>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
|
|
||||||
|
{/* URL */}
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<label htmlFor="url">Bookmark URL</label>
|
<label htmlFor="url">Bookmark URL</label>
|
||||||
<input
|
<input
|
||||||
|
@ -172,6 +174,7 @@ export const BookmarksForm = ({
|
||||||
/>
|
/>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
|
|
||||||
|
{/* CATEGORY */}
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<label htmlFor="categoryId">Bookmark Category</label>
|
<label htmlFor="categoryId">Bookmark Category</label>
|
||||||
<select
|
<select
|
||||||
|
@ -192,6 +195,7 @@ export const BookmarksForm = ({
|
||||||
</select>
|
</select>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
|
|
||||||
|
{/* ICON */}
|
||||||
{!useCustomIcon ? (
|
{!useCustomIcon ? (
|
||||||
// mdi
|
// mdi
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
|
@ -227,7 +231,7 @@ export const BookmarksForm = ({
|
||||||
name="icon"
|
name="icon"
|
||||||
id="icon"
|
id="icon"
|
||||||
onChange={(e) => fileChangeHandler(e)}
|
onChange={(e) => fileChangeHandler(e)}
|
||||||
accept=".jpg,.jpeg,.png,.svg"
|
accept=".jpg,.jpeg,.png,.svg,.ico"
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
@ -241,6 +245,7 @@ export const BookmarksForm = ({
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* VISIBILTY */}
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<label htmlFor="isPublic">Bookmark visibility</label>
|
<label htmlFor="isPublic">Bookmark visibility</label>
|
||||||
<select
|
<select
|
||||||
|
|
|
@ -85,7 +85,9 @@ export const UISettings = (): JSX.Element => {
|
||||||
<SettingsHeadline text="Header" />
|
<SettingsHeadline text="Header" />
|
||||||
{/* HIDE HEADER */}
|
{/* HIDE HEADER */}
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<label htmlFor="hideHeader">Hide greetings</label>
|
<label htmlFor="hideHeader">
|
||||||
|
Hide headline (greetings and weather)
|
||||||
|
</label>
|
||||||
<select
|
<select
|
||||||
id="hideHeader"
|
id="hideHeader"
|
||||||
name="hideHeader"
|
name="hideHeader"
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const isUrl = (data: string): boolean => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const isImage = (data: string): boolean => {
|
export const isImage = (data: string): boolean => {
|
||||||
const regex = /.(jpeg|jpg|png)$/i;
|
const regex = /.(jpeg|jpg|png|ico)$/i;
|
||||||
|
|
||||||
return regex.test(data);
|
return regex.test(data);
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,7 +14,7 @@ const storage = multer.diskStorage({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const supportedTypes = ['jpg', 'jpeg', 'png', 'svg', 'svg+xml'];
|
const supportedTypes = ['jpg', 'jpeg', 'png', 'svg', 'svg+xml', 'x-icon'];
|
||||||
|
|
||||||
const fileFilter = (req, file, cb) => {
|
const fileFilter = (req, file, cb) => {
|
||||||
if (supportedTypes.includes(file.mimetype.split('/')[1])) {
|
if (supportedTypes.includes(file.mimetype.split('/')[1])) {
|
||||||
|
|
Loading…
Reference in a new issue