this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add icon badge to indicate exclusive list

+185 -82
+1 -1
src/app.css
··· 2106 2106 margin-block: 4px; 2107 2107 2108 2108 > &:first-child, 2109 - li[role='none']:first-child + & { 2109 + li[role='none']:not(.szh-menu__header):first-child + & { 2110 2110 display: none; 2111 2111 } 2112 2112 }
+1
src/components/icon.jsx
··· 4 4 import { ICONS } from './ICONS'; 5 5 6 6 const SIZES = { 7 + xs: 8, 7 8 s: 12, 8 9 m: 16, 9 10 l: 20,
+2
src/components/list-add-edit.jsx
··· 6 6 import supports from '../utils/supports'; 7 7 8 8 import Icon from './icon'; 9 + import ListExclusiveBadge from './list-exclusive-badge'; 9 10 import MenuConfirm from './menu-confirm'; 10 11 11 12 function ListAddEdit({ list, onClose }) { ··· 141 142 name="exclusive" 142 143 disabled={uiState === 'loading'} 143 144 />{' '} 145 + <ListExclusiveBadge insignificant />{' '} 144 146 <Trans>Hide posts on this list from Home/Following</Trans> 145 147 </label> 146 148 </div>
+9
src/components/list-exclusive-badge.css
··· 1 + .list-exclusive-badge { 2 + box-sizing: content-box; 3 + border: 1px solid; 4 + padding: 1px; 5 + margin: 0 2px 2px; 6 + border-radius: 3px; 7 + vertical-align: middle; 8 + background-color: var(--bg-blur-color); 9 + }
+19
src/components/list-exclusive-badge.jsx
··· 1 + import './list-exclusive-badge.css'; 2 + 3 + import { useLingui } from '@lingui/react/macro'; 4 + 5 + import Icon from './icon'; 6 + 7 + function ListExclusiveBadge({ insignificant }) { 8 + const { t } = useLingui(); 9 + return ( 10 + <Icon 11 + icon="filter" 12 + size="xs" 13 + class={`list-exclusive-badge ${insignificant ? 'insignificant' : ''}`} 14 + title={t`Posts on this list are hidden from Home/Following`} 15 + /> 16 + ); 17 + } 18 + 19 + export default ListExclusiveBadge;
+10 -1
src/components/nav-menu.jsx
··· 17 17 18 18 import Avatar from './avatar'; 19 19 import Icon from './icon'; 20 + import ListExclusiveBadge from './list-exclusive-badge'; 20 21 import MenuLink from './menu-link'; 21 22 import SubMenu2 from './submenu2'; 22 23 ··· 444 445 <MenuDivider /> 445 446 {lists.map((list) => ( 446 447 <MenuLink key={list.id} to={`/l/${list.id}`}> 447 - <span>{list.title}</span> 448 + <span> 449 + {list.title} 450 + {list.exclusive && ( 451 + <> 452 + {' '} 453 + <ListExclusiveBadge /> 454 + </> 455 + )} 456 + </span> 448 457 </MenuLink> 449 458 ))} 450 459 </>
+10 -1
src/components/shortcuts.jsx
··· 16 16 import AsyncText from './AsyncText'; 17 17 import Icon from './icon'; 18 18 import Link from './link'; 19 + import ListExclusiveBadge from './list-exclusive-badge'; 19 20 import MenuLink from './menu-link'; 20 21 import Menu2 from './menu2'; 21 22 import SubMenu2 from './submenu2'; ··· 218 219 <MenuDivider /> 219 220 {lists?.map((list) => ( 220 221 <MenuLink key={list.id} to={`/l/${list.id}`}> 221 - <span>{list.title}</span> 222 + <span> 223 + {list.title} 224 + {list.exclusive && ( 225 + <> 226 + {' '} 227 + <ListExclusiveBadge /> 228 + </> 229 + )} 230 + </span> 222 231 </MenuLink> 223 232 ))} 224 233 </SubMenu2>
+75 -69
src/locales/en.po
··· 119 119 #: src/pages/account-statuses.jsx:526 120 120 #: src/pages/accounts.jsx:110 121 121 #: src/pages/hashtag.jsx:202 122 - #: src/pages/list.jsx:161 122 + #: src/pages/list.jsx:171 123 123 #: src/pages/public.jsx:116 124 124 #: src/pages/scheduled-posts.jsx:89 125 125 #: src/pages/status.jsx:1239 ··· 458 458 #: src/components/embed-modal.jsx:13 459 459 #: src/components/generic-accounts.jsx:151 460 460 #: src/components/keyboard-shortcuts-help.jsx:43 461 - #: src/components/list-add-edit.jsx:36 461 + #: src/components/list-add-edit.jsx:37 462 462 #: src/components/media-alt-modal.jsx:34 463 463 #: src/components/media-modal.jsx:323 464 464 #: src/components/notification-service.jsx:157 ··· 472 472 #: src/pages/accounts.jsx:37 473 473 #: src/pages/catchup.jsx:1584 474 474 #: src/pages/filters.jsx:225 475 - #: src/pages/list.jsx:280 475 + #: src/pages/list.jsx:302 476 476 #: src/pages/notifications.jsx:939 477 477 #: src/pages/scheduled-posts.jsx:259 478 478 #: src/pages/settings.jsx:87 ··· 493 493 msgstr "Unable to add to list." 494 494 495 495 #: src/components/account-info.jsx:2101 496 - #: src/pages/lists.jsx:105 496 + #: src/pages/lists.jsx:131 497 497 msgid "Unable to load lists." 498 498 msgstr "" 499 499 ··· 502 502 msgstr "" 503 503 504 504 #: src/components/account-info.jsx:2116 505 - #: src/components/list-add-edit.jsx:40 506 - #: src/pages/lists.jsx:59 505 + #: src/components/list-add-edit.jsx:41 506 + #: src/pages/lists.jsx:62 507 507 msgid "New list" 508 508 msgstr "" 509 509 ··· 538 538 msgstr "Profile picture" 539 539 540 540 #: src/components/account-info.jsx:2461 541 - #: src/components/list-add-edit.jsx:105 541 + #: src/components/list-add-edit.jsx:106 542 542 msgid "Name" 543 543 msgstr "" 544 544 ··· 559 559 msgstr "" 560 560 561 561 #: src/components/account-info.jsx:2529 562 - #: src/components/list-add-edit.jsx:150 562 + #: src/components/list-add-edit.jsx:152 563 563 #: src/components/shortcuts-settings.jsx:715 564 564 #: src/pages/filters.jsx:570 565 565 #: src/pages/notifications.jsx:1005 ··· 592 592 msgstr "" 593 593 594 594 #: src/components/columns.jsx:27 595 - #: src/components/nav-menu.jsx:180 595 + #: src/components/nav-menu.jsx:181 596 596 #: src/components/shortcuts-settings.jsx:139 597 597 #: src/components/timeline.jsx:465 598 598 #: src/pages/catchup.jsx:883 ··· 610 610 msgstr "" 611 611 612 612 #: src/components/compose-button.jsx:170 613 - #: src/components/nav-menu.jsx:264 613 + #: src/components/nav-menu.jsx:265 614 614 #: src/pages/scheduled-posts.jsx:31 615 615 #: src/pages/scheduled-posts.jsx:78 616 616 msgid "Scheduled Posts" ··· 734 734 msgstr "" 735 735 736 736 #: src/components/compose.jsx:1271 737 - #: src/components/nav-menu.jsx:348 737 + #: src/components/nav-menu.jsx:349 738 738 #: src/components/shortcuts-settings.jsx:165 739 739 #: src/components/status.jsx:97 740 740 msgid "Local" ··· 781 781 #: src/components/compose.jsx:1440 782 782 #: src/components/compose.jsx:3267 783 783 #: src/components/shortcuts-settings.jsx:715 784 - #: src/pages/list.jsx:366 784 + #: src/pages/list.jsx:388 785 785 msgid "Add" 786 786 msgstr "" 787 787 ··· 817 817 818 818 #: src/components/compose.jsx:2036 819 819 #: src/components/compose.jsx:2113 820 - #: src/components/nav-menu.jsx:243 820 + #: src/components/nav-menu.jsx:244 821 821 msgid "More…" 822 822 msgstr "" 823 823 ··· 1015 1015 msgstr "" 1016 1016 1017 1017 #: src/components/drafts.jsx:128 1018 - #: src/components/list-add-edit.jsx:186 1018 + #: src/components/list-add-edit.jsx:188 1019 1019 #: src/components/status.jsx:1420 1020 1020 #: src/pages/filters.jsx:603 1021 1021 #: src/pages/scheduled-posts.jsx:369 ··· 1084 1084 1085 1085 #: src/components/generic-accounts.jsx:214 1086 1086 #: src/components/timeline.jsx:547 1087 - #: src/pages/list.jsx:299 1087 + #: src/pages/list.jsx:321 1088 1088 #: src/pages/notifications.jsx:919 1089 1089 #: src/pages/search.jsx:558 1090 1090 #: src/pages/status.jsx:1359 ··· 1102 1102 msgstr "" 1103 1103 1104 1104 #: src/components/keyboard-shortcuts-help.jsx:47 1105 - #: src/components/nav-menu.jsx:367 1105 + #: src/components/nav-menu.jsx:368 1106 1106 #: src/pages/catchup.jsx:1622 1107 1107 msgid "Keyboard shortcuts" 1108 1108 msgstr "" ··· 1199 1199 msgstr "" 1200 1200 1201 1201 #: src/components/keyboard-shortcuts-help.jsx:151 1202 - #: src/components/nav-menu.jsx:336 1202 + #: src/components/nav-menu.jsx:337 1203 1203 #: src/components/search-form.jsx:73 1204 1204 #: src/components/shortcuts-settings.jsx:52 1205 1205 #: src/components/shortcuts-settings.jsx:179 ··· 1251 1251 msgid "<0>Shift</0> + <1>Alt</1> + <2>k</2>" 1252 1252 msgstr "" 1253 1253 1254 - #: src/components/list-add-edit.jsx:40 1254 + #: src/components/list-add-edit.jsx:41 1255 1255 msgid "Edit list" 1256 1256 msgstr "" 1257 1257 1258 - #: src/components/list-add-edit.jsx:96 1258 + #: src/components/list-add-edit.jsx:97 1259 1259 msgid "Unable to edit list." 1260 1260 msgstr "" 1261 1261 1262 - #: src/components/list-add-edit.jsx:97 1262 + #: src/components/list-add-edit.jsx:98 1263 1263 msgid "Unable to create list." 1264 1264 msgstr "" 1265 1265 1266 - #: src/components/list-add-edit.jsx:125 1266 + #: src/components/list-add-edit.jsx:126 1267 1267 msgid "Show replies to list members" 1268 1268 msgstr "" 1269 1269 1270 - #: src/components/list-add-edit.jsx:128 1270 + #: src/components/list-add-edit.jsx:129 1271 1271 msgid "Show replies to people I follow" 1272 1272 msgstr "" 1273 1273 1274 - #: src/components/list-add-edit.jsx:131 1274 + #: src/components/list-add-edit.jsx:132 1275 1275 msgid "Don't show replies" 1276 1276 msgstr "" 1277 1277 1278 - #: src/components/list-add-edit.jsx:144 1278 + #: src/components/list-add-edit.jsx:146 1279 1279 msgid "Hide posts on this list from Home/Following" 1280 1280 msgstr "" 1281 1281 1282 - #: src/components/list-add-edit.jsx:150 1282 + #: src/components/list-add-edit.jsx:152 1283 1283 #: src/pages/filters.jsx:570 1284 1284 msgid "Create" 1285 1285 msgstr "" 1286 1286 1287 - #: src/components/list-add-edit.jsx:157 1287 + #: src/components/list-add-edit.jsx:159 1288 1288 msgid "Delete this list?" 1289 1289 msgstr "" 1290 1290 1291 - #: src/components/list-add-edit.jsx:176 1291 + #: src/components/list-add-edit.jsx:178 1292 1292 msgid "Unable to delete list." 1293 1293 msgstr "" 1294 + 1295 + #: src/components/list-exclusive-badge.jsx:14 1296 + #: src/pages/list.jsx:179 1297 + #: src/pages/lists.jsx:107 1298 + msgid "Posts on this list are hidden from Home/Following" 1299 + msgstr "Posts on this list are hidden from Home/Following" 1294 1300 1295 1301 #: src/components/media-alt-modal.jsx:39 1296 1302 #: src/components/media.jsx:51 ··· 1375 1381 msgid "Post updated. Check it out." 1376 1382 msgstr "" 1377 1383 1378 - #: src/components/nav-menu.jsx:122 1384 + #: src/components/nav-menu.jsx:123 1379 1385 msgid "Menu" 1380 1386 msgstr "" 1381 1387 1382 - #: src/components/nav-menu.jsx:158 1388 + #: src/components/nav-menu.jsx:159 1383 1389 msgid "Reload page now to update?" 1384 1390 msgstr "" 1385 1391 1386 - #: src/components/nav-menu.jsx:170 1392 + #: src/components/nav-menu.jsx:171 1387 1393 msgid "New update available…" 1388 1394 msgstr "" 1389 1395 1390 1396 #. js-lingui-explicit-id 1391 - #: src/components/nav-menu.jsx:189 1397 + #: src/components/nav-menu.jsx:190 1392 1398 #: src/components/shortcuts-settings.jsx:140 1393 1399 #: src/pages/following.jsx:23 1394 1400 #: src/pages/following.jsx:144 1395 1401 msgid "following.title" 1396 1402 msgstr "Following" 1397 1403 1398 - #: src/components/nav-menu.jsx:196 1404 + #: src/components/nav-menu.jsx:197 1399 1405 #: src/pages/catchup.jsx:878 1400 1406 msgid "Catch-up" 1401 1407 msgstr "" 1402 1408 1403 - #: src/components/nav-menu.jsx:203 1409 + #: src/components/nav-menu.jsx:204 1404 1410 #: src/components/shortcuts-settings.jsx:58 1405 1411 #: src/components/shortcuts-settings.jsx:146 1406 1412 #: src/pages/home.jsx:228 ··· 1411 1417 msgid "Mentions" 1412 1418 msgstr "" 1413 1419 1414 - #: src/components/nav-menu.jsx:210 1420 + #: src/components/nav-menu.jsx:211 1415 1421 #: src/components/shortcuts-settings.jsx:49 1416 1422 #: src/components/shortcuts-settings.jsx:152 1417 1423 #: src/pages/filters.jsx:24 ··· 1422 1428 msgid "Notifications" 1423 1429 msgstr "" 1424 1430 1425 - #: src/components/nav-menu.jsx:213 1431 + #: src/components/nav-menu.jsx:214 1426 1432 msgid "New" 1427 1433 msgstr "" 1428 1434 1429 - #: src/components/nav-menu.jsx:224 1435 + #: src/components/nav-menu.jsx:225 1430 1436 msgid "Profile" 1431 1437 msgstr "" 1432 1438 1433 - #: src/components/nav-menu.jsx:232 1439 + #: src/components/nav-menu.jsx:233 1434 1440 #: src/components/shortcuts-settings.jsx:54 1435 1441 #: src/components/shortcuts-settings.jsx:195 1436 1442 #: src/pages/bookmarks.jsx:12 ··· 1438 1444 msgid "Bookmarks" 1439 1445 msgstr "" 1440 1446 1441 - #: src/components/nav-menu.jsx:252 1447 + #: src/components/nav-menu.jsx:253 1442 1448 #: src/components/shortcuts-settings.jsx:55 1443 1449 #: src/components/shortcuts-settings.jsx:201 1444 1450 #: src/pages/catchup.jsx:1449 ··· 1449 1455 msgid "Likes" 1450 1456 msgstr "" 1451 1457 1452 - #: src/components/nav-menu.jsx:258 1458 + #: src/components/nav-menu.jsx:259 1453 1459 #: src/pages/followed-hashtags.jsx:15 1454 1460 #: src/pages/followed-hashtags.jsx:45 1455 1461 msgid "Followed Hashtags" 1456 1462 msgstr "" 1457 1463 1458 - #: src/components/nav-menu.jsx:272 1464 + #: src/components/nav-menu.jsx:273 1459 1465 #: src/pages/account-statuses.jsx:329 1460 1466 #: src/pages/filters.jsx:55 1461 1467 #: src/pages/filters.jsx:94 ··· 1463 1469 msgid "Filters" 1464 1470 msgstr "" 1465 1471 1466 - #: src/components/nav-menu.jsx:280 1472 + #: src/components/nav-menu.jsx:281 1467 1473 msgid "Muted users" 1468 1474 msgstr "" 1469 1475 1470 - #: src/components/nav-menu.jsx:288 1476 + #: src/components/nav-menu.jsx:289 1471 1477 msgid "Muted users…" 1472 1478 msgstr "" 1473 1479 1474 - #: src/components/nav-menu.jsx:295 1480 + #: src/components/nav-menu.jsx:296 1475 1481 msgid "Blocked users" 1476 1482 msgstr "" 1477 1483 1478 - #: src/components/nav-menu.jsx:303 1484 + #: src/components/nav-menu.jsx:304 1479 1485 msgid "Blocked users…" 1480 1486 msgstr "" 1481 1487 1482 - #: src/components/nav-menu.jsx:315 1488 + #: src/components/nav-menu.jsx:316 1483 1489 msgid "Accounts…" 1484 1490 msgstr "" 1485 1491 1486 - #: src/components/nav-menu.jsx:325 1492 + #: src/components/nav-menu.jsx:326 1487 1493 #: src/pages/login.jsx:27 1488 1494 #: src/pages/login.jsx:190 1489 1495 #: src/pages/status.jsx:862 ··· 1491 1497 msgid "Log in" 1492 1498 msgstr "" 1493 1499 1494 - #: src/components/nav-menu.jsx:342 1500 + #: src/components/nav-menu.jsx:343 1495 1501 #: src/components/shortcuts-settings.jsx:57 1496 1502 #: src/components/shortcuts-settings.jsx:172 1497 1503 #: src/pages/trending.jsx:444 1498 1504 msgid "Trending" 1499 1505 msgstr "" 1500 1506 1501 - #: src/components/nav-menu.jsx:354 1507 + #: src/components/nav-menu.jsx:355 1502 1508 #: src/components/shortcuts-settings.jsx:165 1503 1509 msgid "Federated" 1504 1510 msgstr "" 1505 1511 1506 - #: src/components/nav-menu.jsx:377 1512 + #: src/components/nav-menu.jsx:378 1507 1513 msgid "Shortcuts / Columns…" 1508 1514 msgstr "" 1509 1515 1510 - #: src/components/nav-menu.jsx:387 1511 - #: src/components/nav-menu.jsx:401 1516 + #: src/components/nav-menu.jsx:388 1517 + #: src/components/nav-menu.jsx:402 1512 1518 msgid "Settings…" 1513 1519 msgstr "" 1514 1520 1515 - #: src/components/nav-menu.jsx:431 1516 - #: src/components/nav-menu.jsx:458 1521 + #: src/components/nav-menu.jsx:432 1522 + #: src/components/nav-menu.jsx:467 1517 1523 #: src/components/shortcuts-settings.jsx:50 1518 1524 #: src/components/shortcuts-settings.jsx:158 1519 - #: src/pages/list.jsx:130 1520 - #: src/pages/lists.jsx:17 1521 - #: src/pages/lists.jsx:51 1525 + #: src/pages/list.jsx:127 1526 + #: src/pages/lists.jsx:18 1527 + #: src/pages/lists.jsx:54 1522 1528 msgid "Lists" 1523 1529 msgstr "" 1524 1530 1525 - #: src/components/nav-menu.jsx:439 1526 - #: src/components/shortcuts.jsx:215 1527 - #: src/pages/list.jsx:137 1531 + #: src/components/nav-menu.jsx:440 1532 + #: src/components/shortcuts.jsx:216 1533 + #: src/pages/list.jsx:139 1528 1534 msgid "All Lists" 1529 1535 msgstr "" 1530 1536 ··· 1948 1954 msgstr "" 1949 1955 1950 1956 #: src/components/shortcuts-settings.jsx:235 1951 - #: src/components/shortcuts.jsx:192 1957 + #: src/components/shortcuts.jsx:193 1952 1958 msgid "Shortcuts" 1953 1959 msgstr "" 1954 1960 ··· 1986 1992 1987 1993 #: src/components/shortcuts-settings.jsx:379 1988 1994 #: src/components/status.jsx:1382 1989 - #: src/pages/list.jsx:174 1995 + #: src/pages/list.jsx:195 1990 1996 msgid "Edit" 1991 1997 msgstr "" 1992 1998 ··· 3140 3146 msgstr "" 3141 3147 3142 3148 #: src/pages/following.jsx:147 3143 - #: src/pages/list.jsx:112 3149 + #: src/pages/list.jsx:109 3144 3150 msgid "Unable to load posts." 3145 3151 msgstr "" 3146 3152 ··· 3269 3275 msgid "Unable to resolve URL" 3270 3276 msgstr "" 3271 3277 3272 - #: src/pages/list.jsx:111 3278 + #: src/pages/list.jsx:108 3273 3279 msgid "Nothing yet." 3274 3280 msgstr "" 3275 3281 3276 - #: src/pages/list.jsx:180 3277 - #: src/pages/list.jsx:285 3282 + #: src/pages/list.jsx:201 3283 + #: src/pages/list.jsx:307 3278 3284 msgid "Manage members" 3279 3285 msgstr "" 3280 3286 3281 3287 #. placeholder {0}: account.username 3282 - #: src/pages/list.jsx:320 3288 + #: src/pages/list.jsx:342 3283 3289 msgid "Remove <0>@{0}</0> from list?" 3284 3290 msgstr "" 3285 3291 3286 - #: src/pages/list.jsx:366 3292 + #: src/pages/list.jsx:388 3287 3293 msgid "Remove…" 3288 3294 msgstr "" 3289 3295 3290 3296 #. placeholder {0}: lists.length 3291 - #: src/pages/lists.jsx:94 3297 + #: src/pages/lists.jsx:115 3292 3298 msgid "{0, plural, one {# list} other {# lists}}" 3293 3299 msgstr "" 3294 3300 3295 - #: src/pages/lists.jsx:109 3301 + #: src/pages/lists.jsx:135 3296 3302 msgid "No lists yet." 3297 3303 msgstr "" 3298 3304
+28 -6
src/pages/list.jsx
··· 1 1 import './lists.css'; 2 2 3 3 import { Trans, useLingui } from '@lingui/react/macro'; 4 - import { Menu, MenuDivider, MenuItem } from '@szhsin/react-menu'; 4 + import { Menu, MenuDivider, MenuHeader, MenuItem } from '@szhsin/react-menu'; 5 5 import { useEffect, useRef, useState } from 'preact/hooks'; 6 6 import { InView } from 'react-intersection-observer'; 7 7 import { useNavigate, useParams } from 'react-router-dom'; ··· 9 9 10 10 import AccountBlock from '../components/account-block'; 11 11 import Icon from '../components/icon'; 12 - import Link from '../components/link'; 13 12 import ListAddEdit from '../components/list-add-edit'; 13 + import ListExclusiveBadge from '../components/list-exclusive-badge'; 14 14 import MenuConfirm from '../components/menu-confirm'; 15 15 import MenuLink from '../components/menu-link'; 16 16 import Menu2 from '../components/menu2'; ··· 80 80 } 81 81 82 82 const [lists, setLists] = useState([]); 83 - useEffect(() => { 84 - getLists().then(setLists); 85 - }, []); 86 83 87 84 const [list, setList] = useState({ title: 'List' }); 88 85 // const [title, setTitle] = useState(`List`); ··· 131 128 <Icon icon="chevron-down" size="s" /> 132 129 </button> 133 130 } 131 + onMenuChange={(e) => { 132 + if (e.open) { 133 + getLists().then(setLists); 134 + } 135 + }} 134 136 > 135 137 <MenuLink to="/l"> 136 138 <span> ··· 142 144 <MenuDivider /> 143 145 {lists.map((list) => ( 144 146 <MenuLink key={list.id} to={`/l/${list.id}`}> 145 - <span>{list.title}</span> 147 + <span> 148 + {list.title} 149 + {list.exclusive && ( 150 + <> 151 + {' '} 152 + <ListExclusiveBadge /> 153 + </> 154 + )} 155 + </span> 146 156 </MenuLink> 147 157 ))} 148 158 </> ··· 162 172 </button> 163 173 } 164 174 > 175 + {list?.exclusive && ( 176 + <> 177 + <MenuHeader className="plain"> 178 + <ListExclusiveBadge />{' '} 179 + <Trans> 180 + Posts on this list are hidden from Home/Following 181 + </Trans> 182 + </MenuHeader> 183 + <MenuDivider /> 184 + </> 185 + )} 165 186 <MenuItem 166 187 onClick={() => 167 188 setShowListAddEditModal({ ··· 225 246 } 226 247 227 248 const MEMBERS_LIMIT = 40; 249 + 228 250 function ListManageMembers({ listID, onClose }) { 229 251 const { t } = useLingui(); 230 252 // Show list of members with [Remove] button
+30 -4
src/pages/lists.jsx
··· 6 6 import Icon from '../components/icon'; 7 7 import Link from '../components/link'; 8 8 import ListAddEdit from '../components/list-add-edit'; 9 + import ListExclusiveBadge from '../components/list-exclusive-badge'; 9 10 import Loader from '../components/loader'; 10 11 import Modal from '../components/modal'; 11 12 import NavMenu from '../components/nav-menu'; ··· 35 36 }, [reloadCount]); 36 37 37 38 const [showListAddEditModal, setShowListAddEditModal] = useState(false); 39 + 40 + const hasExclusiveLists = lists.some((list) => list.exclusive); 38 41 39 42 return ( 40 43 <div id="lists-page" class="deck-container" tabIndex="-1"> ··· 68 71 {lists.map((list) => ( 69 72 <li> 70 73 <Link to={`/l/${list.id}`}> 74 + <Icon icon="list" />{' '} 71 75 <span> 72 - <Icon icon="list" /> <span>{list.title}</span> 76 + {list.title} 77 + {list.exclusive && ( 78 + <> 79 + {' '} 80 + <ListExclusiveBadge insignificant /> 81 + </> 82 + )} 73 83 </span> 74 84 {/* <button 75 85 type="button" ··· 90 100 </ul> 91 101 {lists.length > 1 && ( 92 102 <footer class="ui-state"> 93 - <small class="insignificant"> 94 - <Plural value={lists.length} one="# list" other="# lists" /> 95 - </small> 103 + {hasExclusiveLists && ( 104 + <p> 105 + <small class="insignificant"> 106 + <ListExclusiveBadge />{' '} 107 + <Trans> 108 + Posts on this list are hidden from Home/Following 109 + </Trans> 110 + </small> 111 + </p> 112 + )} 113 + <p> 114 + <small class="insignificant"> 115 + <Plural 116 + value={lists.length} 117 + one="# list" 118 + other="# lists" 119 + /> 120 + </small> 121 + </p> 96 122 </footer> 97 123 )} 98 124 </>