mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-06 20:43:13 +08:00
Split categories and bookmarks forms into separate files. Added visibility functionality to categories and bookmarks
This commit is contained in:
@@ -11,7 +11,7 @@ export const appTemplate: App = {
|
||||
...newAppTemplate,
|
||||
isPinned: false,
|
||||
orderId: 0,
|
||||
id: 0,
|
||||
id: -1,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
};
|
||||
|
||||
16
client/src/utility/templateObjects/bookmarkTemplate.ts
Normal file
16
client/src/utility/templateObjects/bookmarkTemplate.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Bookmark, NewBookmark } from '../../interfaces';
|
||||
|
||||
export const newBookmarkTemplate: NewBookmark = {
|
||||
name: '',
|
||||
url: '',
|
||||
categoryId: -1,
|
||||
icon: '',
|
||||
isPublic: true,
|
||||
};
|
||||
|
||||
export const bookmarkTemplate: Bookmark = {
|
||||
...newBookmarkTemplate,
|
||||
id: -1,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
};
|
||||
16
client/src/utility/templateObjects/categoryTemplate.ts
Normal file
16
client/src/utility/templateObjects/categoryTemplate.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Category, NewCategory } from '../../interfaces';
|
||||
|
||||
export const newCategoryTemplate: NewCategory = {
|
||||
name: '',
|
||||
isPublic: true,
|
||||
};
|
||||
|
||||
export const categoryTemplate: Category = {
|
||||
...newCategoryTemplate,
|
||||
id: -1,
|
||||
isPinned: false,
|
||||
orderId: 0,
|
||||
bookmarks: [],
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
};
|
||||
@@ -1,3 +1,5 @@
|
||||
export * from './configTemplate';
|
||||
export * from './settingsTemplate';
|
||||
export * from './appTemplate';
|
||||
export * from './categoryTemplate';
|
||||
export * from './bookmarkTemplate';
|
||||
|
||||
Reference in New Issue
Block a user