mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-11-08 14:08:22 +01:00
fix codepad extension API bugs
This commit is contained in:
parent
7d3ff0f206
commit
235a9334d6
Binary file not shown.
@ -435,7 +435,13 @@ namespace OS {
|
||||
`${this.app.currdir.path}/${file}`
|
||||
.asFileHandle()
|
||||
.read("json")
|
||||
.then((data) => resolve(data))
|
||||
.then((data) => {
|
||||
if(!data.root && this.app.currdir)
|
||||
{
|
||||
data.root = this.app.currdir.path;
|
||||
}
|
||||
resolve(data);
|
||||
})
|
||||
.catch((e) => {
|
||||
return reject(
|
||||
API.throwe(__("Unable to read meta-data"))
|
||||
|
@ -293,7 +293,9 @@ namespace OS {
|
||||
await API.requires(path);
|
||||
let v: GenericObject<any>;
|
||||
if (this.app.extensions[meta.meta.name]) {
|
||||
this.app.extensions[meta.meta.name].child = [];
|
||||
this.app.extensions[meta.meta.name].text = meta.meta.text;
|
||||
this.app.extensions[meta.meta.name].nodes = [];
|
||||
this.app.extensions[meta.meta.name].ext = new App.extensions[meta.meta.name](this.app);
|
||||
for (v of meta.meta.actions) {
|
||||
this.app.extensions[meta.meta.name].addAction(v);
|
||||
}
|
||||
|
@ -428,7 +428,8 @@ namespace OS {
|
||||
stat.column + 1,
|
||||
stat.line
|
||||
);
|
||||
this.langstat.text = stat.langmode.text;
|
||||
if(stat.langmode)
|
||||
this.langstat.text = stat.langmode.text;
|
||||
this.filestat.text = stat.file
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"root": "{1}",
|
||||
"javascripts": [],
|
||||
"coffees": ["{0}.coffee"],
|
||||
"copies": [],
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"name": "{0}",
|
||||
"root": "{1}",
|
||||
"css": [],
|
||||
"javascripts": [],
|
||||
"coffees": ["coffees/main.coffee"],
|
||||
|
Loading…
Reference in New Issue
Block a user