feat: ??? add sorting by year how was that missing
This commit is contained in:
3 files changed
+4
-1
No files matched your search
@@ -84,6 +84,7 @@
|
|||||||
"time": {
|
"time": {
|
||||||
"label": "Period",
|
"label": "Period",
|
||||||
"all": "All time",
|
"all": "All time",
|
||||||
|
"year": "Past year",
|
||||||
"9months": "9 months",
|
"9months": "9 months",
|
||||||
"6months": "6 months",
|
"6months": "6 months",
|
||||||
"3months": "3 months",
|
"3months": "3 months",
|
||||||
|
|||||||
@@ -106,6 +106,9 @@
|
|||||||
<Option value="TopAll" icon={PlusCircle}>
|
<Option value="TopAll" icon={PlusCircle}>
|
||||||
{$t('filter.sort.top.time.all')}
|
{$t('filter.sort.top.time.all')}
|
||||||
</Option>
|
</Option>
|
||||||
|
<Option value="TopYear" icon={Calendar}>
|
||||||
|
{$t('filter.sort.top.time.year')}
|
||||||
|
</Option>
|
||||||
<Option value="TopNineMonths" icon={Calendar}>
|
<Option value="TopNineMonths" icon={Calendar}>
|
||||||
{$t('filter.sort.top.time.9months')}
|
{$t('filter.sort.top.time.9months')}
|
||||||
</Option>
|
</Option>
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ export function filterPost(
|
|||||||
for (const filter of filters) {
|
for (const filter of filters) {
|
||||||
try {
|
try {
|
||||||
if (
|
if (
|
||||||
filter.regex.test(post.post.url ?? '') ||
|
|
||||||
filter.regex.test(post.post.name) ||
|
filter.regex.test(post.post.name) ||
|
||||||
filter.regex.test(post.post.body ?? '')
|
filter.regex.test(post.post.body ?? '')
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user