Merge pull request #2497 from omnivore-app/feature/library

make library an internal label
This commit is contained in:
Hongbo Wu
2023-07-18 15:40:18 +08:00
committed by GitHub
4 changed files with 25 additions and 2 deletions

View File

@ -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())

View 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;

View 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;

View File

@ -91,7 +91,7 @@ function SavedSearches(props: LibraryFilterMenuProps): JSX.Element {
},
{
name: 'Read Later',
term: 'in:inbox -label:Newsletter',
term: 'in:library',
},
{
name: 'Highlights',