warning if JavaScript was not built

This commit is contained in:
korelstar 2019-11-16 22:53:12 +01:00
parent 93ac4619bd
commit d218ca9d8b
2 changed files with 6 additions and 1 deletions

View File

@ -30,9 +30,10 @@ class PageController extends Controller {
* @return TemplateResponse
*/
public function index() {
$devMode = !is_file(dirname(__FILE__).'/../../js/notes.js');
$response = new TemplateResponse(
$this->appName,
'main',
$devMode ? 'dev-mode' : 'main',
[ ]
);

4
templates/dev-mode.php Normal file
View File

@ -0,0 +1,4 @@
<div id="app-content" style="margin: 2em 3em;">
<h2><?php echo $l->t('Development Mode'); ?></h2>
<p><?php echo $l->t('It looks that the notes app was installed from a development source. Please install it from the official <a href="%1$s">Nextcloud App Store</a> instead. If you want to build the Notes app by yourself, please follow the <a href="%2$s">developer instructions</a>.', [ 'https://apps.nextcloud.com/apps/notes', 'https://github.com/nextcloud/notes#warning-developer-info' ]); ?></p>
</div>