File tree 5 files changed +40
-5
lines changed
5 files changed +40
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export enum Panel {
9
9
Controller ,
10
10
Editor ,
11
11
Output ,
12
+ Byond ,
12
13
}
13
14
14
15
@Component ( {
@@ -46,6 +47,9 @@ export class PanelComponent {
46
47
case Panel . Output :
47
48
this . panelComponent = import ( '../../panels/output/output.component' ) ;
48
49
break ;
50
+ case Panel . Byond :
51
+ this . panelComponent = import ( '../../panels/byond/byond.component' ) ;
52
+ break ;
49
53
}
50
54
}
51
55
}
Original file line number Diff line number Diff line change
1
+ < p > byond works!</ p >
Original file line number Diff line number Diff line change
1
+ import { Component } from '@angular/core' ;
2
+
3
+ @Component ( {
4
+ selector : 'app-panel-byond' ,
5
+ standalone : true ,
6
+ imports : [ ] ,
7
+ templateUrl : './byond.component.html' ,
8
+ styleUrl : './byond.component.scss' ,
9
+ } )
10
+ export default class ByondPanel {
11
+ // noinspection JSUnusedGlobalSymbols
12
+ static title = 'BYOND versions' ;
13
+ }
Original file line number Diff line number Diff line change @@ -9,10 +9,11 @@ const LOCAL_STORAGE_KEY = 'layout';
9
9
providedIn : 'root' ,
10
10
} )
11
11
export class ShellService {
12
+ private minimumVersion = 1 ;
12
13
public layout ?: PanelTreeRoot ;
13
14
private defaultLayout = JSON . stringify ( {
14
- version : 0 ,
15
- nextBranchId : 3 ,
15
+ version : 1 ,
16
+ nextBranchId : 4 ,
16
17
id : 0 ,
17
18
type : 'branch' ,
18
19
split : 'vertical' ,
@@ -29,14 +30,27 @@ export class ShellService {
29
30
size : 70 ,
30
31
} ,
31
32
{
32
- id : Panel . Output ,
33
- type : 'leaf' ,
33
+ id : 2 ,
34
+ type : 'branch' ,
35
+ split : 'vertical' ,
34
36
size : 30 ,
37
+ children : [
38
+ {
39
+ id : Panel . Output ,
40
+ type : 'leaf' ,
41
+ size : 70 ,
42
+ } ,
43
+ {
44
+ id : Panel . Byond ,
45
+ type : 'leaf' ,
46
+ size : 30 ,
47
+ } ,
48
+ ] ,
35
49
} ,
36
50
] ,
37
51
} ,
38
52
{
39
- id : 2 ,
53
+ id : 3 ,
40
54
type : 'branch' ,
41
55
split : 'horizontal' ,
42
56
size : 30 ,
@@ -78,5 +92,8 @@ export class ShellService {
78
92
localStorage . getItem ( LOCAL_STORAGE_KEY ) ?? '' ,
79
93
) ) || this . defaultLayout ,
80
94
) ;
95
+ if ( this . layout ! . version < this . minimumVersion ) {
96
+ this . layout = JSON . parse ( this . defaultLayout ) ;
97
+ }
81
98
}
82
99
}
You can’t perform that action at this time.
0 commit comments