このコミットが含まれているのは:
@@ -2,7 +2,7 @@ import { countsFieldLabel } from '@/lib/countsDefinitions'
|
||||
import { apiDownload, apiGet } from '@/lib/api'
|
||||
import { currentViewingLocale, localeLanguage } from '@/lib/locales'
|
||||
|
||||
import { readCountState, encodeCountState } from '@/lib/queryState'
|
||||
import { readCountState, encodeCountState, setCountState } from '@/lib/queryState'
|
||||
|
||||
import type { CountsAxis, CountsDefinition } from '@/lib/countsDefinitions'
|
||||
import type { LocaleCode } from '@/lib/locales'
|
||||
@@ -368,6 +368,22 @@ export const normaliseCountsParams = (
|
||||
definition?: CountsDefinition,
|
||||
): URLSearchParams => {
|
||||
const params = new URLSearchParams (source)
|
||||
const drills = readCountState<Record<string, unknown>[]> (params, 'drill', [])
|
||||
if (params.get ('tag'))
|
||||
{
|
||||
drills.push ({ field: 'tags', value: `${params.get ('kind') ?? 'internal'}:${
|
||||
params.get ('tag')}` })
|
||||
params.delete ('tag')
|
||||
params.delete ('kind')
|
||||
}
|
||||
if (drills.length > 0)
|
||||
{
|
||||
const conditions = readCountState<Record<string, unknown>[]> (params, 'conditions', [])
|
||||
setCountState (params, 'conditions', encodeCountState ('conditions', [
|
||||
...conditions, ...drills.map (entry => ({ ...entry, operator: 'axis_eq' }))]))
|
||||
for (const key of [...params.keys ()])
|
||||
if (key === 'drill' || key.startsWith ('drill.')) params.delete (key)
|
||||
}
|
||||
if (!params.has ('limit')) params.set ('limit', '100')
|
||||
const nameScope = params.get ('name_scope')
|
||||
if (definition?.conditionAliases != null && (nameScope == null || nameScope === 'locale'))
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする