mirror of
https://github.com/unraid/webgui.git
synced 2026-01-06 01:29:54 -06:00
Chore: Only support small / normal / large font sizes
This commit is contained in:
6
emhttp/plugins/dynamix/DisplaySettings.page
Normal file → Executable file
6
emhttp/plugins/dynamix/DisplaySettings.page
Normal file → Executable file
@@ -152,24 +152,18 @@ _(Language)_:
|
||||
|
||||
_(Font size)_:
|
||||
: <select name="font" id='font'>
|
||||
<?=mk_option($display['font'], "50", _('Very small'))?>
|
||||
<?=mk_option($display['font'], "56.25", _('Small'))?>
|
||||
<?=mk_option($display['font'], "", _('Normal'))?>
|
||||
<?=mk_option($display['font'], "68.75", _('Large'))?>
|
||||
<?=mk_option($display['font'], "75", _('Very large'))?>
|
||||
<?=mk_option($display['font'], "80", _('Huge'))?>
|
||||
</select>
|
||||
|
||||
:display_font_size_help:
|
||||
|
||||
_(Terminal font size)_:
|
||||
: <select name="tty" id="tty">
|
||||
<?=mk_option($display['tty'], "11", _('Very small'))?>
|
||||
<?=mk_option($display['tty'], "13", _('Small'))?>
|
||||
<?=mk_option($display['tty'], "15", _('Normal'))?>
|
||||
<?=mk_option($display['tty'], "17", _('Large'))?>
|
||||
<?=mk_option($display['tty'], "19", _('Very large'))?>
|
||||
<?=mk_option($display['tty'], "21", _('Huge'))?>
|
||||
</select>
|
||||
|
||||
:display_tty_size_help:
|
||||
|
||||
17
emhttp/plugins/dynamix/include/DefaultPageLayout.php
Normal file → Executable file
17
emhttp/plugins/dynamix/include/DefaultPageLayout.php
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright 2005-2024, Lime Technology
|
||||
* Copyright 2012-2024, Bergware International.
|
||||
/* Copyright 2005-2025, Lime Technology
|
||||
* Copyright 2012-2025, Bergware International.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
@@ -19,7 +19,18 @@ $themes2 = $themeHelper->isSidebarTheme();
|
||||
$themeHelper->updateDockerLogColor($docroot);
|
||||
|
||||
$display['font'] = filter_var($_COOKIE['fontSize'] ?? $display['font'] ?? '', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
|
||||
|
||||
// adjust font size if cookie was set to a value that is not supported
|
||||
switch ($display['font']) {
|
||||
case "50":
|
||||
$display['font'] = "56.25";
|
||||
break;
|
||||
case "75":
|
||||
$display['font'] = "68.75";
|
||||
break;
|
||||
case "80":
|
||||
$display['font'] = "68.75";
|
||||
break;
|
||||
}
|
||||
$header = $display['header']; // keep $header, $backgnd vars for plugin backwards compatibility for the time being
|
||||
$backgnd = $display['background'];
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2021 Lime Technology, Inc.
|
||||
# Copyright 2025 Lime Technology, Inc.
|
||||
|
||||
# Unraid OS upgrade script.
|
||||
# Invoked early in emhttpd execution.
|
||||
@@ -31,5 +31,8 @@ fi
|
||||
# stating with 6.10 'USE_SSL="auto"' without a LE cert is invalid
|
||||
[[ ! -f /boot/config/ssl/certs/certificate_bundle.pem ]] && sed -i s/USE_SSL=\"auto\"/USE_SSL=\"no\"/ /boot/config/ident.cfg
|
||||
|
||||
# remove support for huge / very large / very small font sizes (replace with nearest size still supported)
|
||||
[ -f "/boot/config/plugins/dynamix/dynamix.cfg" ] && sed -ri -e 's/font="(80|75)"/font="68.75"/g' -e 's/font="50"/font="56.25"/g' -e 's/tty="11"/tty="13"/g' -e 's/tty="(19|21)"/tty="17"/g' "/boot/config/plugins/dynamix/dynamix.cfg"
|
||||
|
||||
# delete any temp dir left over from a version downgrade (see dynamix.plugin.manager/include/Downgrade.php)
|
||||
rm -rf /boot/deletemedowngrade.*
|
||||
|
||||
Reference in New Issue
Block a user