diff --git a/js/app.js b/js/app.js
index cc4dbf21..42c746a7 100644
--- a/js/app.js
+++ b/js/app.js
@@ -63,7 +63,7 @@ app = Sammy('#main', function (sam) {
// Flash helper to diplay instant notifications
flash: function (level, message) {
flashs = store.get('flash');
- if (!flashs) { flashs = {'info': [], 'fail': [], 'success': [] } }
+ if (!flashs) { flashs = {'info': [], 'fail': [], 'warning': [], 'success': [] } }
flashs[level].push(message);
store.set('flash', flashs);
@@ -275,7 +275,8 @@ app = Sammy('#main', function (sam) {
// Show development note
c.flash('info', 'You are using a development version.
' +
- 'Please note that you can use the moulinette if you want to access to more YunoHost\'s features.');
+ 'Please note that you can use the moulinette if you want to access to more YunoHost\'s features.');
+
// Available sections
data = {links: [
@@ -288,7 +289,15 @@ app = Sammy('#main', function (sam) {
{name: "Backup", path: '#/backup'},
]};
- c.view('home', data);
+ c.api('/users', function(data2) {
+ // Warn admin if no users are created.
+ if (data2.Users.length == 0) {
+ c.flash('warning', "You probably need to create a user first.");
+ }
+
+ c.view('home', data);
+ });
+
});
sam.get('#/login', function (c) {
diff --git a/views/user/user_list.ms b/views/user/user_list.ms
index f39a4924..a68b909f 100644
--- a/views/user/user_list.ms
+++ b/views/user/user_list.ms
@@ -20,4 +20,12 @@
{{Mail}}
{{/Users}} + +{{^Users}} +