Merge branch 'next' into 'next'
next See merge request soapbox-pub/soapbox-fe!1245
This commit is contained in:
commit
edd8c2705a
4 changed files with 59 additions and 52 deletions
|
@ -28,60 +28,62 @@ const SidebarNavigation = () => {
|
|||
const makeMenu = (): Menu => {
|
||||
const menu: Menu = [];
|
||||
|
||||
if (account?.locked || followRequestsCount > 0) {
|
||||
menu.push({
|
||||
to: '/follow_requests',
|
||||
text: <FormattedMessage id='navigation_bar.follow_requests' defaultMessage='Follow requests' />,
|
||||
icon: require('@tabler/icons/icons/user-plus.svg'),
|
||||
// TODO: let menu items have a counter
|
||||
// count: followRequestsCount,
|
||||
});
|
||||
}
|
||||
if (account) {
|
||||
if (account.locked || followRequestsCount > 0) {
|
||||
menu.push({
|
||||
to: '/follow_requests',
|
||||
text: <FormattedMessage id='navigation_bar.follow_requests' defaultMessage='Follow requests' />,
|
||||
icon: require('@tabler/icons/icons/user-plus.svg'),
|
||||
// TODO: let menu items have a counter
|
||||
// count: followRequestsCount,
|
||||
});
|
||||
}
|
||||
|
||||
if (features.bookmarks) {
|
||||
menu.push({
|
||||
to: '/bookmarks',
|
||||
text: <FormattedMessage id='column.bookmarks' defaultMessage='Bookmarks' />,
|
||||
icon: require('@tabler/icons/icons/bookmark.svg'),
|
||||
});
|
||||
}
|
||||
if (features.bookmarks) {
|
||||
menu.push({
|
||||
to: '/bookmarks',
|
||||
text: <FormattedMessage id='column.bookmarks' defaultMessage='Bookmarks' />,
|
||||
icon: require('@tabler/icons/icons/bookmark.svg'),
|
||||
});
|
||||
}
|
||||
|
||||
if (features.lists) {
|
||||
menu.push({
|
||||
to: '/lists',
|
||||
text: <FormattedMessage id='column.lists' defaultMessage='Lists' />,
|
||||
icon: require('@tabler/icons/icons/list.svg'),
|
||||
});
|
||||
}
|
||||
if (features.lists) {
|
||||
menu.push({
|
||||
to: '/lists',
|
||||
text: <FormattedMessage id='column.lists' defaultMessage='Lists' />,
|
||||
icon: require('@tabler/icons/icons/list.svg'),
|
||||
});
|
||||
}
|
||||
|
||||
if (account && instance.invites_enabled) {
|
||||
menu.push({
|
||||
to: `${baseURL}/invites`,
|
||||
icon: require('@tabler/icons/icons/mailbox.svg'),
|
||||
text: <FormattedMessage id='navigation.invites' defaultMessage='Invites' />,
|
||||
});
|
||||
}
|
||||
if (instance.invites_enabled) {
|
||||
menu.push({
|
||||
to: `${baseURL}/invites`,
|
||||
icon: require('@tabler/icons/icons/mailbox.svg'),
|
||||
text: <FormattedMessage id='navigation.invites' defaultMessage='Invites' />,
|
||||
});
|
||||
}
|
||||
|
||||
if (settings.get('isDeveloper')) {
|
||||
menu.push({
|
||||
to: '/developers',
|
||||
icon: require('@tabler/icons/icons/code.svg'),
|
||||
text: <FormattedMessage id='navigation.developers' defaultMessage='Developers' />,
|
||||
});
|
||||
}
|
||||
if (settings.get('isDeveloper')) {
|
||||
menu.push({
|
||||
to: '/developers',
|
||||
icon: require('@tabler/icons/icons/code.svg'),
|
||||
text: <FormattedMessage id='navigation.developers' defaultMessage='Developers' />,
|
||||
});
|
||||
}
|
||||
|
||||
if (account && account.staff) {
|
||||
menu.push({
|
||||
to: '/admin',
|
||||
icon: require('@tabler/icons/icons/dashboard.svg'),
|
||||
text: <FormattedMessage id='tabs_bar.dashboard' defaultMessage='Dashboard' />,
|
||||
// TODO: let menu items have a counter
|
||||
// count: dashboardCount,
|
||||
});
|
||||
}
|
||||
if (account.staff) {
|
||||
menu.push({
|
||||
to: '/admin',
|
||||
icon: require('@tabler/icons/icons/dashboard.svg'),
|
||||
text: <FormattedMessage id='tabs_bar.dashboard' defaultMessage='Dashboard' />,
|
||||
// TODO: let menu items have a counter
|
||||
// count: dashboardCount,
|
||||
});
|
||||
}
|
||||
|
||||
if (features.localTimeline || features.publicTimeline) {
|
||||
menu.push(null);
|
||||
if (features.localTimeline || features.publicTimeline) {
|
||||
menu.push(null);
|
||||
}
|
||||
}
|
||||
|
||||
if (features.localTimeline) {
|
||||
|
|
|
@ -2,16 +2,17 @@ import React from 'react';
|
|||
import { useEffect } from 'react';
|
||||
import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
import { fetchLists } from 'soapbox/actions/lists';
|
||||
import Icon from 'soapbox/components/icon';
|
||||
import ScrollableList from 'soapbox/components/scrollable_list';
|
||||
import { Spinner } from 'soapbox/components/ui';
|
||||
import { CardHeader, CardTitle } from 'soapbox/components/ui';
|
||||
import { useAppSelector } from 'soapbox/hooks';
|
||||
|
||||
import Column from '../ui/components/column';
|
||||
import ColumnLink from '../ui/components/column_link';
|
||||
|
||||
import NewListForm from './components/new_list_form';
|
||||
|
||||
|
@ -66,9 +67,12 @@ const Lists: React.FC = () => {
|
|||
scrollKey='lists'
|
||||
emptyMessage={emptyMessage}
|
||||
>
|
||||
{lists.map((list: any) =>
|
||||
<ColumnLink key={list.get('id')} to={`/list/${list.get('id')}`} src={require('@tabler/icons/icons/list.svg')} text={list.get('title')} />,
|
||||
)}
|
||||
{lists.map((list: any) => (
|
||||
<Link key={list.get('id')} to={`/list/${list.get('id')}`} className='flex items-center gap-1.5 p-2 my-2 text-black dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg'>
|
||||
<Icon src={require('@tabler/icons/icons/list.svg')} fixedWidth />
|
||||
{list.get('title')}
|
||||
</Link>
|
||||
))}
|
||||
</ScrollableList>
|
||||
</Column>
|
||||
);
|
||||
|
|
Binary file not shown.
|
@ -618,6 +618,7 @@
|
|||
"login.fields.otp_code_hint": "Wprowadź kod uwierzytelniania dwuetapowego wygenerowany przez aplikację mobilną lub jeden z kodów zapasowych",
|
||||
"login.fields.otp_code_label": "Kod uwierzytelniania dwuetapowego:",
|
||||
"login.fields.password_placeholder": "Hasło",
|
||||
"login.fields.username_label": "Nazwa użytkownika lub e-mail",
|
||||
"login.fields.username_placeholder": "Nazwa użytkownika",
|
||||
"login.log_in": "Zaloguj się",
|
||||
"login.otp_log_in": "Login OTP",
|
||||
|
|
Loading…
Reference in a new issue