kopia lustrzana https://github.com/cheeaun/phanpy
Add icon badge to indicate exclusive list
rodzic
215d8b230d
commit
fe63f9feb4
|
@ -2106,7 +2106,7 @@ body > .szh-menu-container {
|
||||||
margin-block: 4px;
|
margin-block: 4px;
|
||||||
|
|
||||||
> &:first-child,
|
> &:first-child,
|
||||||
li[role='none']:first-child + & {
|
li[role='none']:not(.szh-menu__header):first-child + & {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { useEffect, useRef, useState } from 'preact/hooks';
|
||||||
import { ICONS } from './ICONS';
|
import { ICONS } from './ICONS';
|
||||||
|
|
||||||
const SIZES = {
|
const SIZES = {
|
||||||
|
xs: 8,
|
||||||
s: 12,
|
s: 12,
|
||||||
m: 16,
|
m: 16,
|
||||||
l: 20,
|
l: 20,
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { addListStore, deleteListStore, updateListStore } from '../utils/lists';
|
||||||
import supports from '../utils/supports';
|
import supports from '../utils/supports';
|
||||||
|
|
||||||
import Icon from './icon';
|
import Icon from './icon';
|
||||||
|
import ListExclusiveBadge from './list-exclusive-badge';
|
||||||
import MenuConfirm from './menu-confirm';
|
import MenuConfirm from './menu-confirm';
|
||||||
|
|
||||||
function ListAddEdit({ list, onClose }) {
|
function ListAddEdit({ list, onClose }) {
|
||||||
|
@ -141,6 +142,7 @@ function ListAddEdit({ list, onClose }) {
|
||||||
name="exclusive"
|
name="exclusive"
|
||||||
disabled={uiState === 'loading'}
|
disabled={uiState === 'loading'}
|
||||||
/>{' '}
|
/>{' '}
|
||||||
|
<ListExclusiveBadge insignificant />{' '}
|
||||||
<Trans>Hide posts on this list from Home/Following</Trans>
|
<Trans>Hide posts on this list from Home/Following</Trans>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
.list-exclusive-badge {
|
||||||
|
box-sizing: content-box;
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 1px;
|
||||||
|
margin: 0 2px 2px;
|
||||||
|
border-radius: 3px;
|
||||||
|
vertical-align: middle;
|
||||||
|
background-color: var(--bg-blur-color);
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
import './list-exclusive-badge.css';
|
||||||
|
|
||||||
|
import { useLingui } from '@lingui/react/macro';
|
||||||
|
|
||||||
|
import Icon from './icon';
|
||||||
|
|
||||||
|
function ListExclusiveBadge({ insignificant }) {
|
||||||
|
const { t } = useLingui();
|
||||||
|
return (
|
||||||
|
<Icon
|
||||||
|
icon="filter"
|
||||||
|
size="xs"
|
||||||
|
class={`list-exclusive-badge ${insignificant ? 'insignificant' : ''}`}
|
||||||
|
title={t`Posts on this list are hidden from Home/Following`}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ListExclusiveBadge;
|
|
@ -17,6 +17,7 @@ import supports from '../utils/supports';
|
||||||
|
|
||||||
import Avatar from './avatar';
|
import Avatar from './avatar';
|
||||||
import Icon from './icon';
|
import Icon from './icon';
|
||||||
|
import ListExclusiveBadge from './list-exclusive-badge';
|
||||||
import MenuLink from './menu-link';
|
import MenuLink from './menu-link';
|
||||||
import SubMenu2 from './submenu2';
|
import SubMenu2 from './submenu2';
|
||||||
|
|
||||||
|
@ -444,7 +445,15 @@ function ListMenu({ menuState }) {
|
||||||
<MenuDivider />
|
<MenuDivider />
|
||||||
{lists.map((list) => (
|
{lists.map((list) => (
|
||||||
<MenuLink key={list.id} to={`/l/${list.id}`}>
|
<MenuLink key={list.id} to={`/l/${list.id}`}>
|
||||||
<span>{list.title}</span>
|
<span>
|
||||||
|
{list.title}
|
||||||
|
{list.exclusive && (
|
||||||
|
<>
|
||||||
|
{' '}
|
||||||
|
<ListExclusiveBadge />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
</MenuLink>
|
</MenuLink>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -16,6 +16,7 @@ import states from '../utils/states';
|
||||||
import AsyncText from './AsyncText';
|
import AsyncText from './AsyncText';
|
||||||
import Icon from './icon';
|
import Icon from './icon';
|
||||||
import Link from './link';
|
import Link from './link';
|
||||||
|
import ListExclusiveBadge from './list-exclusive-badge';
|
||||||
import MenuLink from './menu-link';
|
import MenuLink from './menu-link';
|
||||||
import Menu2 from './menu2';
|
import Menu2 from './menu2';
|
||||||
import SubMenu2 from './submenu2';
|
import SubMenu2 from './submenu2';
|
||||||
|
@ -218,7 +219,15 @@ function Shortcuts() {
|
||||||
<MenuDivider />
|
<MenuDivider />
|
||||||
{lists?.map((list) => (
|
{lists?.map((list) => (
|
||||||
<MenuLink key={list.id} to={`/l/${list.id}`}>
|
<MenuLink key={list.id} to={`/l/${list.id}`}>
|
||||||
<span>{list.title}</span>
|
<span>
|
||||||
|
{list.title}
|
||||||
|
{list.exclusive && (
|
||||||
|
<>
|
||||||
|
{' '}
|
||||||
|
<ListExclusiveBadge />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
</MenuLink>
|
</MenuLink>
|
||||||
))}
|
))}
|
||||||
</SubMenu2>
|
</SubMenu2>
|
||||||
|
|
|
@ -119,7 +119,7 @@ msgstr ""
|
||||||
#: src/pages/account-statuses.jsx:526
|
#: src/pages/account-statuses.jsx:526
|
||||||
#: src/pages/accounts.jsx:110
|
#: src/pages/accounts.jsx:110
|
||||||
#: src/pages/hashtag.jsx:202
|
#: src/pages/hashtag.jsx:202
|
||||||
#: src/pages/list.jsx:161
|
#: src/pages/list.jsx:171
|
||||||
#: src/pages/public.jsx:116
|
#: src/pages/public.jsx:116
|
||||||
#: src/pages/scheduled-posts.jsx:89
|
#: src/pages/scheduled-posts.jsx:89
|
||||||
#: src/pages/status.jsx:1239
|
#: src/pages/status.jsx:1239
|
||||||
|
@ -458,7 +458,7 @@ msgstr ""
|
||||||
#: src/components/embed-modal.jsx:13
|
#: src/components/embed-modal.jsx:13
|
||||||
#: src/components/generic-accounts.jsx:151
|
#: src/components/generic-accounts.jsx:151
|
||||||
#: src/components/keyboard-shortcuts-help.jsx:43
|
#: src/components/keyboard-shortcuts-help.jsx:43
|
||||||
#: src/components/list-add-edit.jsx:36
|
#: src/components/list-add-edit.jsx:37
|
||||||
#: src/components/media-alt-modal.jsx:34
|
#: src/components/media-alt-modal.jsx:34
|
||||||
#: src/components/media-modal.jsx:323
|
#: src/components/media-modal.jsx:323
|
||||||
#: src/components/notification-service.jsx:157
|
#: src/components/notification-service.jsx:157
|
||||||
|
@ -472,7 +472,7 @@ msgstr ""
|
||||||
#: src/pages/accounts.jsx:37
|
#: src/pages/accounts.jsx:37
|
||||||
#: src/pages/catchup.jsx:1584
|
#: src/pages/catchup.jsx:1584
|
||||||
#: src/pages/filters.jsx:225
|
#: src/pages/filters.jsx:225
|
||||||
#: src/pages/list.jsx:280
|
#: src/pages/list.jsx:302
|
||||||
#: src/pages/notifications.jsx:939
|
#: src/pages/notifications.jsx:939
|
||||||
#: src/pages/scheduled-posts.jsx:259
|
#: src/pages/scheduled-posts.jsx:259
|
||||||
#: src/pages/settings.jsx:87
|
#: src/pages/settings.jsx:87
|
||||||
|
@ -493,7 +493,7 @@ msgid "Unable to add to list."
|
||||||
msgstr "Unable to add to list."
|
msgstr "Unable to add to list."
|
||||||
|
|
||||||
#: src/components/account-info.jsx:2101
|
#: src/components/account-info.jsx:2101
|
||||||
#: src/pages/lists.jsx:105
|
#: src/pages/lists.jsx:131
|
||||||
msgid "Unable to load lists."
|
msgid "Unable to load lists."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -502,8 +502,8 @@ msgid "No lists."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/account-info.jsx:2116
|
#: src/components/account-info.jsx:2116
|
||||||
#: src/components/list-add-edit.jsx:40
|
#: src/components/list-add-edit.jsx:41
|
||||||
#: src/pages/lists.jsx:59
|
#: src/pages/lists.jsx:62
|
||||||
msgid "New list"
|
msgid "New list"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -538,7 +538,7 @@ msgid "Profile picture"
|
||||||
msgstr "Profile picture"
|
msgstr "Profile picture"
|
||||||
|
|
||||||
#: src/components/account-info.jsx:2461
|
#: src/components/account-info.jsx:2461
|
||||||
#: src/components/list-add-edit.jsx:105
|
#: src/components/list-add-edit.jsx:106
|
||||||
msgid "Name"
|
msgid "Name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -559,7 +559,7 @@ msgid "Content"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/account-info.jsx:2529
|
#: src/components/account-info.jsx:2529
|
||||||
#: src/components/list-add-edit.jsx:150
|
#: src/components/list-add-edit.jsx:152
|
||||||
#: src/components/shortcuts-settings.jsx:715
|
#: src/components/shortcuts-settings.jsx:715
|
||||||
#: src/pages/filters.jsx:570
|
#: src/pages/filters.jsx:570
|
||||||
#: src/pages/notifications.jsx:1005
|
#: src/pages/notifications.jsx:1005
|
||||||
|
@ -592,7 +592,7 @@ msgid "Cloak mode enabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/columns.jsx:27
|
#: src/components/columns.jsx:27
|
||||||
#: src/components/nav-menu.jsx:180
|
#: src/components/nav-menu.jsx:181
|
||||||
#: src/components/shortcuts-settings.jsx:139
|
#: src/components/shortcuts-settings.jsx:139
|
||||||
#: src/components/timeline.jsx:465
|
#: src/components/timeline.jsx:465
|
||||||
#: src/pages/catchup.jsx:883
|
#: src/pages/catchup.jsx:883
|
||||||
|
@ -610,7 +610,7 @@ msgid "Compose"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/compose-button.jsx:170
|
#: src/components/compose-button.jsx:170
|
||||||
#: src/components/nav-menu.jsx:264
|
#: src/components/nav-menu.jsx:265
|
||||||
#: src/pages/scheduled-posts.jsx:31
|
#: src/pages/scheduled-posts.jsx:31
|
||||||
#: src/pages/scheduled-posts.jsx:78
|
#: src/pages/scheduled-posts.jsx:78
|
||||||
msgid "Scheduled Posts"
|
msgid "Scheduled Posts"
|
||||||
|
@ -734,7 +734,7 @@ msgid "Public"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/compose.jsx:1271
|
#: src/components/compose.jsx:1271
|
||||||
#: src/components/nav-menu.jsx:348
|
#: src/components/nav-menu.jsx:349
|
||||||
#: src/components/shortcuts-settings.jsx:165
|
#: src/components/shortcuts-settings.jsx:165
|
||||||
#: src/components/status.jsx:97
|
#: src/components/status.jsx:97
|
||||||
msgid "Local"
|
msgid "Local"
|
||||||
|
@ -781,7 +781,7 @@ msgstr "Posting on <0/>"
|
||||||
#: src/components/compose.jsx:1440
|
#: src/components/compose.jsx:1440
|
||||||
#: src/components/compose.jsx:3267
|
#: src/components/compose.jsx:3267
|
||||||
#: src/components/shortcuts-settings.jsx:715
|
#: src/components/shortcuts-settings.jsx:715
|
||||||
#: src/pages/list.jsx:366
|
#: src/pages/list.jsx:388
|
||||||
msgid "Add"
|
msgid "Add"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -817,7 +817,7 @@ msgstr "Failed to download GIF"
|
||||||
|
|
||||||
#: src/components/compose.jsx:2036
|
#: src/components/compose.jsx:2036
|
||||||
#: src/components/compose.jsx:2113
|
#: src/components/compose.jsx:2113
|
||||||
#: src/components/nav-menu.jsx:243
|
#: src/components/nav-menu.jsx:244
|
||||||
msgid "More…"
|
msgid "More…"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1015,7 +1015,7 @@ msgid "Error deleting draft! Please try again."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/drafts.jsx:128
|
#: src/components/drafts.jsx:128
|
||||||
#: src/components/list-add-edit.jsx:186
|
#: src/components/list-add-edit.jsx:188
|
||||||
#: src/components/status.jsx:1420
|
#: src/components/status.jsx:1420
|
||||||
#: src/pages/filters.jsx:603
|
#: src/pages/filters.jsx:603
|
||||||
#: src/pages/scheduled-posts.jsx:369
|
#: src/pages/scheduled-posts.jsx:369
|
||||||
|
@ -1084,7 +1084,7 @@ msgstr ""
|
||||||
|
|
||||||
#: src/components/generic-accounts.jsx:214
|
#: src/components/generic-accounts.jsx:214
|
||||||
#: src/components/timeline.jsx:547
|
#: src/components/timeline.jsx:547
|
||||||
#: src/pages/list.jsx:299
|
#: src/pages/list.jsx:321
|
||||||
#: src/pages/notifications.jsx:919
|
#: src/pages/notifications.jsx:919
|
||||||
#: src/pages/search.jsx:558
|
#: src/pages/search.jsx:558
|
||||||
#: src/pages/status.jsx:1359
|
#: src/pages/status.jsx:1359
|
||||||
|
@ -1102,7 +1102,7 @@ msgid "Nothing to show"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/keyboard-shortcuts-help.jsx:47
|
#: src/components/keyboard-shortcuts-help.jsx:47
|
||||||
#: src/components/nav-menu.jsx:367
|
#: src/components/nav-menu.jsx:368
|
||||||
#: src/pages/catchup.jsx:1622
|
#: src/pages/catchup.jsx:1622
|
||||||
msgid "Keyboard shortcuts"
|
msgid "Keyboard shortcuts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1199,7 +1199,7 @@ msgid "<0>Ctrl</0> + <1>Enter</1> or <2>⌘</2> + <3>Enter</3>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/keyboard-shortcuts-help.jsx:151
|
#: src/components/keyboard-shortcuts-help.jsx:151
|
||||||
#: src/components/nav-menu.jsx:336
|
#: src/components/nav-menu.jsx:337
|
||||||
#: src/components/search-form.jsx:73
|
#: src/components/search-form.jsx:73
|
||||||
#: src/components/shortcuts-settings.jsx:52
|
#: src/components/shortcuts-settings.jsx:52
|
||||||
#: src/components/shortcuts-settings.jsx:179
|
#: src/components/shortcuts-settings.jsx:179
|
||||||
|
@ -1251,47 +1251,53 @@ msgstr ""
|
||||||
msgid "<0>Shift</0> + <1>Alt</1> + <2>k</2>"
|
msgid "<0>Shift</0> + <1>Alt</1> + <2>k</2>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/list-add-edit.jsx:40
|
#: src/components/list-add-edit.jsx:41
|
||||||
msgid "Edit list"
|
msgid "Edit list"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/list-add-edit.jsx:96
|
#: src/components/list-add-edit.jsx:97
|
||||||
msgid "Unable to edit list."
|
msgid "Unable to edit list."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/list-add-edit.jsx:97
|
#: src/components/list-add-edit.jsx:98
|
||||||
msgid "Unable to create list."
|
msgid "Unable to create list."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/list-add-edit.jsx:125
|
#: src/components/list-add-edit.jsx:126
|
||||||
msgid "Show replies to list members"
|
msgid "Show replies to list members"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/list-add-edit.jsx:128
|
#: src/components/list-add-edit.jsx:129
|
||||||
msgid "Show replies to people I follow"
|
msgid "Show replies to people I follow"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/list-add-edit.jsx:131
|
#: src/components/list-add-edit.jsx:132
|
||||||
msgid "Don't show replies"
|
msgid "Don't show replies"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/list-add-edit.jsx:144
|
#: src/components/list-add-edit.jsx:146
|
||||||
msgid "Hide posts on this list from Home/Following"
|
msgid "Hide posts on this list from Home/Following"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/list-add-edit.jsx:150
|
#: src/components/list-add-edit.jsx:152
|
||||||
#: src/pages/filters.jsx:570
|
#: src/pages/filters.jsx:570
|
||||||
msgid "Create"
|
msgid "Create"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/list-add-edit.jsx:157
|
#: src/components/list-add-edit.jsx:159
|
||||||
msgid "Delete this list?"
|
msgid "Delete this list?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/list-add-edit.jsx:176
|
#: src/components/list-add-edit.jsx:178
|
||||||
msgid "Unable to delete list."
|
msgid "Unable to delete list."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/components/list-exclusive-badge.jsx:14
|
||||||
|
#: src/pages/list.jsx:179
|
||||||
|
#: src/pages/lists.jsx:107
|
||||||
|
msgid "Posts on this list are hidden from Home/Following"
|
||||||
|
msgstr "Posts on this list are hidden from Home/Following"
|
||||||
|
|
||||||
#: src/components/media-alt-modal.jsx:39
|
#: src/components/media-alt-modal.jsx:39
|
||||||
#: src/components/media.jsx:51
|
#: src/components/media.jsx:51
|
||||||
msgid "Media description"
|
msgid "Media description"
|
||||||
|
@ -1375,32 +1381,32 @@ msgstr ""
|
||||||
msgid "Post updated. Check it out."
|
msgid "Post updated. Check it out."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:122
|
#: src/components/nav-menu.jsx:123
|
||||||
msgid "Menu"
|
msgid "Menu"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:158
|
#: src/components/nav-menu.jsx:159
|
||||||
msgid "Reload page now to update?"
|
msgid "Reload page now to update?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:170
|
#: src/components/nav-menu.jsx:171
|
||||||
msgid "New update available…"
|
msgid "New update available…"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. js-lingui-explicit-id
|
#. js-lingui-explicit-id
|
||||||
#: src/components/nav-menu.jsx:189
|
#: src/components/nav-menu.jsx:190
|
||||||
#: src/components/shortcuts-settings.jsx:140
|
#: src/components/shortcuts-settings.jsx:140
|
||||||
#: src/pages/following.jsx:23
|
#: src/pages/following.jsx:23
|
||||||
#: src/pages/following.jsx:144
|
#: src/pages/following.jsx:144
|
||||||
msgid "following.title"
|
msgid "following.title"
|
||||||
msgstr "Following"
|
msgstr "Following"
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:196
|
#: src/components/nav-menu.jsx:197
|
||||||
#: src/pages/catchup.jsx:878
|
#: src/pages/catchup.jsx:878
|
||||||
msgid "Catch-up"
|
msgid "Catch-up"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:203
|
#: src/components/nav-menu.jsx:204
|
||||||
#: src/components/shortcuts-settings.jsx:58
|
#: src/components/shortcuts-settings.jsx:58
|
||||||
#: src/components/shortcuts-settings.jsx:146
|
#: src/components/shortcuts-settings.jsx:146
|
||||||
#: src/pages/home.jsx:228
|
#: src/pages/home.jsx:228
|
||||||
|
@ -1411,7 +1417,7 @@ msgstr ""
|
||||||
msgid "Mentions"
|
msgid "Mentions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:210
|
#: src/components/nav-menu.jsx:211
|
||||||
#: src/components/shortcuts-settings.jsx:49
|
#: src/components/shortcuts-settings.jsx:49
|
||||||
#: src/components/shortcuts-settings.jsx:152
|
#: src/components/shortcuts-settings.jsx:152
|
||||||
#: src/pages/filters.jsx:24
|
#: src/pages/filters.jsx:24
|
||||||
|
@ -1422,15 +1428,15 @@ msgstr ""
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:213
|
#: src/components/nav-menu.jsx:214
|
||||||
msgid "New"
|
msgid "New"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:224
|
#: src/components/nav-menu.jsx:225
|
||||||
msgid "Profile"
|
msgid "Profile"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:232
|
#: src/components/nav-menu.jsx:233
|
||||||
#: src/components/shortcuts-settings.jsx:54
|
#: src/components/shortcuts-settings.jsx:54
|
||||||
#: src/components/shortcuts-settings.jsx:195
|
#: src/components/shortcuts-settings.jsx:195
|
||||||
#: src/pages/bookmarks.jsx:12
|
#: src/pages/bookmarks.jsx:12
|
||||||
|
@ -1438,7 +1444,7 @@ msgstr ""
|
||||||
msgid "Bookmarks"
|
msgid "Bookmarks"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:252
|
#: src/components/nav-menu.jsx:253
|
||||||
#: src/components/shortcuts-settings.jsx:55
|
#: src/components/shortcuts-settings.jsx:55
|
||||||
#: src/components/shortcuts-settings.jsx:201
|
#: src/components/shortcuts-settings.jsx:201
|
||||||
#: src/pages/catchup.jsx:1449
|
#: src/pages/catchup.jsx:1449
|
||||||
|
@ -1449,13 +1455,13 @@ msgstr ""
|
||||||
msgid "Likes"
|
msgid "Likes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:258
|
#: src/components/nav-menu.jsx:259
|
||||||
#: src/pages/followed-hashtags.jsx:15
|
#: src/pages/followed-hashtags.jsx:15
|
||||||
#: src/pages/followed-hashtags.jsx:45
|
#: src/pages/followed-hashtags.jsx:45
|
||||||
msgid "Followed Hashtags"
|
msgid "Followed Hashtags"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:272
|
#: src/components/nav-menu.jsx:273
|
||||||
#: src/pages/account-statuses.jsx:329
|
#: src/pages/account-statuses.jsx:329
|
||||||
#: src/pages/filters.jsx:55
|
#: src/pages/filters.jsx:55
|
||||||
#: src/pages/filters.jsx:94
|
#: src/pages/filters.jsx:94
|
||||||
|
@ -1463,27 +1469,27 @@ msgstr ""
|
||||||
msgid "Filters"
|
msgid "Filters"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:280
|
#: src/components/nav-menu.jsx:281
|
||||||
msgid "Muted users"
|
msgid "Muted users"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:288
|
#: src/components/nav-menu.jsx:289
|
||||||
msgid "Muted users…"
|
msgid "Muted users…"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:295
|
#: src/components/nav-menu.jsx:296
|
||||||
msgid "Blocked users"
|
msgid "Blocked users"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:303
|
#: src/components/nav-menu.jsx:304
|
||||||
msgid "Blocked users…"
|
msgid "Blocked users…"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:315
|
#: src/components/nav-menu.jsx:316
|
||||||
msgid "Accounts…"
|
msgid "Accounts…"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:325
|
#: src/components/nav-menu.jsx:326
|
||||||
#: src/pages/login.jsx:27
|
#: src/pages/login.jsx:27
|
||||||
#: src/pages/login.jsx:190
|
#: src/pages/login.jsx:190
|
||||||
#: src/pages/status.jsx:862
|
#: src/pages/status.jsx:862
|
||||||
|
@ -1491,40 +1497,40 @@ msgstr ""
|
||||||
msgid "Log in"
|
msgid "Log in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:342
|
#: src/components/nav-menu.jsx:343
|
||||||
#: src/components/shortcuts-settings.jsx:57
|
#: src/components/shortcuts-settings.jsx:57
|
||||||
#: src/components/shortcuts-settings.jsx:172
|
#: src/components/shortcuts-settings.jsx:172
|
||||||
#: src/pages/trending.jsx:444
|
#: src/pages/trending.jsx:444
|
||||||
msgid "Trending"
|
msgid "Trending"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:354
|
#: src/components/nav-menu.jsx:355
|
||||||
#: src/components/shortcuts-settings.jsx:165
|
#: src/components/shortcuts-settings.jsx:165
|
||||||
msgid "Federated"
|
msgid "Federated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:377
|
#: src/components/nav-menu.jsx:378
|
||||||
msgid "Shortcuts / Columns…"
|
msgid "Shortcuts / Columns…"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:387
|
#: src/components/nav-menu.jsx:388
|
||||||
#: src/components/nav-menu.jsx:401
|
#: src/components/nav-menu.jsx:402
|
||||||
msgid "Settings…"
|
msgid "Settings…"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:431
|
#: src/components/nav-menu.jsx:432
|
||||||
#: src/components/nav-menu.jsx:458
|
#: src/components/nav-menu.jsx:467
|
||||||
#: src/components/shortcuts-settings.jsx:50
|
#: src/components/shortcuts-settings.jsx:50
|
||||||
#: src/components/shortcuts-settings.jsx:158
|
#: src/components/shortcuts-settings.jsx:158
|
||||||
#: src/pages/list.jsx:130
|
#: src/pages/list.jsx:127
|
||||||
#: src/pages/lists.jsx:17
|
#: src/pages/lists.jsx:18
|
||||||
#: src/pages/lists.jsx:51
|
#: src/pages/lists.jsx:54
|
||||||
msgid "Lists"
|
msgid "Lists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/nav-menu.jsx:439
|
#: src/components/nav-menu.jsx:440
|
||||||
#: src/components/shortcuts.jsx:215
|
#: src/components/shortcuts.jsx:216
|
||||||
#: src/pages/list.jsx:137
|
#: src/pages/list.jsx:139
|
||||||
msgid "All Lists"
|
msgid "All Lists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1948,7 +1954,7 @@ msgid "Media only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/shortcuts-settings.jsx:235
|
#: src/components/shortcuts-settings.jsx:235
|
||||||
#: src/components/shortcuts.jsx:192
|
#: src/components/shortcuts.jsx:193
|
||||||
msgid "Shortcuts"
|
msgid "Shortcuts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1986,7 +1992,7 @@ msgstr ""
|
||||||
|
|
||||||
#: src/components/shortcuts-settings.jsx:379
|
#: src/components/shortcuts-settings.jsx:379
|
||||||
#: src/components/status.jsx:1382
|
#: src/components/status.jsx:1382
|
||||||
#: src/pages/list.jsx:174
|
#: src/pages/list.jsx:195
|
||||||
msgid "Edit"
|
msgid "Edit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3140,7 +3146,7 @@ msgid "Nothing to see here."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/following.jsx:147
|
#: src/pages/following.jsx:147
|
||||||
#: src/pages/list.jsx:112
|
#: src/pages/list.jsx:109
|
||||||
msgid "Unable to load posts."
|
msgid "Unable to load posts."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3269,30 +3275,30 @@ msgstr ""
|
||||||
msgid "Unable to resolve URL"
|
msgid "Unable to resolve URL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/list.jsx:111
|
#: src/pages/list.jsx:108
|
||||||
msgid "Nothing yet."
|
msgid "Nothing yet."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/list.jsx:180
|
#: src/pages/list.jsx:201
|
||||||
#: src/pages/list.jsx:285
|
#: src/pages/list.jsx:307
|
||||||
msgid "Manage members"
|
msgid "Manage members"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. placeholder {0}: account.username
|
#. placeholder {0}: account.username
|
||||||
#: src/pages/list.jsx:320
|
#: src/pages/list.jsx:342
|
||||||
msgid "Remove <0>@{0}</0> from list?"
|
msgid "Remove <0>@{0}</0> from list?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/list.jsx:366
|
#: src/pages/list.jsx:388
|
||||||
msgid "Remove…"
|
msgid "Remove…"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. placeholder {0}: lists.length
|
#. placeholder {0}: lists.length
|
||||||
#: src/pages/lists.jsx:94
|
#: src/pages/lists.jsx:115
|
||||||
msgid "{0, plural, one {# list} other {# lists}}"
|
msgid "{0, plural, one {# list} other {# lists}}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/pages/lists.jsx:109
|
#: src/pages/lists.jsx:135
|
||||||
msgid "No lists yet."
|
msgid "No lists yet."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import './lists.css';
|
import './lists.css';
|
||||||
|
|
||||||
import { Trans, useLingui } from '@lingui/react/macro';
|
import { Trans, useLingui } from '@lingui/react/macro';
|
||||||
import { Menu, MenuDivider, MenuItem } from '@szhsin/react-menu';
|
import { Menu, MenuDivider, MenuHeader, MenuItem } from '@szhsin/react-menu';
|
||||||
import { useEffect, useRef, useState } from 'preact/hooks';
|
import { useEffect, useRef, useState } from 'preact/hooks';
|
||||||
import { InView } from 'react-intersection-observer';
|
import { InView } from 'react-intersection-observer';
|
||||||
import { useNavigate, useParams } from 'react-router-dom';
|
import { useNavigate, useParams } from 'react-router-dom';
|
||||||
|
@ -9,8 +9,8 @@ import { useSnapshot } from 'valtio';
|
||||||
|
|
||||||
import AccountBlock from '../components/account-block';
|
import AccountBlock from '../components/account-block';
|
||||||
import Icon from '../components/icon';
|
import Icon from '../components/icon';
|
||||||
import Link from '../components/link';
|
|
||||||
import ListAddEdit from '../components/list-add-edit';
|
import ListAddEdit from '../components/list-add-edit';
|
||||||
|
import ListExclusiveBadge from '../components/list-exclusive-badge';
|
||||||
import MenuConfirm from '../components/menu-confirm';
|
import MenuConfirm from '../components/menu-confirm';
|
||||||
import MenuLink from '../components/menu-link';
|
import MenuLink from '../components/menu-link';
|
||||||
import Menu2 from '../components/menu2';
|
import Menu2 from '../components/menu2';
|
||||||
|
@ -80,9 +80,6 @@ function List(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const [lists, setLists] = useState([]);
|
const [lists, setLists] = useState([]);
|
||||||
useEffect(() => {
|
|
||||||
getLists().then(setLists);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const [list, setList] = useState({ title: 'List' });
|
const [list, setList] = useState({ title: 'List' });
|
||||||
// const [title, setTitle] = useState(`List`);
|
// const [title, setTitle] = useState(`List`);
|
||||||
|
@ -131,6 +128,11 @@ function List(props) {
|
||||||
<Icon icon="chevron-down" size="s" />
|
<Icon icon="chevron-down" size="s" />
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
|
onMenuChange={(e) => {
|
||||||
|
if (e.open) {
|
||||||
|
getLists().then(setLists);
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<MenuLink to="/l">
|
<MenuLink to="/l">
|
||||||
<span>
|
<span>
|
||||||
|
@ -142,7 +144,15 @@ function List(props) {
|
||||||
<MenuDivider />
|
<MenuDivider />
|
||||||
{lists.map((list) => (
|
{lists.map((list) => (
|
||||||
<MenuLink key={list.id} to={`/l/${list.id}`}>
|
<MenuLink key={list.id} to={`/l/${list.id}`}>
|
||||||
<span>{list.title}</span>
|
<span>
|
||||||
|
{list.title}
|
||||||
|
{list.exclusive && (
|
||||||
|
<>
|
||||||
|
{' '}
|
||||||
|
<ListExclusiveBadge />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
</MenuLink>
|
</MenuLink>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
|
@ -162,6 +172,17 @@ function List(props) {
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
{list?.exclusive && (
|
||||||
|
<>
|
||||||
|
<MenuHeader className="plain">
|
||||||
|
<ListExclusiveBadge />{' '}
|
||||||
|
<Trans>
|
||||||
|
Posts on this list are hidden from Home/Following
|
||||||
|
</Trans>
|
||||||
|
</MenuHeader>
|
||||||
|
<MenuDivider />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
setShowListAddEditModal({
|
setShowListAddEditModal({
|
||||||
|
@ -225,6 +246,7 @@ function List(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const MEMBERS_LIMIT = 40;
|
const MEMBERS_LIMIT = 40;
|
||||||
|
|
||||||
function ListManageMembers({ listID, onClose }) {
|
function ListManageMembers({ listID, onClose }) {
|
||||||
const { t } = useLingui();
|
const { t } = useLingui();
|
||||||
// Show list of members with [Remove] button
|
// Show list of members with [Remove] button
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { useEffect, useReducer, useState } from 'preact/hooks';
|
||||||
import Icon from '../components/icon';
|
import Icon from '../components/icon';
|
||||||
import Link from '../components/link';
|
import Link from '../components/link';
|
||||||
import ListAddEdit from '../components/list-add-edit';
|
import ListAddEdit from '../components/list-add-edit';
|
||||||
|
import ListExclusiveBadge from '../components/list-exclusive-badge';
|
||||||
import Loader from '../components/loader';
|
import Loader from '../components/loader';
|
||||||
import Modal from '../components/modal';
|
import Modal from '../components/modal';
|
||||||
import NavMenu from '../components/nav-menu';
|
import NavMenu from '../components/nav-menu';
|
||||||
|
@ -36,6 +37,8 @@ function Lists() {
|
||||||
|
|
||||||
const [showListAddEditModal, setShowListAddEditModal] = useState(false);
|
const [showListAddEditModal, setShowListAddEditModal] = useState(false);
|
||||||
|
|
||||||
|
const hasExclusiveLists = lists.some((list) => list.exclusive);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="lists-page" class="deck-container" tabIndex="-1">
|
<div id="lists-page" class="deck-container" tabIndex="-1">
|
||||||
<div class="timeline-deck deck">
|
<div class="timeline-deck deck">
|
||||||
|
@ -68,8 +71,15 @@ function Lists() {
|
||||||
{lists.map((list) => (
|
{lists.map((list) => (
|
||||||
<li>
|
<li>
|
||||||
<Link to={`/l/${list.id}`}>
|
<Link to={`/l/${list.id}`}>
|
||||||
|
<Icon icon="list" />{' '}
|
||||||
<span>
|
<span>
|
||||||
<Icon icon="list" /> <span>{list.title}</span>
|
{list.title}
|
||||||
|
{list.exclusive && (
|
||||||
|
<>
|
||||||
|
{' '}
|
||||||
|
<ListExclusiveBadge insignificant />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
{/* <button
|
{/* <button
|
||||||
type="button"
|
type="button"
|
||||||
|
@ -90,9 +100,25 @@ function Lists() {
|
||||||
</ul>
|
</ul>
|
||||||
{lists.length > 1 && (
|
{lists.length > 1 && (
|
||||||
<footer class="ui-state">
|
<footer class="ui-state">
|
||||||
|
{hasExclusiveLists && (
|
||||||
|
<p>
|
||||||
<small class="insignificant">
|
<small class="insignificant">
|
||||||
<Plural value={lists.length} one="# list" other="# lists" />
|
<ListExclusiveBadge />{' '}
|
||||||
|
<Trans>
|
||||||
|
Posts on this list are hidden from Home/Following
|
||||||
|
</Trans>
|
||||||
</small>
|
</small>
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
<p>
|
||||||
|
<small class="insignificant">
|
||||||
|
<Plural
|
||||||
|
value={lists.length}
|
||||||
|
one="# list"
|
||||||
|
other="# lists"
|
||||||
|
/>
|
||||||
|
</small>
|
||||||
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
Ładowanie…
Reference in New Issue