Compare commits

...

4 Commits

Author SHA1 Message Date
Nícolas Pastorello
11244f0bf1
Merge 66d808024f into cecf179b34 2025-01-28 18:48:22 +00:00
community-scripts-pr-app[bot]
cecf179b34
Update CHANGELOG.md (#1829)
Some checks are pending
Auto Update .app-files / update-app-files (push) Waiting to run
Shellcheck / Shellcheck (push) Waiting to run
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
Frontend CI/CD / build (push) Waiting to run
Frontend CI/CD / deploy (push) Blocked by required conditions
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-28 19:34:32 +01:00
Bram Suurd
1f39208c1c
Filter out duplicate scripts in LatestScripts component and sort by creation date (#1828) 2025-01-28 19:33:22 +01:00
CanbiZ
63061942b9
Aktualisieren von homarr-install.sh 2025-01-28 18:24:06 +01:00
3 changed files with 17 additions and 3 deletions

View File

@ -37,6 +37,10 @@ Do not break established syntax in this file, as it is automatically updated by
- Update all Alpine LXC's to 3.21 (Docker, Grafana, Nextcloud, Vaultwarden, Zigbee2Mqtt, Alpine) [@MickLesk](https://github.com/MickLesk) ([#1803](https://github.com/community-scripts/ProxmoxVE/pull/1803))
- [Standardization] Fix Spelling for "Setup Python3" [@MickLesk](https://github.com/MickLesk) ([#1810](https://github.com/community-scripts/ProxmoxVE/pull/1810))
### 🌐 Website
- Filter out duplicate scripts in LatestScripts component and sort by creation date [@BramSuurdje](https://github.com/BramSuurdje) ([#1828](https://github.com/community-scripts/ProxmoxVE/pull/1828))
### 🧰 Maintenance
- [core]: Remove Figlet | Get Headers by Repo & Store Local [@MickLesk](https://github.com/MickLesk) ([#1802](https://github.com/community-scripts/ProxmoxVE/pull/1802))

View File

@ -35,8 +35,18 @@ export function LatestScripts({ items }: { items: Category[] }) {
const latestScripts = useMemo(() => {
if (!items) return [];
const scripts = items.flatMap((category) => category.scripts || []);
return scripts.sort(
// Filter out duplicates by slug
const uniqueScriptsMap = new Map<string, Script>();
scripts.forEach((script) => {
if (!uniqueScriptsMap.has(script.slug)) {
uniqueScriptsMap.set(script.slug, script);
}
});
return Array.from(uniqueScriptsMap.values()).sort(
(a, b) =>
new Date(b.date_created).getTime() - new Date(a.date_created).getTime(),
);
@ -49,7 +59,7 @@ export function LatestScripts({ items }: { items: Category[] }) {
const goToPreviousPage = () => {
setPage((prevPage) => prevPage - 1);
};
const startIndex = (page - 1) * ITEMS_PER_PAGE;
const endIndex = page * ITEMS_PER_PAGE;

View File

@ -35,7 +35,7 @@ msg_ok "Set up Node.js Repository"
msg_info "Installing Node.js/pnpm"
$STD apt-get update
$STD apt-get install -y nodejs
$STD npm install -g pnpm
$STD npm install -g pnpm@latest
msg_ok "Installed Node.js/pnpm"
msg_info "Installing Homarr (Patience)"