mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-23 03:11:25 +00:00
Merge branch 'mahanstreamer-archi'
This commit is contained in:
commit
6433e26e08
2 changed files with 35 additions and 11 deletions
|
@ -20,7 +20,7 @@ import { i18n } from "../../i18next";
|
|||
import { PostFormParams } from "../../interfaces";
|
||||
import { UserService, WebSocketService } from "../../services";
|
||||
import {
|
||||
archiveUrl,
|
||||
archiveTodayUrl,
|
||||
authField,
|
||||
capitalizeFirstLetter,
|
||||
choicesConfig,
|
||||
|
@ -29,6 +29,7 @@ import {
|
|||
debounce,
|
||||
fetchCommunities,
|
||||
getSiteMetadata,
|
||||
ghostArchiveUrl,
|
||||
isBrowser,
|
||||
isImage,
|
||||
pictrsDeleteToast,
|
||||
|
@ -36,6 +37,7 @@ import {
|
|||
toast,
|
||||
validTitle,
|
||||
validURL,
|
||||
webArchiveUrl,
|
||||
wsClient,
|
||||
wsJsonToRes,
|
||||
wsSubscribe,
|
||||
|
@ -211,15 +213,35 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
|||
/>
|
||||
</form>
|
||||
{this.state.postForm.url && validURL(this.state.postForm.url) && (
|
||||
<a
|
||||
href={`${archiveUrl}/?run=1&url=${encodeURIComponent(
|
||||
this.state.postForm.url
|
||||
)}`}
|
||||
class="mr-2 d-inline-block float-right text-muted small font-weight-bold"
|
||||
rel="noopener"
|
||||
>
|
||||
{i18n.t("archive_link")}
|
||||
</a>
|
||||
<div>
|
||||
<a
|
||||
href={`${webArchiveUrl}/save/${encodeURIComponent(
|
||||
this.state.postForm.url
|
||||
)}`}
|
||||
class="mr-2 d-inline-block float-right text-muted small font-weight-bold"
|
||||
rel="noopener"
|
||||
>
|
||||
archive.org {i18n.t("archive_link")}
|
||||
</a>
|
||||
<a
|
||||
href={`${ghostArchiveUrl}/search?term=${encodeURIComponent(
|
||||
this.state.postForm.url
|
||||
)}`}
|
||||
class="mr-2 d-inline-block float-right text-muted small font-weight-bold"
|
||||
rel="noopener"
|
||||
>
|
||||
ghostarchive.org {i18n.t("archive_link")}
|
||||
</a>
|
||||
<a
|
||||
href={`${archiveTodayUrl}/?run=1&url=${encodeURIComponent(
|
||||
this.state.postForm.url
|
||||
)}`}
|
||||
class="mr-2 d-inline-block float-right text-muted small font-weight-bold"
|
||||
rel="noopener"
|
||||
>
|
||||
archive.today {i18n.t("archive_link")}
|
||||
</a>
|
||||
</div>
|
||||
)}
|
||||
{this.state.imageLoading && <Spinner />}
|
||||
{isImage(this.state.postForm.url) && (
|
||||
|
|
|
@ -102,7 +102,9 @@ export const docsUrl = `${joinLemmyUrl}/docs/en/index.html`;
|
|||
export const helpGuideUrl = `${joinLemmyUrl}/docs/en/about/guide.html`; // TODO find a way to redirect to the non-en folder
|
||||
export const markdownHelpUrl = `${helpGuideUrl}#markdown-guide`;
|
||||
export const sortingHelpUrl = `${helpGuideUrl}#sorting`;
|
||||
export const archiveUrl = "https://archive.is";
|
||||
export const archiveTodayUrl = "https://archive.today";
|
||||
export const ghostArchiveUrl = "https://ghostarchive.org";
|
||||
export const webArchiveUrl = "https://web.archive.org";
|
||||
export const elementUrl = "https://element.io";
|
||||
|
||||
export const postRefetchSeconds: number = 60 * 1000;
|
||||
|
|
Loading…
Reference in a new issue