WoT implemented, plus other fixes #160

Merged
freakoverse merged 36 commits from staging into master 2024-11-20 16:39:08 +00:00
2 changed files with 11 additions and 4 deletions
Showing only changes of commit ad197fdd62 - Show all commits

View File

@ -130,9 +130,9 @@ export const ModFilter = React.memo(
import.meta.env.VITE_REPORTING_NPUB import.meta.env.VITE_REPORTING_NPUB
const isOwnProfile = const isOwnProfile =
filterOptions.author && author &&
userState.auth && userState.auth &&
userState.user?.pubkey === filterOptions.author userState.user?.pubkey === author
if (!(isAdmin || isOwnProfile)) return null if (!(isAdmin || isOwnProfile)) return null
} }

View File

@ -1,8 +1,15 @@
import { FilterOptions, SortBy, NSFWFilter, ModeratedFilter } from 'types' import {
FilterOptions,
SortBy,
NSFWFilter,
ModeratedFilter,
WOTFilterOptions
} from 'types'
export const DEFAULT_FILTER_OPTIONS: FilterOptions = { export const DEFAULT_FILTER_OPTIONS: FilterOptions = {
sort: SortBy.Latest, sort: SortBy.Latest,
nsfw: NSFWFilter.Hide_NSFW, nsfw: NSFWFilter.Hide_NSFW,
source: window.location.host, source: window.location.host,
moderated: ModeratedFilter.Moderated moderated: ModeratedFilter.Moderated,
wot: WOTFilterOptions.Site_Only
} }