Compare commits

...

6 Commits

Author SHA1 Message Date
CanbiZ
72bee44543
remove storage Check in adguard.sh
Some checks are pending
Deploy Next.js site to Pages / build (push) Waiting to run
Deploy Next.js site to Pages / deploy (push) Blocked by required conditions
2024-11-14 00:05:55 +01:00
CanbiZ
3ef3718056
Merge adguard.sh (#238) 2024-11-13 23:58:19 +01:00
CanbiZ
f7adce2fda
Remove Update Code from Adguard Home (#213)
* Remove Update Code from Adguard Home

* Update adguard.json

* Update ct/adguard.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update json/adguard.json

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* improve Text in json

---------

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>
2024-11-13 23:52:36 +01:00
Bram Suurd
612f41afdd
Enhance Alerts component with dynamic colored notes using AlertColors from config for better visibility and consistency (#229) 2024-11-13 22:33:45 +01:00
Paul
2c07496638
Remove DRAFT (#231)
* Proposed rewording

* Fixed typo in donations

* remove draft label
2024-11-13 22:11:19 +01:00
Paul
873c78bfd8
Removed DRAFT label in README. (#232) 2024-11-13 22:11:08 +01:00
6 changed files with 33 additions and 32 deletions

View File

@ -65,7 +65,7 @@ For detailed instructions, check out our [official guides](https://github.com/co
The Proxmox Helper Scripts project is community-driven, and we highly appreciate any contributions — whether it's through reporting bugs, suggesting features, improving documentation, or spreading the word. We are committed to maintaining transparency and sustainability in this open-source effort.
### 💖&nbsp; Donate to Support the Project (DRAFT)
### 💖&nbsp; Donate to Support the Project
We offer two donation options to help maintain and grow this project:

View File

@ -52,35 +52,10 @@ function default_settings() {
VERB="no"
echo_default
}
function update_script() {
header_info
if [[ ! -d /opt/AdGuardHome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then
read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt
[[ ${prompt,,} =~ ^(y|yes)$ ]] || exit
fi
wget -qL https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz
msg_info "Stopping AdguardHome"
systemctl stop AdGuardHome
msg_ok "Stopped AdguardHome"
msg_info "Updating AdguardHome"
tar -xvf AdGuardHome_linux_amd64.tar.gz &>/dev/null
mkdir -p adguard-backup
cp -r /opt/AdGuardHome/AdGuardHome.yaml /opt/AdGuardHome/data adguard-backup/
cp AdGuardHome/AdGuardHome /opt/AdGuardHome/AdGuardHome
cp -r adguard-backup/* /opt/AdGuardHome/
msg_ok "Updated AdguardHome"
msg_info "Starting AdguardHome"
systemctl start AdGuardHome
msg_ok "Started AdguardHome"
msg_info "Cleaning Up"
rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup
msg_ok "Cleaned"
msg_ok "Updated Successfully"
msg_error "Adguard Home should be updated via the user interface."
exit
}

View File

@ -1,14 +1,26 @@
import TextCopyBlock from "@/components/TextCopyBlock";
import { AlertColors } from "@/config/siteConfig";
import { Script } from "@/lib/types";
import { cn } from "@/lib/utils";
import { Info } from "lucide-react";
type NoteProps = {
text: string;
type: keyof typeof AlertColors;
}
export default function Alerts({ item }: { item: Script }) {
return (
<>
{item?.notes?.length > 0 &&
item.notes.map((note: any, index: number) => (
item.notes.map((note: NoteProps, index: number) => (
<div key={index} className="mt-4 flex flex-col gap-2">
<p className="inline-flex items-center gap-2 rounded-lg border border-red-500/25 bg-destructive/25 p-2 pl-4 text-sm">
<p
className={cn(
"inline-flex items-center gap-2 rounded-lg border p-2 pl-4 text-sm",
AlertColors[note.type],
)}
>
<Info className="h-4 min-h-4 w-4 min-w-4" />
<span>{TextCopyBlock(note.text)}</span>
</p>

View File

@ -34,3 +34,10 @@ export const analytics = {
url: "analytics.proxmoxve-scripts.com",
token: "b60d3032-1a11-4244-a100-81d26c5c49a7",
};
export const AlertColors = {
warning:
"border-yellow-400 bg-yellow-50 dark:border-yellow-900 dark:bg-yellow-900",
danger: "border-red-500/25 bg-destructive/25",
info: "border-cyan-500/25 bg-cyan-50 dark:border-cyan-900/25 dark:bg-cyan-900",
};

View File

@ -1,3 +1,5 @@
import { AlertColors } from "@/config/siteConfig";
export type Script = {
name: string;
slug: string;
@ -29,7 +31,7 @@ export type Script = {
notes: [
{
text: string;
type: string;
type: keyof typeof AlertColors;
},
];
};

View File

@ -30,5 +30,10 @@
"username": null,
"password": null
},
"notes": []
}
"notes": [
{
"text": "Adguard Home can be updated via the user interface.",
"type": "warning"
}
]
}