Allow filter in other feeds tabs

This commit is contained in:
the1812 2020-05-23 12:15:27 +08:00
parent 3fcbcca549
commit 5562dab0da
8 changed files with 22 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -89,7 +89,7 @@
"favorites-redirect.min.js": "70D6ECCE0402AA76387D2A3288C1148C60CC88D5378B7A2BDC813F3F78E4EE84",
"feeds-apis.min.js": "E486419850FB119A08C0DF4797DA9F77585EA9955D6D4285F3FAFB4528ACED9D",
"feeds-filter.min.js": "9E8BC1A669D97992E888A3154FCE64912CE0B7A303D6BE40C3CA0C71A9533B96",
"feeds-filter-card.vue.min.js": "BC37675ACE6B712499BE0DBFECC3B60E593C63ECDB0E07F60B573634352F3583",
"feeds-filter-card.vue.min.js": "E995F9C93BA50983AAAFB2DE45848769C78FC0E39A34655FA98586DFE670670B",
"feeds-translate.min.css": "704EF1AAE13C4F7D33244E0EC30069AE449C4DBA0310E94C6A6B6ECC33570E5E",
"feeds-translate.min.js": "3BFACEC337137ABA7EA27184A03F42523DE24F96596BA14AD16A012749D919B1",
"feeds-translate-providers.min.js": "DD3B48C051ED1CD89AB79B2563723B2639D8737EF2194136D63ABAA8D4B64F6C",

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -191,10 +191,12 @@ export default {
) as HTMLAnchorElement
Observer.attributes(tab, () => {
document.body.classList.toggle(
'enable-feeds-filter',
tab.classList.contains('selected'),
// 'enable-feeds-filter',
'by-type',
!tab.classList.contains('selected'),
)
})
document.body.classList.add('enable-feeds-filter')
const { feedsCardsManager, feedsCardTypes } = await import('../feeds-apis')
const success = await feedsCardsManager.startWatching()
if (!success) {
@ -240,12 +242,16 @@ body.enable-feeds-filter:not(.disable-feeds-filter) {
'share': 2048
)
{
&.feeds-filter-block-#{$name} .feed-card .card[data-type='#{$value}'] {
&:not(.by-type).feeds-filter-block-#{$name}
.feed-card
.card[data-type='#{$value}'] {
display: none !important;
}
}
@each $name in ('self-repost') {
&.feeds-filter-block-#{$name} .feed-card .card[data-#{$name}] {
&:not(.by-type).feeds-filter-block-#{$name}
.feed-card
.card[data-#{$name}] {
display: none !important;
}
}
@ -420,6 +426,12 @@ body.enable-feeds-filter:not(.disable-feeds-filter) {
justify-content: space-between;
margin-bottom: 18px;
}
body.by-type & {
h2:nth-of-type(1),
.filter-types {
display: none;
}
}
.filter-patterns {
&:not(:empty) {
margin-bottom: 8px;