mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-11-19 11:48:22 +01:00
update
This commit is contained in:
parent
fe0223d2eb
commit
9405900664
@ -5,6 +5,9 @@ Blackend for my blog at https://blog.iohub.dev
|
|||||||
|
|
||||||
## Change logs
|
## Change logs
|
||||||
|
|
||||||
|
### v0.2.0-a
|
||||||
|
* Important change: Store raw post content to the database instead of base64 string as before
|
||||||
|
|
||||||
### v0.1.4-a
|
### v0.1.4-a
|
||||||
* Minor bug fix
|
* Minor bug fix
|
||||||
* Enhance youtube video embedding feature in markdown
|
* Enhance youtube video embedding feature in markdown
|
||||||
|
@ -5,6 +5,9 @@ Blackend for my blog at https://blog.iohub.dev
|
|||||||
|
|
||||||
## Change logs
|
## Change logs
|
||||||
|
|
||||||
|
### v0.2.0-a
|
||||||
|
* Important change: Store raw post content to the database instead of base64 string as before
|
||||||
|
|
||||||
### v0.1.4-a
|
### v0.1.4-a
|
||||||
* Minor bug fix
|
* Minor bug fix
|
||||||
* Enhance youtube video embedding feature in markdown
|
* Enhance youtube video embedding feature in markdown
|
||||||
|
File diff suppressed because one or more lines are too long
@ -6,7 +6,7 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "xsang.le@gmail.com"
|
"email": "xsang.le@gmail.com"
|
||||||
},
|
},
|
||||||
"version":"0.1.4-a",
|
"version":"0.2.0-a",
|
||||||
"category":"Internet",
|
"category":"Internet",
|
||||||
"iconclass":"fa fa-book",
|
"iconclass":"fa fa-book",
|
||||||
"mimes":["none"]
|
"mimes":["none"]
|
||||||
|
Binary file not shown.
@ -253,7 +253,7 @@ class Blogger extends this.OS.application.BaseApplication
|
|||||||
return unless sel
|
return unless sel
|
||||||
@blogdb.get Number(sel.id)
|
@blogdb.get Number(sel.id)
|
||||||
.then (r) =>
|
.then (r) =>
|
||||||
@editor.value atob(r.content)
|
@editor.value r.content
|
||||||
@inputtags.value = r.tags
|
@inputtags.value = r.tags
|
||||||
(@find "blog-publish").swon = if Number(r.publish) then true else false
|
(@find "blog-publish").swon = if Number(r.publish) then true else false
|
||||||
.catch (e) =>
|
.catch (e) =>
|
||||||
@ -401,7 +401,7 @@ class Blogger extends this.OS.application.BaseApplication
|
|||||||
return @notify __("Please enter tags") if tags is ""
|
return @notify __("Please enter tags") if tags is ""
|
||||||
d = new Date()
|
d = new Date()
|
||||||
data =
|
data =
|
||||||
content: content.asBase64()
|
content: content
|
||||||
title: title[1].trim()
|
title: title[1].trim()
|
||||||
tags: tags
|
tags: tags
|
||||||
ctime: if sel then sel.ctime else d.timestamp()
|
ctime: if sel then sel.ctime else d.timestamp()
|
||||||
@ -441,7 +441,7 @@ class Blogger extends this.OS.application.BaseApplication
|
|||||||
begin = it.index + it[0].length
|
begin = it.index + it[0].length
|
||||||
ret += text.substring begin, text.length
|
ret += text.substring begin, text.length
|
||||||
#console.log ret
|
#console.log ret
|
||||||
return ret.asBase64()
|
return ret
|
||||||
|
|
||||||
clearEditor:() ->
|
clearEditor:() ->
|
||||||
@.editor.value ""
|
@.editor.value ""
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "xsang.le@gmail.com"
|
"email": "xsang.le@gmail.com"
|
||||||
},
|
},
|
||||||
"version":"0.1.4-a",
|
"version":"0.2.0-a",
|
||||||
"category":"Internet",
|
"category":"Internet",
|
||||||
"iconclass":"fa fa-book",
|
"iconclass":"fa fa-book",
|
||||||
"mimes":["none"]
|
"mimes":["none"]
|
||||||
|
15
DBDecoder/README.md
Normal file
15
DBDecoder/README.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# DBDecoder
|
||||||
|
This is an example project, generated by AntOS Development Kit
|
||||||
|
|
||||||
|
## Howto
|
||||||
|
Use the CodePad command palette to access to the SDK functionalities:
|
||||||
|
|
||||||
|
1. Create new project
|
||||||
|
2. Init the project from the current folder located in side bar
|
||||||
|
3. Build and run the project
|
||||||
|
4. Release the project in zip package
|
||||||
|
|
||||||
|
## Set up build target
|
||||||
|
|
||||||
|
Open the `project.json` file from the current project tree and add/remove
|
||||||
|
build target entries. Save the file
|
5
DBDecoder/assets/scheme.html
Normal file
5
DBDecoder/assets/scheme.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<afx-app-window apptitle="DBDecoder" width="500" height="400" data-id="DBDecoder">
|
||||||
|
<afx-hbox >
|
||||||
|
<afx-button data-id="decoder" text="GO"></afx-button>
|
||||||
|
</afx-hbox>
|
||||||
|
</afx-app-window>
|
15
DBDecoder/build/debug/README.md
Normal file
15
DBDecoder/build/debug/README.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# DBDecoder
|
||||||
|
This is an example project, generated by AntOS Development Kit
|
||||||
|
|
||||||
|
## Howto
|
||||||
|
Use the CodePad command palette to access to the SDK functionalities:
|
||||||
|
|
||||||
|
1. Create new project
|
||||||
|
2. Init the project from the current folder located in side bar
|
||||||
|
3. Build and run the project
|
||||||
|
4. Release the project in zip package
|
||||||
|
|
||||||
|
## Set up build target
|
||||||
|
|
||||||
|
Open the `project.json` file from the current project tree and add/remove
|
||||||
|
build target entries. Save the file
|
1
DBDecoder/build/debug/main.js
Normal file
1
DBDecoder/build/debug/main.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
(function(){var t;t=class extends this.OS.application.BaseApplication{constructor(t){super("DBDecoder",t)}main(){var t;return t=this.find("decoder"),this.db=new this._api.DB("blogs"),t.onbtclick=t=>this.db.find("1=1").then(t=>{var e,n,r;for(e=0,n=t.length;e<n;e++)(r=t[e]).content=atob(r.content),r.rendered=atob(r.rendered);return this.saveDB(t).then(()=>this.notify("Data base saved")).catch(t=>this.error(t.toString(),t))})}saveDB(t){return new Promise((e,n)=>{var r;return 0===t.length?e():(r=t.shift(),this.db.save(r).then(()=>this.saveDB(t).then(()=>e()).catch(t=>n(__e(t)))).catch(t=>n(__e(t))))})}},this.OS.register("DBDecoder",t)}).call(this);
|
14
DBDecoder/build/debug/package.json
Normal file
14
DBDecoder/build/debug/package.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"app":"DBDecoder",
|
||||||
|
"name":"DBDecoder",
|
||||||
|
"description":"DBDecoder",
|
||||||
|
"info":{
|
||||||
|
"author": "",
|
||||||
|
"email": ""
|
||||||
|
},
|
||||||
|
"version":"0.0.1-a",
|
||||||
|
"category":"Other",
|
||||||
|
"iconclass":"fa fa-adn",
|
||||||
|
"mimes":["none"],
|
||||||
|
"locale": {}
|
||||||
|
}
|
5
DBDecoder/build/debug/scheme.html
Normal file
5
DBDecoder/build/debug/scheme.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<afx-app-window apptitle="DBDecoder" width="500" height="400" data-id="DBDecoder">
|
||||||
|
<afx-hbox >
|
||||||
|
<afx-button data-id="decoder" text="GO"></afx-button>
|
||||||
|
</afx-hbox>
|
||||||
|
</afx-app-window>
|
BIN
DBDecoder/build/release/DBDecoder.zip
Normal file
BIN
DBDecoder/build/release/DBDecoder.zip
Normal file
Binary file not shown.
29
DBDecoder/coffees/main.coffee
Normal file
29
DBDecoder/coffees/main.coffee
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
class DBDecoder extends this.OS.application.BaseApplication
|
||||||
|
constructor: ( args ) ->
|
||||||
|
super "DBDecoder", args
|
||||||
|
|
||||||
|
main: () ->
|
||||||
|
bt = @find "decoder"
|
||||||
|
@db = new @_api.DB("blogs")
|
||||||
|
bt.onbtclick = (e) =>
|
||||||
|
# decode the database
|
||||||
|
@db.find("1=1").then (data) =>
|
||||||
|
for v in data
|
||||||
|
v.content = atob(v.content)
|
||||||
|
v.rendered = atob(v.rendered)
|
||||||
|
@saveDB(data).then () =>
|
||||||
|
@notify "Data base saved"
|
||||||
|
.catch (e) => @error e.toString(), e
|
||||||
|
|
||||||
|
saveDB: (list) ->
|
||||||
|
new Promise (resolve, reject) =>
|
||||||
|
return resolve() if list.length is 0
|
||||||
|
record = list.shift()
|
||||||
|
@db.save(record).then () =>
|
||||||
|
@saveDB(list)
|
||||||
|
.then () => resolve()
|
||||||
|
.catch (e) => reject __e e
|
||||||
|
.catch (e) => reject __e e
|
||||||
|
|
||||||
|
|
||||||
|
this.OS.register "DBDecoder", DBDecoder
|
14
DBDecoder/package.json
Normal file
14
DBDecoder/package.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"app":"DBDecoder",
|
||||||
|
"name":"DBDecoder",
|
||||||
|
"description":"DBDecoder",
|
||||||
|
"info":{
|
||||||
|
"author": "",
|
||||||
|
"email": ""
|
||||||
|
},
|
||||||
|
"version":"0.0.1-a",
|
||||||
|
"category":"Other",
|
||||||
|
"iconclass":"fa fa-adn",
|
||||||
|
"mimes":["none"],
|
||||||
|
"locale": {}
|
||||||
|
}
|
8
DBDecoder/project.json
Normal file
8
DBDecoder/project.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"name": "DBDecoder",
|
||||||
|
"root": "home://workspace/antosdk-apps/DBDecoder",
|
||||||
|
"css": [],
|
||||||
|
"javascripts": [],
|
||||||
|
"coffees": ["coffees/main.coffee"],
|
||||||
|
"copies": ["assets/scheme.html", "package.json", "README.md"]
|
||||||
|
}
|
@ -1,3 +1,3 @@
|
|||||||
# MarkOn markdown editor
|
# MarkOn markdown editor
|
||||||
|
|
||||||
markdown editor for antOS
|
Simple Markdown editor for antOS
|
@ -32,7 +32,7 @@
|
|||||||
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Blogger/README.md",
|
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Blogger/README.md",
|
||||||
"category": "Internet",
|
"category": "Internet",
|
||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"version": "0.1.4-a",
|
"version": "0.2.0-a",
|
||||||
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Blogger/build/release/Blogger.zip"
|
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Blogger/build/release/Blogger.zip"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -44,6 +44,15 @@
|
|||||||
"version": "0.0.2-a",
|
"version": "0.0.2-a",
|
||||||
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Booklet/build/release/Booklet.zip"
|
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Booklet/build/release/Booklet.zip"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"pkgname": "DBDecoder",
|
||||||
|
"name": "DBDecoder",
|
||||||
|
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/DBDecoder/README.md",
|
||||||
|
"category": "Other",
|
||||||
|
"author": "",
|
||||||
|
"version": "0.0.1-a",
|
||||||
|
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/DBDecoder/build/release/DBDecoder.zip"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"pkgname": "GraphEditor",
|
"pkgname": "GraphEditor",
|
||||||
"name": "Graph Editor",
|
"name": "Graph Editor",
|
||||||
|
Loading…
Reference in New Issue
Block a user