import React from "react"; import { Button } from "react-bootstrap"; import { useIntl } from "react-intl"; import { useLatestVersion } from "src/core/StashService"; import { ConstantSetting, Setting, SettingGroup } from "./Inputs"; import { SettingSection } from "./SettingSection"; export const SettingsAboutPanel: React.FC = () => { const gitHash = import.meta.env.VITE_APP_GITHASH; const stashVersion = import.meta.env.VITE_APP_STASH_VERSION; const buildTime = import.meta.env.VITE_APP_DATE; const intl = useIntl(); const { data: dataLatest, error: errorLatest, loading: loadingLatest, refetch, networkStatus, } = useLatestVersion(); const hasNew = dataLatest && gitHash !== dataLatest.latestversion.shorthash; return ( <> {errorLatest ? ( ) : !dataLatest || loadingLatest || networkStatus === 4 ? ( ) : (

{intl.formatMessage({ id: "config.about.latest_version_build_hash", })}

{dataLatest.latestversion.shorthash}{" "} {hasNew ? intl.formatMessage({ id: "config.about.new_version_notice", }) : undefined}
)}

{intl.formatMessage( { id: "config.about.stash_home" }, { url: ( GitHub ), } )}

{intl.formatMessage( { id: "config.about.stash_wiki" }, { url: ( Wiki ), } )}

{intl.formatMessage( { id: "config.about.stash_discord" }, { url: ( Discord ), } )}

{intl.formatMessage( { id: "config.about.stash_open_collective" }, { url: ( Open Collective ), } )}

); };