add appearance to settings

This commit is contained in:
maxpozdeev 2022-07-11 00:52:50 +03:00
parent d6eabc8e94
commit 522010e34e
3 changed files with 15 additions and 0 deletions

View file

@ -157,6 +157,9 @@
"set_submit": "Submit changes",
"set_cancel": "Cancel",
"set_showdate": "Show task date in list",
"set_appearance": "Appearance",
"set_appearance_system": "Same as system",
"set_appearance_light": "Light theme",
"confirmDelete": "Are you sure you want to delete the task?",
"confirmLeave": "There can be unsaved data. Do you really want to leave?",
"actionNoteSave": "save",

View file

@ -157,6 +157,9 @@
"set_submit": "Сохранить изменения",
"set_cancel": "Отмена",
"set_showdate": "Показывать дату создания задачи",
"set_appearance": "Тема оформления",
"set_appearance_system": "Как в системе",
"set_appearance_light": "Светлая",
"confirmDelete": "Вы действительно хотите удалить задачу?",
"confirmLeave": "На странице могут быть несохраненные данные. Вы действительно хотите закрыть страницу?",
"actionNoteSave": "сохранить",

View file

@ -51,6 +51,7 @@ if(isset($_POST['save']))
Config::set('dateformatshort', removeNewLines(_post('dateformatshort')) );
Config::set('title', removeNewLines(trim(_post('title'))) );
Config::set('showdate', (int)_post('showdate'));
Config::set('appearance', removeNewLines(trim(_post('appearance'))) );
Config::save();
$t['saved'] = 1;
jsonExit($t);
@ -265,6 +266,14 @@ header('Content-type:text/html; charset=utf-8');
</div>
</div>
<div class="tr">
<div class="th"><?php _e('set_appearance');?>:</div>
<div class="td">
<label><input type="radio" name="appearance" value="system" <?php if(_c('appearance') == 'system') echo 'checked="checked"'; ?> /><?php _e('set_appearance_system');?></label> <br/>
<label><input type="radio" name="appearance" value="light" <?php if(_c('appearance') == 'light') echo 'checked="checked"'; ?> /><?php _e('set_appearance_light');?></label>
</div>
</div>
<div class="tr form-bottom-buttons">
<input type="submit" value="<?php _e('set_submit');?>" />
<input type="button" class="mtt-back-button" value="<?php _e('set_cancel');?>" />