mirror of
https://github.com/immich-app/immich.git
synced 2025-03-11 02:23:09 -05:00
* concat location properties and use URL constructor to fix issues * remove slashes from old version urls * remove versions 1.125.0 and 1.125.4 that don't have docs archives
This commit is contained in:
parent
6c64a6dab8
commit
16266c9f5a
2 changed files with 17 additions and 22 deletions
|
@ -24,10 +24,13 @@ export default function VersionSwitcher(): JSX.Element {
|
|||
{ label: 'Next', url: 'https://main.preview.immich.app' },
|
||||
{ label: 'Latest', url: 'https://immich.app' },
|
||||
...archiveVersions,
|
||||
];
|
||||
].map(({ label, url }) => ({
|
||||
label,
|
||||
url: new URL(url),
|
||||
}));
|
||||
setVersions(allVersions);
|
||||
|
||||
const activeVersion = allVersions.find((version) => new URL(version.url).origin === window.location.origin);
|
||||
const activeVersion = allVersions.find((version) => version.url.origin === window.location.origin);
|
||||
if (activeVersion) {
|
||||
setLabel(activeVersion.label);
|
||||
}
|
||||
|
@ -49,7 +52,7 @@ export default function VersionSwitcher(): JSX.Element {
|
|||
mobile={windowSize === 'mobile'}
|
||||
items={versions.map(({ label, url }) => ({
|
||||
label,
|
||||
to: url + location.pathname + location.hash,
|
||||
to: new URL(location.pathname + location.search + location.hash, url).href,
|
||||
target: '_self',
|
||||
}))}
|
||||
/>
|
||||
|
|
30
docs/static/archived-versions.json
vendored
30
docs/static/archived-versions.json
vendored
|
@ -19,10 +19,6 @@
|
|||
"label": "v1.125.5",
|
||||
"url": "https://v1.125.5.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.125.4",
|
||||
"url": "https://v1.125.4.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.125.3",
|
||||
"url": "https://v1.125.3.archive.immich.app"
|
||||
|
@ -35,10 +31,6 @@
|
|||
"label": "v1.125.1",
|
||||
"url": "https://v1.125.1.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.125.0",
|
||||
"url": "https://v1.125.0.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.124.2",
|
||||
"url": "https://v1.124.2.archive.immich.app"
|
||||
|
@ -201,46 +193,46 @@
|
|||
},
|
||||
{
|
||||
"label": "v1.105.1",
|
||||
"url": "https://v1.105.1.archive.immich.app/"
|
||||
"url": "https://v1.105.1.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.105.0",
|
||||
"url": "https://v1.105.0.archive.immich.app/"
|
||||
"url": "https://v1.105.0.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.104.0",
|
||||
"url": "https://v1.104.0.archive.immich.app/"
|
||||
"url": "https://v1.104.0.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.103.1",
|
||||
"url": "https://v1.103.1.archive.immich.app/"
|
||||
"url": "https://v1.103.1.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.103.0",
|
||||
"url": "https://v1.103.0.archive.immich.app/"
|
||||
"url": "https://v1.103.0.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.102.3",
|
||||
"url": "https://v1.102.3.archive.immich.app/"
|
||||
"url": "https://v1.102.3.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.102.2",
|
||||
"url": "https://v1.102.2.archive.immich.app/"
|
||||
"url": "https://v1.102.2.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.102.1",
|
||||
"url": "https://v1.102.1.archive.immich.app/"
|
||||
"url": "https://v1.102.1.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.102.0",
|
||||
"url": "https://v1.102.0.archive.immich.app/"
|
||||
"url": "https://v1.102.0.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.101.0",
|
||||
"url": "https://v1.101.0.archive.immich.app/"
|
||||
"url": "https://v1.101.0.archive.immich.app"
|
||||
},
|
||||
{
|
||||
"label": "v1.100.0",
|
||||
"url": "https://v1.100.0.archive.immich.app/"
|
||||
"url": "https://v1.100.0.archive.immich.app"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Reference in a new issue