Skip to content

Commit f224df5

Browse files
committed
merge develop
2 parents cdca060 + 508634d commit f224df5

File tree

8 files changed

+18
-11
lines changed

8 files changed

+18
-11
lines changed

client/components/__test__/Nav.test.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ describe('Nav', () => {
4646
},
4747
t: jest.fn(),
4848
setLanguage: jest.fn(),
49-
language: 'en-US'
49+
language: 'en-US',
50+
isUserOwner: true
5051
};
5152

5253
it('renders correctly', () => {

client/modules/IDE/components/Editor.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ class Editor extends React.Component {
284284
mode = 'javascript';
285285
} else if (fileName.match(/.+\.css$/i)) {
286286
mode = 'css';
287-
} else if (fileName.match(/.+\.html$/i)) {
287+
} else if (fileName.match(/.+\.(html|xml)$/i)) {
288288
mode = 'htmlmixed';
289289
} else if (fileName.match(/.+\.json$/i)) {
290290
mode = 'application/json';

client/styles/components/_toolbar.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@
149149
font-size: #{12 / $base-font-size}rem;
150150
}
151151

152+
.toolbar__autorefresh {
153+
display: flex;
154+
align-items: center;
155+
}
156+
152157
.checkbox__autorefresh{
153158
cursor: pointer;
154159
}

server/utils/fileUtils.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ export const fileExtensionsArray = [
3838
'mov',
3939
'vert',
4040
'frag',
41-
'bin'
41+
'bin',
42+
'xml'
4243
];
4344

4445
export const mimeTypes = `image/*,audio/*,text/javascript,text/html,text/css,
4546
application/json,application/x-font-ttf,application/x-font-truetype,text/plain,
46-
text/csv,.obj,video/webm,video/ogg,video/quicktime,video/mp4`;
47+
text/csv,.obj,video/webm,video/ogg,video/quicktime,video/mp4,application/xml`;
4748

4849
export const fileExtensions = fileExtensionsArray
4950
.map((ext) => `.${ext}`)
@@ -64,10 +65,10 @@ export const MEDIA_FILE_QUOTED_REGEX = new RegExp(
6465

6566
export const STRING_REGEX = /(['"])((\\\1|.)*?)\1/gm;
6667
// these are files that have to be linked to with a blob url
67-
export const PLAINTEXT_FILE_REGEX = /.+\.(json|txt|csv|vert|frag|tsv)$/i;
68+
export const PLAINTEXT_FILE_REGEX = /.+\.(json|txt|csv|vert|frag|tsv|xml)$/i;
6869
// these are files that users would want to edit as text (maybe svg should be here?)
69-
export const TEXT_FILE_REGEX = /.+\.(json|txt|csv|tsv|vert|frag|js|css|html|htm|jsx)$/i;
70+
export const TEXT_FILE_REGEX = /.+\.(json|txt|csv|tsv|vert|frag|js|css|html|htm|jsx|xml)$/i;
7071
export const NOT_EXTERNAL_LINK_REGEX = /^(?!(http:\/\/|https:\/\/))/;
7172
export const EXTERNAL_LINK_REGEX = /^(http:\/\/|https:\/\/)/;
7273

73-
export const CREATE_FILE_REGEX = /.+\.(json|txt|csv|tsv|js|css|frag|vert|html|htm)$/i;
74+
export const CREATE_FILE_REGEX = /.+\.(json|txt|csv|tsv|js|css|frag|vert|xml|html|htm)$/i;

translations/locales/en-US/translations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
"Title": "Create File",
239239
"CloseButtonARIA": "Close New File Modal",
240240
"EnterName": "Please enter a name",
241-
"InvalidType": "Invalid file type. Valid extensions are .js, .css, .json, .txt, .csv, .tsv, .frag, and .vert."
241+
"InvalidType": "Invalid file type. Valid extensions are .js, .css, .json, .xml, .txt, .csv, .tsv, .frag, and .vert."
242242
},
243243
"NewFileForm": {
244244
"AddFileSubmit": "Add File",

translations/locales/es-419/translations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
"Title": "Crear Archivo",
239239
"CloseButtonARIA": "Cerrar diálogo de crear archivo",
240240
"EnterName": "Por favor introduce un nombre",
241-
"InvalidType": "Tipo de archivo inválido. Las extensiones válidas son .js, .css, .json, .txt, .csv, .tsv, .frag y .vert."
241+
"InvalidType": "Tipo de archivo inválido. Las extensiones válidas son .js, .css, .json, .xml, .txt, .csv, .tsv, .frag y .vert."
242242
},
243243
"NewFileForm": {
244244
"AddFileSubmit": "Agregar Archivo",

translations/locales/hi/translations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
"Title": "फ़ाइल बनाएँ",
239239
"CloseButtonARIA": "नई फ़ाइल मोडल बंद करें",
240240
"EnterName": "कृपया एक नाम दर्ज करें",
241-
"InvalidType": "अमान्य फ़ाइल प्रकार। मान्य एक्सटेंशन हैं .js, .css, .json, .txt, .csv, .tsv, .frag, और .vert."
241+
"InvalidType": "अमान्य फ़ाइल प्रकार। मान्य एक्सटेंशन हैं .js, .css, .json, .xml, .txt, .csv, .tsv, .frag, और .vert."
242242
},
243243
"NewFileForm": {
244244
"AddFileSubmit": "फाइल जोडें",

translations/locales/ja/translations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
"Title": "ファイル作成",
239239
"CloseButtonARIA": "新規ファイルモーダルを閉じる",
240240
"EnterName": "ファイル名を入力してください",
241-
"InvalidType": "ファイルタイプが無効です。有効な拡張子は、.js、.css、.json、.txt、.csv、.tsv、.frag、.vertです。"
241+
"InvalidType": "ファイルタイプが無効です。有効な拡張子は、.js、.css、.json、.xml、.txt、.csv、.tsv、.frag、.vertです。"
242242
},
243243
"NewFileForm": {
244244
"AddFileSubmit": "ファイルを追加",

0 commit comments

Comments
 (0)