Browse Source

Update error fallback, fix community dropdown and several icons

main
GreatBearShark 2 years ago
parent
commit
647b360702
  1. 10
      src/components/ErrorFallback.tsx
  2. 1
      src/components/community-dropdown.tsx
  3. 21
      src/components/icon.tsx
  4. 5
      src/components/navbar.tsx
  5. 4
      src/components/post-listing.tsx
  6. 9
      src/custom.css

10
src/components/ErrorFallback.tsx

@ -35,6 +35,16 @@ export default function ErrorFallback() {
Create a Bug Report
</Button>
</Block>
<Link
css={{
textAlign: 'center',
display: 'block',
textDecoration: 'underline',
}}
href="/"
>
Go Back Home
</Link>
</Block>
</Block>
</ThemeProvider>

1
src/components/community-dropdown.tsx

@ -94,6 +94,7 @@ export class CommunityDropdown extends Component<
className="dropdown-filter form-control"
placeholder="Filter"
onChange={this.handleFilterChange}
autoFocus
/>
<button
className="dropdown-exit btn"

21
src/components/icon.tsx

@ -155,6 +155,27 @@ const icons = {
<line x1="3" y1="18" x2="21" y2="18" />
</svg>
),
settings: (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"
/>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
/>
</svg>
),
};
interface IconProps {

5
src/components/navbar.tsx

@ -258,6 +258,7 @@ class UnwrappedNavbar extends Component<any, NavbarState> {
<StyledLink
py={3}
mx={2}
ml={3}
// className="btn btn-inline"
title={i18n.t('communities')}
id="community-button"
@ -338,9 +339,7 @@ class UnwrappedNavbar extends Component<any, NavbarState> {
color="text"
title={i18n.t('admin_settings')}
>
<svg className="icon">
<use xlinkHref="#icon-settings" />
</svg>
<Icon name="settings" />
</StyledLink>
</li>
)}

4
src/components/post-listing.tsx

@ -252,7 +252,7 @@ const MobilePostListing = ({
<Link
to={{
pathname: `/post/${post.id}`,
state: { post: { ...post, my_vote: this.state.my_vote } },
state: { post: { ...post, my_vote: my_vote } },
}}
color="text"
>
@ -459,7 +459,7 @@ const MobilePostListing = ({
})}
to={{
pathname: `/post/${post.id}`,
state: { post: { ...post, my_vote: this.state.my_vote } },
state: { post: { ...post, my_vote: my_vote } },
}}
>
<Icon name="comment" className="icon mr-1" />

9
src/custom.css

@ -535,10 +535,11 @@ a.text-body {
}
.floating-container {
left: 50%;
margin-left: -150px;
top: 100px;
width: 300px;
/* left: 50%;
margin-left: -150px; */
left: 5vw;
top: 20px;
width: 90vw;
}
.dropdown-content {

Loading…
Cancel
Save