Usability U01–U16: sichere Abläufe und Bedienkorrekturen #1
@@ -13,7 +13,7 @@
|
||||
<a class="btn btn-outline-secondary" href="hilfe">Hilfe</a>
|
||||
<label for="text-scale">Textgröße</label>
|
||||
<select id="text-scale" @bind="fontScale" @bind:after="ApplyTextScale">
|
||||
<option value="100">Normal</option><option value="125">Groß (125 %)</option>
|
||||
<option value="75">Klein (75 %)</option><option value="100">Normal</option><option value="125">Groß (125 %)</option>
|
||||
<option value="150">Sehr groß (150 %)</option><option value="200">200 %</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@ public partial class MainLayout
|
||||
if (firstRender)
|
||||
{
|
||||
var value = await JS.InvokeAsync<int>("duempelkasReading.get");
|
||||
fontScale = value is 125 or 150 or 200 ? value : 100;
|
||||
fontScale = value is 75 or 125 or 150 or 200 ? value : 100;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ window.duempelkasDialog = {
|
||||
window.duempelkasReading = {
|
||||
get() { let value = 100; try { value = Number(localStorage.getItem('duempelkas-text-scale')) || 100; } catch (_) {} return this.set(value, false); },
|
||||
set(value, persist = true) {
|
||||
const scale = [100,125,150,200].includes(Number(value)) ? Number(value) : 100;
|
||||
const scale = [75,100,125,150,200].includes(Number(value)) ? Number(value) : 100;
|
||||
document.documentElement.style.setProperty('--app-font-size', (16 * scale / 100) + 'px');
|
||||
if (persist) { try { localStorage.setItem('duempelkas-text-scale', String(scale)); } catch (_) {} }
|
||||
return scale;
|
||||
|
||||
Reference in New Issue
Block a user