diff options
author | Eric Bailey <git@esb.lol> | 2023-11-21 10:57:34 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-21 10:57:34 -0600 |
commit | f18b9b32b0d296c8d19dc06956699f95c0af9be2 (patch) | |
tree | d0a9287debdaec187042f9d277fbfece6b8c411e /src/state/queries/preferences/const.ts | |
parent | 71b59021b9e2cea7241622ef7ae51fbd2bd687f9 (diff) | |
download | voidsky-f18b9b32b0d296c8d19dc06956699f95c0af9be2.tar.zst |
PWI Base (#1964)
* Base work for public view * Make default moderation settings more restrictive * Fix type * Handle showing sign-in on authed actions * Fix hoc logic * Simplify prefs logic * Remove duplicate method * Add todo * Clean up RepostButton.web * Fix x button color * Add todo * Retain existing label prefs for now, use separate logged out settings * Clean up useAuthedMethod, rename to useRequireAuth * Add todos * Move dismiss logic to withAuthRequired * Ooops add web * Block public view in prod * Add todo * Fix bad import
Diffstat (limited to 'src/state/queries/preferences/const.ts')
-rw-r--r-- | src/state/queries/preferences/const.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/state/queries/preferences/const.ts b/src/state/queries/preferences/const.ts index 5db137e58..b7f9206e8 100644 --- a/src/state/queries/preferences/const.ts +++ b/src/state/queries/preferences/const.ts @@ -2,6 +2,7 @@ import { UsePreferencesQueryResponse, ThreadViewPreferences, } from '#/state/queries/preferences/types' +import {DEFAULT_LOGGED_OUT_LABEL_PREFERENCES} from '#/state/queries/preferences/moderation' export const DEFAULT_HOME_FEED_PREFS: UsePreferencesQueryResponse['feedViewPrefs'] = { @@ -25,3 +26,26 @@ export const DEFAULT_PROD_FEEDS = { pinned: [DEFAULT_PROD_FEED_PREFIX('whats-hot')], saved: [DEFAULT_PROD_FEED_PREFIX('whats-hot')], } + +export const DEFAULT_LOGGED_OUT_PREFERENCES: UsePreferencesQueryResponse = { + birthDate: new Date('2022-11-17'), // TODO(pwi) + adultContentEnabled: false, + feeds: { + saved: [], + pinned: [], + unpinned: [], + }, + // labels are undefined until set by user + contentLabels: { + nsfw: DEFAULT_LOGGED_OUT_LABEL_PREFERENCES.nsfw, + nudity: DEFAULT_LOGGED_OUT_LABEL_PREFERENCES.nudity, + suggestive: DEFAULT_LOGGED_OUT_LABEL_PREFERENCES.suggestive, + gore: DEFAULT_LOGGED_OUT_LABEL_PREFERENCES.gore, + hate: DEFAULT_LOGGED_OUT_LABEL_PREFERENCES.hate, + spam: DEFAULT_LOGGED_OUT_LABEL_PREFERENCES.spam, + impersonation: DEFAULT_LOGGED_OUT_LABEL_PREFERENCES.impersonation, + }, + feedViewPrefs: DEFAULT_HOME_FEED_PREFS, + threadViewPrefs: DEFAULT_THREAD_VIEW_PREFS, + userAge: 13, // TODO(pwi) +} |