Embeddable ParityBar (#4222) (#4287)

* Embeddable ParityBar

* Replacing storage with store

* Fixing  references.

* Addressing style issues

* Supporting parity background

Conflicts:
	js/src/views/ParityBar/parityBar.js
This commit is contained in:
Tomasz Drwięga
2017-01-24 20:19:05 +01:00
committed by Gav Wood
parent dcd9119452
commit 2b132c38d6
10 changed files with 243 additions and 54 deletions

View File

@@ -14,13 +14,15 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import store from 'store';
const LS_KEY = 'tooltips';
let currentId = -1;
let maxId = 0;
function closeTooltips (state, action) {
window.localStorage.setItem(LS_KEY, '{"state":"off"}');
store.set(LS_KEY, '{"state":"off"}');
currentId = -1;
@@ -41,7 +43,7 @@ function newTooltip (state, action) {
}
function nextTooltip (state, action) {
const hideTips = window.localStorage.getItem(LS_KEY);
const hideTips = store.get(LS_KEY);
currentId = hideTips
? -1