Skip to content

Commit

Permalink
Minor tweak to user table
Browse files Browse the repository at this point in the history
  • Loading branch information
eb1 committed Nov 1, 2024
1 parent fda1b7b commit cdc24e4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions www/js/models/json/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ define(function (require) {
userid: "",
// password: "",
roles: [],
// user preferences (in local storage for AIM 1.x)
bookmarks: [],
// editor preferences (in local storage for pre-v1.18)
copysource: 0,
wrapusfm: 0,
stopatboundaries: 0,
Expand All @@ -31,7 +32,6 @@ define(function (require) {
defaultfttarget: 0,
uilang: 0,
darkmode: 1,
bookmarks: [],
wordspacing: wordSpacingEnum.NORMAL
},

Expand Down
4 changes: 2 additions & 2 deletions www/js/models/sql/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,14 @@ define(function (require) {
// 2 new tables -- user and bookmark
theSQL = 'CREATE TABLE user (id integer primary key, username text, userid text, roles text, CopySource integer, WrapUSFM integer, StopAtBoundaries integer, AllowEditBlankSP integer, ShowTranslationChecks integer, DefaultFTTarget integer, UILang integer, DarkMode integer, bookmarks Text, WordSpacing integer);';
tx.executeSql(theSQL, [], function (tx, res) {
console.log("UpgradeSchema() - user table created");
console.log("upgradeSchema() - user table created");
}, function (err) {
// exception thrown -- assume table doesn't exist
console.log("upgradeSchema: error: " + err.message);
});
theSQL = 'CREATE TABLE IF NOT EXISTS bookmark (id integer primary key, bookmarkid text, projectid text, bookname text, bookid integer, chapterid integer, spid text);';
tx.executeSql(theSQL, [], function (tx, res) {
console.log("UpgradeSchema() - bookmark table created");
console.log("upgradeSchema() - bookmark table created");
}, function (err) {
// exception thrown -- assume table doesn't exist
console.log("upgradeSchema: error: " + err.message);
Expand Down
3 changes: 2 additions & 1 deletion www/js/models/sql/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ define(function (require) {
// email: "",
// password: "",
roles: [],
bookmarks: [],
// editor preferences (these were in local storage for pre-v1.18)
copysource: 0,
wrapusfm: 0,
stopatboundaries: 0,
Expand All @@ -63,7 +65,6 @@ define(function (require) {
defaultfttarget: 0,
uilang: 0,
darkmode: 1,
bookmarks: [],
wordspacing: wordSpacingEnum.NORMAL
},
initialize: function () {
Expand Down

0 comments on commit cdc24e4

Please sign in to comment.