Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yPhil
Pétrolette
Commits
a6040811
Commit
a6040811
authored
Jan 16, 2018
by
yPhil
Browse files
Merge branch 'ui' into dev
parents
fc9e6f0b
8a696995
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/lib/js/sync.js
View file @
a6040811
...
...
@@ -56,32 +56,26 @@ MOB.sync = (function() {
},
readSync
:
function
()
{
if
(
synchronized
)
{
remoteStorage
.
petrolette
.
read
()
.
then
((
data
)
=>
{
remoteStorage
.
petrolette
.
read
()
.
then
((
data
)
=>
{
if
(
MOB
.
prefs
.
isValidSourcesFile
(
JSON
.
parse
(
data
)))
{
if
(
MOB
.
prefs
.
isValidSourcesFile
(
JSON
.
parse
(
data
)))
{
console
.
info
(
'
Petrolette | Validation OK
'
);
console
.
error
(
'
Petrolette | Validation OK
'
);
return
MOB
.
tab
.
populate
(
JSON
.
parse
(
data
)
);
return
MOB
.
tab
.
populate
(
JSON
.
parse
(
data
));
}
else
{
}
else
{
console
.
error
(
'
Petrolette | Validation NOT OK: Default sources
'
);
console
.
error
(
'
Petrolette | Validation NOT OK: Default sources
'
);
MOB
.
tab
.
populate
(
JSON
.
parse
(
MOB
.
prefs
.
readConfig
(
'
tabs
'
)));
}
})
.
catch
((
err
)
=>
{
console
.
error
(
'
Petrolette | Validation error:
'
,
err
);
});
MOB
.
tab
.
populate
(
JSON
.
parse
(
MOB
.
prefs
.
readConfig
(
'
tabs
'
)));
}
}
else
{
MOB
.
tab
.
populate
(
JSON
.
parse
(
MOB
.
prefs
.
readConfig
(
'
tabs
'
)));
}
})
.
catch
((
err
)
=>
{
console
.
error
(
'
Petrolette | Validation error:
'
,
err
);
});
},
writeSync
:
function
(
sources
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment