Skip to content

[ui:cwd] make easily able to mapping mimetype to the kind#3375

Merged
nao-pon merged 1 commit intoStudio-42:masterfrom
nao-pon:mime2kind
Jul 7, 2021
Merged

[ui:cwd] make easily able to mapping mimetype to the kind#3375
nao-pon merged 1 commit intoStudio-42:masterfrom
nao-pon:mime2kind

Conversation

@nao-pon
Copy link
Member

@nao-pon nao-pon commented Jul 7, 2021

"kind"+ FILE EXTENSION By defining a language member, you can easily add the file type displayed in the UI.

ref. #3369

It can be...

from

fm.bind('init', function() {
    fm.kinds['image/vnd.dxf'] = 'DXF';
    fm.messages['kindDXF'] = 'AutoCAD DXF';
});

to

fm.bind('init', function() {
    fm.messages['kindDXF'] = 'AutoCAD DXF';
});

`"kind"+ FILE EXTENSION` By defining a language member, you can easily
add the file type displayed in the UI.

ref. Studio-42#3369

It can be...

from

```javascript
fm.bind('init', function() {
    fm.kinds['image/vnd.dxf'] = 'DXF';
    fm.messages['kindDXF'] = 'AutoCAD DXF';
});
```

to

```javascript
fm.bind('init', function() {
    fm.messages['kindDXF'] = 'AutoCAD DXF';
});
@nao-pon nao-pon merged commit 3c93e74 into Studio-42:master Jul 7, 2021
@nao-pon nao-pon deleted the mime2kind branch July 7, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant