feat(ui): add nsfw & watermark to linear ui

- add `addNSFWCheckerToGraph` and `addWatermarkerToGraph` functions
- use them in all linear graph creation
- add state & toggles to settings modal to enable these
- trigger queries for app config on socket connect
- disable the nsfw/watermark booleans if we get the app config and they are not available
This commit is contained in:
psychedelicious
2023-07-26 18:20:20 +10:00
parent 2c5b539d3a
commit db48f3230b
16 changed files with 378 additions and 236 deletions

View File

@ -8,6 +8,7 @@ export const appInfoApi = api.injectEndpoints({
url: `app/version`,
method: 'GET',
}),
providesTags: ['AppVersion'],
keepUnusedDataFor: 86400000, // 1 day
}),
getAppConfig: build.query<AppConfig, void>({
@ -15,6 +16,7 @@ export const appInfoApi = api.injectEndpoints({
url: `app/config`,
method: 'GET',
}),
providesTags: ['AppConfig'],
keepUnusedDataFor: 86400000, // 1 day
}),
}),