Port Backend to SQLite/Sequelize (removes MongoDB), Support Electron (#14)

* The MongoDB/Mongoose data storage is removed in favor of Sequelize. This abstracts over SQLite or RDBMs like PostgreSQL and MSSQL. The default is SQLite, which significantly simplifies deployments in end-user environments.

* As Spacedeck now has no more mandatory server dependencies, we can wrap it in Electron and ship it as a desktop application.

* Removes docker-compose.yml

* First version of import UI
This commit is contained in:
mntmn
2018-04-12 16:40:58 +00:00
committed by GitHub
parent 8e0bc69a11
commit ebac854da8
62 changed files with 1725 additions and 3024 deletions

View File

@@ -8,24 +8,29 @@ SpacedeckAccount = {
account_confirmed_sent: false,
account_tab: 'invoices',
password_change_error: null,
feedback_text: ""
feedback_text: "",
importables: [], // spacedeck.com zip import files
},
methods: {
show_account: function(user) {
show_account: function() {
this.activate_dropdown('account');
this.load_subscription();
this.load_billing();
},
start_zip_import: function(f) {
if (confirm("Your archive will be imported in the background. This can take a few minutes. You can continue using Spacedeck in the meantime.")) {
import_zip(this.user, f);
}
},
account_save_user_digest: function(val) {
this.user.preferences.daily_digest = val;
this.save_user(function(){
this.user.prefs_email_digest = val;
this.save_user(function() {
});
},
account_save_user_notifications: function(val) {
this.user.preferences.email_notifications = val;
this.save_user(function(){
this.user.prefs_email_notifications = val;
this.save_user(function() {
});
},
@@ -36,13 +41,11 @@ SpacedeckAccount = {
save_user_language: function(lang) {
localStorage.lang = lang;
if (this.user.preferences) {
this.user.preferences.language = lang;
this.save_user(function() {
window._spacedeck_location_change = true;
location.href="/spaces";
}.bind(this));
}
this.user.prefs_language = lang;
this.save_user(function() {
window._spacedeck_location_change = true;
location.href="/spaces";
}.bind(this));
},
save_user: function(on_success) {