File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,11 +33,27 @@ body {
3333}
3434
3535.panel-header .version {
36- margin-left : auto;
3736 font-size : 12px ;
3837 color : var (--sapContent_LabelColor , # 6a6d70 );
3938}
4039
40+ .panel-header .close-btn {
41+ margin-left : auto;
42+ background : none;
43+ border : none;
44+ font-size : 18px ;
45+ cursor : pointer;
46+ color : var (--sapContent_LabelColor , # 6a6d70 );
47+ padding : 2px 6px ;
48+ border-radius : 4px ;
49+ line-height : 1 ;
50+ }
51+
52+ .panel-header .close-btn : hover {
53+ background : var (--sapNeutralBackground , # eaecee );
54+ color : var (--sapTextColor , # 32363a );
55+ }
56+
4157.status-card , .profile-card , .tools-card {
4258 margin : 0 16px 12px ;
4359 padding : 14px ;
Original file line number Diff line number Diff line change 1717 </ svg >
1818 < span class ="title "> sap-devs</ span >
1919 < span class ="version " id ="version "> v...</ span >
20+ < button type ="button " class ="close-btn " id ="btn-close " title ="Close "> ×</ button >
2021 </ div >
2122
2223 < div class ="status-card ">
Original file line number Diff line number Diff line change 4242
4343 setText ( 'profile-name' , state . profile . name || state . profile . id ) ;
4444 setText ( 'profile-id' , state . profile . id ) ;
45- setText ( 'version' , 'v' + state . version ) ;
45+ var ver = state . version ;
46+ setText ( 'version' , ver . charAt ( 0 ) === 'v' ? ver : 'v' + ver ) ;
4647 }
4748
4849 function setText ( id , text ) {
7677 }
7778
7879 document . addEventListener ( 'DOMContentLoaded' , function ( ) {
80+ var btnClose = document . getElementById ( 'btn-close' ) ;
81+ if ( btnClose ) {
82+ btnClose . addEventListener ( 'click' , function ( ) {
83+ if ( window . wails && window . wails . Window ) {
84+ window . wails . Window . Hide ( ) ;
85+ } else {
86+ window . close ( ) ;
87+ }
88+ } ) ;
89+ }
90+
7991 var btnSync = document . getElementById ( 'btn-sync' ) ;
8092 if ( btnSync ) {
8193 btnSync . addEventListener ( 'click' , function ( ) {
Original file line number Diff line number Diff line change @@ -44,13 +44,16 @@ func readSyncState(cacheDir string) SyncState {
4444 if err != nil {
4545 return SyncState {Status : "unknown" }
4646 }
47- var raw map [string ]time.Time
47+ var raw struct {
48+ Version int `json:"version"`
49+ Categories map [string ]time.Time `json:"categories"`
50+ }
4851 if err := json .Unmarshal (data , & raw ); err != nil {
4952 return SyncState {Status : "unknown" }
5053 }
5154 var latest time.Time
5255 count := 0
53- for _ , t := range raw {
56+ for _ , t := range raw . Categories {
5457 count ++
5558 if t .After (latest ) {
5659 latest = t
You can’t perform that action at this time.
0 commit comments