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 makeMenu = (): Menu => {
|
||||||
const menu: Menu = [];
|
const menu: Menu = [];
|
||||||
|
|
||||||
if (account?.locked || followRequestsCount > 0) {
|
if (account) {
|
||||||
menu.push({
|
if (account.locked || followRequestsCount > 0) {
|
||||||
to: '/follow_requests',
|
menu.push({
|
||||||
text: <FormattedMessage id='navigation_bar.follow_requests' defaultMessage='Follow requests' />,
|
to: '/follow_requests',
|
||||||
icon: require('@tabler/icons/icons/user-plus.svg'),
|
text: <FormattedMessage id='navigation_bar.follow_requests' defaultMessage='Follow requests' />,
|
||||||
// TODO: let menu items have a counter
|
icon: require('@tabler/icons/icons/user-plus.svg'),
|
||||||
// count: followRequestsCount,
|
// TODO: let menu items have a counter
|
||||||
});
|
// count: followRequestsCount,
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (features.bookmarks) {
|
if (features.bookmarks) {
|
||||||
menu.push({
|
menu.push({
|
||||||
to: '/bookmarks',
|
to: '/bookmarks',
|
||||||
text: <FormattedMessage id='column.bookmarks' defaultMessage='Bookmarks' />,
|
text: <FormattedMessage id='column.bookmarks' defaultMessage='Bookmarks' />,
|
||||||
icon: require('@tabler/icons/icons/bookmark.svg'),
|
icon: require('@tabler/icons/icons/bookmark.svg'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (features.lists) {
|
if (features.lists) {
|
||||||
menu.push({
|
menu.push({
|
||||||
to: '/lists',
|
to: '/lists',
|
||||||
text: <FormattedMessage id='column.lists' defaultMessage='Lists' />,
|
text: <FormattedMessage id='column.lists' defaultMessage='Lists' />,
|
||||||
icon: require('@tabler/icons/icons/list.svg'),
|
icon: require('@tabler/icons/icons/list.svg'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (account && instance.invites_enabled) {
|
if (instance.invites_enabled) {
|
||||||
menu.push({
|
menu.push({
|
||||||
to: `${baseURL}/invites`,
|
to: `${baseURL}/invites`,
|
||||||
icon: require('@tabler/icons/icons/mailbox.svg'),
|
icon: require('@tabler/icons/icons/mailbox.svg'),
|
||||||
text: <FormattedMessage id='navigation.invites' defaultMessage='Invites' />,
|
text: <FormattedMessage id='navigation.invites' defaultMessage='Invites' />,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.get('isDeveloper')) {
|
if (settings.get('isDeveloper')) {
|
||||||
menu.push({
|
menu.push({
|
||||||
to: '/developers',
|
to: '/developers',
|
||||||
icon: require('@tabler/icons/icons/code.svg'),
|
icon: require('@tabler/icons/icons/code.svg'),
|
||||||
text: <FormattedMessage id='navigation.developers' defaultMessage='Developers' />,
|
text: <FormattedMessage id='navigation.developers' defaultMessage='Developers' />,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (account && account.staff) {
|
if (account.staff) {
|
||||||
menu.push({
|
menu.push({
|
||||||
to: '/admin',
|
to: '/admin',
|
||||||
icon: require('@tabler/icons/icons/dashboard.svg'),
|
icon: require('@tabler/icons/icons/dashboard.svg'),
|
||||||
text: <FormattedMessage id='tabs_bar.dashboard' defaultMessage='Dashboard' />,
|
text: <FormattedMessage id='tabs_bar.dashboard' defaultMessage='Dashboard' />,
|
||||||
// TODO: let menu items have a counter
|
// TODO: let menu items have a counter
|
||||||
// count: dashboardCount,
|
// count: dashboardCount,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (features.localTimeline || features.publicTimeline) {
|
if (features.localTimeline || features.publicTimeline) {
|
||||||
menu.push(null);
|
menu.push(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (features.localTimeline) {
|
if (features.localTimeline) {
|
||||||
|
|
|
@ -2,16 +2,17 @@ import React from 'react';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
|
import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
|
|
||||||
import { fetchLists } from 'soapbox/actions/lists';
|
import { fetchLists } from 'soapbox/actions/lists';
|
||||||
|
import Icon from 'soapbox/components/icon';
|
||||||
import ScrollableList from 'soapbox/components/scrollable_list';
|
import ScrollableList from 'soapbox/components/scrollable_list';
|
||||||
import { Spinner } from 'soapbox/components/ui';
|
import { Spinner } from 'soapbox/components/ui';
|
||||||
import { CardHeader, CardTitle } from 'soapbox/components/ui';
|
import { CardHeader, CardTitle } from 'soapbox/components/ui';
|
||||||
import { useAppSelector } from 'soapbox/hooks';
|
import { useAppSelector } from 'soapbox/hooks';
|
||||||
|
|
||||||
import Column from '../ui/components/column';
|
import Column from '../ui/components/column';
|
||||||
import ColumnLink from '../ui/components/column_link';
|
|
||||||
|
|
||||||
import NewListForm from './components/new_list_form';
|
import NewListForm from './components/new_list_form';
|
||||||
|
|
||||||
|
@ -66,9 +67,12 @@ const Lists: React.FC = () => {
|
||||||
scrollKey='lists'
|
scrollKey='lists'
|
||||||
emptyMessage={emptyMessage}
|
emptyMessage={emptyMessage}
|
||||||
>
|
>
|
||||||
{lists.map((list: any) =>
|
{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')} />,
|
<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>
|
</ScrollableList>
|
||||||
</Column>
|
</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_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.otp_code_label": "Kod uwierzytelniania dwuetapowego:",
|
||||||
"login.fields.password_placeholder": "Hasło",
|
"login.fields.password_placeholder": "Hasło",
|
||||||
|
"login.fields.username_label": "Nazwa użytkownika lub e-mail",
|
||||||
"login.fields.username_placeholder": "Nazwa użytkownika",
|
"login.fields.username_placeholder": "Nazwa użytkownika",
|
||||||
"login.log_in": "Zaloguj się",
|
"login.log_in": "Zaloguj się",
|
||||||
"login.otp_log_in": "Login OTP",
|
"login.otp_log_in": "Login OTP",
|
||||||
|
|
Loading…
Reference in a new issue