Compare commits

...

1 Commits

Author SHA1 Message Date
5bc038acd8 Suppression de la sélection du langage au démarrage de l'appli : maintenant c'est le système qui décide de la langue.
Some checks failed
Tests unitaires / Brain (Python · pytest + couverture) (push) Successful in 20s
Tests unitaires / Web (Angular · vitest + couverture) (push) Successful in 33s
Tests unitaires / Core (Java · mvn test + JaCoCo) (push) Successful in 2m30s
Build & Push Images / build (brain) (push) Successful in 1m22s
E2E Tests / e2e (push) Failing after 5m47s
Build & Push Images / build (core) (push) Successful in 3m29s
Build & Push Images / build-switcher (push) Successful in 48s
Build & Push Images / build (web) (push) Successful in 1m55s
Changement relicat Loremind -> DM Loremind
Passage en 0.18.0 stable publique
2026-06-22 16:59:55 +02:00
14 changed files with 23 additions and 166 deletions

View File

@@ -26,7 +26,7 @@ from app.infrastructure.ollama_model_installer import ensure_ollama_embedding_mo
app = FastAPI( app = FastAPI(
title="LoreMind Brain", title="LoreMind Brain",
description="Backend IA pour la génération de contenu narratif.", description="Backend IA pour la génération de contenu narratif.",
version="0.17.3", version="0.18.0",
) )
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@@ -14,7 +14,7 @@
<groupId>com.loremind</groupId> <groupId>com.loremind</groupId>
<artifactId>loremind-core</artifactId> <artifactId>loremind-core</artifactId>
<version>0.17.3</version> <version>0.18.0</version>
<name>LoreMind Core</name> <name>LoreMind Core</name>
<description>Backend Core - Architecture Hexagonale</description> <description>Backend Core - Architecture Hexagonale</description>

View File

@@ -1,7 +1,7 @@
#Requires -Version 5.1 #Requires -Version 5.1
<# <#
.SYNOPSIS .SYNOPSIS
Installeur officiel de LoreMindMJ pour Windows 10/11. Installeur officiel de DM Loremind pour Windows 10/11.
.DESCRIPTION .DESCRIPTION
Script d'installation pas-a-pas qui : Script d'installation pas-a-pas qui :
@@ -18,7 +18,7 @@
Le code source de ce script est public et auditable a l'adresse indiquee dans .LINK. Le code source de ce script est public et auditable a l'adresse indiquee dans .LINK.
.PARAMETER InstallDir .PARAMETER InstallDir
Dossier d'installation. Defaut : %LOCALAPPDATA%\LoreMind Dossier d'installation. Defaut : %LOCALAPPDATA%\DM Loremind
.PARAMETER ComposeUrl .PARAMETER ComposeUrl
URL du fichier docker-compose.yml a recuperer. Defaut : version officielle du depot. URL du fichier docker-compose.yml a recuperer. Defaut : version officielle du depot.
@@ -39,7 +39,7 @@
.NOTES .NOTES
Auteur : ietm64 Auteur : ietm64
Licence : AGPL-3.0 Licence : AGPL-3.0
Projet : LoreMindMJ - assistant pour Maitres de Jeu de JDR Projet : DM Loremind - assistant pour Maitres de Jeu de JDR
Version : 0.8.3 Version : 0.8.3
.LINK .LINK
@@ -48,7 +48,7 @@
[CmdletBinding()] [CmdletBinding()]
param( param(
[string]$InstallDir = "$env:LOCALAPPDATA\LoreMind", [string]$InstallDir = "$env:LOCALAPPDATA\DM Loremind",
[string]$ComposeUrl = "https://raw.githubusercontent.com/IGMLcreation/LoreMind/main/docker-compose.yml", [string]$ComposeUrl = "https://raw.githubusercontent.com/IGMLcreation/LoreMind/main/docker-compose.yml",
[int]$WebPort = 8081, [int]$WebPort = 8081,
[switch]$NonInteractive [switch]$NonInteractive
@@ -142,7 +142,7 @@ if (-not (Test-Admin)) {
Write-Host "" Write-Host ""
Write-Host "============================================================" Write-Host "============================================================"
Write-Host " LoreMindMJ - Installeur Windows" -ForegroundColor Magenta Write-Host " DM Loremind - Installeur Windows" -ForegroundColor Magenta
Write-Host "============================================================" Write-Host "============================================================"
Write-Host "" Write-Host ""
@@ -250,7 +250,7 @@ if ($llmProvider -eq 'onemin' -and -not $NonInteractive) {
# pare-feu pour que Docker puisse l'atteindre sans exposer le port. # pare-feu pour que Docker puisse l'atteindre sans exposer le port.
# 2. Embarque : Ollama tourne dans un conteneur Docker dedie (profile local-ollama). # 2. Embarque : Ollama tourne dans un conteneur Docker dedie (profile local-ollama).
# 3. Aucun : on n'installe rien tout de suite. L'utilisateur configurera # 3. Aucun : on n'installe rien tout de suite. L'utilisateur configurera
# Ollama plus tard via la page Parametres de LoreMind. # Ollama plus tard via la page Parametres de DM Loremind.
$ollamaMode = 'embedded' # valeurs : 'host' | 'embedded' | 'none' $ollamaMode = 'embedded' # valeurs : 'host' | 'embedded' | 'none'
$ollamaBaseUrl = 'http://ollama:11434' $ollamaBaseUrl = 'http://ollama:11434'
if ($llmProvider -eq 'ollama') { if ($llmProvider -eq 'ollama') {
@@ -298,7 +298,7 @@ if ($llmProvider -eq 'ollama') {
# sera installe plus tard sur l'hote. L'utilisateur peut aussi changer # sera installe plus tard sur l'hote. L'utilisateur peut aussi changer
# l'URL via la page Parametres pour pointer vers un Ollama distant. # l'URL via la page Parametres pour pointer vers un Ollama distant.
$ollamaBaseUrl = 'http://host.docker.internal:11434' $ollamaBaseUrl = 'http://host.docker.internal:11434'
Write-Warn2 "Aucun Ollama ne sera installe pour le moment. Configurez-le plus tard via la page Parametres de LoreMind." Write-Warn2 "Aucun Ollama ne sera installe pour le moment. Configurez-le plus tard via la page Parametres de DM Loremind."
} }
} }
@@ -404,7 +404,7 @@ if ($ollamaMode -eq 'embedded' -and $llmProvider -eq 'ollama') {
$url = "http://localhost:$WebPort" $url = "http://localhost:$WebPort"
Write-Host "" Write-Host ""
Write-Host "============================================================" -ForegroundColor Green Write-Host "============================================================" -ForegroundColor Green
Write-Host " LoreMindMJ est lance !" -ForegroundColor Green Write-Host " DM Loremind est lance !" -ForegroundColor Green
Write-Host "============================================================" -ForegroundColor Green Write-Host "============================================================" -ForegroundColor Green
Write-Host " URL : $url" Write-Host " URL : $url"
Write-Host " Identifiant : $adminUser" Write-Host " Identifiant : $adminUser"

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# ========================================================================== # ==========================================================================
# Installeur LoreMindMJ pour Linux (Debian/Ubuntu/Fedora/Arch) # Installeur DM Loremind pour Linux (Debian/Ubuntu/Fedora/Arch)
# Usage : # Usage :
# curl -fsSL https://raw.githubusercontent.com/IGMLcreation/LoreMind/main/installers/install.sh | bash # curl -fsSL https://raw.githubusercontent.com/IGMLcreation/LoreMind/main/installers/install.sh | bash
# ========================================================================== # ==========================================================================
@@ -71,7 +71,7 @@ install_docker() {
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
echo echo
echo "============================================================" echo "============================================================"
echo -e " ${c_cyan}LoreMindMJ - Installeur Linux${c_off}" echo -e " ${c_cyan}DM Loremind - Installeur Linux${c_off}"
echo "============================================================" echo "============================================================"
echo echo
@@ -169,7 +169,7 @@ if [ "$LLM_PROVIDER" = "ollama" ]; then
# sera installe plus tard sur l'hote. L'utilisateur peut aussi # sera installe plus tard sur l'hote. L'utilisateur peut aussi
# changer l'URL via la page Parametres pour un Ollama distant. # changer l'URL via la page Parametres pour un Ollama distant.
OLLAMA_BASE_URL_VAL="http://host.docker.internal:11434" OLLAMA_BASE_URL_VAL="http://host.docker.internal:11434"
warn "Aucun Ollama ne sera installe pour le moment. Configurez-le plus tard via la page Parametres de LoreMind." warn "Aucun Ollama ne sera installe pour le moment. Configurez-le plus tard via la page Parametres de DM Loremind."
;; ;;
esac esac
fi fi
@@ -268,7 +268,7 @@ fi
URL="http://localhost:${WEB_PORT}" URL="http://localhost:${WEB_PORT}"
echo echo
echo -e "${c_green}============================================================${c_off}" echo -e "${c_green}============================================================${c_off}"
echo -e "${c_green} LoreMindMJ est lance !${c_off}" echo -e "${c_green} DM Loremind est lance !${c_off}"
echo -e "${c_green}============================================================${c_off}" echo -e "${c_green}============================================================${c_off}"
echo " URL : $URL" echo " URL : $URL"
echo " Identifiant : $ADMIN_USERNAME" echo " Identifiant : $ADMIN_USERNAME"

View File

@@ -1,10 +1,10 @@
#Requires -Version 5.1 #Requires -Version 5.1
<# <#
.SYNOPSIS .SYNOPSIS
Configuration securisee d'Ollama hote pour LoreMindMJ (Windows). Configuration securisee d'Ollama hote pour DM Loremind (Windows).
.DESCRIPTION .DESCRIPTION
But : permettre au conteneur Docker LoreMind d'atteindre l'Ollama installe But : permettre au conteneur Docker DM Loremind d'atteindre l'Ollama installe
sur l'hote, SANS exposer Ollama sur le LAN ni Internet. sur l'hote, SANS exposer Ollama sur le LAN ni Internet.
Strategie (specifique a Docker Desktop / WSL2 sur Windows) : Strategie (specifique a Docker Desktop / WSL2 sur Windows) :

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# ============================================================================ # ============================================================================
# LoreMindMJ - Configuration securisee d'Ollama hote (Linux) # DM Loremind - Configuration securisee d'Ollama hote (Linux)
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# But : permettre au conteneur Docker de LoreMind d'atteindre l'Ollama # But : permettre au conteneur Docker de LoreMind d'atteindre l'Ollama
# installe sur l'hote, SANS l'exposer sur le LAN ni Internet. # installe sur l'hote, SANS l'exposer sur le LAN ni Internet.

4
web/package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "loremind-web", "name": "loremind-web",
"version": "0.17.3", "version": "0.18.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "loremind-web", "name": "loremind-web",
"version": "0.17.3", "version": "0.18.0",
"dependencies": { "dependencies": {
"@angular/animations": "^21.2.16", "@angular/animations": "^21.2.16",
"@angular/common": "^21.2.16", "@angular/common": "^21.2.16",

View File

@@ -1,6 +1,6 @@
{ {
"name": "loremind-web", "name": "loremind-web",
"version": "0.17.3", "version": "0.18.0",
"description": "LoreMind Frontend - Angular", "description": "LoreMind Frontend - Angular",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",

View File

@@ -20,6 +20,3 @@
<app-global-search></app-global-search> <app-global-search></app-global-search>
<app-confirm-dialog-host></app-confirm-dialog-host> <app-confirm-dialog-host></app-confirm-dialog-host>
<!-- Écran de choix de langue au 1er lancement (s'auto-masque ensuite). -->
<app-first-run-language></app-first-run-language>

View File

@@ -6,7 +6,6 @@ import { SecondarySidebarComponent } from './shared/secondary-sidebar/secondary-
import { GlobalSearchComponent } from './shared/global-search/global-search.component'; import { GlobalSearchComponent } from './shared/global-search/global-search.component';
import { UpdateBannerComponent } from './shared/update-banner/update-banner.component'; import { UpdateBannerComponent } from './shared/update-banner/update-banner.component';
import { ConfirmDialogHostComponent } from './shared/confirm-dialog/confirm-dialog-host.component'; import { ConfirmDialogHostComponent } from './shared/confirm-dialog/confirm-dialog-host.component';
import { FirstRunLanguageComponent } from './shared/first-run-language/first-run-language.component';
import { LayoutService } from './services/layout.service'; import { LayoutService } from './services/layout.service';
import { GlobalSearchService } from './services/global-search.service'; import { GlobalSearchService } from './services/global-search.service';
import { VersionCheckerService } from './services/version-checker.service'; import { VersionCheckerService } from './services/version-checker.service';
@@ -20,7 +19,6 @@ import { VersionCheckerService } from './services/version-checker.service';
GlobalSearchComponent, GlobalSearchComponent,
UpdateBannerComponent, UpdateBannerComponent,
ConfirmDialogHostComponent, ConfirmDialogHostComponent,
FirstRunLanguageComponent,
AsyncPipe AsyncPipe
], ],
templateUrl: './app.component.html', templateUrl: './app.component.html',

View File

@@ -77,23 +77,13 @@ export class LanguageService {
} }
private resolveInitialLang(): string { private resolveInitialLang(): string {
// 1) Choix mémorisé (sélecteur in-app) → prioritaire.
const stored = this.read(); const stored = this.read();
if (stored && this.languages.some((l) => l.code === stored)) { if (stored && this.languages.some((l) => l.code === stored)) {
return stored; return stored;
} }
const browser = this.translate.getBrowserLang(); // 2) Sinon, détection du système : français → fr, toute autre langue → en.
if (browser && this.languages.some((l) => l.code === browser)) { return this.translate.getBrowserLang() === 'fr' ? 'fr' : 'en';
return browser;
}
return this.defaultLang;
}
/**
* Vrai si une langue a déjà été choisie explicitement (mémorisée en localStorage).
* Faux au tout premier lancement → on propose alors l'écran de choix de langue.
*/
hasExplicitChoice(): boolean {
return this.read() !== null;
} }
private read(): string | null { private read(): string | null {

View File

@@ -1,17 +0,0 @@
@if (visible) {
<div class="flo-overlay" role="dialog" aria-modal="true" aria-label="Language / Langue">
<div class="flo-card">
<img class="flo-logo" src="assets/logo.png" alt="DM Loremind" />
<h2 class="flo-title">Bienvenue&nbsp;·&nbsp;Welcome</h2>
<p class="flo-sub">Choisissez votre langue&nbsp;·&nbsp;Choose your language</p>
<div class="flo-buttons">
@for (opt of options; track opt.code) {
<button type="button" class="flo-btn" (click)="choose(opt.code)">
<span class="flo-flag">{{ opt.flag }}</span>
<span class="flo-native">{{ opt.native }}</span>
</button>
}
</div>
</div>
</div>
}

View File

@@ -1,76 +0,0 @@
.flo-overlay {
position: fixed;
inset: 0;
z-index: 10000;
display: flex;
align-items: center;
justify-content: center;
padding: 1.5rem;
background: rgba(10, 10, 20, 0.82);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
}
.flo-card {
width: 100%;
max-width: 420px;
padding: 2.5rem 2rem;
text-align: center;
background: #12121f;
border: 1px solid rgba(108, 99, 255, 0.25);
border-radius: 18px;
box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
.flo-logo {
width: 64px;
height: 64px;
border-radius: 14px;
object-fit: contain;
}
.flo-title {
margin: 1rem 0 0.3rem;
font-size: 1.5rem;
font-weight: 700;
color: #fff;
}
.flo-sub {
margin: 0 0 1.8rem;
font-size: 0.95rem;
color: #9ca3af;
}
.flo-buttons {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.flo-btn {
display: flex;
align-items: center;
gap: 0.9rem;
width: 100%;
padding: 0.9rem 1.1rem;
font-size: 1.05rem;
font-weight: 600;
color: #e0e0e0;
background: rgba(108, 99, 255, 0.08);
border: 1px solid rgba(108, 99, 255, 0.25);
border-radius: 12px;
cursor: pointer;
transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.flo-btn:hover {
background: rgba(108, 99, 255, 0.18);
border-color: rgba(108, 99, 255, 0.5);
transform: translateY(-1px);
}
.flo-flag {
font-size: 1.5rem;
line-height: 1;
}

View File

@@ -1,35 +0,0 @@
import { Component, inject } from '@angular/core';
import { LanguageService } from '../../services/language.service';
/**
* Écran de choix de langue au TOUT PREMIER lancement (overlay one-shot).
*
* Ne s'affiche que si aucune langue n'a encore été choisie explicitement
* (cf. LanguageService.hasExplicitChoice). Le choix est mémorisé en localStorage
* via LanguageService.use() → aux lancements suivants l'overlay ne réapparaît pas,
* et le sélecteur de langue habituel prend le relais.
*
* Textes volontairement BILINGUES / neutres (l'utilisateur n'a pas encore choisi).
*/
@Component({
selector: 'app-first-run-language',
standalone: true,
templateUrl: './first-run-language.component.html',
styleUrls: ['./first-run-language.component.scss'],
})
export class FirstRunLanguageComponent {
private readonly language = inject(LanguageService);
visible = !this.language.hasExplicitChoice();
/** Libellés NATIFs (indépendants de la langue courante). */
readonly options: ReadonlyArray<{ code: string; native: string; flag: string }> = [
{ code: 'fr', native: 'Français', flag: '🇫🇷' },
{ code: 'en', native: 'English', flag: '🇬🇧' },
];
choose(code: string): void {
this.language.use(code); // applique + mémorise
this.visible = false;
}
}