Skip to content

Commit

Permalink
Merge pull request #64 from yngwi/master
Browse files Browse the repository at this point in the history
Version 0.6.15
  • Loading branch information
yngwi authored Nov 8, 2021
2 parents ee3a949 + d4fdc8e commit 774469c
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 123 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nampi-frontend",
"version": "0.6.14",
"version": "0.6.15",
"private": true,
"dependencies": {
"//": "TODO: Replace with the original react-leaflet package after this [issue](https://github.com/PaulLeCam/react-leaflet/issues/891) is resolved.",
Expand Down
73 changes: 0 additions & 73 deletions src/App/components/ActDetails/index.tsx

This file was deleted.

43 changes: 0 additions & 43 deletions src/App/components/ActsPage/index.tsx

This file was deleted.

2 changes: 2 additions & 0 deletions src/App/components/AspectDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Heading } from "../Heading";
import { ItemComments } from "../ItemComments";
import { ItemInheritance } from "../ItemInheritance";
import { ItemLabels } from "../ItemLabels";
import { ItemPermalink } from "../ItemPermalink";
import { ItemSameAs } from "../ItemSameAs";
import { ItemTexts } from "../ItemTexts";
import { LoadingPlaceholder } from "../LoadingPlaceholder";
Expand Down Expand Up @@ -123,6 +124,7 @@ export const AspectDetails = ({ idLocal }: Props) => {
/>
)}
</div>
<ItemPermalink item={data} />
<ItemInheritance item={data} />
<ItemLabels item={data} />
<ItemTexts item={data} />
Expand Down
2 changes: 2 additions & 0 deletions src/App/components/AuthorDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { FilterableItemList } from "../FilterableItemList";
import { Heading } from "../Heading";
import { ItemInheritance } from "../ItemInheritance";
import { ItemLabels } from "../ItemLabels";
import { ItemPermalink } from "../ItemPermalink";
import { LoadingPlaceholder } from "../LoadingPlaceholder";

interface Props {
Expand Down Expand Up @@ -67,6 +68,7 @@ export const AuthorDetails = ({ idLocal }: Props) => {
values={{ label: getText(data.labels) }}
/>
</Heading>
<ItemPermalink item={data} />
<ItemInheritance item={data} />
<ItemLabels item={data} />
<EventsWithAuthor id={data.id} />
Expand Down
2 changes: 2 additions & 0 deletions src/App/components/EventDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ItemComments } from "../ItemComments";
import { ItemInheritance } from "../ItemInheritance";
import { ItemLabels } from "../ItemLabels";
import { ItemLink } from "../ItemLink";
import { ItemPermalink } from "../ItemPermalink";
import { ItemTexts } from "../ItemTexts";
import { LoadingPlaceholder } from "../LoadingPlaceholder";
import { Map } from "../Map";
Expand Down Expand Up @@ -80,6 +81,7 @@ export const EventDetails = ({ idLocal }: Props) => {
/>
)}
</div>
<ItemPermalink item={data} />
<ItemInheritance item={data} />
<ItemLabels item={data} />
<ItemTexts item={data} />
Expand Down
2 changes: 2 additions & 0 deletions src/App/components/GroupDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ItemComments } from "../ItemComments";
import { ItemInheritance } from "../ItemInheritance";
import { ItemLabels } from "../ItemLabels";
import { ItemLink } from "../ItemLink";
import { ItemPermalink } from "../ItemPermalink";
import { ItemSameAs } from "../ItemSameAs";
import { ItemTexts } from "../ItemTexts";
import { LoadingPlaceholder } from "../LoadingPlaceholder";
Expand Down Expand Up @@ -84,6 +85,7 @@ export const GroupDetails = ({ idLocal }: Props) => {
/>
)}
</div>
<ItemPermalink item={data} />
<ItemInheritance item={data} />
<ItemLabels item={data} />
<ItemTexts item={data} />
Expand Down
34 changes: 34 additions & 0 deletions src/App/components/ItemPermalink/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { faCopy } from "@fortawesome/free-solid-svg-icons";
import { Item } from "nampi-use-api";
import { FormattedMessage, useIntl } from "react-intl";
import { IconButton } from "../IconButton";

interface Props {
item: Item;
}

export const ItemPermalink = ({ item }: Props) => {
const intl = useIntl();
return (
<div className="text-xs">
<FormattedMessage
description="Permalink text"
defaultMessage="Permalink: {url} {copy}"
values={{
url: item.id,
copy: (
<IconButton
className="border-transparent text-gray-500"
icon={faCopy}
label={intl.formatMessage({
description: "Copy button label",
defaultMessage: "Copy permalink",
})}
onClick={() => navigator.clipboard.writeText(item.id)}
/>
),
}}
/>
</div>
);
};
2 changes: 2 additions & 0 deletions src/App/components/PersonDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { ItemComments } from "../ItemComments";
import { ItemInheritance } from "../ItemInheritance";
import { ItemLabels } from "../ItemLabels";
import { ItemLink } from "../ItemLink";
import { ItemPermalink } from "../ItemPermalink";
import { ItemSameAs } from "../ItemSameAs";
import { ItemTexts } from "../ItemTexts";
import { LoadingPlaceholder } from "../LoadingPlaceholder";
Expand Down Expand Up @@ -243,6 +244,7 @@ export const PersonDetails = ({ idLocal }: Props) => {
/>
)}
</div>
<ItemPermalink item={data} />
<ItemInheritance item={data} />
<ItemLabels item={data} />
<ItemTexts item={data} />
Expand Down
2 changes: 2 additions & 0 deletions src/App/components/PlaceDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Heading } from "../Heading";
import { ItemComments } from "../ItemComments";
import { ItemInheritance } from "../ItemInheritance";
import { ItemLabels } from "../ItemLabels";
import { ItemPermalink } from "../ItemPermalink";
import { ItemSameAs } from "../ItemSameAs";
import { ItemTexts } from "../ItemTexts";
import { LoadingPlaceholder } from "../LoadingPlaceholder";
Expand Down Expand Up @@ -92,6 +93,7 @@ export const PlaceDetails = ({ idLocal }: Props) => {
/>
)}
</div>
<ItemPermalink item={data} />
<ItemInheritance item={data} />
<ItemLabels item={data} />
<ItemTexts item={data} />
Expand Down
2 changes: 2 additions & 0 deletions src/App/components/SourceDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Heading } from "../Heading";
import { ItemComments } from "../ItemComments";
import { ItemInheritance } from "../ItemInheritance";
import { ItemLabels } from "../ItemLabels";
import { ItemPermalink } from "../ItemPermalink";
import { ItemSameAs } from "../ItemSameAs";
import { ItemTexts } from "../ItemTexts";
import { LoadingPlaceholder } from "../LoadingPlaceholder";
Expand Down Expand Up @@ -81,6 +82,7 @@ export const SourceDetails = ({ idLocal }: Props) => {
/>
)}
</div>
<ItemPermalink item={data} />
<ItemInheritance item={data} />
<ItemLabels item={data} />
<ItemTexts item={data} />
Expand Down
6 changes: 0 additions & 6 deletions src/App/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useAuth } from "nampi-use-api";
import { Route, Router, Switch } from "react-router";
import { About } from "./components/About";
import { ActsPage } from "./components/ActsPage";
import { AspectsPage } from "./components/AspectsPage";
import { AuthorsPage } from "./components/AuthorsPage";
import { Data } from "./components/Data";
Expand Down Expand Up @@ -31,11 +30,6 @@ export const App = () => {
<Navbar className="sticky top-0 z-10" />
<Switch>
<Route exact path="/" component={Home} />
<Route
exact
path={["/acts", "/acts/:idLocal"]}
component={ActsPage}
/>
<Route
exact
path={["/aspects", "/aspects/:idLocal"]}
Expand Down

0 comments on commit 774469c

Please sign in to comment.