New things :)
parent
f28ffed5cd
commit
aec7bd2f94
|
@ -55,7 +55,7 @@ if ($Logs) {
|
|||
#Not available yet
|
||||
$Message = $NotifLocale.local.outputs.output[5].message
|
||||
$MessageType = "warning"
|
||||
Start-NotifTask $Title $Message $MessageType $Balise
|
||||
Start-NotifTask -Message $Message -MessageType $MessageType
|
||||
}
|
||||
}
|
||||
elseif ($Help) {
|
||||
|
@ -67,7 +67,7 @@ else {
|
|||
if (Test-WAUisRunning) {
|
||||
$Message = $NotifLocale.local.outputs.output[8].message
|
||||
$MessageType = "warning"
|
||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
||||
Start-NotifTask -Message $Message -MessageType $MessageType
|
||||
break
|
||||
}
|
||||
#Run scheduled task
|
||||
|
@ -75,19 +75,19 @@ else {
|
|||
#Starting check - Send notification
|
||||
$Message = $NotifLocale.local.outputs.output[6].message
|
||||
$MessageType = "info"
|
||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
||||
Start-NotifTask -Message $Message -MessageType $MessageType
|
||||
#Sleep until the task is done
|
||||
While (Test-WAUisRunning) {
|
||||
Start-Sleep 3
|
||||
}
|
||||
$Message = $NotifLocale.local.outputs.output[9].message
|
||||
$MessageType = "success"
|
||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
||||
Start-NotifTask -Message $Message -MessageType $MessageType
|
||||
}
|
||||
catch {
|
||||
#Check failed - Just send notification
|
||||
$Message = $NotifLocale.local.outputs.output[7].message
|
||||
$MessageType = "error"
|
||||
Start-NotifTask $Title $Message $MessageType $Balise
|
||||
Start-NotifTask -Message $Message -MessageType $MessageType
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,12 +55,15 @@ function Test-Network {
|
|||
|
||||
#Send Warning Notif if no connection for 5 min
|
||||
if ($timeout -eq 300) {
|
||||
#Log
|
||||
Write-Log "Notify 'No connection' sent." "Yellow"
|
||||
|
||||
#Notif
|
||||
$Title = $NotifLocale.local.outputs.output[0].title
|
||||
$Message = $NotifLocale.local.outputs.output[0].message
|
||||
$MessageType = "warning"
|
||||
$Balise = "connection"
|
||||
Start-NotifTask $Title $Message $MessageType $Balise
|
||||
$Balise = "Connection"
|
||||
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Balise $Balise
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -69,11 +72,14 @@ function Test-Network {
|
|||
|
||||
#Send Timeout Notif if no connection for 30 min
|
||||
Write-Log "Timeout. No internet connection !" "Red"
|
||||
|
||||
#Notif
|
||||
$Title = $NotifLocale.local.outputs.output[1].title
|
||||
$Message = $NotifLocale.local.outputs.output[1].message
|
||||
$MessageType = "error"
|
||||
$Balise = "connection"
|
||||
Start-NotifTask $Title $Message $MessageType $Balise
|
||||
$Balise = "Connection"
|
||||
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Balise $Balise
|
||||
|
||||
return $false
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
Function Update-App ($app) {
|
||||
|
||||
#Get App Info
|
||||
$OnClickAction = Get-AppInfo $app.Id
|
||||
$ReleaseNoteURL = Get-AppInfo $app.Id
|
||||
if ($ReleaseNoteURL){
|
||||
$Button1Text = $NotifLocale.local.outputs.output[10].message
|
||||
}
|
||||
|
||||
#Send available update notification
|
||||
Write-Log "Updating $($app.Name) from $($app.Version) to $($app.AvailableVersion)..." "Cyan"
|
||||
|
@ -11,7 +14,7 @@ Function Update-App ($app) {
|
|||
$Message = $NotifLocale.local.outputs.output[2].message -f $($app.Version), $($app.AvailableVersion)
|
||||
$MessageType = "info"
|
||||
$Balise = $($app.Name)
|
||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
||||
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Balise $Balise -Button1Action $ReleaseNoteURL -Button1Text $Button1Text
|
||||
|
||||
#Winget upgrade
|
||||
Write-Log "########## WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID '$($App.Id)' ##########" "Gray"
|
||||
|
@ -84,7 +87,7 @@ Function Update-App ($app) {
|
|||
$Message = $NotifLocale.local.outputs.output[3].message -f $($app.AvailableVersion)
|
||||
$MessageType = "success"
|
||||
$Balise = $($app.Name)
|
||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
||||
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Balise $Balise -Button1Action $ReleaseNoteURL -Button1Text $Button1Text
|
||||
|
||||
$Script:InstallOK += 1
|
||||
|
||||
|
@ -99,7 +102,7 @@ Function Update-App ($app) {
|
|||
$Message = $NotifLocale.local.outputs.output[4].message
|
||||
$MessageType = "error"
|
||||
$Balise = $($app.Name)
|
||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
||||
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Balise $Balise -Button1Action $ReleaseNoteURL -Button1Text $Button1Text
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
function Update-WAU {
|
||||
|
||||
$OnClickAction = "https://github.com/Romanitho/Winget-AutoUpdate/releases"
|
||||
$Button1Text = $NotifLocale.local.outputs.output[10].message
|
||||
|
||||
#Send available update notification
|
||||
$Title = $NotifLocale.local.outputs.output[2].title -f "Winget-AutoUpdate"
|
||||
$Message = $NotifLocale.local.outputs.output[2].message -f $WAUCurrentVersion, $WAUAvailableVersion
|
||||
$MessageType = "info"
|
||||
$Balise = "Winget-AutoUpdate"
|
||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
||||
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Button1Action $OnClickAction -Button1Text $Button1Text
|
||||
|
||||
#Run WAU update
|
||||
try {
|
||||
|
@ -53,8 +53,7 @@ function Update-WAU {
|
|||
$Title = $NotifLocale.local.outputs.output[3].title -f "Winget-AutoUpdate"
|
||||
$Message = $NotifLocale.local.outputs.output[3].message -f $WAUAvailableVersion
|
||||
$MessageType = "success"
|
||||
$Balise = "Winget-AutoUpdate"
|
||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
||||
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Button1Action $OnClickAction -Button1Text $Button1Text
|
||||
|
||||
#Rerun with newer version
|
||||
Write-Log "Re-run WAU"
|
||||
|
@ -70,8 +69,7 @@ function Update-WAU {
|
|||
$Title = $NotifLocale.local.outputs.output[4].title -f "Winget-AutoUpdate"
|
||||
$Message = $NotifLocale.local.outputs.output[4].message
|
||||
$MessageType = "error"
|
||||
$Balise = "Winget-AutoUpdate"
|
||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
||||
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Button1Action $OnClickAction -Button1Text $Button1Text
|
||||
Write-Log "WAU Update failed" "Red"
|
||||
|
||||
}
|
||||
|
|
|
@ -49,6 +49,10 @@
|
|||
<output id="9">
|
||||
<!--Manual check for updated apps completed-->
|
||||
<message>Die manuelle suche nach Updates wurde abgeschlossen.</message>
|
||||
<output id="10">
|
||||
<!--See changelog-->
|
||||
<message>See changelog</message>
|
||||
</output>
|
||||
</output>
|
||||
</outputs>
|
||||
</local>
|
||||
|
|
|
@ -50,5 +50,9 @@
|
|||
<!--Manual check for updated apps completed-->
|
||||
<message>Manual check for updated apps completed...</message>
|
||||
</output>
|
||||
<output id="10">
|
||||
<!--See changelog-->
|
||||
<message>See changelog</message>
|
||||
</output>
|
||||
</outputs>
|
||||
</local>
|
||||
|
|
|
@ -50,5 +50,9 @@
|
|||
<!--Manual check for updated apps completed-->
|
||||
<message>Manual check for updated apps completed...</message>
|
||||
</output>
|
||||
<output id="10">
|
||||
<!--See changelog-->
|
||||
<message>See changelog</message>
|
||||
</output>
|
||||
</outputs>
|
||||
</local>
|
||||
|
|
|
@ -50,5 +50,9 @@
|
|||
<!--Manual check for updated apps completed-->
|
||||
<message>Manual check for updated apps completed...</message>
|
||||
</output>
|
||||
<output id="10">
|
||||
<!--See changelog-->
|
||||
<message>See changelog</message>
|
||||
</output>
|
||||
</outputs>
|
||||
</local>
|
||||
|
|
|
@ -50,5 +50,9 @@
|
|||
<!--Manual check for updated apps completed-->
|
||||
<message>Recherche de mises à jour terminée.</message>
|
||||
</output>
|
||||
<output id="10">
|
||||
<!--See changelog-->
|
||||
<message>Consulter le journal des modifications</message>
|
||||
</output>
|
||||
</outputs>
|
||||
</local>
|
||||
|
|
|
@ -50,5 +50,9 @@
|
|||
<!--Manual check for updated apps completed-->
|
||||
<message>A frissített alkalmazások kézi ellenőrzése befejeződött...</message>
|
||||
</output>
|
||||
<output id="10">
|
||||
<!--See changelog-->
|
||||
<message>See changelog</message>
|
||||
</output>
|
||||
</outputs>
|
||||
</local>
|
||||
|
|
|
@ -50,5 +50,9 @@
|
|||
<!--Manual check for updated apps completed-->
|
||||
<message>Manual check for updated apps completed...</message>
|
||||
</output>
|
||||
<output id="10">
|
||||
<!--See changelog-->
|
||||
<message>See changelog</message>
|
||||
</output>
|
||||
</outputs>
|
||||
</local>
|
||||
|
|
|
@ -50,5 +50,9 @@
|
|||
<!--Manual check for updated apps completed-->
|
||||
<message>Manual check for updated apps completed...</message>
|
||||
</output>
|
||||
<output id="10">
|
||||
<!--See changelog-->
|
||||
<message>See changelog</message>
|
||||
</output>
|
||||
</outputs>
|
||||
</local>
|
||||
|
|
|
@ -50,5 +50,9 @@
|
|||
<!--Manual check for updated apps completed-->
|
||||
<message>Manual check for updated apps completed...</message>
|
||||
</output>
|
||||
<output id="10">
|
||||
<!--See changelog-->
|
||||
<message>See changelog</message>
|
||||
</output>
|
||||
</outputs>
|
||||
</local>
|
||||
|
|
|
@ -50,5 +50,9 @@
|
|||
<!--Manual check for updated apps completed-->
|
||||
<message>Manuell koll efter uppdaterade appar slutförd...</message>
|
||||
</output>
|
||||
<output id="10">
|
||||
<!--See changelog-->
|
||||
<message>See changelog</message>
|
||||
</output>
|
||||
</outputs>
|
||||
</local>
|
||||
|
|
Loading…
Reference in New Issue