warning if JavaScript was not built

pull/409/head
korelstar 4 years ago
parent 93ac4619bd
commit d218ca9d8b

@ -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',
[ ]
);

@ -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>
Loading…
Cancel
Save