Skip to content

Commit a6b44ac

Browse files
committed
Fix some issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent 71ed9aa commit a6b44ac

File tree

7 files changed

+9
-210
lines changed

7 files changed

+9
-210
lines changed

.github/workflows/lint-stylelint.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The format is mostly based on [Keep a Changelog](https://keepachangelog.com/en/1
55
# Unreleased
66
## [18.x.x]
77
### Changed
8+
- Ported the admin settings to vue (#2353)
89

910
### Fixed
1011
- Fix PHP 8.1 deprecations (#1861)

lib/Service/StatusService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function isCronProperlyConfigured(): bool
4848
$cronOff = !boolval($this->settings->getAppValue(
4949
Application::NAME,
5050
'useCronUpdates',
51-
Application::DEFAULT_SETTINGS['useCronUpdates']
51+
(string)Application::DEFAULT_SETTINGS['useCronUpdates']
5252
));
5353

5454
// check for cron modes which may lead to problems

lib/Settings/AdminSettings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public function getForm()
3030
$this->initialState->provideInitialState($setting, $this->config->getAppValue(
3131
Application::NAME,
3232
$setting,
33-
Application::DEFAULT_SETTINGS[$setting])
34-
);
33+
(string)Application::DEFAULT_SETTINGS[$setting]
34+
));
3535
}
3636

3737
return new TemplateResponse(Application::NAME, 'admin', []);

src/components/AdminSettings.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ export default {
8787
appId: 'news',
8888
key,
8989
})
90-
if (value === true || value === false) {
91-
value = value ? '0' : '1'
90+
if (key === 'useCronUpdates') {
91+
value = value ? '1' : '0'
9292
}
9393
try {
9494
const { data } = await axios.post(url, {
@@ -99,7 +99,7 @@ export default {
9999
})
100100
} catch (e) {
101101
this.handleResponse({
102-
errorMessage: t('news', 'Unable to update share by mail config'),
102+
errorMessage: t('news', 'Unable to update news config'),
103103
error: e,
104104
})
105105
}
@@ -122,7 +122,7 @@ export default {
122122
margin-bottom: 1rem;
123123
}
124124
125-
input {
125+
.input-field {
126126
max-width: 350px;
127127
}
128128
}

tests/Unit/Controller/AdminControllerTest.php

Lines changed: 0 additions & 156 deletions
This file was deleted.

tests/Unit/Service/StatusServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testGetStatus()
6060
->will($this->returnValueMap([
6161
['news', 'installed_version', '', '1.0'],
6262
['core', 'backgroundjobs_mode', '', 'cron'],
63-
['news', 'useCronUpdates', true, true],
63+
['news', 'useCronUpdates', (string)true, (string)true],
6464
]));
6565

6666
$this->connection->expects($this->exactly(1))

0 commit comments

Comments
 (0)