Merge pull request #2497 from omnivore-app/feature/library
make library an internal label
This commit is contained in:
@ -9,7 +9,12 @@ import { getRepository } from '../entity/utils'
|
||||
import { CreateLabelInput } from '../generated/graphql'
|
||||
import { generateRandomColor } from '../utils/helpers'
|
||||
|
||||
const INTERNAL_LABELS_IN_LOWERCASE = ['newsletters', 'favorites', 'rss']
|
||||
const INTERNAL_LABELS_IN_LOWERCASE = [
|
||||
'newsletters',
|
||||
'favorites',
|
||||
'rss',
|
||||
'library',
|
||||
]
|
||||
|
||||
const isLabelInternal = (name: string): boolean => {
|
||||
return INTERNAL_LABELS_IN_LOWERCASE.includes(name.toLowerCase())
|
||||
|
||||
9
packages/db/migrations/0116.do.update_label_library_internal.sql
Executable file
9
packages/db/migrations/0116.do.update_label_library_internal.sql
Executable file
@ -0,0 +1,9 @@
|
||||
-- Type: DO
|
||||
-- Name: update_label_library_internal
|
||||
-- Description: Update labels table and change labels with name library to internal
|
||||
|
||||
BEGIN;
|
||||
|
||||
UPDATE omnivore.labels SET internal = true WHERE LOWER(name) = 'library';
|
||||
|
||||
COMMIT;
|
||||
9
packages/db/migrations/0116.undo.update_label_library_internal.sql
Executable file
9
packages/db/migrations/0116.undo.update_label_library_internal.sql
Executable file
@ -0,0 +1,9 @@
|
||||
-- Type: UNDO
|
||||
-- Name: update_label_library_internal
|
||||
-- Description: Update labels table and change labels with name library to internal
|
||||
|
||||
BEGIN;
|
||||
|
||||
UPDATE omnivore.labels SET internal = false WHERE LOWER(name) = 'library';
|
||||
|
||||
COMMIT;
|
||||
@ -91,7 +91,7 @@ function SavedSearches(props: LibraryFilterMenuProps): JSX.Element {
|
||||
},
|
||||
{
|
||||
name: 'Read Later',
|
||||
term: 'in:inbox -label:Newsletter',
|
||||
term: 'in:library',
|
||||
},
|
||||
{
|
||||
name: 'Highlights',
|
||||
|
||||
Reference in New Issue
Block a user