Compare commits

...

1 Commits

Author SHA1 Message Date
Matt Hill
3d49689b1e remove unnecessary warnings 2026-03-31 13:21:37 -06:00
8 changed files with 12 additions and 72 deletions

View File

@@ -399,7 +399,6 @@ export default {
425: 'Ausführen', 425: 'Ausführen',
426: 'Aktion kann nur ausgeführt werden, wenn der Dienst', 426: 'Aktion kann nur ausgeführt werden, wenn der Dienst',
427: 'Verboten', 427: 'Verboten',
428: 'kann vorübergehend Probleme verursachen',
429: 'hat unerfüllte Abhängigkeiten. Es wird nicht wie erwartet funktionieren.', 429: 'hat unerfüllte Abhängigkeiten. Es wird nicht wie erwartet funktionieren.',
430: 'Container wird neu gebaut', 430: 'Container wird neu gebaut',
431: 'Deinstallation wird gestartet', 431: 'Deinstallation wird gestartet',

View File

@@ -398,7 +398,6 @@ export const ENGLISH: Record<string, number> = {
'Run': 425, // as in, run a piece of software 'Run': 425, // as in, run a piece of software
'Action can only be executed when service is': 426, 'Action can only be executed when service is': 426,
'Forbidden': 427, 'Forbidden': 427,
'may temporarily experiences issues': 428,
'has unmet dependencies. It will not work as expected.': 429, 'has unmet dependencies. It will not work as expected.': 429,
'Rebuilding container': 430, 'Rebuilding container': 430,
'Beginning uninstall': 431, 'Beginning uninstall': 431,

View File

@@ -399,7 +399,6 @@ export default {
425: 'Ejecutar', 425: 'Ejecutar',
426: 'La acción solo se puede ejecutar cuando el servicio está', 426: 'La acción solo se puede ejecutar cuando el servicio está',
427: 'Prohibido', 427: 'Prohibido',
428: 'puede experimentar problemas temporales',
429: 'tiene dependencias no satisfechas. No funcionará como se espera.', 429: 'tiene dependencias no satisfechas. No funcionará como se espera.',
430: 'Reconstruyendo contenedor', 430: 'Reconstruyendo contenedor',
431: 'Iniciando desinstalación', 431: 'Iniciando desinstalación',

View File

@@ -399,7 +399,6 @@ export default {
425: 'Exécuter', 425: 'Exécuter',
426: 'Action possible uniquement lorsque le service est', 426: 'Action possible uniquement lorsque le service est',
427: 'Interdit', 427: 'Interdit',
428: 'peut rencontrer des problèmes temporaires',
429: 'a des dépendances non satisfaites. Il ne fonctionnera pas comme prévu.', 429: 'a des dépendances non satisfaites. Il ne fonctionnera pas comme prévu.',
430: 'Reconstruction du conteneur', 430: 'Reconstruction du conteneur',
431: 'Désinstallation initiée', 431: 'Désinstallation initiée',

View File

@@ -399,7 +399,6 @@ export default {
425: 'Uruchom', 425: 'Uruchom',
426: 'Akcja może być wykonana tylko gdy serwis jest', 426: 'Akcja może być wykonana tylko gdy serwis jest',
427: 'Zabronione', 427: 'Zabronione',
428: 'może tymczasowo napotkać problemy',
429: 'ma niespełnione zależności. Nie będzie działać zgodnie z oczekiwaniami.', 429: 'ma niespełnione zależności. Nie będzie działać zgodnie z oczekiwaniami.',
430: 'Odbudowywanie kontenera', 430: 'Odbudowywanie kontenera',
431: 'Rozpoczynanie odinstalowania', 431: 'Rozpoczynanie odinstalowania',

View File

@@ -36,7 +36,7 @@ import { InterfaceService } from '../../../components/interfaces/interface.servi
<button <button
tuiButton tuiButton
iconStart="@tui.rotate-cw" iconStart="@tui.rotate-cw"
(click)="controls.restart(manifest())" (click)="controls.restart(manifest().id)"
> >
{{ 'Restart' | i18n }} {{ 'Restart' | i18n }}
</button> </button>

View File

@@ -10,7 +10,6 @@ import { RouterLink } from '@angular/router'
import { MarketplacePkg } from '@start9labs/marketplace' import { MarketplacePkg } from '@start9labs/marketplace'
import { import {
DialogService, DialogService,
i18nKey,
i18nPipe, i18nPipe,
LocalizePipe, LocalizePipe,
MarkdownPipe, MarkdownPipe,
@@ -32,7 +31,6 @@ import {
TuiProgressCircle, TuiProgressCircle,
} from '@taiga-ui/kit' } from '@taiga-ui/kit'
import { PatchDB } from 'patch-db-client' import { PatchDB } from 'patch-db-client'
import { defaultIfEmpty, firstValueFrom } from 'rxjs'
import { InstallingProgressPipe } from 'src/app/routes/portal/routes/services/pipes/install-progress.pipe' import { InstallingProgressPipe } from 'src/app/routes/portal/routes/services/pipes/install-progress.pipe'
import { MarketplaceService } from 'src/app/services/marketplace.service' import { MarketplaceService } from 'src/app/services/marketplace.service'
import { import {
@@ -41,8 +39,6 @@ import {
PackageDataEntry, PackageDataEntry,
UpdatingState, UpdatingState,
} from 'src/app/services/patch-db/data-model' } from 'src/app/services/patch-db/data-model'
import { getAllPackages } from 'src/app/utils/get-package-data'
import { hasCurrentDeps } from 'src/app/utils/has-deps'
import UpdatesComponent from './updates.component' import UpdatesComponent from './updates.component'
@Component({ @Component({
@@ -106,7 +102,7 @@ import UpdatesComponent from './updates.component'
size="s" size="s"
[loading]="!ready()" [loading]="!ready()"
[appearance]="error() ? 'destructive' : 'primary'" [appearance]="error() ? 'destructive' : 'primary'"
(click.stop)="onClick()" (click.stop)="update()"
> >
{{ error() ? ('Retry' | i18n) : ('Update' | i18n) }} {{ error() ? ('Retry' | i18n) : ('Update' | i18n) }}
</button> </button>
@@ -274,22 +270,7 @@ export class UpdatesItemComponent {
readonly local = readonly local =
input.required<PackageDataEntry<InstalledState | UpdatingState>>() input.required<PackageDataEntry<InstalledState | UpdatingState>>()
async onClick() { async update() {
this.ready.set(false)
this.error.set('')
if (hasCurrentDeps(this.item().id, await getAllPackages(this.patch))) {
if (await this.alert()) {
await this.update()
} else {
this.ready.set(true)
}
} else {
await this.update()
}
}
private async update() {
const { id, version } = this.item() const { id, version } = this.item()
const url = this.parent.current()?.url || '' const url = this.parent.current()?.url || ''
@@ -301,21 +282,4 @@ export class UpdatesItemComponent {
this.error.set(e.message) this.error.set(e.message)
} }
} }
private async alert(): Promise<boolean> {
return firstValueFrom(
this.dialog
.openConfirm({
label: 'Warning',
size: 's',
data: {
content:
`${this.i18n.transform('Services that depend on')} ${this.local().stateInfo.manifest.title} ${this.i18n.transform('will no longer work properly and may crash.')}` as i18nKey,
yes: 'Continue',
no: 'Cancel',
},
})
.pipe(defaultIfEmpty(false)),
)
}
} }

View File

@@ -84,25 +84,7 @@ export class ControlsService {
}) })
} }
async restart({ id, title }: T.Manifest) { async restart(id: string) {
const packages = await getAllPackages(this.patch)
defer(() =>
hasCurrentDeps(id, packages)
? this.dialog
.openConfirm({
label: 'Warning',
size: 's',
data: {
content:
`${this.i18n.transform('Services that depend on')} ${title} ${this.i18n.transform('may temporarily experiences issues')}` as i18nKey,
yes: 'Restart',
no: 'Cancel',
},
})
.pipe(filter(Boolean))
: of(null),
).subscribe(async () => {
const loader = this.loader.open('Restarting').subscribe() const loader = this.loader.open('Restarting').subscribe()
try { try {
@@ -112,7 +94,6 @@ export class ControlsService {
} finally { } finally {
loader.unsubscribe() loader.unsubscribe()
} }
})
} }
private alert(content: T.LocaleString): Promise<boolean> { private alert(content: T.LocaleString): Promise<boolean> {