fix: fixed jellyseerr out of date on stable version

When jellyseerr latest version or the stable version was deployed, the version was shown as out of
date with a message to up date to the latest version even though it was the latest version. This
fixed that issue
This commit is contained in:
Fallenbagel
2022-04-13 17:21:03 +05:00
parent cc5192209f
commit 73672e29f8
2 changed files with 13 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
import {
ArrowCircleUpIcon,
BeakerIcon,
// BeakerIcon,
CodeIcon,
ServerIcon,
} from '@heroicons/react/outline';
@@ -36,7 +36,7 @@ const VersionStatus: React.FC<VersionStatusProps> = ({ onClick }) => {
data.commitTag === 'local'
? 'Keep it up! 👍'
: data.version.startsWith('develop-')
? intl.formatMessage(messages.streamdevelop)
? intl.formatMessage(messages.streamstable)
: intl.formatMessage(messages.streamstable);
return (
@@ -52,14 +52,16 @@ const VersionStatus: React.FC<VersionStatusProps> = ({ onClick }) => {
tabIndex={0}
className={`flex items-center p-2 mx-2 text-xs transition duration-300 rounded-lg ring-1 ring-gray-700 ${
data.updateAvailable
? 'bg-yellow-500 text-white hover:bg-yellow-400'
? // ? 'bg-yellow-500 text-white hover:bg-yellow-400'
'bg-gray-900 text-gray-300 hover:bg-gray-800'
: 'bg-gray-900 text-gray-300 hover:bg-gray-800'
}`}
>
{data.commitTag === 'local' ? (
<CodeIcon className="w-6 h-6" />
) : data.version.startsWith('develop-') ? (
<BeakerIcon className="w-6 h-6" />
// <BeakerIcon className="w-6 h-6" />
<CodeIcon className="w-6 h-6" />
) : (
<ServerIcon className="w-6 h-6" />
)}
@@ -72,7 +74,8 @@ const VersionStatus: React.FC<VersionStatusProps> = ({ onClick }) => {
intl.formatMessage(messages.commitsbehind, {
commitsBehind: data.commitsBehind,
})
) : data.commitsBehind === -1 ? (
) : // ) : data.commitsBehind === -1 ? (
data.commitsBehind === 0 ? (
intl.formatMessage(messages.outofdate)
) : (
<code className="p-0 bg-transparent">

View File

@@ -85,10 +85,10 @@ const SettingsAbout: React.FC = () => {
title={intl.formatMessage(messages.version)}
className="truncate"
>
<code>{data.version.replace('develop-', '')}</code>
{/* <code>{data.version.replace('develop-', '')}</code> */}
{status?.updateAvailable ? (
<Badge badgeType="warning" className="ml-2">
{intl.formatMessage(messages.outofdate)}
<Badge badgeType="success" className="ml-2">
{intl.formatMessage(messages.uptodate)}
</Badge>
) : (
status?.commitTag !== 'local' && (
@@ -115,12 +115,12 @@ const SettingsAbout: React.FC = () => {
<List title={intl.formatMessage(messages.gettingsupport)}>
<List.Item title={intl.formatMessage(messages.documentation)}>
<a
href="https://github.com/Fallenbagel/jellyseerr#readme"
href="https://github.com/Fallenbagel/jellyseerr/blob/main/README.md"
target="_blank"
rel="noreferrer"
className="text-indigo-500 hover:underline"
>
https://github.com/Fallenbagel/jellyseerr#readme
https://github.com/Fallenbagel/jellyseerr/blob/main/README.md
</a>
</List.Item>
<List.Item title={intl.formatMessage(messages.githubdiscussions)}>