File tree Expand file tree Collapse file tree 4 files changed +24
-13
lines changed Expand file tree Collapse file tree 4 files changed +24
-13
lines changed Original file line number Diff line number Diff line change 110
110
</div >
111
111
</div >
112
112
113
- <div class =" flex w-full px-1 pb-1 border-b" >
114
- <input
115
- type =" text"
116
- :value =" filename"
117
- @input =" (event) => $emit('update:filename', event.target.value)"
118
- class =" block w-full py-1 pl-3 pr-10 text-base border-gray-300 focus:outline-none rounded-lg focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
119
- placeholder =" filename"
120
- />
113
+ <div v-if =" allowFilename" class =" flex items-center justify-between bg-ui-gray-700" >
114
+ <div class =" flex items-center gap-2 m-2 mt-0 rounded-lg bg-ui-gray-800 focus-within:ring-2 focus-within:ring-ui-focus w-full" >
115
+ <label
116
+ class =" hidden pl-2 text-xs font-semibold leading-none tracking-wide uppercase text-ui-gray-500 xl:inline-block whitespace-nowrap"
117
+ >
118
+ Filename
119
+ </label >
120
+ <input
121
+ type =" text"
122
+ :value =" filename"
123
+ class =" text-xs font-medium text-ui-gray-400 bg-ui-gray-800 border-0 rounded-lg cursor-pointer hover:bg-ui-gray-900 focus:bg-ui-gray-900 focus:outline-none focus:ring-0 w-full"
124
+ @input =" (event) => $emit('update:filename', event.target.value)"
125
+ placeholder =" filename"
126
+ />
127
+ </div >
121
128
</div >
122
129
123
130
<div ref =" monaco" class =" w-full h-full" ></div >
@@ -148,6 +155,7 @@ export default {
148
155
size: Number ,
149
156
tabSize: [String , Number ],
150
157
filename: String ,
158
+ allowFilename: Boolean ,
151
159
language: String ,
152
160
options: Object ,
153
161
landscape: Boolean ,
Original file line number Diff line number Diff line change 26
26
:tab-size =" editor.tabSize"
27
27
:language =" editor.language"
28
28
:filename =" editor.filename"
29
+ :allow-filename =" editors.length > 1"
29
30
:landscape =" isLandscape"
30
31
:can-move-up =" index !== 0"
31
32
:can-move-down =" index !== editors.length - 1"
Original file line number Diff line number Diff line change 92
92
ref =" window"
93
93
class =" z-10"
94
94
:blocks =" blocks"
95
+ :filenames =" filenames"
95
96
:settings =" settings"
96
97
@update:title =" (title) => (settings.title = title)"
97
98
/>
Original file line number Diff line number Diff line change 40
40
</div >
41
41
</div >
42
42
43
- <div
44
- v-for = " (lines, index) in blocks "
45
- :key = " index "
46
- :style = " { padding: `${settings.padding}px` } "
47
- >
43
+ <div v-for = " (lines, index) in blocks " :key = " index " :style = " { padding: `${settings.padding}px` } " >
44
+ < div
45
+ v-if = " filenames.length > 1 "
46
+ class = " text-sm mb-2 text-gray-400 w-full text-right "
47
+ >{{ filenames[index] }}</ div >
48
48
<Code
49
49
class =" relative"
50
50
:lines =" lines"
@@ -63,6 +63,7 @@ export default {
63
63
props: {
64
64
blocks: Array ,
65
65
settings: Object ,
66
+ filenames: Array
66
67
},
67
68
68
69
components: { Code, FauxMenu },
You can’t perform that action at this time.
0 commit comments