File tree Expand file tree Collapse file tree 5 files changed +36
-1
lines changed
Expand file tree Collapse file tree 5 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " iknow-entity-browser" ,
3- "version" : " 0.7.0 " ,
3+ "version" : " 0.7.1 " ,
44 "description" : " Visualizer for iKnow entities" ,
55 "main" : " gulpfile.babel.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -124,6 +124,10 @@ <h1>Tabular View Settings</h1>
124124 < span id ="settings.tabularColumns "> </ span >
125125 </ div >
126126 </ div >
127+ < hr />
128+ < div >
129+ < button id ="settings.resetSettings "> Reset Settings</ button >
130+ </ div >
127131 </ div >
128132</ div >
129133</ body >
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as model from "../model";
22import * as graph from "../graph" ;
33import * as sourceSettings from "./sourceSettings" ;
44import * as tabularViewSettings from "./tabularViewSettings" ;
5+ import * as storage from "../storage" ;
56import { getChanges , applyChanges } from "./values" ;
67import { makeAutosizable } from "../utils" ;
78
@@ -27,6 +28,12 @@ export function init () {
2728
2829 // make inputs auto-sizable
2930 [ ] . slice . call ( document . querySelectorAll ( `input[autosize]` ) ) . forEach ( ( i ) => makeAutosizable ( i ) ) ;
31+ document . getElementById ( "settings.resetSettings" ) . addEventListener ( "click" , ( ) => {
32+ if ( ! confirm ( "Do you want to set all the settings to defaults?" ) )
33+ return ;
34+ storage . reset ( ) ;
35+ location . reload ( ) ;
36+ } ) ;
3037
3138 sourceSettings . init ( ) ;
3239 tabularViewSettings . init ( ) ;
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ export function load (key) {
1010 return storage [ key ] ;
1111}
1212
13+ export function reset ( ) {
14+ localStorage . removeItem ( STORAGE_NAME ) ;
15+ }
16+
1317function updateLocalStorage ( ) {
1418 localStorage . setItem ( STORAGE_NAME , JSON . stringify ( storage ) ) ;
1519}
Original file line number Diff line number Diff line change @@ -51,6 +51,26 @@ select {
5151
5252}
5353
54+ input [type = button ], button {
55+
56+ background-color : $colorA ;
57+ color : white ;
58+ text-shadow : 0 1px 1px black ;
59+ border : 0 ;
60+ border-radius : 12px ;
61+ padding : 5px ;
62+ margin : 2px ;
63+ cursor : pointer ;
64+ transition : $defaultTransition ;
65+ box-shadow : 0 1px 1px gray ;
66+
67+ & :hover {
68+ color : $highlightColor ;
69+ box-shadow : 0 2px 5px gray ;
70+ }
71+
72+ }
73+
5474.central {
5575
5676 position : absolute ;
You can’t perform that action at this time.
0 commit comments