miniflux-legacy/templates/config.php

89 lines
4.2 KiB
PHP
Raw Normal View History

2013-02-18 03:48:21 +01:00
<div class="page-header">
<h2><?= $title ?></h2>
<nav>
<ul>
<li class="active"><a href="?action=config"><?= t('general') ?></a></li>
<li><a href="?action=services"><?= t('external services') ?></a></li>
<li><a href="?action=api"><?= t('api') ?></a></li>
<li><a href="?action=database"><?= t('database') ?></a></li>
<li><a href="?action=help"><?= t('help') ?></a></li>
<li><a href="?action=about"><?= t('about') ?></a></li>
</ul>
</nav>
2013-02-18 03:48:21 +01:00
</div>
2013-03-27 02:54:26 +01:00
<section>
<form method="post" action="?action=config" autocomplete="off">
2013-02-18 03:48:21 +01:00
<h3><?= t('Authentication') ?></h3>
<?= Helper\form_hidden('csrf', $values) ?>
2013-04-13 03:08:55 +02:00
<?= Helper\form_label(t('Username'), 'username') ?>
2013-02-18 03:48:21 +01:00
<?= Helper\form_text('username', $values, $errors, array('required')) ?><br/>
2013-04-13 03:08:55 +02:00
<?= Helper\form_label(t('Password'), 'password') ?>
2013-03-27 02:54:26 +01:00
<?= Helper\form_password('password', $values, $errors) ?><br/>
2013-02-18 03:48:21 +01:00
2013-04-13 03:08:55 +02:00
<?= Helper\form_label(t('Confirmation'), 'confirmation') ?>
2013-02-18 03:48:21 +01:00
<?= Helper\form_password('confirmation', $values, $errors) ?><br/>
2013-04-13 03:08:55 +02:00
<h3><?= t('Application') ?></h3>
2014-02-26 01:03:46 +01:00
<?= Helper\form_label(t('Timezone'), 'timezone') ?>
<?= Helper\form_select('timezone', $timezones, $values, $errors) ?><br/>
2013-04-13 03:08:55 +02:00
<?= Helper\form_label(t('Language'), 'language') ?>
<?= Helper\form_select('language', $languages, $values, $errors) ?><br/>
2013-02-18 03:48:21 +01:00
<?= Helper\form_label(t('Theme'), 'theme') ?>
<?= Helper\form_select('theme', $theme_options, $values, $errors) ?><br/>
implement frontend autoupdate Only the unread counter is updated right know. The AutoUpdate Feature is designed on the premise of don't wasting resources. A distinction is made between updates when Miniflux is visible or hidden. To determine the visibility status, the Page Visibility API is used. The API is available starting with Chrome 33, Firefox 18 and IE10. [https://developer.mozilla.org/en-US/docs/Web/Guide/User_experience/Using_the_Page_Visibility_API] As IE9 returns an undefined, it doesn't break the compatibility at least. If Miniflux is visible, the unread counter on the web page is updated as soon as a mismatch between the counter and the number of unread articles in the database is found. If Miniflux is hidden, the timestamp of the most recent article from each feed is compared with the value from the last run. We have an update If the timestamp of the latest article is greater than the stored one and the latest article is unread. The web page title is updated with a ? symbol to notify the user and the update check pauses till Miniflux gets visible again. If Miniflux gets visible again, the number of unread articles is queried from the database, the unread counter on the web page is updated and finally the ? symbol is removed from the web page title. This way I can use my fever API client to read new articles (or at least the latest article) while Miniflux is hidden and as I've seen the new articles already a new articles notification is prevented. It's intentionally that the page does not reload automatically as long as articles are visible. If I'm in hurry, I only scroll through the articles to spot something interesting. Most of the time I don't reach the last article. If the page is reloaded while I'm away, I would have to scan from the top again. If we're on a nothing_to_read page and have unread articles in the database, a redirect to the unread page will be done. The default update check interval is 10 minutes and can be changed on the settings page. A zero value disables the update check entirely. fixes #213
2014-11-27 22:36:04 +01:00
<?= Helper\form_label(t('Frontend updatecheck interval in minutes'), 'frontend_updatecheck_interval') ?>
<?= Helper\form_number('frontend_updatecheck_interval', $values, $errors, array('min="0"')) ?><br/>
<?php if (ENABLE_AUTO_UPDATE): ?>
<?= Helper\form_label(t('Auto-Update URL'), 'auto_update_url') ?>
<?= Helper\form_text('auto_update_url', $values, $errors, array('required')) ?><br/>
<?php endif ?>
<?= Helper\form_checkbox('image_proxy', t('Enable image proxy'), 1, isset($values['image_proxy']) && $values['image_proxy'] == 1) ?>
<div class="form-help"><?= t('Avoid mixed content warnings with HTTPS') ?></div>
<h3><?= t('Reading') ?></h3>
2013-05-26 19:09:34 +02:00
<?= Helper\form_label(t('Remove automatically read items'), 'autoflush') ?>
<?= Helper\form_select('autoflush', $autoflush_read_options, $values, $errors) ?><br/>
<?= Helper\form_label(t('Remove automatically unread items'), 'autoflush_unread') ?>
<?= Helper\form_select('autoflush_unread', $autoflush_unread_options, $values, $errors) ?><br/>
<?= Helper\form_label(t('Items per page'), 'items_per_page') ?>
<?= Helper\form_select('items_per_page', $paging_options, $values, $errors) ?><br/>
<?= Helper\form_label(t('Default sorting order for items'), 'items_sorting_direction') ?>
<?= Helper\form_select('items_sorting_direction', $sorting_options, $values, $errors) ?><br/>
<?= Helper\form_label(t('Display items on lists'), 'items_display_mode') ?>
<?= Helper\form_select('items_display_mode', $display_mode, $values, $errors) ?><br/>
<?= Helper\form_label(t('When there is nothing to read, redirect me to this page'), 'redirect_nothing_to_read') ?>
<?= Helper\form_select('redirect_nothing_to_read', $redirect_nothing_to_read_options, $values, $errors) ?><br/>
<?= Helper\form_checkbox('nocontent', t('Do not fetch the content of articles'), 1, isset($values['nocontent']) && $values['nocontent'] == 1) ?><br />
2014-03-30 21:59:26 +02:00
2014-12-24 23:54:27 +01:00
<?= Helper\form_checkbox('favicons', t('Download favicons'), 1, isset($values['favicons']) && $values['favicons'] == 1) ?><br />
2013-02-18 03:48:21 +01:00
<div class="form-actions">
2013-06-15 02:42:09 +02:00
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
2013-02-18 03:48:21 +01:00
</div>
</form>
2013-03-27 02:54:26 +01:00
</section>
<div class="page-section">
<h2><?= t('Advanced') ?></h2>
</div>
<section class="panel panel-danger">
<ul>
<li><a href="?action=generate-tokens&amp;csrf=<?= $values['csrf'] ?>"><?= t('Generate new tokens') ?></a> (<?= t('Miniflux API') ?>, <?= t('Fever API') ?>, <?= t('Bookmarklet') ?>, <?= t('Bookmark RSS Feed') ?>)</li>
2015-01-11 01:51:27 +01:00
<?php if (ENABLE_AUTO_UPDATE): ?>
2014-11-08 16:07:24 +01:00
<li><a href="?action=confirm-auto-update"><?= t('Update Miniflux') ?></a> (<?= t('Don\'t forget to backup your database') ?>)</li>
2015-01-11 01:51:27 +01:00
<?php endif ?>
</ul>
</section>