Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a default color for Media category #593

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/util/classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ export const defaultCategories: Category[] = [
{ name: ['Work', 'Video'], rule: { type: 'regex', regex: 'Kdenlive' } },
{ name: ['Work', 'Audio'], rule: { type: 'regex', regex: 'Audacity' } },
{ name: ['Work', '3D'], rule: { type: 'regex', regex: 'Blender' } },
{
name: ['Media'],
rule: { type: null },
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule type is set to null which is not a valid value according to the Rule interface definition. It should be either 'regex' or 'none'.

Suggested change
rule: { type: null },
rule: { type: 'none' },

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently there are several instances of null instead of 'none', not sure why these aren't caught in CI.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to chase them down and replace with 'none'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find any other instance of null used in the rules

Copy link
Member

@ErikBjare ErikBjare Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data: { color: '#F33' },
},
{
name: ['Media', 'Games'],
rule: { type: 'regex', regex: 'Minecraft|RimWorld' },
Expand Down
Loading