Skip to content

Commit 960406a

Browse files
author
HugoFara
committed
chore(settings): removes frameheigth settings, as the feature is no longer used ("Height of right top frame" not working
Fixes #116)
1 parent 8b7b6d8 commit 960406a

File tree

7 files changed

+18
-365
lines changed

7 files changed

+18
-365
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,24 @@ ones are marked like "v1.0.0-fork".
107107
user-based multi-tenancy. Existing prefixed tables will be migrated to the
108108
new system automatically.
109109

110+
### Removed
111+
112+
* **Orphaned Frame Settings** ([#116](https://github.com/HugoFara/lwt/issues/116)):
113+
Removed all legacy frame-related settings from the admin settings page:
114+
* `set-text-h-frameheight-no-audio` - Frame height without audio
115+
* `set-text-h-frameheight-with-audio` - Frame height with audio
116+
* `set-text-l-framewidth-percent` - Width of left frames (text)
117+
* `set-text-r-frameheight-percent` - Height of right frame (text)
118+
* `set-test-h-frameheight` - Frame height (test)
119+
* `set-test-l-framewidth-percent` - Width of left frames (test)
120+
* `set-test-r-frameheight-percent` - Height of right frame (test)
121+
122+
These settings controlled frame dimensions in the text reading and test
123+
interfaces, but became non-functional after the iframe-based layout was
124+
replaced with Alpine.js components ([#166](https://github.com/HugoFara/lwt/issues/166)).
125+
Also removed the dead `initFrameResizable()` function from TypeScript.
126+
Closes #116.
127+
110128
## 2.10.0-fork (April 1 2024)
111129

112130
### Added in 2.10.0-fork

db/seeds/demo.sql

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -308,45 +308,6 @@ INSERT INTO settings
308308
VALUES
309309
('lastscorecalc', '2020-10-03');
310310
INSERT INTO settings
311-
VALUES
312-
(
313-
'set-text-h-frameheight-no-audio',
314-
'140'
315-
);
316-
INSERT INTO settings
317-
VALUES
318-
(
319-
'set-text-h-frameheight-with-audio',
320-
'200'
321-
);
322-
INSERT INTO settings
323-
VALUES
324-
(
325-
'set-text-l-framewidth-percent',
326-
'50'
327-
);
328-
INSERT INTO settings
329-
VALUES
330-
(
331-
'set-text-r-frameheight-percent',
332-
'50'
333-
);
334-
INSERT INTO settings
335-
VALUES
336-
('set-test-h-frameheight', '140');
337-
INSERT INTO settings
338-
VALUES
339-
(
340-
'set-test-l-framewidth-percent',
341-
'50'
342-
);
343-
INSERT INTO settings
344-
VALUES
345-
(
346-
'set-test-r-frameheight-percent',
347-
'50'
348-
);
349-
INSERT INTO settings
350311
VALUES
351312
(
352313
'set-test-main-frame-waiting-time',

src/backend/Services/SettingsService.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,6 @@ class SettingsService
4848
* @var array<string, array{dft: string, num: int, min?: int, max?: int}>
4949
*/
5050
private const SETTING_DEFINITIONS = [
51-
'set-text-h-frameheight-no-audio' => [
52-
"dft" => '140', "num" => 1, "min" => 10, "max" => 999
53-
],
54-
'set-text-h-frameheight-with-audio' => [
55-
"dft" => '200', "num" => 1, "min" => 10, "max" => 999
56-
],
57-
'set-text-l-framewidth-percent' => [
58-
"dft" => '60', "num" => 1, "min" => 5, "max" => 95
59-
],
60-
'set-text-r-frameheight-percent' => [
61-
"dft" => '37', "num" => 1, "min" => 5, "max" => 95
62-
],
63-
'set-test-h-frameheight' => [
64-
"dft" => '140', "num" => 1, "min" => 10, "max" => 999
65-
],
66-
'set-test-l-framewidth-percent' => [
67-
"dft" => '50', "num" => 1, "min" => 5, "max" => 95
68-
],
69-
'set-test-r-frameheight-percent' => [
70-
"dft" => '50', "num" => 1, "min" => 5, "max" => 95
71-
],
7251
'set-words-to-do-buttons' => [
7352
"dft" => '1', "num" => 0
7453
],
@@ -156,13 +135,6 @@ class SettingsService
156135
*/
157136
private const SETTING_KEYS = [
158137
'set-theme-dir',
159-
'set-text-h-frameheight-no-audio',
160-
'set-text-h-frameheight-with-audio',
161-
'set-text-l-framewidth-percent',
162-
'set-text-r-frameheight-percent',
163-
'set-test-h-frameheight',
164-
'set-test-l-framewidth-percent',
165-
'set-test-r-frameheight-percent',
166138
'set-words-to-do-buttons',
167139
'set-tooltip-mode',
168140
'set-ggl-translation-per-page',

src/backend/Views/Admin/settings_form.php

Lines changed: 0 additions & 218 deletions
Original file line numberDiff line numberDiff line change
@@ -76,132 +76,6 @@
7676
</button>
7777
</header>
7878
<div class="card-content" x-show="open" x-transition>
79-
<div class="field is-horizontal">
80-
<div class="field-label is-normal">
81-
<label class="label" for="set-text-h-frameheight-no-audio">
82-
Frame Height <span class="has-text-weight-normal">(without audio)</span>
83-
</label>
84-
</div>
85-
<div class="field-body">
86-
<div class="field has-addons">
87-
<div class="control">
88-
<input class="input notempty posintnumber setfocus"
89-
type="number"
90-
min="0"
91-
id="set-text-h-frameheight-no-audio"
92-
name="set-text-h-frameheight-no-audio"
93-
data_info="Height of left top frame without audioplayer"
94-
value="<?php echo htmlspecialchars($settings['set-text-h-frameheight-no-audio'] ?? '', ENT_QUOTES, 'UTF-8'); ?>"
95-
maxlength="3"
96-
style="width: 100px;"
97-
required />
98-
</div>
99-
<div class="control">
100-
<span class="button is-static">px</span>
101-
</div>
102-
<div class="control">
103-
<span class="icon has-text-danger" title="Field must not be empty">
104-
<?php echo IconHelper::render('asterisk', ['alt' => 'Required']); ?>
105-
</span>
106-
</div>
107-
</div>
108-
</div>
109-
</div>
110-
111-
<div class="field is-horizontal">
112-
<div class="field-label is-normal">
113-
<label class="label" for="set-text-h-frameheight-with-audio">
114-
Frame Height <span class="has-text-weight-normal">(with audio)</span>
115-
</label>
116-
</div>
117-
<div class="field-body">
118-
<div class="field has-addons">
119-
<div class="control">
120-
<input class="input notempty posintnumber"
121-
type="number"
122-
min="0"
123-
id="set-text-h-frameheight-with-audio"
124-
name="set-text-h-frameheight-with-audio"
125-
data_info="Height of left top frame with audioplayer"
126-
value="<?php echo htmlspecialchars($settings['set-text-h-frameheight-with-audio'] ?? '', ENT_QUOTES, 'UTF-8'); ?>"
127-
maxlength="3"
128-
style="width: 100px;"
129-
required />
130-
</div>
131-
<div class="control">
132-
<span class="button is-static">px</span>
133-
</div>
134-
<div class="control">
135-
<span class="icon has-text-danger" title="Field must not be empty">
136-
<?php echo IconHelper::render('asterisk', ['alt' => 'Required']); ?>
137-
</span>
138-
</div>
139-
</div>
140-
</div>
141-
</div>
142-
143-
<div class="field is-horizontal">
144-
<div class="field-label is-normal">
145-
<label class="label" for="set-text-l-framewidth-percent">Width of Left Frames</label>
146-
</div>
147-
<div class="field-body">
148-
<div class="field has-addons">
149-
<div class="control">
150-
<input class="input notempty posintnumber"
151-
type="number"
152-
min="0"
153-
max="100"
154-
id="set-text-l-framewidth-percent"
155-
name="set-text-l-framewidth-percent"
156-
data_info="Width of left frames"
157-
value="<?php echo htmlspecialchars($settings['set-text-l-framewidth-percent'] ?? '', ENT_QUOTES, 'UTF-8'); ?>"
158-
maxlength="2"
159-
style="width: 80px;"
160-
required />
161-
</div>
162-
<div class="control">
163-
<span class="button is-static">%</span>
164-
</div>
165-
<div class="control">
166-
<span class="icon has-text-danger" title="Field must not be empty">
167-
<?php echo IconHelper::render('asterisk', ['alt' => 'Required']); ?>
168-
</span>
169-
</div>
170-
</div>
171-
</div>
172-
</div>
173-
174-
<div class="field is-horizontal">
175-
<div class="field-label is-normal">
176-
<label class="label" for="set-text-r-frameheight-percent">Height of Right Frame</label>
177-
</div>
178-
<div class="field-body">
179-
<div class="field has-addons">
180-
<div class="control">
181-
<input class="input notempty posintnumber"
182-
type="number"
183-
min="0"
184-
max="100"
185-
id="set-text-r-frameheight-percent"
186-
name="set-text-r-frameheight-percent"
187-
data_info="Height of right top frame"
188-
value="<?php echo htmlspecialchars($settings['set-text-r-frameheight-percent'] ?? '', ENT_QUOTES, 'UTF-8'); ?>"
189-
maxlength="2"
190-
style="width: 80px;"
191-
required />
192-
</div>
193-
<div class="control">
194-
<span class="button is-static">%</span>
195-
</div>
196-
<div class="control">
197-
<span class="icon has-text-danger" title="Field must not be empty">
198-
<?php echo IconHelper::render('asterisk', ['alt' => 'Required']); ?>
199-
</span>
200-
</div>
201-
</div>
202-
</div>
203-
</div>
204-
20579
<div class="field is-horizontal">
20680
<div class="field-label is-normal">
20781
<label class="label" for="set-words-to-do-buttons">Words To Do Buttons</label>
@@ -289,98 +163,6 @@
289163
</button>
290164
</header>
291165
<div class="card-content" x-show="open" x-transition>
292-
<div class="field is-horizontal">
293-
<div class="field-label is-normal">
294-
<label class="label" for="set-test-h-frameheight">Frame Height</label>
295-
</div>
296-
<div class="field-body">
297-
<div class="field has-addons">
298-
<div class="control">
299-
<input class="input notempty posintnumber"
300-
type="number"
301-
min="0"
302-
id="set-test-h-frameheight"
303-
name="set-test-h-frameheight"
304-
data_info="Height of left top frame"
305-
value="<?php echo htmlspecialchars($settings['set-test-h-frameheight'] ?? '', ENT_QUOTES, 'UTF-8'); ?>"
306-
maxlength="3"
307-
style="width: 100px;"
308-
required />
309-
</div>
310-
<div class="control">
311-
<span class="button is-static">px</span>
312-
</div>
313-
<div class="control">
314-
<span class="icon has-text-danger" title="Field must not be empty">
315-
<?php echo IconHelper::render('asterisk', ['alt' => 'Required']); ?>
316-
</span>
317-
</div>
318-
</div>
319-
</div>
320-
</div>
321-
322-
<div class="field is-horizontal">
323-
<div class="field-label is-normal">
324-
<label class="label" for="set-test-l-framewidth-percent">Width of Left Frames</label>
325-
</div>
326-
<div class="field-body">
327-
<div class="field has-addons">
328-
<div class="control">
329-
<input class="input notempty posintnumber"
330-
type="number"
331-
min="0"
332-
max="100"
333-
id="set-test-l-framewidth-percent"
334-
name="set-test-l-framewidth-percent"
335-
data_info="Width of left frames"
336-
value="<?php echo htmlspecialchars($settings['set-test-l-framewidth-percent'] ?? '', ENT_QUOTES, 'UTF-8'); ?>"
337-
maxlength="2"
338-
style="width: 80px;"
339-
required />
340-
</div>
341-
<div class="control">
342-
<span class="button is-static">%</span>
343-
</div>
344-
<div class="control">
345-
<span class="icon has-text-danger" title="Field must not be empty">
346-
<?php echo IconHelper::render('asterisk', ['alt' => 'Required']); ?>
347-
</span>
348-
</div>
349-
</div>
350-
</div>
351-
</div>
352-
353-
<div class="field is-horizontal">
354-
<div class="field-label is-normal">
355-
<label class="label" for="set-test-r-frameheight-percent">Height of Right Frame</label>
356-
</div>
357-
<div class="field-body">
358-
<div class="field has-addons">
359-
<div class="control">
360-
<input class="input notempty posintnumber"
361-
type="number"
362-
min="0"
363-
max="100"
364-
id="set-test-r-frameheight-percent"
365-
name="set-test-r-frameheight-percent"
366-
data_info="Height of right top frame"
367-
value="<?php echo htmlspecialchars($settings['set-test-r-frameheight-percent'] ?? '', ENT_QUOTES, 'UTF-8'); ?>"
368-
maxlength="2"
369-
style="width: 80px;"
370-
required />
371-
</div>
372-
<div class="control">
373-
<span class="button is-static">%</span>
374-
</div>
375-
<div class="control">
376-
<span class="icon has-text-danger" title="Field must not be empty">
377-
<?php echo IconHelper::render('asterisk', ['alt' => 'Required']); ?>
378-
</span>
379-
</div>
380-
</div>
381-
</div>
382-
</div>
383-
384166
<div class="field is-horizontal">
385167
<div class="field-label is-normal">
386168
<label class="label" for="set-test-main-frame-waiting-time">Display Next Test After</label>

0 commit comments

Comments
 (0)