mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #22547 from overleaf/revert-22517-ac-ds-nav-phosphor-icons
Revert "[web] Use icons from `@phosphor-icons/react` for the project-list (DS-Nav)" GitOrigin-RevId: 350f5d69a8f575d8ee4e3bd6af46e4e5f7137c7d
This commit is contained in:
+6
-22
@@ -1,11 +1,11 @@
|
||||
import { useState } from 'react'
|
||||
import classnames from 'classnames'
|
||||
import { Question, User } from '@phosphor-icons/react'
|
||||
import NewProjectButton from '../new-project-button'
|
||||
import SidebarFilters from './sidebar-filters'
|
||||
import AddAffiliation, { useAddAffiliation } from '../add-affiliation'
|
||||
import SurveyWidget from '../survey-widget'
|
||||
import { usePersistedResize } from '@/shared/hooks/use-resize'
|
||||
import { usePersistedResize } from '../../../../shared/hooks/use-resize'
|
||||
import MaterialIcon from '@/shared/components/material-icon'
|
||||
import { Dropdown } from 'react-bootstrap-5'
|
||||
import getMeta from '@/utils/meta'
|
||||
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
|
||||
@@ -77,18 +77,11 @@ function SidebarDsNav() {
|
||||
}}
|
||||
>
|
||||
<div>
|
||||
<Question size={24} />
|
||||
<MaterialIcon type="help" size="2x" />
|
||||
</div>
|
||||
</OLTooltip>
|
||||
</Dropdown.Toggle>
|
||||
<Dropdown.Menu
|
||||
as="ul"
|
||||
role="menu"
|
||||
align="end"
|
||||
popperConfig={{
|
||||
modifiers: [{ name: 'offset', options: { offset: [0, 5] } }],
|
||||
}}
|
||||
>
|
||||
<Dropdown.Menu as="ul" role="menu" align="end">
|
||||
<NavDropdownMenuItems
|
||||
dropdown={helpItem.dropdown}
|
||||
showContactUsModal={showContactUsModal}
|
||||
@@ -112,20 +105,11 @@ function SidebarDsNav() {
|
||||
}}
|
||||
>
|
||||
<div>
|
||||
<User size={24} />
|
||||
<MaterialIcon type="person" size="2x" />
|
||||
</div>
|
||||
</OLTooltip>
|
||||
</Dropdown.Toggle>
|
||||
<Dropdown.Menu
|
||||
as="ul"
|
||||
role="menu"
|
||||
align="end"
|
||||
popperConfig={{
|
||||
modifiers: [
|
||||
{ name: 'offset', options: { offset: [-50, 5] } },
|
||||
],
|
||||
}}
|
||||
>
|
||||
<Dropdown.Menu as="ul" role="menu" align="end">
|
||||
<AccountMenuItems
|
||||
sessionUser={sessionUser}
|
||||
showSubscriptionLink={showSubscriptionLink}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { sortBy } from 'lodash'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Plus, TagSimple } from '@phosphor-icons/react'
|
||||
import MaterialIcon from '../../../../shared/components/material-icon'
|
||||
import {
|
||||
UNCATEGORIZED_KEY,
|
||||
@@ -47,12 +46,7 @@ export default function TagsList() {
|
||||
</li>
|
||||
<li className="tag">
|
||||
<button type="button" className="tag-name" onClick={openCreateTagModal}>
|
||||
{isDsNav ? (
|
||||
<Plus weight="bold" />
|
||||
) : (
|
||||
<MaterialIcon type="add" className="tag-list-icon" />
|
||||
)}
|
||||
|
||||
<MaterialIcon type="add" className="tag-list-icon" />
|
||||
<span className="name">{t('new_tag')}</span>
|
||||
</button>
|
||||
</li>
|
||||
@@ -74,11 +68,7 @@ export default function TagsList() {
|
||||
color: getTagColor(tag),
|
||||
}}
|
||||
>
|
||||
{isDsNav ? (
|
||||
<TagSimple weight="fill" className="tag-list-icon" />
|
||||
) : (
|
||||
<MaterialIcon type="label" className="tag-list-icon" />
|
||||
)}
|
||||
<MaterialIcon type="label" className="tag-list-icon" />
|
||||
</span>
|
||||
<span className="name">
|
||||
{tag.name}{' '}
|
||||
|
||||
+2
-6
@@ -5,8 +5,6 @@ import type { NavbarSessionUser } from '@/features/ui/components/types/navbar'
|
||||
import DropdownListItem from '@/features/ui/components/bootstrap-5/dropdown-list-item'
|
||||
import NavDropdownDivider from './nav-dropdown-divider'
|
||||
import NavDropdownLinkItem from './nav-dropdown-link-item'
|
||||
import { useIsDsNav } from '@/features/project-list/components/use-is-ds-nav'
|
||||
import { SignOut } from '@phosphor-icons/react'
|
||||
|
||||
export function AccountMenuItems({
|
||||
sessionUser,
|
||||
@@ -17,7 +15,7 @@ export function AccountMenuItems({
|
||||
}) {
|
||||
const { t } = useTranslation()
|
||||
const logOutFormId = 'logOutForm'
|
||||
const isDsNav = useIsDsNav()
|
||||
|
||||
return (
|
||||
<>
|
||||
<Dropdown.Item as="li" disabled role="menuitem">
|
||||
@@ -45,10 +43,8 @@ export function AccountMenuItems({
|
||||
type="submit"
|
||||
form={logOutFormId}
|
||||
role="menuitem"
|
||||
className="d-flex align-items-center justify-content-between"
|
||||
>
|
||||
<span>{t('log_out')}</span>
|
||||
{isDsNav && <SignOut size={16} />}
|
||||
{t('log_out')}
|
||||
</Dropdown.Item>
|
||||
<form id={logOutFormId} method="POST" action="/logout">
|
||||
<input type="hidden" name="_csrf" value={getMeta('ol-csrfToken')} />
|
||||
|
||||
@@ -239,7 +239,6 @@
|
||||
|
||||
&.show {
|
||||
background-color: var(--bg-accent-03);
|
||||
color: var(--green-60);
|
||||
}
|
||||
|
||||
&::after {
|
||||
|
||||
@@ -85,7 +85,6 @@
|
||||
"@overleaf/promise-utils": "*",
|
||||
"@overleaf/redis-wrapper": "*",
|
||||
"@overleaf/settings": "*",
|
||||
"@phosphor-icons/react": "^2.1.7",
|
||||
"@slack/webhook": "^7.0.2",
|
||||
"@xmldom/xmldom": "^0.7.13",
|
||||
"accepts": "^1.3.7",
|
||||
|
||||
Reference in New Issue
Block a user