Mise en place de l'anglais comme deuxième langue pour l'application
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
<!-- Bloc Mises a jour (canal stable + canal beta Patreon fusionnes) -->
|
||||
@if (config.updateCheckEnabled || licenseStatus?.enabled) {
|
||||
<section class="card">
|
||||
<h2>Mises a jour</h2>
|
||||
<p class="hint">Verifie aupres du registry Docker si une nouvelle version
|
||||
des conteneurs (core, brain, web) est disponible. Postgres et MinIO sont
|
||||
exclus — ils sont mis a jour manuellement.</p>
|
||||
<h2>{{ 'updatesSection.title' | translate }}</h2>
|
||||
<p class="hint">{{ 'updatesSection.hint' | translate }}</p>
|
||||
@if (licenseSuccess) {
|
||||
<div class="alert alert-success">
|
||||
<lucide-icon [img]="Check" [size]="16"></lucide-icon>
|
||||
@@ -16,16 +14,16 @@
|
||||
<!-- ====================================================== -->
|
||||
@if (config.updateCheckEnabled) {
|
||||
<div class="channel-block">
|
||||
<h3 class="channel-title">Canal stable</h3>
|
||||
<h3 class="channel-title">{{ 'updatesSection.stableChannel' | translate }}</h3>
|
||||
<div class="form-row">
|
||||
<button type="button" class="btn-secondary" (click)="checkUpdates()" [disabled]="updateChecking">
|
||||
<lucide-icon [img]="RefreshCw" [size]="14"></lucide-icon>
|
||||
<span>{{ updateChecking ? 'Verification...' : 'Verifier maintenant' }}</span>
|
||||
<span>{{ (updateChecking ? 'updatesSection.checking' : 'updatesSection.checkNow') | translate }}</span>
|
||||
</button>
|
||||
</div>
|
||||
@if (updateStatus && !updateStatus.enabled) {
|
||||
<div class="hint">
|
||||
Feature non configuree (WATCHTOWER_TOKEN absent).
|
||||
{{ 'updatesSection.featureNotConfigured' | translate }}
|
||||
</div>
|
||||
}
|
||||
@if (updateStatus?.enabled) {
|
||||
@@ -33,25 +31,25 @@
|
||||
@if (updateStatus?.updateAvailable) {
|
||||
<div class="alert alert-success">
|
||||
<lucide-icon [img]="Download" [size]="16"></lucide-icon>
|
||||
<span>Une mise a jour est disponible.</span>
|
||||
<span>{{ 'updatesSection.updateAvailable' | translate }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (updateStatus?.anyUnknown && !updateStatus?.updateAvailable) {
|
||||
<div class="alert alert-warn">
|
||||
<lucide-icon [img]="Download" [size]="16"></lucide-icon>
|
||||
<span>Verification impossible (baseline absente ou registry injoignable).</span>
|
||||
<span>{{ 'updatesSection.checkImpossible' | translate }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (!updateStatus?.updateAvailable && !updateStatus?.anyUnknown) {
|
||||
<div class="hint">
|
||||
Tout est a jour (verifie le {{ updateStatus?.checkedAt | date:'short' }}).
|
||||
{{ 'updatesSection.upToDate' | translate:{ date: (updateStatus?.checkedAt | date:'short') } }}
|
||||
</div>
|
||||
}
|
||||
@if (updateStatus?.updateAvailable) {
|
||||
<div class="form-row">
|
||||
<button type="button" class="btn-primary" (click)="applyUpdate()" [disabled]="updateApplying">
|
||||
<lucide-icon [img]="Download" [size]="16"></lucide-icon>
|
||||
<span>{{ updateApplying ? 'Mise a jour en cours...' : 'Mettre a jour maintenant' }}</span>
|
||||
<span>{{ (updateApplying ? 'updatesSection.applying' : 'updatesSection.applyNow') | translate }}</span>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
@@ -72,26 +70,20 @@
|
||||
<div class="channel-block">
|
||||
<h3 class="channel-title">
|
||||
<lucide-icon [img]="Heart" [size]="16"></lucide-icon>
|
||||
Canal beta — reserve aux patrons
|
||||
{{ 'updatesSection.betaChannelTitle' | translate }}
|
||||
</h3>
|
||||
<p class="hint">
|
||||
Soutiens LoreMind sur Patreon pour acceder aux nouvelles features en avant-premiere.
|
||||
Le tier <strong>Compagnon</strong> (7€/mois) ou superieur debloque ce canal.
|
||||
</p>
|
||||
<p class="hint" [innerHTML]="'updatesSection.betaChannelIntro' | translate"></p>
|
||||
<!-- Pas de licence installee -->
|
||||
@if (licenseStatus?.status === 'NONE') {
|
||||
<div class="form-row">
|
||||
<button type="button" class="btn-primary" (click)="connectPatreon()">
|
||||
<lucide-icon [img]="Link2" [size]="16"></lucide-icon>
|
||||
<span>Connecter mon compte Patreon</span>
|
||||
<span>{{ 'updatesSection.connectPatreon' | translate }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<p class="hint">
|
||||
Une nouvelle fenetre va s'ouvrir vers Patreon. Apres autorisation, copie le token affiche
|
||||
et colle-le ci-dessous.
|
||||
</p>
|
||||
<p class="hint">{{ 'updatesSection.connectInstructions' | translate }}</p>
|
||||
<div class="form-row">
|
||||
<label for="license-jwt">Token Patreon</label>
|
||||
<label for="license-jwt">{{ 'updatesSection.patreonToken' | translate }}</label>
|
||||
<input
|
||||
id="license-jwt"
|
||||
type="text"
|
||||
@@ -103,7 +95,7 @@
|
||||
<div class="form-row">
|
||||
<button type="button" class="btn-primary" (click)="installLicense()" [disabled]="!licenseJwtInput.trim()">
|
||||
<lucide-icon [img]="Check" [size]="16"></lucide-icon>
|
||||
<span>Activer la licence</span>
|
||||
<span>{{ 'updatesSection.activateLicense' | translate }}</span>
|
||||
</button>
|
||||
</div>
|
||||
@if (licenseError) {
|
||||
@@ -118,58 +110,49 @@
|
||||
@if (licenseStatus.status === 'VALID') {
|
||||
<div class="alert alert-success">
|
||||
<lucide-icon [img]="Check" [size]="16"></lucide-icon>
|
||||
<span>Compte Patreon connecte. Tier {{ tierLabel(licenseStatus.tierId) }} actif.</span>
|
||||
<span>{{ 'updatesSection.licenseValid' | translate:{ tier: tierLabel(licenseStatus.tierId) } }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (licenseStatus.status === 'GRACE') {
|
||||
<div class="alert alert-warn">
|
||||
<lucide-icon [img]="AlertCircle" [size]="16"></lucide-icon>
|
||||
<span>
|
||||
Connexion Patreon expiree, mais acces beta maintenu pendant la periode de tolerance.
|
||||
Verifie que ton abonnement Patreon est toujours actif et clique sur "Verifier maintenant".
|
||||
</span>
|
||||
<span>{{ 'updatesSection.licenseGrace' | translate }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (licenseStatus.status === 'EXPIRED') {
|
||||
<div class="alert alert-error">
|
||||
<lucide-icon [img]="AlertCircle" [size]="16"></lucide-icon>
|
||||
<span>
|
||||
Connexion Patreon expiree depuis trop longtemps. Reconnecte-toi pour retrouver l'acces beta.
|
||||
</span>
|
||||
<span>{{ 'updatesSection.licenseExpired' | translate }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (licenseStatus.status === 'UNVERIFIABLE') {
|
||||
<div class="alert alert-error">
|
||||
<lucide-icon [img]="AlertCircle" [size]="16"></lucide-icon>
|
||||
<span>Le token installe ne peut plus etre verifie. Reconnecte-toi.</span>
|
||||
<span>{{ 'updatesSection.licenseUnverifiable' | translate }}</span>
|
||||
</div>
|
||||
}
|
||||
<ul class="license-info">
|
||||
@if (licenseStatus.tierId) {
|
||||
<li><strong>Tier :</strong> {{ tierLabel(licenseStatus.tierId) }}</li>
|
||||
<li [innerHTML]="'updatesSection.infoTier' | translate:{ tier: tierLabel(licenseStatus.tierId) }"></li>
|
||||
}
|
||||
@if (licenseStatus.expiresAt) {
|
||||
<li>
|
||||
<strong>Validite :</strong>
|
||||
jusqu'au {{ formatDate(licenseStatus.expiresAt) }}
|
||||
<span [innerHTML]="'updatesSection.infoValidity' | translate:{ date: formatDate(licenseStatus.expiresAt) }"></span>
|
||||
@if (daysUntilExpiry !== null && daysUntilExpiry > 0) {
|
||||
<span>
|
||||
(renouvellement dans {{ daysUntilExpiry }} jour@if (daysUntilExpiry > 1) {
|
||||
<span>s</span>
|
||||
})
|
||||
{{ (daysUntilExpiry > 1 ? 'updatesSection.renewalDays' : 'updatesSection.renewalDay') | translate:{ n: daysUntilExpiry } }}
|
||||
</span>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
@if (licenseStatus.lastRefreshAttemptAt) {
|
||||
<li>
|
||||
<strong>Dernier refresh :</strong>
|
||||
{{ formatDate(licenseStatus.lastRefreshAttemptAt) }}
|
||||
<span [innerHTML]="'updatesSection.infoLastRefresh' | translate:{ date: formatDate(licenseStatus.lastRefreshAttemptAt) }"></span>
|
||||
@if (licenseStatus.lastRefreshSucceeded === true) {
|
||||
<span class="badge-ok">OK</span>
|
||||
<span class="badge-ok">{{ 'updatesSection.refreshOk' | translate }}</span>
|
||||
}
|
||||
@if (licenseStatus.lastRefreshSucceeded === false) {
|
||||
<span class="badge-warn">echec</span>
|
||||
<span class="badge-warn">{{ 'updatesSection.refreshFailed' | translate }}</span>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
@@ -182,28 +165,28 @@
|
||||
(change)="toggleBetaChannel(!licenseStatus.betaChannelEnabled)"
|
||||
[disabled]="licenseStatus.status !== 'VALID' && licenseStatus.status !== 'GRACE'"
|
||||
>
|
||||
<span>Activer le canal beta</span>
|
||||
<span>{{ 'updatesSection.enableBetaChannel' | translate }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-row form-row-actions">
|
||||
<button type="button" class="btn-secondary" (click)="refreshLicense()" [disabled]="licenseLoading">
|
||||
<lucide-icon [img]="RefreshCw" [size]="14"></lucide-icon>
|
||||
<span>{{ licenseLoading ? 'Verification...' : 'Verifier maintenant' }}</span>
|
||||
<span>{{ (licenseLoading ? 'updatesSection.checking' : 'updatesSection.checkNow') | translate }}</span>
|
||||
</button>
|
||||
<button type="button" class="btn-secondary btn-danger" (click)="disconnectPatreon()">
|
||||
<lucide-icon [img]="Unlink" [size]="14"></lucide-icon>
|
||||
<span>Deconnecter Patreon</span>
|
||||
<span>{{ 'updatesSection.disconnectPatreon' | translate }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<!-- Etat du canal beta -->
|
||||
@if (licenseStatus.betaChannelEnabled) {
|
||||
<div class="beta-status">
|
||||
@if (betaChecking) {
|
||||
<div class="hint">Verification des images beta...</div>
|
||||
<div class="hint">{{ 'updatesSection.checkingBetaImages' | translate }}</div>
|
||||
}
|
||||
@if (!betaChecking && betaStatus && !betaStatus.enabled) {
|
||||
<div class="hint">
|
||||
Indisponible : {{ betaStatus.disabledReason }}
|
||||
{{ 'updatesSection.betaUnavailable' | translate:{ reason: betaStatus.disabledReason } }}
|
||||
</div>
|
||||
}
|
||||
@if (!betaChecking && betaStatus?.enabled) {
|
||||
@@ -211,7 +194,7 @@
|
||||
@if (betaStatus?.anyUnknown) {
|
||||
<div class="alert alert-warn">
|
||||
<lucide-icon [img]="AlertCircle" [size]="16"></lucide-icon>
|
||||
<span>Verification beta impossible (registry beta injoignable ou baseline absente).</span>
|
||||
<span>{{ 'updatesSection.betaCheckImpossible' | translate }}</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -222,11 +205,11 @@
|
||||
@if (channelStatus) {
|
||||
<div class="channel-switch">
|
||||
<div class="channel-current">
|
||||
<span class="channel-label">Canal actuel :</span>
|
||||
<span class="channel-label">{{ 'updatesSection.currentChannel' | translate }}</span>
|
||||
<span class="channel-badge"
|
||||
[class.channel-stable]="channelStatus.currentChannel === 'stable'"
|
||||
[class.channel-beta]="channelStatus.currentChannel === 'beta'">
|
||||
{{ channelStatus.currentChannel === 'beta' ? 'Bêta' : 'Stable' }}
|
||||
{{ (channelStatus.currentChannel === 'beta' ? 'updatesSection.channelBeta' : 'updatesSection.channelStable') | translate }}
|
||||
</span>
|
||||
</div>
|
||||
<!-- Sidecar dispo : boutons d'action -->
|
||||
@@ -238,7 +221,7 @@
|
||||
[disabled]="switchInFlight"
|
||||
(click)="requestChannelSwitch('beta')">
|
||||
<lucide-icon [img]="Download" [size]="14"></lucide-icon>
|
||||
<span>{{ switchInFlight ? 'Bascule en cours...' : 'Passer sur le canal beta' }}</span>
|
||||
<span>{{ (switchInFlight ? 'updatesSection.switching' : 'updatesSection.switchToBeta') | translate }}</span>
|
||||
</button>
|
||||
}
|
||||
<!-- On beta -> proposer retour stable -->
|
||||
@@ -248,14 +231,14 @@
|
||||
[disabled]="switchInFlight"
|
||||
(click)="requestChannelSwitch('stable')">
|
||||
<lucide-icon [img]="ArrowLeft" [size]="14"></lucide-icon>
|
||||
<span>{{ switchInFlight ? 'Bascule en cours...' : 'Repasser sur le canal stable' }}</span>
|
||||
<span>{{ (switchInFlight ? 'updatesSection.switching' : 'updatesSection.switchToStable') | translate }}</span>
|
||||
</button>
|
||||
}
|
||||
<!-- Switch en cours : on prévient que la page va se rendre injoignable -->
|
||||
@if (switchInFlight) {
|
||||
<div class="alert alert-warn">
|
||||
<lucide-icon [img]="RefreshCw" [size]="16"></lucide-icon>
|
||||
<span>Bascule en cours. L'application va etre indisponible 10 a 30 secondes — la page se rechargera automatiquement quand le nouveau Core sera pret.</span>
|
||||
<span>{{ 'updatesSection.switchInProgressNotice' | translate }}</span>
|
||||
</div>
|
||||
}
|
||||
<!-- Erreur eventuelle remontee par le sidecar -->
|
||||
@@ -270,14 +253,7 @@
|
||||
@if (!channelStatus.switcherAvailable) {
|
||||
<div class="alert alert-warn">
|
||||
<lucide-icon [img]="AlertCircle" [size]="16"></lucide-icon>
|
||||
<span>
|
||||
Le sidecar de bascule n'est pas installe. Pour beneficier du switch
|
||||
automatique, recupere le dernier <code>docker-compose.yml</code> du repo
|
||||
et fais <code>docker compose pull && docker compose up -d</code> une
|
||||
fois. Sinon, bascule manuellement en editant <code>IMAGE_NAMESPACE</code>
|
||||
dans ton <code>.env</code> (<code>igmlcreation/loremind-</code> pour stable,
|
||||
<code>igmlcreation/loremind-beta-</code> pour beta).
|
||||
</span>
|
||||
<span [innerHTML]="'updatesSection.switcherUnavailable' | translate"></span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user