Split settings page into mutliple pages
This commit is contained in:
parent
b761e8f17c
commit
1ac40097ed
@ -74,7 +74,7 @@ Router\get_action('auto-update', function() {
|
|||||||
Router\get_action('generate-tokens', function() {
|
Router\get_action('generate-tokens', function() {
|
||||||
|
|
||||||
Model\Config\new_tokens();
|
Model\Config\new_tokens();
|
||||||
Response\redirect('?action=config');
|
Response\redirect('?action=api');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Optimize the database manually
|
// Optimize the database manually
|
||||||
@ -145,3 +145,34 @@ Router\post_action('config', function() {
|
|||||||
'title' => t('Preferences')
|
'title' => t('Preferences')
|
||||||
)));
|
)));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Display help page
|
||||||
|
Router\get_action('help', function() {
|
||||||
|
|
||||||
|
Response\html(Template\layout('help', array(
|
||||||
|
'config' => Model\Config\get_all(),
|
||||||
|
'menu' => 'config',
|
||||||
|
'title' => t('Help')
|
||||||
|
)));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Display about page
|
||||||
|
Router\get_action('about', function() {
|
||||||
|
|
||||||
|
Response\html(Template\layout('about', array(
|
||||||
|
'config' => Model\Config\get_all(),
|
||||||
|
'db_size' => filesize(\Model\Database\get_path()),
|
||||||
|
'menu' => 'config',
|
||||||
|
'title' => t('About')
|
||||||
|
)));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Display API page
|
||||||
|
Router\get_action('api', function() {
|
||||||
|
|
||||||
|
Response\html(Template\layout('api', array(
|
||||||
|
'config' => Model\Config\get_all(),
|
||||||
|
'menu' => 'config',
|
||||||
|
'title' => t('API')
|
||||||
|
)));
|
||||||
|
});
|
||||||
|
@ -225,4 +225,23 @@ return array(
|
|||||||
// 'Username:' => '',
|
// 'Username:' => '',
|
||||||
// 'Password:' => '',
|
// 'Password:' => '',
|
||||||
// 'All' => '',
|
// 'All' => '',
|
||||||
|
// 'Advanced' => '',
|
||||||
|
// 'Documentation' => '',
|
||||||
|
// 'Installation instructions' => '',
|
||||||
|
// 'Upgrade to a new version' => '',
|
||||||
|
// 'Cronjob' => '',
|
||||||
|
// 'Advanced configuration' => '',
|
||||||
|
// 'Full article download' => '',
|
||||||
|
// 'Multiple users' => '',
|
||||||
|
// 'Themes' => '',
|
||||||
|
// 'Json-RPC API' => '',
|
||||||
|
// 'Fever API' => '',
|
||||||
|
// 'Translations' => '',
|
||||||
|
// 'Run Miniflux with Docker' => '',
|
||||||
|
// 'FAQ' => '',
|
||||||
|
// 'settings' => '',
|
||||||
|
// 'help' => '',
|
||||||
|
// 'api' => '',
|
||||||
|
// 'about' => '',
|
||||||
|
// 'Link:' => '',
|
||||||
);
|
);
|
||||||
|
@ -225,4 +225,23 @@ return array(
|
|||||||
// 'Username:' => '',
|
// 'Username:' => '',
|
||||||
// 'Password:' => '',
|
// 'Password:' => '',
|
||||||
// 'All' => '',
|
// 'All' => '',
|
||||||
|
// 'Advanced' => '',
|
||||||
|
// 'Documentation' => '',
|
||||||
|
// 'Installation instructions' => '',
|
||||||
|
// 'Upgrade to a new version' => '',
|
||||||
|
// 'Cronjob' => '',
|
||||||
|
// 'Advanced configuration' => '',
|
||||||
|
// 'Full article download' => '',
|
||||||
|
// 'Multiple users' => '',
|
||||||
|
// 'Themes' => '',
|
||||||
|
// 'Json-RPC API' => '',
|
||||||
|
// 'Fever API' => '',
|
||||||
|
// 'Translations' => '',
|
||||||
|
// 'Run Miniflux with Docker' => '',
|
||||||
|
// 'FAQ' => '',
|
||||||
|
// 'settings' => '',
|
||||||
|
// 'help' => '',
|
||||||
|
// 'api' => '',
|
||||||
|
// 'about' => '',
|
||||||
|
// 'Link:' => '',
|
||||||
);
|
);
|
||||||
|
@ -225,4 +225,23 @@ return array(
|
|||||||
// 'Username:' => '',
|
// 'Username:' => '',
|
||||||
// 'Password:' => '',
|
// 'Password:' => '',
|
||||||
// 'All' => '',
|
// 'All' => '',
|
||||||
|
// 'Advanced' => '',
|
||||||
|
// 'Documentation' => '',
|
||||||
|
// 'Installation instructions' => '',
|
||||||
|
// 'Upgrade to a new version' => '',
|
||||||
|
// 'Cronjob' => '',
|
||||||
|
// 'Advanced configuration' => '',
|
||||||
|
// 'Full article download' => '',
|
||||||
|
// 'Multiple users' => '',
|
||||||
|
// 'Themes' => '',
|
||||||
|
// 'Json-RPC API' => '',
|
||||||
|
// 'Fever API' => '',
|
||||||
|
// 'Translations' => '',
|
||||||
|
// 'Run Miniflux with Docker' => '',
|
||||||
|
// 'FAQ' => '',
|
||||||
|
// 'settings' => '',
|
||||||
|
// 'help' => '',
|
||||||
|
// 'api' => '',
|
||||||
|
// 'about' => '',
|
||||||
|
// 'Link:' => '',
|
||||||
);
|
);
|
||||||
|
@ -225,4 +225,23 @@ return array(
|
|||||||
'Username:' => 'Utilisateur :',
|
'Username:' => 'Utilisateur :',
|
||||||
'Password:' => 'Mot de passe :',
|
'Password:' => 'Mot de passe :',
|
||||||
'All' => 'Tout',
|
'All' => 'Tout',
|
||||||
|
'Advanced' => 'Avancé',
|
||||||
|
'Documentation' => 'Documentation',
|
||||||
|
'Installation instructions' => 'Installation',
|
||||||
|
'Upgrade to a new version' => 'Mise à jour',
|
||||||
|
'Cronjob' => 'Mise à jour des flux en arrière plan',
|
||||||
|
'Advanced configuration' => 'Configuration avancée',
|
||||||
|
'Full article download' => 'Téléchargement des contenus complet',
|
||||||
|
'Multiple users' => 'Utilisateurs multiples',
|
||||||
|
'Themes' => 'Thèmes',
|
||||||
|
'Json-RPC API' => 'API Json-RPC',
|
||||||
|
'Fever API' => 'Fever',
|
||||||
|
'Translations' => 'Traductions',
|
||||||
|
'Run Miniflux with Docker' => 'Exécuter Miniflux avec Docker',
|
||||||
|
'FAQ' => 'Questions fréquentes',
|
||||||
|
'settings' => 'préférences',
|
||||||
|
'help' => 'aide',
|
||||||
|
'api' => 'api',
|
||||||
|
'about' => 'a propos',
|
||||||
|
'Link:' => 'Lien :',
|
||||||
);
|
);
|
||||||
|
@ -225,4 +225,23 @@ return array(
|
|||||||
// 'Username:' => '',
|
// 'Username:' => '',
|
||||||
// 'Password:' => '',
|
// 'Password:' => '',
|
||||||
// 'All' => '',
|
// 'All' => '',
|
||||||
|
// 'Advanced' => '',
|
||||||
|
// 'Documentation' => '',
|
||||||
|
// 'Installation instructions' => '',
|
||||||
|
// 'Upgrade to a new version' => '',
|
||||||
|
// 'Cronjob' => '',
|
||||||
|
// 'Advanced configuration' => '',
|
||||||
|
// 'Full article download' => '',
|
||||||
|
// 'Multiple users' => '',
|
||||||
|
// 'Themes' => '',
|
||||||
|
// 'Json-RPC API' => '',
|
||||||
|
// 'Fever API' => '',
|
||||||
|
// 'Translations' => '',
|
||||||
|
// 'Run Miniflux with Docker' => '',
|
||||||
|
// 'FAQ' => '',
|
||||||
|
// 'settings' => '',
|
||||||
|
// 'help' => '',
|
||||||
|
// 'api' => '',
|
||||||
|
// 'about' => '',
|
||||||
|
// 'Link:' => '',
|
||||||
);
|
);
|
||||||
|
@ -225,4 +225,23 @@ return array(
|
|||||||
// 'Username:' => '',
|
// 'Username:' => '',
|
||||||
// 'Password:' => '',
|
// 'Password:' => '',
|
||||||
// 'All' => '',
|
// 'All' => '',
|
||||||
|
// 'Advanced' => '',
|
||||||
|
// 'Documentation' => '',
|
||||||
|
// 'Installation instructions' => '',
|
||||||
|
// 'Upgrade to a new version' => '',
|
||||||
|
// 'Cronjob' => '',
|
||||||
|
// 'Advanced configuration' => '',
|
||||||
|
// 'Full article download' => '',
|
||||||
|
// 'Multiple users' => '',
|
||||||
|
// 'Themes' => '',
|
||||||
|
// 'Json-RPC API' => '',
|
||||||
|
// 'Fever API' => '',
|
||||||
|
// 'Translations' => '',
|
||||||
|
// 'Run Miniflux with Docker' => '',
|
||||||
|
// 'FAQ' => '',
|
||||||
|
// 'settings' => '',
|
||||||
|
// 'help' => '',
|
||||||
|
// 'api' => '',
|
||||||
|
// 'about' => '',
|
||||||
|
// 'Link:' => '',
|
||||||
);
|
);
|
||||||
|
@ -225,4 +225,23 @@ return array(
|
|||||||
// 'Username:' => '',
|
// 'Username:' => '',
|
||||||
// 'Password:' => '',
|
// 'Password:' => '',
|
||||||
// 'All' => '',
|
// 'All' => '',
|
||||||
|
// 'Advanced' => '',
|
||||||
|
// 'Documentation' => '',
|
||||||
|
// 'Installation instructions' => '',
|
||||||
|
// 'Upgrade to a new version' => '',
|
||||||
|
// 'Cronjob' => '',
|
||||||
|
// 'Advanced configuration' => '',
|
||||||
|
// 'Full article download' => '',
|
||||||
|
// 'Multiple users' => '',
|
||||||
|
// 'Themes' => '',
|
||||||
|
// 'Json-RPC API' => '',
|
||||||
|
// 'Fever API' => '',
|
||||||
|
// 'Translations' => '',
|
||||||
|
// 'Run Miniflux with Docker' => '',
|
||||||
|
// 'FAQ' => '',
|
||||||
|
// 'settings' => '',
|
||||||
|
// 'help' => '',
|
||||||
|
// 'api' => '',
|
||||||
|
// 'about' => '',
|
||||||
|
// 'Link:' => '',
|
||||||
);
|
);
|
||||||
|
42
templates/about.php
Normal file
42
templates/about.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<div class="page-header">
|
||||||
|
<h2><?= t('About') ?></h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="?action=config"><?= t('settings') ?></a></li>
|
||||||
|
<li><a href="?action=help"><?= t('help') ?></a></li>
|
||||||
|
<li><a href="?action=api"><?= t('api') ?></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<section>
|
||||||
|
<div class="alert alert-normal">
|
||||||
|
<h3 id="bookmarks"><?= t('Bookmarks') ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<?= t('Bookmarklet:') ?>
|
||||||
|
<a href="javascript:location.href='<?= Helper\get_current_base_url() ?>?action=subscribe&token=<?= urlencode($config['bookmarklet_token']) ?>&url='+encodeURIComponent(location.href)"><?= t('Subscribe with Miniflux') ?></a> (<?= t('Drag and drop this link to your bookmarks') ?>)
|
||||||
|
<li>
|
||||||
|
<a href="<?= Helper\get_current_base_url().'?action=bookmark-feed&token='.urlencode($config['feed_token']) ?>" target="_blank"><?= t('Bookmark RSS Feed') ?></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-normal">
|
||||||
|
<h3><?= t('Database') ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?= t('Database size:') ?> <strong><?= Helper\format_bytes($db_size) ?></strong></li>
|
||||||
|
<li><a href="?action=optimize-db"><?= t('Optimize the database') ?></a> <?= t('(VACUUM command)') ?></li>
|
||||||
|
<li><a href="?action=download-db"><?= t('Download the entire database') ?></a> <?= t('(Gzip compressed Sqlite file)') ?></li>
|
||||||
|
<?php if (ENABLE_MULTIPLE_DB): ?>
|
||||||
|
<li>
|
||||||
|
<a href="?action=new-db"><?= t('Add a new database (new user)') ?></a>
|
||||||
|
</li>
|
||||||
|
<?php endif ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-normal">
|
||||||
|
<h3><?= t('About') ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?= t('Miniflux version:') ?> <strong><?= APP_VERSION ?></strong></li>
|
||||||
|
<li><?= t('Official website:') ?> <a href="http://miniflux.net" rel="noreferrer" target="_blank">http://miniflux.net</a></li>
|
||||||
|
<li><a href="?action=console"><?= t('Console') ?></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</section>
|
27
templates/api.php
Normal file
27
templates/api.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<div class="page-header">
|
||||||
|
<h2><?= t('API') ?></h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="?action=config"><?= t('settings') ?></a></li>
|
||||||
|
<li><a href="?action=about"><?= t('about') ?></a></li>
|
||||||
|
<li><a href="?action=help"><?= t('help') ?></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<section>
|
||||||
|
<div class="alert alert-normal">
|
||||||
|
<h3 id="fever"><?= t('Fever API') ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?= t('Link:') ?> <strong><?= Helper\get_current_base_url().'fever/' ?></strong></li>
|
||||||
|
<li><?= t('Username:') ?> <strong><?= Helper\escape($config['username']) ?></strong></li>
|
||||||
|
<li><?= t('Password:') ?> <strong><?= Helper\escape($config['fever_token']) ?></strong></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-normal">
|
||||||
|
<h3 id="api"><?= t('Miniflux API') ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?= t('API endpoint:') ?> <strong><?= Helper\get_current_base_url().'jsonrpc.php' ?></strong></li>
|
||||||
|
<li><?= t('API username:') ?> <strong><?= Helper\escape($config['username']) ?></strong></li>
|
||||||
|
<li><?= t('API token:') ?> <strong><?= Helper\escape($config['api_token']) ?></strong></li>
|
||||||
|
<li><a href="?action=generate-tokens"><?= t('Generate new tokens') ?></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</section>
|
@ -1,5 +1,10 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h2><?= t('Preferences') ?></h2>
|
<h2><?= t('Preferences') ?></h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="?action=about"><?= t('about') ?></a></li>
|
||||||
|
<li><a href="?action=help"><?= t('help') ?></a></li>
|
||||||
|
<li><a href="?action=api"><?= t('api') ?></a></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<section>
|
<section>
|
||||||
<form method="post" action="?action=config" autocomplete="off">
|
<form method="post" action="?action=config" autocomplete="off">
|
||||||
@ -67,63 +72,15 @@
|
|||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<?php if (ENABLE_AUTO_UPDATE): ?>
|
||||||
<div class="page-section">
|
<div class="page-section">
|
||||||
<h2><?= t('More information') ?></h2>
|
<h2><?= t('Advanced') ?></h2>
|
||||||
</div>
|
</div>
|
||||||
<section>
|
<section class="alert alert-error">
|
||||||
<div class="alert alert-normal">
|
<ul>
|
||||||
<h3 id="fever"><?= t('Fever API') ?></h3>
|
<li><a href="?action=auto-update"><?= t('Update Miniflux') ?></a> (<?= t('Don\'t forget to backup your database') ?>)</li>
|
||||||
<ul>
|
</ul>
|
||||||
<li><?= t('Link:') ?> <strong><?= Helper\get_current_base_url().'fever/' ?></strong></li>
|
|
||||||
<li><?= t('Username:') ?> <strong><?= Helper\escape($values['username']) ?></strong></li>
|
|
||||||
<li><?= t('Password:') ?> <strong><?= Helper\escape($values['fever_token']) ?></strong></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="alert alert-normal">
|
|
||||||
<h3 id="bookmarks"><?= t('Bookmarks') ?></h3>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<?= t('Bookmarklet:') ?>
|
|
||||||
<a href="javascript:location.href='<?= Helper\get_current_base_url() ?>?action=subscribe&token=<?= urlencode($values['bookmarklet_token']) ?>&url='+encodeURIComponent(location.href)"><?= t('Subscribe with Miniflux') ?></a> (<?= t('Drag and drop this link to your bookmarks') ?>)
|
|
||||||
<li>
|
|
||||||
<a href="<?= Helper\get_current_base_url().'?action=bookmark-feed&token='.urlencode($values['feed_token']) ?>" target="_blank"><?= t('Bookmark RSS Feed') ?></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="alert alert-normal">
|
|
||||||
<h3 id="api"><?= t('API') ?></h3>
|
|
||||||
<ul>
|
|
||||||
<li><?= t('API endpoint:') ?> <strong><?= Helper\get_current_base_url().'jsonrpc.php' ?></strong></li>
|
|
||||||
<li><?= t('API username:') ?> <strong><?= Helper\escape($values['username']) ?></strong></li>
|
|
||||||
<li><?= t('API token:') ?> <strong><?= Helper\escape($values['api_token']) ?></strong></li>
|
|
||||||
<li><a href="?action=generate-tokens"><?= t('Generate new tokens') ?></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="alert alert-normal">
|
|
||||||
<h3><?= t('Database') ?></h3>
|
|
||||||
<ul>
|
|
||||||
<li><?= t('Database size:') ?> <strong><?= Helper\format_bytes($db_size) ?></strong></li>
|
|
||||||
<li><a href="?action=optimize-db"><?= t('Optimize the database') ?></a> <?= t('(VACUUM command)') ?></li>
|
|
||||||
<li><a href="?action=download-db"><?= t('Download the entire database') ?></a> <?= t('(Gzip compressed Sqlite file)') ?></li>
|
|
||||||
<?php if (ENABLE_MULTIPLE_DB): ?>
|
|
||||||
<li>
|
|
||||||
<a href="?action=new-db"><?= t('Add a new database (new user)') ?></a>
|
|
||||||
</li>
|
|
||||||
<?php endif ?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<?= \PicoFarad\Template\load('keyboard_shortcuts') ?>
|
|
||||||
<div class="alert alert-normal">
|
|
||||||
<h3><?= t('About') ?></h3>
|
|
||||||
<ul>
|
|
||||||
<li><?= t('Miniflux version:') ?> <strong><?= APP_VERSION ?></strong></li>
|
|
||||||
<li><?= t('Official website:') ?> <a href="http://miniflux.net" rel="noreferrer" target="_blank">http://miniflux.net</a></li>
|
|
||||||
<?php if (ENABLE_AUTO_UPDATE): ?>
|
|
||||||
<li><a href="?action=auto-update"><?= t('Update Miniflux') ?></a> (<?= t('Don\'t forget to backup your database') ?>)</li>
|
|
||||||
<?php endif ?>
|
|
||||||
<li><a href="?action=console"><?= t('Console') ?></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
<script type="text/javascript" src="assets/js/persona.js" async></script>
|
<script type="text/javascript" src="assets/js/persona.js" async></script>
|
30
templates/help.php
Normal file
30
templates/help.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<div class="page-header">
|
||||||
|
<h2><?= t('Help') ?></h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="?action=config"><?= t('settings') ?></a></li>
|
||||||
|
<li><a href="?action=about"><?= t('about') ?></a></li>
|
||||||
|
<li><a href="?action=api"><?= t('api') ?></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<section>
|
||||||
|
<?= \PicoFarad\Template\load('keyboard_shortcuts') ?>
|
||||||
|
</section>
|
||||||
|
<div class="page-section">
|
||||||
|
<h2><?= t('Documentation') ?></h2>
|
||||||
|
</div>
|
||||||
|
<section>
|
||||||
|
<ul>
|
||||||
|
<li><a href="http://miniflux.net/documentation/installation" rel="noreferrer" target="_blank"><?= t('Installation instructions') ?></a></li>
|
||||||
|
<li><a href="http://miniflux.net/documentation/upgrade" rel="noreferrer" target="_blank"><?= t('Upgrade to a new version') ?></a></li>
|
||||||
|
<li><a href="http://miniflux.net/documentation/cronjob" rel="noreferrer" target="_blank"><?= t('Cronjob') ?></a></li>
|
||||||
|
<li><a href="http://miniflux.net/documentation/config" rel="noreferrer" target="_blank"><?= t('Advanced configuration') ?></a></li>
|
||||||
|
<li><a href="http://miniflux.net/documentation/full-article-download" rel="noreferrer" target="_blank"><?= t('Full article download') ?></a></li>
|
||||||
|
<li><a href="http://miniflux.net/documentation/multiple-users" rel="noreferrer" target="_blank"><?= t('Multiple users') ?></a></li>
|
||||||
|
<li><a href="http://miniflux.net/documentation/themes" rel="noreferrer" target="_blank"><?= t('Themes') ?></a></li>
|
||||||
|
<li><a href="http://miniflux.net/documentation/json-rpc-api" rel="noreferrer" target="_blank"><?= t('Json-RPC API') ?></a></li>
|
||||||
|
<li><a href="http://miniflux.net/documentation/fever" rel="noreferrer" target="_blank"><?= t('Fever API') ?></a></li>
|
||||||
|
<li><a href="http://miniflux.net/documentation/translations" rel="noreferrer" target="_blank"><?= t('Translations') ?></a></li>
|
||||||
|
<li><a href="http://miniflux.net/documentation/docker" rel="noreferrer" target="_blank"><?= t('Run Miniflux with Docker') ?></a></li>
|
||||||
|
<li><a href="http://miniflux.net/documentation/faq" rel="noreferrer" target="_blank"><?= t('FAQ') ?></a></li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
Loading…
Reference in New Issue
Block a user