diff --git a/Blogger/README.md b/Blogger/README.md index 66db9f3..33b2f09 100644 --- a/Blogger/README.md +++ b/Blogger/README.md @@ -6,6 +6,7 @@ Blackend for my blog at https://blog.iohub.dev ## Change logs ### v0.2.x-a +* Patch 6: Chage libraries load order * Patch 5: Add user photo to portfolio * Patch 4: Add package dependencies * Patch 3: Correct JSON text decoding diff --git a/Blogger/build/debug/README.md b/Blogger/build/debug/README.md index 66db9f3..33b2f09 100644 --- a/Blogger/build/debug/README.md +++ b/Blogger/build/debug/README.md @@ -6,6 +6,7 @@ Blackend for my blog at https://blog.iohub.dev ## Change logs ### v0.2.x-a +* Patch 6: Chage libraries load order * Patch 5: Add user photo to portfolio * Patch 4: Add package dependencies * Patch 3: Correct JSON text decoding diff --git a/Blogger/build/debug/fonts/KaTeX_AMS-Regular.woff b/Blogger/build/debug/fonts/KaTeX_AMS-Regular.woff deleted file mode 100644 index 29ef535..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_AMS-Regular.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_AMS-Regular.woff2 b/Blogger/build/debug/fonts/KaTeX_AMS-Regular.woff2 deleted file mode 100644 index c01a71b..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_AMS-Regular.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Caligraphic-Bold.ttf b/Blogger/build/debug/fonts/KaTeX_Caligraphic-Bold.ttf deleted file mode 100644 index 35e420d..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Caligraphic-Bold.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Caligraphic-Bold.woff b/Blogger/build/debug/fonts/KaTeX_Caligraphic-Bold.woff deleted file mode 100644 index 2a33324..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Caligraphic-Bold.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Caligraphic-Bold.woff2 b/Blogger/build/debug/fonts/KaTeX_Caligraphic-Bold.woff2 deleted file mode 100644 index e914468..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Caligraphic-Bold.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Caligraphic-Regular.ttf b/Blogger/build/debug/fonts/KaTeX_Caligraphic-Regular.ttf deleted file mode 100644 index d62f65c..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Caligraphic-Regular.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Caligraphic-Regular.woff b/Blogger/build/debug/fonts/KaTeX_Caligraphic-Regular.woff deleted file mode 100644 index e818948..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Caligraphic-Regular.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Caligraphic-Regular.woff2 b/Blogger/build/debug/fonts/KaTeX_Caligraphic-Regular.woff2 deleted file mode 100644 index c26e0dd..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Caligraphic-Regular.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Fraktur-Bold.ttf b/Blogger/build/debug/fonts/KaTeX_Fraktur-Bold.ttf deleted file mode 100644 index 512b32d..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Fraktur-Bold.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Fraktur-Bold.woff b/Blogger/build/debug/fonts/KaTeX_Fraktur-Bold.woff deleted file mode 100644 index d845037..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Fraktur-Bold.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Fraktur-Bold.woff2 b/Blogger/build/debug/fonts/KaTeX_Fraktur-Bold.woff2 deleted file mode 100644 index 7d45f74..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Fraktur-Bold.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Fraktur-Regular.ttf b/Blogger/build/debug/fonts/KaTeX_Fraktur-Regular.ttf deleted file mode 100644 index f5c9a82..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Fraktur-Regular.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Fraktur-Regular.woff b/Blogger/build/debug/fonts/KaTeX_Fraktur-Regular.woff deleted file mode 100644 index 0b2eb42..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Fraktur-Regular.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Fraktur-Regular.woff2 b/Blogger/build/debug/fonts/KaTeX_Fraktur-Regular.woff2 deleted file mode 100644 index 5b9bec4..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Fraktur-Regular.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Main-Bold.ttf b/Blogger/build/debug/fonts/KaTeX_Main-Bold.ttf deleted file mode 100644 index 875806e..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Main-Bold.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Main-Bold.woff b/Blogger/build/debug/fonts/KaTeX_Main-Bold.woff deleted file mode 100644 index fcdf3c8..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Main-Bold.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Main-Bold.woff2 b/Blogger/build/debug/fonts/KaTeX_Main-Bold.woff2 deleted file mode 100644 index bfa2801..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Main-Bold.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Main-BoldItalic.ttf b/Blogger/build/debug/fonts/KaTeX_Main-BoldItalic.ttf deleted file mode 100644 index 25cceac..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Main-BoldItalic.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Main-BoldItalic.woff b/Blogger/build/debug/fonts/KaTeX_Main-BoldItalic.woff deleted file mode 100644 index 13de70d..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Main-BoldItalic.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Main-BoldItalic.woff2 b/Blogger/build/debug/fonts/KaTeX_Main-BoldItalic.woff2 deleted file mode 100644 index 0046141..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Main-BoldItalic.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Main-Italic.ttf b/Blogger/build/debug/fonts/KaTeX_Main-Italic.ttf deleted file mode 100644 index b235ba8..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Main-Italic.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Main-Italic.woff b/Blogger/build/debug/fonts/KaTeX_Main-Italic.woff deleted file mode 100644 index c70b25f..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Main-Italic.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Main-Italic.woff2 b/Blogger/build/debug/fonts/KaTeX_Main-Italic.woff2 deleted file mode 100644 index 68e2e94..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Main-Italic.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Main-Regular.ttf b/Blogger/build/debug/fonts/KaTeX_Main-Regular.ttf deleted file mode 100644 index 7c5300f..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Main-Regular.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Main-Regular.woff b/Blogger/build/debug/fonts/KaTeX_Main-Regular.woff deleted file mode 100644 index 1354862..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Main-Regular.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Main-Regular.woff2 b/Blogger/build/debug/fonts/KaTeX_Main-Regular.woff2 deleted file mode 100644 index aa6f9a0..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Main-Regular.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Math-Italic.ttf b/Blogger/build/debug/fonts/KaTeX_Math-Italic.ttf deleted file mode 100644 index 7add130..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Math-Italic.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Math-Italic.woff b/Blogger/build/debug/fonts/KaTeX_Math-Italic.woff deleted file mode 100644 index b41b9a1..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Math-Italic.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Math-Italic.woff2 b/Blogger/build/debug/fonts/KaTeX_Math-Italic.woff2 deleted file mode 100644 index ab66ee6..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Math-Italic.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_SansSerif-Bold.ttf b/Blogger/build/debug/fonts/KaTeX_SansSerif-Bold.ttf deleted file mode 100644 index 48c947e..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_SansSerif-Bold.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_SansSerif-Bold.woff b/Blogger/build/debug/fonts/KaTeX_SansSerif-Bold.woff deleted file mode 100644 index 829d446..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_SansSerif-Bold.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_SansSerif-Bold.woff2 b/Blogger/build/debug/fonts/KaTeX_SansSerif-Bold.woff2 deleted file mode 100644 index c7a2d6e..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_SansSerif-Bold.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_SansSerif-Italic.ttf b/Blogger/build/debug/fonts/KaTeX_SansSerif-Italic.ttf deleted file mode 100644 index cd3700c..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_SansSerif-Italic.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_SansSerif-Italic.woff b/Blogger/build/debug/fonts/KaTeX_SansSerif-Italic.woff deleted file mode 100644 index d572d1c..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_SansSerif-Italic.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_SansSerif-Italic.woff2 b/Blogger/build/debug/fonts/KaTeX_SansSerif-Italic.woff2 deleted file mode 100644 index 5424402..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_SansSerif-Italic.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_SansSerif-Regular.ttf b/Blogger/build/debug/fonts/KaTeX_SansSerif-Regular.ttf deleted file mode 100644 index 6cc265a..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_SansSerif-Regular.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_SansSerif-Regular.woff b/Blogger/build/debug/fonts/KaTeX_SansSerif-Regular.woff deleted file mode 100644 index 7973f19..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_SansSerif-Regular.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_SansSerif-Regular.woff2 b/Blogger/build/debug/fonts/KaTeX_SansSerif-Regular.woff2 deleted file mode 100644 index 891ca8c..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_SansSerif-Regular.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Script-Regular.ttf b/Blogger/build/debug/fonts/KaTeX_Script-Regular.ttf deleted file mode 100644 index 485ccdd..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Script-Regular.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Script-Regular.woff b/Blogger/build/debug/fonts/KaTeX_Script-Regular.woff deleted file mode 100644 index 99f8ee4..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Script-Regular.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Script-Regular.woff2 b/Blogger/build/debug/fonts/KaTeX_Script-Regular.woff2 deleted file mode 100644 index 629d9c8..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Script-Regular.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Size1-Regular.ttf b/Blogger/build/debug/fonts/KaTeX_Size1-Regular.ttf deleted file mode 100644 index 7080aae..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Size1-Regular.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Size1-Regular.woff b/Blogger/build/debug/fonts/KaTeX_Size1-Regular.woff deleted file mode 100644 index 1517ce9..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Size1-Regular.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Size1-Regular.woff2 b/Blogger/build/debug/fonts/KaTeX_Size1-Regular.woff2 deleted file mode 100644 index db8b77f..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Size1-Regular.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Size2-Regular.ttf b/Blogger/build/debug/fonts/KaTeX_Size2-Regular.ttf deleted file mode 100644 index 7becda4..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Size2-Regular.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Size2-Regular.woff b/Blogger/build/debug/fonts/KaTeX_Size2-Regular.woff deleted file mode 100644 index c12a237..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Size2-Regular.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Size2-Regular.woff2 b/Blogger/build/debug/fonts/KaTeX_Size2-Regular.woff2 deleted file mode 100644 index 2558a34..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Size2-Regular.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Size3-Regular.ttf b/Blogger/build/debug/fonts/KaTeX_Size3-Regular.ttf deleted file mode 100644 index 2c28b7d..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Size3-Regular.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Size3-Regular.woff b/Blogger/build/debug/fonts/KaTeX_Size3-Regular.woff deleted file mode 100644 index f9c2a7d..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Size3-Regular.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Size3-Regular.woff2 b/Blogger/build/debug/fonts/KaTeX_Size3-Regular.woff2 deleted file mode 100644 index 329c24e..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Size3-Regular.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Size4-Regular.ttf b/Blogger/build/debug/fonts/KaTeX_Size4-Regular.ttf deleted file mode 100644 index f4720c2..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Size4-Regular.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Size4-Regular.woff b/Blogger/build/debug/fonts/KaTeX_Size4-Regular.woff deleted file mode 100644 index aca79b3..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Size4-Regular.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Size4-Regular.woff2 b/Blogger/build/debug/fonts/KaTeX_Size4-Regular.woff2 deleted file mode 100644 index d0f337f..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Size4-Regular.woff2 and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Typewriter-Regular.ttf b/Blogger/build/debug/fonts/KaTeX_Typewriter-Regular.ttf deleted file mode 100644 index 13369a8..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Typewriter-Regular.ttf and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Typewriter-Regular.woff b/Blogger/build/debug/fonts/KaTeX_Typewriter-Regular.woff deleted file mode 100644 index 410e3f3..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Typewriter-Regular.woff and /dev/null differ diff --git a/Blogger/build/debug/fonts/KaTeX_Typewriter-Regular.woff2 b/Blogger/build/debug/fonts/KaTeX_Typewriter-Regular.woff2 deleted file mode 100644 index d57f54b..0000000 Binary files a/Blogger/build/debug/fonts/KaTeX_Typewriter-Regular.woff2 and /dev/null differ diff --git a/Blogger/build/debug/main.js b/Blogger/build/debug/main.js index cf3a14a..de770da 100644 --- a/Blogger/build/debug/main.js +++ b/Blogger/build/debug/main.js @@ -1 +1 @@ -(function(){var t,e,i,s,a,n;(e=class extends this.OS.application.BaseApplication{constructor(t){super("Blogger",t)}main(){var t;return this.user={},this.cvlist=this.find("cv-list"),this.cvlist.ontreeselect=t=>{var e;if(t)return e=t.data.item.data,this.CVSectionByCID(Number(e.id))},this.inputtags=this.find("input-tags"),this.bloglist=this.find("blog-list"),this.seclist=this.find("cv-sec-list"),t=this.find("photo"),$(t).click(e=>this.openDialog("FileDialog",{title:__("Select image file"),mimes:["image/.*"]}).then(e=>t.value=e.file.path).catch(t=>this.error(__("Unable to get file"),t))),this.userdb=new this._api.DB("user"),this.cvcatdb=new this._api.DB("cv_cat"),this.cvsecdb=new this._api.DB("cv_sections"),this.blogdb=new this._api.DB("blogs"),this.tabcontainer=this.find("tabcontainer"),this.tabcontainer.ontabselect=t=>this.fetchData(t.data.container.aid),this.find("bt-user-save").onbtclick=t=>this.saveUser(),this.find("cv-cat-add").onbtclick=t=>{var e;return e=t=>this.openDialog(new s,{title:__("Add category"),tree:t}).then(t=>{var e;return e={name:t.value,pid:t.p.id,publish:1},this.cvcatdb.save(e).then(t=>this.refreshCVCat()).catch(t=>this.error(__("Cannot add new category"),t))}).catch(t=>this.error(t.toString(),t)),this.fetchCVCat().then(t=>e(t)).catch(t=>(e({text:"Porfolio",id:"0",nodes:[]}),this.error(__("Unable to fetch categories"),t)))},this.find("cv-cat-edit").onbtclick=t=>{var e,i;if((i=this.cvlist.selectedItem)&&(e=i.data))return this.fetchCVCat().then(t=>this.openDialog(new s,{title:__("Edit category"),tree:t,cat:e}).then(t=>{var i;return i={id:e.id,publish:e.publish,pid:t.p.id,name:t.value},this.cvcatdb.save(i).then(t=>this.refreshCVCat()).catch(t=>this.error(__("Cannot Edit category"),t))})).catch(t=>this.error(__("Unable to fetch categories"),t))},this.find("cv-cat-del").onbtclick=t=>{var e,i;if((i=this.cvlist.selectedItem)&&(e=i.data))return this.openDialog("YesNoDialog",{title:__("Delete category"),iconclass:"fa fa-question-circle",text:__("Do you really want to delete: {0}?",e.name)}).then(t=>{if(t)return this.deleteCVCat(e)}).catch(t=>this.error(t.toString(),t))},this.find("cv-sec-add").onbtclick=t=>{var e,s;if(s=this.cvlist.selectedItem)return(e=s.data)&&"0"!==e.id?this.openDialog(new i(this),{title:__("New section entry for {0}",e.name)}).then(t=>(t.cid=Number(e.id),t.start=Number(t.start),t.end=Number(t.end),this.cvsecdb.save(t).then(t=>this.CVSectionByCID(Number(e.id))).catch(t=>this.error(__("Cannot save section: {0}",t.toString()),t)))):this.notify(__("Please select a category"))},this.find("cv-sec-move").onbtclick=t=>{var e,i;return(i=this.find("cv-sec-list").selectedItem)?(e=i.data,this.fetchCVCat().then(t=>this.openDialog(new s,{title:__("Move to"),tree:t,selonly:!0}).then(t=>{var i;return i={id:e.id,cid:t.p.id},this.cvsecdb.save(i).then(t=>(this.CVSectionByCID(e.cid),this.find("cv-sec-list").unselect())).catch(t=>this.error(__("Cannot move section"),t))}))):this.notify(__("Please select a section to move"))},this.find("cv-sec-edit").onbtclick=t=>{var e,s;return(s=this.find("cv-sec-list").selectedItem)?(e=s.data,this.openDialog(new i(this),{title:__("Modify section entry"),section:e}).then(t=>(t.cid=Number(e.cid),t.start=Number(t.start),t.end=Number(t.end),this.cvsecdb.save(t).then(t=>this.CVSectionByCID(Number(e.cid))).catch(t=>this.error(__("Cannot save section: {0}",t.toString()),t))))):this.notify(__("Please select a section to edit"))},this.seclist.onitemclose=t=>{var e;if(t)return e=t.data.item.data,this.openDialog("YesNoDialog",{iconclass:"fa fa-question-circle",text:__("Do you really want to delete: {0}?",e.title)}).then(i=>{if(i)return this.cvsecdb.delete(e.id).then(e=>this.seclist.delete(t.data.item)).catch(t=>this.error(__("Cannot delete the section: {0}",t.toString()),t))}),!1},this.editor=new SimpleMDE({element:this.find("markarea"),autoDownloadFontAwesome:!1,autofocus:!0,tabSize:4,indentWithTabs:!0,toolbar:[{name:__("New"),className:"fa fa-file",action:t=>(this.bloglist.unselect(),this.clearEditor())},{name:__("Save"),className:"fa fa-save",action:t=>this.saveBlog()},"|","bold","italic","heading","|","quote","code","unordered-list","ordered-list","|","link","image","table","horizontal-rule",{name:"image",className:"fa fa-file-image-o",action:t=>this.openDialog("FileDialog",{title:__("Select image file"),mimes:["image/.*"]}).then(t=>t.file.path.asFileHandle().publish().then(t=>this.editor.codemirror.getDoc().replaceSelection(`![](${this._api.handle.shared}/${t.result})`)).catch(t=>this.error(__("Cannot export file for embedding to text"),t)))},{name:"Youtube",className:"fa fa-youtube",action:t=>this.editor.codemirror.getDoc().replaceSelection("[[youtube:]]")},"|",{name:__("Preview"),className:"fa fa-eye no-disable",action:t=>(this.previewOn=!this.previewOn,SimpleMDE.togglePreview(t),renderMathInElement(this.find("editor-container")))},"|",{name:__("Send mail"),className:"fa fa-paper-plane",action:t=>{var e,i;return(i=this.bloglist.selectedItem)?(e=i.data,this.openDialog(new a(this),{title:__("Send mail"),content:this.editor.value(),id:e.id}).then((function(t){return console.log("Email sent")}))):this.error(__("No post selected"))}}]}),this.bloglist.onlistselect=e=>{var i;if((t=this.bloglist.selectedItem)&&(i=t.data))return this.blogdb.get(Number(i.id)).then(t=>(this.editor.value(t.content),this.inputtags.value=t.tags,this.find("blog-publish").swon=!!Number(t.publish))).catch(t=>this.error(__("Cannot fetch the entry content"),t))},this.bloglist.onitemclose=e=>{var i;if(e)return t=e.data.item,i=t.data,this.openDialog("YesNoDialog",{title:__("Delete a post"),iconclass:"fa fa-question-circle",text:__("Do you really want to delete this post ?")}).then(e=>{if(e)return this.blogdb.delete(i.id).then(e=>(this.bloglist.delete(t),this.bloglist.unselect(),this.clearEditor()))}),!1},this.bindKey("CTRL-S",()=>{var t;if((t=this.tabcontainer.selectedTab)&&"blog-container"===t.container.aid)return this.saveBlog()}),this.on("vboxchange",()=>this.resizeContent()),this.resizeContent(),this.loadBlogs()}fetchData(t){switch(t){case"user-container":return this.userdb.get(null).then(t=>{var e,i,s,a,n;for(this.user=t[0],a=[],e=0,s=(i=this.select("[input-class='user-input']")).length;ethis.error(__("Cannot fetch user data"),t));case"cv-container":return this.refreshCVCat();default:return this.loadBlogs()}}saveUser(){var t,e,i,s;for(t=0,i=(e=this.select("[input-class='user-input']")).length;tthis.notify(__("User data updated"))).catch(t=>this.error(__("Cannot save user data"),t)):this.notify(__("Full name must be entered"))}refreshCVCat(){return this.fetchCVCat().then(t=>(this.cvlist.data=t,this.cvlist.expandAll())).catch(t=>this.error(__("Unable to load categories"),t))}fetchCVCat(){return new Promise((t,e)=>{var i,s;return s={text:"Porfolio",id:"0",nodes:[]},i={order:{name:"ASC"}},this.cvcatdb.find(i).then(e=>(this.catListToTree(e,s,"0"),t(s))).catch((function(t){return e(__e(t))}))})}catListToTree(t,e,i){var s,a,n,r,o;if(0===(n=function(){var e,s,a;for(a=[],e=0,s=t.length;e(e=function(){var t,e,i;for(i=[],t=0,e=s.length;t(this.refreshCVCat(),this.seclist.data=[])).catch(e=>this.error(__("Cannot delete the category: {0} [{1}]",t.name,e.toString()),e)))).catch(e=>this.error(__("Cannot delete all content of: {0} [{1}]",t.name,e.toString()),e))}CVSectionByCID(t){var e;return e={exp:{"=":{cid:t}},order:{start:"DESC"}},this.cvsecdb.find(e).then(t=>{var e,i,s,a;for(i=[],this.find("cv-sec-status").text=__("Found {0} sections",t.length),e=0,s=t.length;ethis.error(t.toString(),t))}saveBlog(){var t,e,i,s,a,n,r;return s=void 0,(a=this.bloglist.selectedItem)&&(s=a.data),n=this.inputtags.value,t=this.editor.value(),(r=new RegExp("^#+(.*)\n","g").exec(t))&&2===r.length?""===n?this.notify(__("Please enter tags")):(e=new Date,i={content:t,title:r[1].trim(),tags:n,ctime:s?s.ctime:e.timestamp(),ctimestr:s?s.ctimestr:e.toString(),utime:e.timestamp(),utimestr:e.toString(),rendered:this.process(this.editor.options.previewRender(t)),publish:this.find("blog-publish").swon?1:0},s&&(i.id=s.id),this.blogdb.save(i).then(t=>this.loadBlogs()).catch(t=>this.error(__("Cannot save blog: {0}",t.toString()),t))):this.notify(__("Please insert a title in the text: beginning with heading"))}process(t){var e,i,s,a,n,r,o,l,h;for(i=function(t){return``},o=/\[\[youtube:([^\]]*)\]\]/g,l=[];null!==(s=o.exec(t));)l.push(s);if(!(l.length>0))return t;for(h="",e=0,a=0,r=l.length;a{var e,s;for(e=0,s=t.length;ethis.error(__("No post found: {0}",t.toString()),t))}resizeContent(){var t,e,i,s,a,n;return i=this.find("editor-container"),e=$(i).children(),a=$(this.scheme).find(".afx-window-top")[0],n=e[1],s=e[4],t=$(this.scheme).height()-$(a).height()-$(n).height()-$(s).height()-90,$(e[2]).css("height",t+"px")}}).singleton=!0,e.dependencies=["pkg://Katex/main.js","pkg://Katex/main.css","pkg://SimpleMDE/main.js","pkg://SimpleMDE/main.css"],this.OS.register("Blogger",e),(s=class t extends this.OS.GUI.BasicDialog{constructor(){super("BloggerCategoryDialog",t.scheme)}main(){var t;if(super.main(),this.tree=this.find("tree"),this.txtinput=this.find("txtinput"),this.find("bt-ok").onbtclick=t=>{var e,i,s;return(e=this.tree.selectedItem)?(i=e.data,""!==(s=this.txtinput.value)||this.data.selonly?this.data.cat&&this.data.cat.id===i.id?this.notify(__("Parent can not be the category itself")):(this.handle&&this.handle({p:i,value:s}),this.quit()):this.notify(__("Please enter category name"))):this.notify(__("Please select a parent category"))},this.find("bt-cancel").onbtclick=t=>this.quit(),this.data&&this.data.tree)return this.data&&this.data.cat&&(this.txtinput.value=this.data.cat.name,(t="0"===this.data.cat.pid?this.data.tree:this.findDataByID(this.data.cat.pid,this.data.tree.nodes))&&(t.selected=!0)),this.tree.data=this.data.tree,this.tree.expandAll()}findDataByID(t,e){var i,s,a;for(s=0,a=e.length;s\n \n \n \n \n \n \n
\n \n \n
\n
\n
\n
\n',i=class extends this.OS.GUI.BasicDialog{constructor(t){super("BloggerCVSectionDiaglog",(t.meta().path+"/cvsection.html").asFileHandle())}main(){var t,e;return super.main(),this.editor=new SimpleMDE({autoDownloadFontAwesome:!1,element:this.find("contentarea"),status:!1,toolbar:!1}),$(this.select('[class = "CodeMirror-scroll"]')[0]).css("min-height","50px"),$(this.select('[class="CodeMirror cm-s-paper CodeMirror-wrap"]')[0]).css("min-height","50px"),t=this.select("[input-class='user-input']"),this.data&&this.data.section&&function(){var i,s,a;for(a=[],i=0,s=t.length;i{var s,a,n,r;for(s={},a=0,n=t.length;athis.resizeContent()),this.resizeContent()}resizeContent(){var t,e,i;return i=this.find("editor-container"),e=$(i).children(),t=$(i).height()-30,$(e[1]).css("height",t+"px")}},(a=class t extends this.OS.GUI.BasicDialog{constructor(t){super("BloggerSendmailDiaglog",(t.meta().path+"/sendmail.html").asFileHandle())}main(){var e,i;return super.main(),this.subdb=new this.parent._api.DB("subscribers"),this.maillinglist=this.find("email-list"),i=new RegExp("^#+(.*)\n","g").exec(this.data.content),this.find("mail-title").value=i[1],e=this.data.content.substring(0,500)+"...",this.find("contentarea").value=t.template.format(this.data.id,e),this.subdb.find({}).then(t=>{var e,i,s;for(e=0,i=t.length;ethis.error(__("Cannot fetch subscribers data: {0}",t.toString()),t)),this.find("bt-sendmail").onbtclick=t=>{var e,i,s,a,n,r;for(i=[],s=0,n=(a=this.maillinglist.items).length;st.error?this.notify(__("Unable to send mail to: {0}",t.result.join(", "))):this.quit()).catch(t=>(console.log(t),this.error(__("Error sending mail: {0}",t.toString()),t))))}}}).template="Hello,\n\nXuan Sang LE has just published a new post on his blog: https://blog.lxsang.me/post/id/{0}\n\n==========\n{1}\n==========\n\n\nRead the full article via:\nhttps://blog.lxsang.me/post/id/{0}\n\nYou receive this email because you have been subscribed to his blog.\n\nHave a nice day,\n\nSent from Blogger, an AntOS application",n=class extends this.OS.GUI.tag.ListViewItemTag{constructor(){super()}ondatachange(){var t,e,i,s,a,n;if(this.data){for(e in n=this.data,i=["content","start","end"],this.closable=n.closable,a=[],s=this.refs)t=s[e],n[e]&&""!==n[e]?i.includes(e)?a.push($(t).text(n[e])):a.push(t.text=n[e]):a.push(void 0);return a}}reload(){}init(){}itemlayout(){return{el:"div",children:[{el:"afx-label",ref:"title",class:"afx-cv-sec-title"},{el:"afx-label",ref:"subtitle",class:"afx-cv-sec-subtitle"},{el:"p",ref:"content",class:"afx-cv-sec-content"},{el:"p",class:"afx-cv-sec-period",children:[{el:"i",ref:"start"},{el:"i",ref:"end",class:"period-end"}]},{el:"afx-label",ref:"location",class:"afx-cv-sec-loc"}]}}},this.OS.GUI.tag.define("afx-blogger-cvsection-item",n),t=class extends this.OS.GUI.tag.ListViewItemTag{constructor(){super()}ondatachange(t){if(this.data)return(t=this.data).closable=!0,this.closable=t.closable,this.refs.title.text=t.title,this.refs.ctimestr.text=__("Created: {0}",t.ctimestr),this.refs.utimestr.text=__("Updated: {0}",t.utimestr)}reload(){}init(){}itemlayout(){return{el:"div",children:[{el:"afx-label",ref:"title",class:"afx-blogpost-title"},{el:"afx-label",ref:"ctimestr",class:"blog-dates"},{el:"afx-label",ref:"utimestr",class:"blog-dates"}]}}},this.OS.GUI.tag.define("afx-blogger-post-item",t)}).call(this); \ No newline at end of file +(function(){var t,e,i,s,a,n;(e=class extends this.OS.application.BaseApplication{constructor(t){super("Blogger",t)}main(){var t;return this.user={},this.cvlist=this.find("cv-list"),this.cvlist.ontreeselect=t=>{var e;if(t)return e=t.data.item.data,this.CVSectionByCID(Number(e.id))},this.inputtags=this.find("input-tags"),this.bloglist=this.find("blog-list"),this.seclist=this.find("cv-sec-list"),t=this.find("photo"),$(t).click(e=>this.openDialog("FileDialog",{title:__("Select image file"),mimes:["image/.*"]}).then(e=>t.value=e.file.path).catch(t=>this.error(__("Unable to get file"),t))),this.userdb=new this._api.DB("user"),this.cvcatdb=new this._api.DB("cv_cat"),this.cvsecdb=new this._api.DB("cv_sections"),this.blogdb=new this._api.DB("blogs"),this.tabcontainer=this.find("tabcontainer"),this.tabcontainer.ontabselect=t=>this.fetchData(t.data.container.aid),this.find("bt-user-save").onbtclick=t=>this.saveUser(),this.find("cv-cat-add").onbtclick=t=>{var e;return e=t=>this.openDialog(new s,{title:__("Add category"),tree:t}).then(t=>{var e;return e={name:t.value,pid:t.p.id,publish:1},this.cvcatdb.save(e).then(t=>this.refreshCVCat()).catch(t=>this.error(__("Cannot add new category"),t))}).catch(t=>this.error(t.toString(),t)),this.fetchCVCat().then(t=>e(t)).catch(t=>(e({text:"Porfolio",id:"0",nodes:[]}),this.error(__("Unable to fetch categories"),t)))},this.find("cv-cat-edit").onbtclick=t=>{var e,i;if((i=this.cvlist.selectedItem)&&(e=i.data))return this.fetchCVCat().then(t=>this.openDialog(new s,{title:__("Edit category"),tree:t,cat:e}).then(t=>{var i;return i={id:e.id,publish:e.publish,pid:t.p.id,name:t.value},this.cvcatdb.save(i).then(t=>this.refreshCVCat()).catch(t=>this.error(__("Cannot Edit category"),t))})).catch(t=>this.error(__("Unable to fetch categories"),t))},this.find("cv-cat-del").onbtclick=t=>{var e,i;if((i=this.cvlist.selectedItem)&&(e=i.data))return this.openDialog("YesNoDialog",{title:__("Delete category"),iconclass:"fa fa-question-circle",text:__("Do you really want to delete: {0}?",e.name)}).then(t=>{if(t)return this.deleteCVCat(e)}).catch(t=>this.error(t.toString(),t))},this.find("cv-sec-add").onbtclick=t=>{var e,s;if(s=this.cvlist.selectedItem)return(e=s.data)&&"0"!==e.id?this.openDialog(new i(this),{title:__("New section entry for {0}",e.name)}).then(t=>(t.cid=Number(e.id),t.start=Number(t.start),t.end=Number(t.end),this.cvsecdb.save(t).then(t=>this.CVSectionByCID(Number(e.id))).catch(t=>this.error(__("Cannot save section: {0}",t.toString()),t)))):this.notify(__("Please select a category"))},this.find("cv-sec-move").onbtclick=t=>{var e,i;return(i=this.find("cv-sec-list").selectedItem)?(e=i.data,this.fetchCVCat().then(t=>this.openDialog(new s,{title:__("Move to"),tree:t,selonly:!0}).then(t=>{var i;return i={id:e.id,cid:t.p.id},this.cvsecdb.save(i).then(t=>(this.CVSectionByCID(e.cid),this.find("cv-sec-list").unselect())).catch(t=>this.error(__("Cannot move section"),t))}))):this.notify(__("Please select a section to move"))},this.find("cv-sec-edit").onbtclick=t=>{var e,s;return(s=this.find("cv-sec-list").selectedItem)?(e=s.data,this.openDialog(new i(this),{title:__("Modify section entry"),section:e}).then(t=>(t.cid=Number(e.cid),t.start=Number(t.start),t.end=Number(t.end),this.cvsecdb.save(t).then(t=>this.CVSectionByCID(Number(e.cid))).catch(t=>this.error(__("Cannot save section: {0}",t.toString()),t))))):this.notify(__("Please select a section to edit"))},this.seclist.onitemclose=t=>{var e;if(t)return e=t.data.item.data,this.openDialog("YesNoDialog",{iconclass:"fa fa-question-circle",text:__("Do you really want to delete: {0}?",e.title)}).then(i=>{if(i)return this.cvsecdb.delete(e.id).then(e=>this.seclist.delete(t.data.item)).catch(t=>this.error(__("Cannot delete the section: {0}",t.toString()),t))}),!1},this.editor=new SimpleMDE({element:this.find("markarea"),autoDownloadFontAwesome:!1,autofocus:!0,tabSize:4,indentWithTabs:!0,toolbar:[{name:__("New"),className:"fa fa-file",action:t=>(this.bloglist.unselect(),this.clearEditor())},{name:__("Save"),className:"fa fa-save",action:t=>this.saveBlog()},"|","bold","italic","heading","|","quote","code","unordered-list","ordered-list","|","link","image","table","horizontal-rule",{name:"image",className:"fa fa-file-image-o",action:t=>this.openDialog("FileDialog",{title:__("Select image file"),mimes:["image/.*"]}).then(t=>t.file.path.asFileHandle().publish().then(t=>this.editor.codemirror.getDoc().replaceSelection(`![](${this._api.handle.shared}/${t.result})`)).catch(t=>this.error(__("Cannot export file for embedding to text"),t)))},{name:"Youtube",className:"fa fa-youtube",action:t=>this.editor.codemirror.getDoc().replaceSelection("[[youtube:]]")},"|",{name:__("Preview"),className:"fa fa-eye no-disable",action:t=>(this.previewOn=!this.previewOn,SimpleMDE.togglePreview(t),renderMathInElement(this.find("editor-container")))},"|",{name:__("Send mail"),className:"fa fa-paper-plane",action:t=>{var e,i;return(i=this.bloglist.selectedItem)?(e=i.data,this.openDialog(new a(this),{title:__("Send mail"),content:this.editor.value(),id:e.id}).then((function(t){return console.log("Email sent")}))):this.error(__("No post selected"))}}]}),this.bloglist.onlistselect=e=>{var i;if((t=this.bloglist.selectedItem)&&(i=t.data))return this.blogdb.get(Number(i.id)).then(t=>(this.editor.value(t.content),this.inputtags.value=t.tags,this.find("blog-publish").swon=!!Number(t.publish))).catch(t=>this.error(__("Cannot fetch the entry content"),t))},this.bloglist.onitemclose=e=>{var i;if(e)return t=e.data.item,i=t.data,this.openDialog("YesNoDialog",{title:__("Delete a post"),iconclass:"fa fa-question-circle",text:__("Do you really want to delete this post ?")}).then(e=>{if(e)return this.blogdb.delete(i.id).then(e=>(this.bloglist.delete(t),this.bloglist.unselect(),this.clearEditor()))}),!1},this.bindKey("CTRL-S",()=>{var t;if((t=this.tabcontainer.selectedTab)&&"blog-container"===t.container.aid)return this.saveBlog()}),this.on("vboxchange",()=>this.resizeContent()),this.resizeContent(),this.loadBlogs()}fetchData(t){switch(t){case"user-container":return this.userdb.get(null).then(t=>{var e,i,s,a,n;for(this.user=t[0],a=[],e=0,s=(i=this.select("[input-class='user-input']")).length;ethis.error(__("Cannot fetch user data"),t));case"cv-container":return this.refreshCVCat();default:return this.loadBlogs()}}saveUser(){var t,e,i,s;for(t=0,i=(e=this.select("[input-class='user-input']")).length;tthis.notify(__("User data updated"))).catch(t=>this.error(__("Cannot save user data"),t)):this.notify(__("Full name must be entered"))}refreshCVCat(){return this.fetchCVCat().then(t=>(this.cvlist.data=t,this.cvlist.expandAll())).catch(t=>this.error(__("Unable to load categories"),t))}fetchCVCat(){return new Promise((t,e)=>{var i,s;return s={text:"Porfolio",id:"0",nodes:[]},i={order:{name:"ASC"}},this.cvcatdb.find(i).then(e=>(this.catListToTree(e,s,"0"),t(s))).catch((function(t){return e(__e(t))}))})}catListToTree(t,e,i){var s,a,n,r,o;if(0===(n=function(){var e,s,a;for(a=[],e=0,s=t.length;e(e=function(){var t,e,i;for(i=[],t=0,e=s.length;t(this.refreshCVCat(),this.seclist.data=[])).catch(e=>this.error(__("Cannot delete the category: {0} [{1}]",t.name,e.toString()),e)))).catch(e=>this.error(__("Cannot delete all content of: {0} [{1}]",t.name,e.toString()),e))}CVSectionByCID(t){var e;return e={exp:{"=":{cid:t}},order:{start:"DESC"}},this.cvsecdb.find(e).then(t=>{var e,i,s,a;for(i=[],this.find("cv-sec-status").text=__("Found {0} sections",t.length),e=0,s=t.length;ethis.error(t.toString(),t))}saveBlog(){var t,e,i,s,a,n,r;return s=void 0,(a=this.bloglist.selectedItem)&&(s=a.data),n=this.inputtags.value,t=this.editor.value(),(r=new RegExp("^#+(.*)\n","g").exec(t))&&2===r.length?""===n?this.notify(__("Please enter tags")):(e=new Date,i={content:t,title:r[1].trim(),tags:n,ctime:s?s.ctime:e.timestamp(),ctimestr:s?s.ctimestr:e.toString(),utime:e.timestamp(),utimestr:e.toString(),rendered:this.process(this.editor.options.previewRender(t)),publish:this.find("blog-publish").swon?1:0},s&&(i.id=s.id),this.blogdb.save(i).then(t=>this.loadBlogs()).catch(t=>this.error(__("Cannot save blog: {0}",t.toString()),t))):this.notify(__("Please insert a title in the text: beginning with heading"))}process(t){var e,i,s,a,n,r,o,l,h;for(i=function(t){return``},o=/\[\[youtube:([^\]]*)\]\]/g,l=[];null!==(s=o.exec(t));)l.push(s);if(!(l.length>0))return t;for(h="",e=0,a=0,r=l.length;a{var e,s;for(e=0,s=t.length;ethis.error(__("No post found: {0}",t.toString()),t))}resizeContent(){var t,e,i,s,a,n;return i=this.find("editor-container"),e=$(i).children(),a=$(this.scheme).find(".afx-window-top")[0],n=e[1],s=e[4],t=$(this.scheme).height()-$(a).height()-$(n).height()-$(s).height()-90,$(e[2]).css("height",t+"px")}}).singleton=!0,e.dependencies=["pkg://SimpleMDE/main.js","pkg://SimpleMDE/main.css","pkg://Katex/main.js","pkg://Katex/main.css"],this.OS.register("Blogger",e),(s=class t extends this.OS.GUI.BasicDialog{constructor(){super("BloggerCategoryDialog",t.scheme)}main(){var t;if(super.main(),this.tree=this.find("tree"),this.txtinput=this.find("txtinput"),this.find("bt-ok").onbtclick=t=>{var e,i,s;return(e=this.tree.selectedItem)?(i=e.data,""!==(s=this.txtinput.value)||this.data.selonly?this.data.cat&&this.data.cat.id===i.id?this.notify(__("Parent can not be the category itself")):(this.handle&&this.handle({p:i,value:s}),this.quit()):this.notify(__("Please enter category name"))):this.notify(__("Please select a parent category"))},this.find("bt-cancel").onbtclick=t=>this.quit(),this.data&&this.data.tree)return this.data&&this.data.cat&&(this.txtinput.value=this.data.cat.name,(t="0"===this.data.cat.pid?this.data.tree:this.findDataByID(this.data.cat.pid,this.data.tree.nodes))&&(t.selected=!0)),this.tree.data=this.data.tree,this.tree.expandAll()}findDataByID(t,e){var i,s,a;for(s=0,a=e.length;s\n \n \n \n \n \n \n
\n \n \n
\n
\n
\n
\n',i=class extends this.OS.GUI.BasicDialog{constructor(t){super("BloggerCVSectionDiaglog",(t.meta().path+"/cvsection.html").asFileHandle())}main(){var t,e;return super.main(),this.editor=new SimpleMDE({autoDownloadFontAwesome:!1,element:this.find("contentarea"),status:!1,toolbar:!1}),$(this.select('[class = "CodeMirror-scroll"]')[0]).css("min-height","50px"),$(this.select('[class="CodeMirror cm-s-paper CodeMirror-wrap"]')[0]).css("min-height","50px"),t=this.select("[input-class='user-input']"),this.data&&this.data.section&&function(){var i,s,a;for(a=[],i=0,s=t.length;i{var s,a,n,r;for(s={},a=0,n=t.length;athis.resizeContent()),this.resizeContent()}resizeContent(){var t,e,i;return i=this.find("editor-container"),e=$(i).children(),t=$(i).height()-30,$(e[1]).css("height",t+"px")}},(a=class t extends this.OS.GUI.BasicDialog{constructor(t){super("BloggerSendmailDiaglog",(t.meta().path+"/sendmail.html").asFileHandle())}main(){var e,i;return super.main(),this.subdb=new this.parent._api.DB("subscribers"),this.maillinglist=this.find("email-list"),i=new RegExp("^#+(.*)\n","g").exec(this.data.content),this.find("mail-title").value=i[1],e=this.data.content.substring(0,500)+"...",this.find("contentarea").value=t.template.format(this.data.id,e),this.subdb.find({}).then(t=>{var e,i,s;for(e=0,i=t.length;ethis.error(__("Cannot fetch subscribers data: {0}",t.toString()),t)),this.find("bt-sendmail").onbtclick=t=>{var e,i,s,a,n,r;for(i=[],s=0,n=(a=this.maillinglist.items).length;st.error?this.notify(__("Unable to send mail to: {0}",t.result.join(", "))):this.quit()).catch(t=>(console.log(t),this.error(__("Error sending mail: {0}",t.toString()),t))))}}}).template="Hello,\n\nXuan Sang LE has just published a new post on his blog: https://blog.lxsang.me/post/id/{0}\n\n==========\n{1}\n==========\n\n\nRead the full article via:\nhttps://blog.lxsang.me/post/id/{0}\n\nYou receive this email because you have been subscribed to his blog.\n\nHave a nice day,\n\nSent from Blogger, an AntOS application",n=class extends this.OS.GUI.tag.ListViewItemTag{constructor(){super()}ondatachange(){var t,e,i,s,a,n;if(this.data){for(e in n=this.data,i=["content","start","end"],this.closable=n.closable,a=[],s=this.refs)t=s[e],n[e]&&""!==n[e]?i.includes(e)?a.push($(t).text(n[e])):a.push(t.text=n[e]):a.push(void 0);return a}}reload(){}init(){}itemlayout(){return{el:"div",children:[{el:"afx-label",ref:"title",class:"afx-cv-sec-title"},{el:"afx-label",ref:"subtitle",class:"afx-cv-sec-subtitle"},{el:"p",ref:"content",class:"afx-cv-sec-content"},{el:"p",class:"afx-cv-sec-period",children:[{el:"i",ref:"start"},{el:"i",ref:"end",class:"period-end"}]},{el:"afx-label",ref:"location",class:"afx-cv-sec-loc"}]}}},this.OS.GUI.tag.define("afx-blogger-cvsection-item",n),t=class extends this.OS.GUI.tag.ListViewItemTag{constructor(){super()}ondatachange(t){if(this.data)return(t=this.data).closable=!0,this.closable=t.closable,this.refs.title.text=t.title,this.refs.ctimestr.text=__("Created: {0}",t.ctimestr),this.refs.utimestr.text=__("Updated: {0}",t.utimestr)}reload(){}init(){}itemlayout(){return{el:"div",children:[{el:"afx-label",ref:"title",class:"afx-blogpost-title"},{el:"afx-label",ref:"ctimestr",class:"blog-dates"},{el:"afx-label",ref:"utimestr",class:"blog-dates"}]}}},this.OS.GUI.tag.define("afx-blogger-post-item",t)}).call(this); \ No newline at end of file diff --git a/Blogger/build/debug/package.json b/Blogger/build/debug/package.json index 758a0bc..a1ad299 100644 --- a/Blogger/build/debug/package.json +++ b/Blogger/build/debug/package.json @@ -6,7 +6,7 @@ "author": "Xuan Sang LE", "email": "xsang.le@gmail.com" }, - "version":"0.2.5-a", + "version":"0.2.6-a", "category":"Internet", "iconclass":"fa fa-book", "dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"], diff --git a/Blogger/build/release/Blogger.zip b/Blogger/build/release/Blogger.zip index bd1380b..07769d6 100644 Binary files a/Blogger/build/release/Blogger.zip and b/Blogger/build/release/Blogger.zip differ diff --git a/Blogger/main.coffee b/Blogger/main.coffee index 49b1318..bf05f7a 100644 --- a/Blogger/main.coffee +++ b/Blogger/main.coffee @@ -496,10 +496,10 @@ class Blogger extends this.OS.application.BaseApplication ($ children[2]).css("height", cheight + "px") Blogger.singleton = true -Blogger.dependencies = [ - "pkg://Katex/main.js", - "pkg://Katex/main.css", +Blogger.dependencies = [ "pkg://SimpleMDE/main.js", "pkg://SimpleMDE/main.css" + "pkg://Katex/main.js", + "pkg://Katex/main.css", ] this.OS.register "Blogger", Blogger \ No newline at end of file diff --git a/Blogger/package.json b/Blogger/package.json index 758a0bc..a1ad299 100644 --- a/Blogger/package.json +++ b/Blogger/package.json @@ -6,7 +6,7 @@ "author": "Xuan Sang LE", "email": "xsang.le@gmail.com" }, - "version":"0.2.5-a", + "version":"0.2.6-a", "category":"Internet", "iconclass":"fa fa-book", "dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"], diff --git a/packages.json b/packages.json index ece1d5a..e48e8b0 100644 --- a/packages.json +++ b/packages.json @@ -55,7 +55,7 @@ "description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Blogger/README.md", "category": "Internet", "author": "Xuan Sang LE", - "version": "0.2.5-a", + "version": "0.2.6-a", "dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"],"mimes":["none"], "download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Blogger/build/release/Blogger.zip" },