File tree Expand file tree Collapse file tree 16 files changed +550
-191
lines changed
Expand file tree Collapse file tree 16 files changed +550
-191
lines changed Original file line number Diff line number Diff line change 55** :cactus : Feature**
66
77- The cursor jump to the end of format or to the next brackets when press ` tab ` (#976 )
8+ - Tab drag & drop inside the window
9+ - Scrollable tabs
810
911** :butterfly : Optimization**
1012
Original file line number Diff line number Diff line change 170170 "codemirror" : " ^5.46.0" ,
171171 "command-exists" : " ^1.2.8" ,
172172 "dayjs" : " ^1.8.13" ,
173+ "dom-autoscroller" : " ^2.3.4" ,
173174 "dompurify" : " ^1.0.10" ,
175+ "dragula" : " ^3.7.2" ,
174176 "electron-is-accelerator" : " ^0.1.2" ,
175177 "element-resize-detector" : " ^1.2.0" ,
176178 "element-ui" : " ^2.8.2" ,
Original file line number Diff line number Diff line change 152152
153153 // prevent Chromium's default behavior and try to open the first file
154154 window .addEventListener (' dragover' , e => {
155+ // Cancel to allow tab drag&drop.
156+ if (! e .dataTransfer .types .length ) return
157+
155158 e .preventDefault ()
156159 if (e .dataTransfer .types .indexOf (' Files' ) >= 0 ) {
157160 if (e .dataTransfer .items .length === 1 && / png| jpg| jpeg| gif/ .test (e .dataTransfer .items [0 ].type )) {
201204 }
202205 .editor-middle {
203206 display : flex ;
207+ flex-direction : column ;
204208 flex : 1 ;
205209 min-height : 100vh ;
206210 position : relative ;
Original file line number Diff line number Diff line change 4848}
4949
5050.editor-tabs {
51- border-bottom : 1px solid # 1d1d1d ;
5251 box-shadow : none !important ;
5352}
53+ .editor-tabs : after {
54+ position : absolute;
55+ content : '' ;
56+ border-bottom : 1px solid # 1d1d1d ;
57+ bottom : 0 ;
58+ left : 0 ;
59+ right : 0 ;
60+ z-index : 1 ;
61+ }
62+ .editor-tabs ul .tabs-container : after {
63+ position : absolute;
64+ content : '' ;
65+ border-bottom : 1px solid # 1d1d1d ;
66+ bottom : 0 ;
67+ left : 0 ;
68+ right : 0 ;
69+ z-index : 2 ;
70+ }
71+
5472.tabs-container > li ,
5573.tabs-container > li .active {
5674 background : var (--editorBgColor ) !important ;
Original file line number Diff line number Diff line change 2727 --editorAreaWidth : 700px ;
2828}
2929
30- .title-bar .tabs-visible {
31- background : # f3f3f3 !important ;
32- }
33-
3430.editor-tabs {
3531 background : # f3f3f3 !important ;
36- border-bottom : 1px solid # dddddd !important ;
3732 box-shadow : none !important ;
3833}
34+ .editor-tabs : after {
35+ position : absolute;
36+ content : '' ;
37+ border-bottom : 1px solid # dddddd ;
38+ bottom : 0 ;
39+ left : 0 ;
40+ right : 0 ;
41+ z-index : 1 ;
42+ }
43+ .editor-tabs ul .tabs-container : after {
44+ position : absolute;
45+ content : '' ;
46+ border-bottom : 1px solid # dddddd ;
47+ bottom : 0 ;
48+ left : 0 ;
49+ right : 0 ;
50+ z-index : 2 ;
51+ }
52+ .title-bar-editor-bg .tabs-visible {
53+ background : # f3f3f3 !important ;
54+ }
55+
3956.tabs-container > li {
4057 background : none !important ;
4158}
4562 border-bottom : none;
4663 background : var (--floatBgColor ) !important ;
4764}
48- .tabs-container > li .active : not ( : last-child ) : after {
65+ .tabs-container > li .active : after {
4966 top : 0 !important ;
5067 bottom : auto !important ;
5168 background : var (--themeColor ) !important ;
Original file line number Diff line number Diff line change 110110}
111111
112112.editor-tabs {
113- border-bottom : 1px solid # 181a1f ;
114113 box-shadow : none !important ;
115114}
115+ .editor-tabs : after {
116+ position : absolute;
117+ content : '' ;
118+ border-bottom : 1px solid # 181a1f ;
119+ bottom : 0 ;
120+ left : 0 ;
121+ right : 0 ;
122+ z-index : 1 ;
123+ }
124+ .editor-tabs ul .tabs-container : after {
125+ position : absolute;
126+ content : '' ;
127+ border-bottom : 1px solid # 181a1f ;
128+ bottom : 0 ;
129+ left : 0 ;
130+ right : 0 ;
131+ z-index : 2 ;
132+ }
133+
116134.tabs-container > li ,
117135.tabs-container > li .active {
118136 background : var (--editorBgColor ) !important ;
121139 border : 1px solid # 181a1f ;
122140 border-bottom : none;
123141}
124- .tabs-container > li .active : not ( : last-child ) : after {
142+ .tabs-container > li .active : after {
125143 top : 0 !important ;
126144 right : auto !important ;
127145 width : 2px !important ;
Original file line number Diff line number Diff line change 3131 box-shadow : none !important ;
3232}
3333
34- .tabs-container > li : not ( : last-child ) {
34+ .tabs-container > li {
3535 border-right : 1px solid # e5e5e5 !important ;
3636 background : var (--editorBgColor ) !important ;
3737}
Original file line number Diff line number Diff line change 6868
6969<style scoped>
7070 .editor-with-tabs {
71- width : 100 % ;
71+ position : relative ;
7272 height : 100% ;
73- padding-top : var (--titleBarHeight );
7473 flex : 1 ;
7574 display : flex ;
7675 flex-direction : column ;
77-
76+
7877 overflow : hidden ;
7978 background : var (--editorBgColor );
8079 & > .container {
You can’t perform that action at this time.
0 commit comments