Bozza traduzione realtime da selezione alto/dx
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>1.1.2606.0412</Version>
|
||||
<Version>1.1.2606.0413</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 18
|
||||
VisualStudioVersion = 18.5.11801.241 oobstable
|
||||
VisualStudioVersion = 18.5.11801.241
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwCoreLib.Lux.Core", "EgwCoreLib.Lux.Core\EgwCoreLib.Lux.Core.csproj", "{CCE87D58-1E6C-47B3-A28C-65BFCF5F1D0C}"
|
||||
EndProject
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
{
|
||||
public abstract class BaseComp : ComponentBase
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Lingua corrente (da rivedere con Cascading Parameters
|
||||
/// </summary>
|
||||
[CascadingParameter(Name = "LangSel")]
|
||||
public string LangSel { get; set; } = "IT";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
@@ -15,24 +25,14 @@
|
||||
/// Gestione traduzione interfaccia con lingua corrente
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <param name="lingua"></param>
|
||||
/// <returns></returns>
|
||||
protected string Traduci(string lemma)
|
||||
{
|
||||
return VService.Traduci(lemma, lingua);
|
||||
return VService.Traduci(lemma, LangSel);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Lingua corrente (da rivedere con Cascading Parameters
|
||||
/// </summary>
|
||||
private string lingua = "IT";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
[Inject]
|
||||
|
||||
@@ -46,8 +46,10 @@
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<button class="btn btn-outline-info btn-sm" @onclick="() => DoSelect(item)"><i class="fa-solid fa-pen"></i></button>
|
||||
<div clas="text-nowrap">
|
||||
<button class="btn btn-outline-info btn-sm" @onclick="() => DoSelect(item)"><i class="fa-solid fa-search"></i></button>
|
||||
<button class="btn btn-outline-primary btn-sm" @onclick="() => DoEdit(item)"><i class="fa-solid fa-pen"></i></button>
|
||||
</div>
|
||||
</td>
|
||||
<td>@item.Lemma</td>
|
||||
<td class="text-end">
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="d-flex w-100 align-items-center">
|
||||
<div class="col-3 px-0 text-start">
|
||||
<a href="https://www.egalware.com" target="_blank">About Egalware</a>
|
||||
</div>
|
||||
<div class="col-8 px-0">
|
||||
</div>
|
||||
<div class="col-1 px-2 text-end">
|
||||
<select class="form-select form-select-sm" @bind="CurrLang" @bind:after="() => SaveLang()">
|
||||
@* <option disabled>Sel →</option> *@
|
||||
<option value="IT">IT</option>
|
||||
<option value="EN">EN</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace Lux.UI.Components.Compo.Common
|
||||
{
|
||||
public partial class CmpHeader
|
||||
{
|
||||
[Parameter]
|
||||
public string CurrLang { get; set; } = null!;
|
||||
|
||||
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_LangSelected { get; set; }
|
||||
|
||||
private Task SaveLang()
|
||||
{
|
||||
return EC_LangSelected.InvokeAsync(CurrLang);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,22 +7,13 @@
|
||||
|
||||
<main>
|
||||
<div class="top-row px-4">
|
||||
@*<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>*@
|
||||
<div class="d-flex w-100 align-items-center">
|
||||
<div class="col-3 px-0 text-start">
|
||||
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
|
||||
</div>
|
||||
<div class="col-8 px-0">
|
||||
</div>
|
||||
<div class="col-1 px-2 text-end">
|
||||
<button type="button" class="btn btn-primary btn-sm rounded-3">IT</button>
|
||||
<button type="button" class="btn btn-primary btn-sm rounded-3">EN</button>
|
||||
</div>
|
||||
</div>
|
||||
<CmpHeader CurrLang="@currLang" EC_LangSelected="SetLang"></CmpHeader>
|
||||
</div>
|
||||
|
||||
<article class="content px-4" style="padding-bottom: 40px;">
|
||||
@Body
|
||||
<CascadingValue Value="currLang" Name="LangSel">
|
||||
@Body
|
||||
</CascadingValue>
|
||||
</article>
|
||||
|
||||
<div class="fixed-bottom bottom-row px-2 py-1">
|
||||
|
||||
@@ -20,8 +20,23 @@ namespace Lux.UI.Components.Layout
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private string currLang = "IT";
|
||||
|
||||
private bool navLarge = true;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Imposta LangSel selezionata
|
||||
/// </summary>
|
||||
/// <param name="newLang"></param>
|
||||
private void SetLang(string newLang)
|
||||
{
|
||||
currLang = newLang;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -34,11 +34,6 @@ namespace Lux.UI.Components.Layout
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
//private string Traduci(string lemma, string lingua = "IT")
|
||||
//{
|
||||
// return VService.Traduci(lingua, lemma);
|
||||
//}
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void OnInitialized()
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Lux.UI.Components.Pages
|
||||
{
|
||||
if (currRec != null)
|
||||
{
|
||||
// genero 1 rec x ogni lingua
|
||||
// genero 1 rec x ogni LangSel
|
||||
var listNew = ListLingue.Select(x => new VocabolarioModel()
|
||||
{
|
||||
Lingua = x.Lingua,
|
||||
@@ -90,7 +90,7 @@ namespace Lux.UI.Components.Pages
|
||||
private async Task DoCloneLang(string origLang)
|
||||
{
|
||||
mTitle = "Attenzione";
|
||||
mMessage = "Sicuro di voler duplicare il vocabolario della lingua selezionata?\n" +
|
||||
mMessage = "Sicuro di voler duplicare il vocabolario della LangSel selezionata?\n" +
|
||||
$"Sorgente: {origLang}";
|
||||
mMode = BootstrapModal.ModalMode.Confirm;
|
||||
modalOpt = new();
|
||||
@@ -99,7 +99,7 @@ namespace Lux.UI.Components.Pages
|
||||
if (!await Modal!.ShowAsync<bool>())
|
||||
return;
|
||||
|
||||
// dovrebbe chiedere nuova lingua...
|
||||
// dovrebbe chiedere nuova LangSel...
|
||||
string destLang = "FR";
|
||||
// ora duplica...
|
||||
await VService.CloneAsync(origLang, destLang);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50</UserSecretsId>
|
||||
<Version>1.1.2606.0412</Version>
|
||||
<Version>1.1.2606.0413</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>LUX - Web Windows MES</i>
|
||||
<h4>Versione: 1.1.2606.0412</h4>
|
||||
<h4>Versione: 1.1.2606.0413</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2606.0412
|
||||
1.1.2606.0413
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2606.0412</version>
|
||||
<version>1.1.2606.0413</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user