File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 110.01: New app!
220.02: Handle duplicate menu entries in the app
3+ 0.03: Go straight to settings when no tally types are configured yet, instead of an empty list
Original file line number Diff line number Diff line change @@ -103,4 +103,10 @@ function tfmt(tally) {
103103 return "" . concat ( d . getHours ( ) , ":" ) . concat ( pad2 ( d . getMinutes ( ) ) ) ;
104104}
105105var pad2 = function ( s ) { return ( "0" + s . toFixed ( 0 ) ) . slice ( - 2 ) ; } ;
106- showTallies ( readTallies ( ) ) ;
106+ var tallyCfg = storage . readJSON ( "tallycfg.json" , 1 ) || [ ] ;
107+ if ( tallyCfg . length === 0 ) {
108+ eval ( storage . read ( "tally.settings.js" ) ) ( function ( ) { return load ( ) ; } ) ;
109+ }
110+ else {
111+ showTallies ( readTallies ( ) ) ;
112+ }
Original file line number Diff line number Diff line change @@ -123,4 +123,11 @@ function tfmt(tally: Tally) {
123123
124124const pad2 = ( s : number ) => ( "0" + s . toFixed ( 0 ) ) . slice ( - 2 ) ;
125125
126- showTallies ( readTallies ( ) ) ;
126+ const tallyCfg = storage . readJSON ( "tallycfg.json" , 1 ) as TallySettings || [ ] ;
127+ if ( tallyCfg . length === 0 ) {
128+ // No tally types configured yet, so there's nothing to log and nothing
129+ // to show here - go straight to settings so the user can add one.
130+ eval ( storage . read ( "tally.settings.js" ) as string ) ( ( ) => load ( ) ) ;
131+ } else {
132+ showTallies ( readTallies ( ) ) ;
133+ }
Original file line number Diff line number Diff line change 22 "id" : " tally" ,
33 "name" : " Tally Keeper" ,
44 "shortName" : " Tally" ,
5- "version" : " 0.02 " ,
5+ "version" : " 0.03 " ,
66 "author" : " bobrippling" ,
77 "description" : " Add to a tally from clock info" ,
88 "icon" : " app.png" ,
You can’t perform that action at this time.
0 commit comments