mirror of
https://github.com/documize/community.git
synced 2025-08-02 12:05:23 +02:00
parent
99a5418dba
commit
8baad7e2f0
22 changed files with 229 additions and 102 deletions
|
@ -26,5 +26,24 @@ export default Service.extend({
|
|||
|
||||
clearAll() {
|
||||
localStorage.clear();
|
||||
}
|
||||
},
|
||||
|
||||
getDocSectionHide(docId) {
|
||||
let state = localStorage[`doc-hide-${docId}`];
|
||||
if (_.isUndefined(state) || _.isEmpty(state)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return _.split(state, '|');
|
||||
},
|
||||
|
||||
setDocSectionHide(docId, state) {
|
||||
let key = `doc-hide-${docId}`;
|
||||
|
||||
if (state.length === 0) {
|
||||
delete localStorage[key];
|
||||
} else {
|
||||
localStorage[key] = _.join(state, '|');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue