Compare commits

..

1 Commits

Author SHA1 Message Date
c15318f31b update to latest backend changes 2023-02-17 12:37:26 +01:00
278 changed files with 3914 additions and 5478 deletions

View File

@ -5,8 +5,6 @@ It is used to show the change logs of the current AntOS version
## Change logs
### v0.1.1-b
* Increase default window size
### v0.1.1-b
* add missing css file
### v0.1.0-b

View File

@ -1,8 +1,16 @@
<afx-app-window apptitle="__(About AntOS)" width="600" height="500" data-id="About">
<afx-vbox padding="10">
<div data-id="container"></div>
<afx-hbox data-height="35" style="text-align: right;">
<afx-button data-id="btnclose" text="__(Close)"></afx-button>
<afx-app-window apptitle="__(About AntOS)" width="450" height="500" data-id="About">
<afx-vbox >
<div data-height="10"></div>
<afx-hbox data-id="wrapper">
<div data-width="10"></div>
<div data-id="container"></div>
<div data-width="10"></div>
</afx-hbox>
<div data-height="5"></div>
<afx-hbox data-height="23" style="text-align: right;">
<afx-button data-id="btnclose" text="__(Close)"></afx-button>
<div data-width="5"></div>
</afx-hbox>
<div data-height="10"></div>
</afx-vbox>
</afx-app-window>

View File

@ -5,8 +5,6 @@ It is used to show the change logs of the current AntOS version
## Change logs
### v0.1.1-b
* Increase default window size
### v0.1.1-b
* add missing css file
### v0.1.0-b

View File

@ -4,12 +4,14 @@ afx-app-window[data-id = "About"] a:hover
{
color:#df3154;
}
afx-app-window[data-id = "About"] div[data-id="container"]
afx-app-window[data-id = "About"] afx-hbox[data-id="wrapper"]
{
overflow-x: hidden;
overflow-y:auto;
/*text-align: justify;*/
}
afx-app-window[data-id = "About"] div[data-id="container"]
{
text-align: justify;
}
afx-app-window[data-id = "About"] img

View File

@ -7,7 +7,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.1.2-b",
"version":"0.1.1-b",
"category":"Utility",
"iconclass":"fa fa-question-circle",
"mimes":["none"],

View File

@ -1,8 +1,16 @@
<afx-app-window apptitle="__(About AntOS)" width="600" height="500" data-id="About">
<afx-vbox padding="10">
<div data-id="container"></div>
<afx-hbox data-height="35" style="text-align: right;">
<afx-button data-id="btnclose" text="__(Close)"></afx-button>
<afx-app-window apptitle="__(About AntOS)" width="450" height="500" data-id="About">
<afx-vbox >
<div data-height="10"></div>
<afx-hbox data-id="wrapper">
<div data-width="10"></div>
<div data-id="container"></div>
<div data-width="10"></div>
</afx-hbox>
<div data-height="5"></div>
<afx-hbox data-height="23" style="text-align: right;">
<afx-button data-id="btnclose" text="__(Close)"></afx-button>
<div data-width="5"></div>
</afx-hbox>
<div data-height="10"></div>
</afx-vbox>
</afx-app-window>

Binary file not shown.

View File

@ -4,12 +4,14 @@ afx-app-window[data-id = "About"] a:hover
{
color:#df3154;
}
afx-app-window[data-id = "About"] div[data-id="container"]
afx-app-window[data-id = "About"] afx-hbox[data-id="wrapper"]
{
overflow-x: hidden;
overflow-y:auto;
/*text-align: justify;*/
}
afx-app-window[data-id = "About"] div[data-id="container"]
{
text-align: justify;
}
afx-app-window[data-id = "About"] img

View File

@ -7,7 +7,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.1.2-b",
"version":"0.1.1-b",
"category":"Utility",
"iconclass":"fa fa-question-circle",
"mimes":["none"],

View File

@ -3,8 +3,6 @@
This simple application show the current running AntOS processes
## Change logs
### v0.0.8-b
* Increase default window size
### v0.0.6-a
* Fix process type identification bug

View File

@ -1,82 +0,0 @@
{
"name": "ActivityMonitor",
"targets": {
"init": {
"jobs": [
{
"name": "vfs-mkdir",
"data": [
"build",
"build/debug",
"build/release"
]
}
]
},
"coffee": {
"require": [
"coffee"
],
"jobs": [
{
"name": "coffee-compile",
"data": {
"src": [
"main.coffee"
],
"dest": "build/debug/main.js"
}
}
]
},
"uglify": {
"require": [
"terser"
],
"jobs": [
{
"name": "terser-uglify",
"data": [
"build/debug/main.js"
]
}
]
},
"copy": {
"jobs": [
{
"name": "vfs-cp",
"data": {
"src": [
"scheme.html",
"package.json",
"README.md",
"main.css"
],
"dest": "build/debug"
}
}
]
},
"release": {
"require": [
"zip"
],
"depend": [
"init",
"coffee",
"uglify",
"copy"
],
"jobs": [
{
"name": "zip-mk",
"data": {
"src": "build/debug",
"dest": "build/release/ActivityMonitor.zip"
}
}
]
}
}
}

View File

@ -3,8 +3,6 @@
This simple application show the current running AntOS processes
## Change logs
### v0.0.8-b
* Increase default window size
### v0.0.6-a
* Fix process type identification bug

View File

@ -7,7 +7,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.0.8-b",
"version":"0.0.7-b",
"category":"System",
"iconclass":"fa fa-heartbeat",
"mimes":["none"]

View File

@ -1,6 +1,11 @@
<afx-app-window data-id = "am-window" apptitle="" width="500" height="400">
<afx-vbox padding="7">
<afx-grid-view data-id = "mygrid"></afx-grid-view>
<afx-button data-height="35" data-id = "btkill" text = "__(Kill process)" iconclass="fa fa-times"></afx-button>
</afx-vbox>
<afx-app-window data-id = "am-window" apptitle="" width="400" height="300">
<afx-hbox>
<div data-width="7"></div>
<afx-vbox>
<div data-height="7"></div>
<afx-grid-view data-id = "mygrid"></afx-grid-view>
<afx-button data-height="30" data-id = "btkill" text = "__(Kill process)" iconclass="fa fa-times"></afx-button>
</afx-vbox>
<div data-width="7"></div>
</afx-hbox>
</afx-app-window>

View File

@ -7,7 +7,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.0.8-b",
"version":"0.0.7-b",
"category":"System",
"iconclass":"fa fa-heartbeat",
"mimes":["none"]

View File

@ -1,6 +1,11 @@
<afx-app-window data-id = "am-window" apptitle="" width="500" height="400">
<afx-vbox padding="7">
<afx-grid-view data-id = "mygrid"></afx-grid-view>
<afx-button data-height="35" data-id = "btkill" text = "__(Kill process)" iconclass="fa fa-times"></afx-button>
</afx-vbox>
<afx-app-window data-id = "am-window" apptitle="" width="400" height="300">
<afx-hbox>
<div data-width="7"></div>
<afx-vbox>
<div data-height="7"></div>
<afx-grid-view data-id = "mygrid"></afx-grid-view>
<afx-button data-height="30" data-id = "btkill" text = "__(Kill process)" iconclass="fa fa-times"></afx-button>
</afx-vbox>
<div data-width="7"></div>
</afx-hbox>
</afx-app-window>

View File

@ -5,7 +5,6 @@ the editor that powers VS Code.
The editor functionality can be extended by its extension mechanism.
Extension can be developed/released/isntalled by the editor itself.
### Change logs
- 0.2.3-b: Minor changes to adapt the core UI to the new AntOS 2.0.x
- 0.2.3-b: Allow reload current file via context menu in case of external changes
- 0.2.2-b: Support horizotal scrolling on horizotal tabbars
- 0.2.1-b: Add open file to right, editor actions are only attached to code editor

View File

@ -2,7 +2,7 @@
<afx-vbox>
<afx-hbox data-id="wrapper">
<afx-vbox data-width = "200" min-width="200" data-id = "sidebar">
<afx-tab-container data-id="sidebar-tab-container" dir="row" tabbarwidth="40">
<afx-tab-container data-id="sidebar-tab-container" dir="row" tabbarwidth="30">
<!--File tab-->
<afx-hbox data-height="100%" iconclass="bi bi-files" >
<afx-vbox>
@ -15,7 +15,7 @@
<!--extension tab-->
<afx-hbox data-height="100%" iconclass="bi bi-puzzle" >
<afx-vbox>
<input data-id="txt_ext_search" type="text" data-height="30">
<input data-id="txt_ext_search" type="text" data-height="23">
<afx-list-view data-id="extension-list"></afx-list-view>
</afx-vbox>
</afx-hbox>
@ -26,17 +26,17 @@
<afx-vbox data-id="editor-main-container">
<afx-hbox>
<afx-vbox data-id="left-panel">
<afx-tab-bar closable="true" data-height="35" data-id = "left-tabbar"></afx-tab-bar>
<afx-tab-bar closable="true" data-height="26" data-id = "left-tabbar"></afx-tab-bar>
<div data-id="left-editorarea"></div>
</afx-vbox>
<afx-resizer data-width="3"></afx-resizer>
<afx-vbox data-id="right-panel">
<afx-tab-bar closable="true" data-height="35" data-id = "right-tabbar"></afx-tab-bar>
<afx-tab-bar closable="true" data-height="26" data-id = "right-tabbar"></afx-tab-bar>
<div data-id="right-editorarea"></div>
</afx-vbox>
</afx-hbox>
<afx-resizer data-height = "3" dir = "ve" attachnext = "true" ></afx-resizer>
<afx-tab-container data-id = "bottombar" data-height="150" min-height="150" tabbarheight= "35">
<afx-tab-container data-id = "bottombar" data-height="150" min-height="150" tabbarheight= "22">
<afx-hbox tabname="__(Output)" iconclass = "fa fa-file-text" class = "bottom-tab-content">
<afx-button text = "" data-id="logger-clear" iconclass="fa fa-trash" data-width="21"></afx-button>
<div data-id="output-tab" iconclass = "fa fa-file-text" >

View File

@ -1,22 +0,0 @@
# Antedit
Simple yet powerful text/code editor based on the Monaco editor,
the editor that powers VS Code.
The editor functionality can be extended by its extension mechanism.
Extension can be developed/released/isntalled by the editor itself.
### Change logs
- 0.2.3-b: Minor changes to adapt the core UI to the new AntOS 2.0.x
- 0.2.3-b: Allow reload current file via context menu in case of external changes
- 0.2.2-b: Support horizotal scrolling on horizotal tabbars
- 0.2.1-b: Add open file to right, editor actions are only attached to code editor
- 0.2.0-b: Support diff mode in editor + fix new Monaco version compatible bug
- 0.1.17-b: Fix extension keybinding bug with the new monaco editor
- 0.1.16-b: use the new version of monaco editor
- 0.1.14-b: improve output log display
- 0.1.13-b: Allow file upload in file view, add menu context in tabbar
- 0.1.12-b: fix recent files not adding correctly
- 0.1.11-b: fix file type parsing from path
- 0.1.10-b: Antedit now has it own extension manager
- 0.1.9-a: Allow output text selection
- 0.1.8-a: Allow to change language mode
- 0.1.7-a: Add keyboard shortcut support to extension actions

View File

@ -1,19 +0,0 @@
(function() {
// import the CodePad application module
const App = this.OS.application.Antedit;
// define the extension
App.extensions.{0} = class {0} extends App.EditorBaseExtension {
constructor(app) {
super("{0}",app);
}
test() {
return this.notify("Test action is invoked");
}
cleanup() {}
};
}).call(this);

View File

@ -1,15 +0,0 @@
{
"javascripts": ["{0}.js"],
"copies": [],
"meta": {
"name": "{0}",
"text": "{0}",
"version": "0.0.1-a",
"actions" : [
{
"text": "__(Example action)",
"name": "test"
}
]
}
}

View File

@ -1,33 +0,0 @@
[
{
"name": "EditorExtensionMaker",
"text": "Antedit Extension",
"version": "0.0.1-a",
"actions" : [
{
"text": "__(New Extension)",
"name": "create"
},
{
"text": "__(Build)",
"name": "build"
},
{
"text": "__(Run)",
"name": "run"
},
{
"text": "__(Build release)",
"name": "release"
},
{
"text": "__(Install from file)",
"name": "install"
},
{
"text": "__(Install from URL)",
"name": "installFromURL"
}
]
}
]

View File

@ -1,175 +0,0 @@
afx-app-window[data-id = "antedit"] afx-tab-bar> afx-list-view > div.list-container
{
/*border-top: 1px solid #272822;*/
overflow: hidden;
overflow-x: auto;
font-size: 12px;
scrollbar-width: none;
/*scrollbar-color: #656565 transparent;*/
}
afx-app-window[data-id = "antedit"] afx-tab-bar> afx-list-view > div.list-container::-webkit-scrollbar {
height: 0;
}
afx-app-window[data-id = "antedit"] afx-tab-bar> afx-list-view > div.list-container::-webkit-scrollbar-track {
background: transparent;
}
afx-app-window[data-id = "antedit"] afx-tab-bar> afx-list-view > div.list-container::-webkit-scrollbar-thumb {
background-color: #656565;
border: 0;
}
afx-app-window[data-id = "antedit"] afx-tab-bar> afx-list-view > div.list-container > ul
{
width: intrinsic;
width: -moz-max-content;
width: -webkit-max-content;
width: max-content;
}
afx-app-window[data-id = "antedit"] afx-tab-bar> afx-list-view ul afx-list-item:nth-child(even) li.selected,
afx-app-window[data-id = "antedit"] afx-tab-bar> afx-list-view > div.list-container > ul > afx-list-item > li.selected{
background-color:#272822;
color:white;
border: 0;
border-radius: 0;
}
afx-app-window[data-id = "antedit"] afx-tab-bar> afx-list-view afx-list-view i.closable:before {
color:#afafaf;
}
afx-app-window[data-id = "antedit"] afx-tab-bar> afx-list-view ul afx-list-item:nth-child(even) li,
afx-app-window[data-id = "antedit"] afx-tab-bar> afx-list-view > div.list-container > ul li{
background-color:#333333;
color:#afafaf;
border-radius: 0;
border: 0;
border-right: 1px solid #272822;
}
afx-app-window[data-id = "antedit"] afx-tab-bar[data-id="left-tabbar"]> afx-list-view > div.list-container > ul li,
afx-app-window[data-id = "antedit"] afx-tab-bar[data-id="right-tabbar"]> afx-list-view > div.list-container > ul li
{
padding-right: 20px;
}
afx-app-window[data-id = "antedit"] afx-tab-container[data-id="sidebar-tab-container"] afx-tab-bar> afx-list-view > div.list-container {
background-color: #333333;
}
afx-app-window[data-id = "antedit"] afx-tab-container[data-id="sidebar-tab-container"] afx-tab-bar> afx-list-view > div.list-container > ul li{
float: none;
font-size: 20px;
}
afx-app-window[data-id = "antedit"] .afx-window-wrapper afx-vbox[data-id = "sidebar"]{
background-color:#272822;
}
afx-app-window[data-id = "antedit"] div.afx-window-content {
background-color:#333333;
}
afx-app-window[data-id = "antedit"] afx-resizer {
background-color:#272822;
border-right: 1px solid #656565;
border-bottom: 1px solid #656565;
}
afx-app-window[data-id = "antedit"] .bottom-tab-content {
background-color:#272822;
}
afx-app-window[data-id = "antedit"] .afx-window-wrapper afx-tree-view{
color: white;
padding: 0;
}
afx-app-window[data-id = "antedit"] .afx-window-wrapper afx-tree-view afx-tree-view-item ul li{
padding-left: 10px;
}
afx-app-window[data-id = "antedit"] .afx-window-wrapper .afx_tree_item_selected ul{
background-color: #116cd6;
}
afx-app-window[data-id = "antedit"] afx-file-view afx-tree-view .afx-tree-view-item:before{
color: white;
}
afx-app-window[data-id = "antedit"] .afx-window-wrapper div[data-id="statctn"]{
color: white;
background-color: #007acc;
padding-right: 10px;
padding-top: 5px;
font-size: 11px;
}
afx-app-window[data-id = "antedit"] .afx-window-wrapper div[data-id="statctn"] afx-label {
padding-left: 10px;
}
afx-app-window[data-id = "antedit"] div[data-id="output-tab"] {
overflow-y: auto;
overflow-x: hidden;
user-select: text;
}
afx-app-window[data-id = "antedit"] div[data-id="output-tab"] pre {
margin: 3px;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
font-family: monospace;
}
afx-app-window[data-id = "antedit"] div[data-id="output-tab"] pre.code-pad-log-error {
color: red;
}
afx-app-window[data-id = "antedit"] div[data-id="output-tab"] pre.code-pad-log-warn {
color: orange;
}
afx-app-window[data-id = "antedit"] div[data-id="output-tab"] pre.code-pad-log-info {
color: white;
}
afx-app-window[data-id = "antedit"] afx-button[ data-id="logger-clear" ] button{
border: 0;
background: transparent;
}
afx-app-window[data-id = "antedit"] afx-antedit-ext-list-item {
color: white !important;
}
afx-app-window[data-id = "antedit"] afx-antedit-ext-list-item afx-label i.label-text{
font-weight: bold !important;
}
afx-app-window[data-id = "antedit"] afx-antedit-ext-list-item p {
margin: 0;
padding: 0;
padding-left:15px;
font-size: 11px;
}
afx-app-window[data-id = "antedit"] afx-antedit-ext-list-item p[data-id="ext-list-item-b-p"] {
text-align: right;
font-size: 11px;
}
afx-app-window[data-id = "antedit"] afx-antedit-ext-list-item > li {
background-color: transparent !important;
padding-right: 5px !important;
}
afx-app-window[data-id = "antedit"] afx-antedit-ext-list-item > li.selected {
background-color: #116cd6 !important;
}
afx-app-window[data-id = "antedit"] afx-antedit-ext-list-item button {
height: 22px;
width: 24px;
padding: 0 !important;
}
afx-app-window[data-id = "antedit"] input[data-id="txt_ext_search"] {
background-color: transparent;
border-radius: 0;
border-color: #333;
color: white;
}

File diff suppressed because one or more lines are too long

View File

@ -1,89 +0,0 @@
{
"pkgname": "Antedit",
"app": "Antedit",
"name": "Antos Editor",
"description": "Antos text/code editor",
"info": {
"author": "Xuan Sang LE",
"email": "mrsang@iohub.dev"
},
"version": "0.2.4-b",
"category": "Development",
"iconclass": "bi bi-journal-code",
"mimes": [
"text/.*",
"[^/]*/json.*",
"[^/]*/.*ml",
"[^/]*/javascript",
"dir"
],
"dependencies": [
"MonacoCore@0.33.0-r"
],
"locale": {
"en_GB": {
"Output": "Output",
"Close tab": "Close tab",
"Close without saving ?": "Close without saving ?",
"Unable to open: {0}": "Unable to open: {0}",
"Unable to save file: {0}": "Unable to save file: {0}",
"Save as": "Save as",
"New extension at": "New extension at",
"Select extension archive": "Select extension archive",
"Current folder is not found": "Current folder is not found",
"Select build directory": "Select build directory",
"Unable to read meta-data": "Unable to read meta-data",
"ExtensionName": "ExtensionName",
"Files generated in {0}": "Files generated in {0}",
"Unable to build extension:{0}": "Unable to build extension:{0}",
"Unable to read meta-data:{0}": "Unable to read meta-data:{0}",
"Invalid extension meta-data": "Invalid extension meta-data",
"Unable to run extension:{0}": "Unable to run extension:{0}",
"Archive created at {0}": "Archive created at {0}",
"Unable to read meta-data: {0}": "Unable to read meta-data: {0}",
"Extension installed": "Extension installed",
"Unable to install extension: {0}": "Unable to install extension: {0}",
"Enter URI": "Enter URI",
"Please enter extension URI:": "Please enter extension URI:",
"Unable to create extension directories: {0}": "Unable to create extension directories: {0}",
"New file": "New file",
"New folder": "New folder",
"Rename": "Rename",
"Delete": "Delete",
"File name": "File name",
"Folder name": "Folder name",
"Quit": "Quit",
"View": "View",
"Toggle bottom bar": "Toggle bottom bar",
"Toggle split view": "Toggle split view",
"Unable to move file/folder": "Unable to move file/folder",
"Editor": "Editor",
"Change language mode": "Change language mode",
"Select language": "Select language",
"Unable to disable split view: Please save changes of modified files on the right panel": "Unable to disable split view: Please save changes of modified files on the right panel",
"File": "File",
"New": "New",
"Open Recent": "Open Recent",
"Open": "Open",
"Open Folder": "Open Folder",
"Save": "Save",
"Fail to create: {0}": "Fail to create: {0}",
"Fail to rename: {0}": "Fail to rename: {0}",
"Fail to delete: {0}": "Fail to delete: {0}",
"Open file": "Open file",
"Open folder": "Open folder",
"Cannot load extension meta data": "Cannot load extension meta data",
"unable to load extension: {0}": "unable to load extension: {0}",
"Unable to find extension: {0}": "Unable to find extension: {0}",
"Unable to find action: {0}": "Unable to find action: {0}",
"Unable to preload extension": "Unable to preload extension",
"Example action": "Example action",
"New Extension": "New Extension",
"Build": "Build",
"Run": "Run",
"Build release": "Build release",
"Install extension from file": "Install extension from file",
"Install extension from URL": "Install extension from URL"
}
}
}

View File

@ -1,54 +0,0 @@
<afx-app-window apptitle="Antos Editor" width="600" height="400" data-id="antedit">
<afx-vbox>
<afx-hbox data-id="wrapper">
<afx-vbox data-width = "200" min-width="200" data-id = "sidebar">
<afx-tab-container data-id="sidebar-tab-container" dir="row" tabbarwidth="40">
<!--File tab-->
<afx-hbox data-height="100%" iconclass="bi bi-files" >
<afx-vbox>
<div data-height="5"></div>
<afx-file-view chdir="false" data-id = "fileview" view="tree" status = "false">
</afx-file-view>
</afx-vbox>
</afx-hbox>
<!--extension tab-->
<afx-hbox data-height="100%" iconclass="bi bi-puzzle" >
<afx-vbox>
<input data-id="txt_ext_search" type="text" data-height="30">
<afx-list-view data-id="extension-list"></afx-list-view>
</afx-vbox>
</afx-hbox>
</afx-tab-container>
</afx-vbox>
<afx-resizer data-width = "3" ></afx-resizer>
<afx-vbox data-id="editor-main-container">
<afx-hbox>
<afx-vbox data-id="left-panel">
<afx-tab-bar closable="true" data-height="35" data-id = "left-tabbar"></afx-tab-bar>
<div data-id="left-editorarea"></div>
</afx-vbox>
<afx-resizer data-width="3"></afx-resizer>
<afx-vbox data-id="right-panel">
<afx-tab-bar closable="true" data-height="35" data-id = "right-tabbar"></afx-tab-bar>
<div data-id="right-editorarea"></div>
</afx-vbox>
</afx-hbox>
<afx-resizer data-height = "3" dir = "ve" attachnext = "true" ></afx-resizer>
<afx-tab-container data-id = "bottombar" data-height="150" min-height="150" tabbarheight= "35">
<afx-hbox tabname="__(Output)" iconclass = "fa fa-file-text" class = "bottom-tab-content">
<afx-button text = "" data-id="logger-clear" iconclass="fa fa-trash" data-width="21"></afx-button>
<div data-id="output-tab" iconclass = "fa fa-file-text" >
</div>
</afx-hbox>
</afx-tab-container>
</afx-vbox>
</afx-hbox>
<div data-height="20" data-id="statctn">
<afx-label text=" " data-id = "current-file-lbl" style="float:left;"></afx-label>
<afx-label data-id="langstat" style="float:right; padding-right: 10px;"></afx-label>
<afx-label data-id="editorstat" style="float:right;"></afx-label>
</div>
</afx-vbox>
</afx-app-window>

Binary file not shown.

View File

@ -43,16 +43,12 @@ afx-app-window[data-id = "antedit"] afx-tab-bar> afx-list-view > div.list-conta
color:#afafaf;
border-radius: 0;
border: 0;
padding-top: 5px;
padding-bottom: 5px;
padding-right: 20px;
border-right: 1px solid #272822;
}
afx-app-window[data-id = "antedit"] afx-tab-bar[data-id="left-tabbar"]> afx-list-view > div.list-container > ul li,
afx-app-window[data-id = "antedit"] afx-tab-bar[data-id="right-tabbar"]> afx-list-view > div.list-container > ul li
{
padding-right: 20px;
}
afx-app-window[data-id = "antedit"] afx-tab-container[data-id="sidebar-tab-container"] afx-tab-bar> afx-list-view > div.list-container {
background-color: #333333;
}

View File

@ -7,7 +7,7 @@
"author": "Xuan Sang LE",
"email": "mrsang@iohub.dev"
},
"version": "0.2.4-b",
"version": "0.2.3-b",
"category": "Development",
"iconclass": "bi bi-journal-code",
"mimes": [

View File

@ -1,7 +1,9 @@
<afx-app-window apptitle="Archive" width="500" height="400" data-id="Archive">
<afx-app-window apptitle="Archive" width="250" height="300" data-id="Archive">
<afx-vbox>
<afx-tree-view data-id="filetree"></afx-tree-view>
<afx-hbox data-height="55" padding="10">
<div data-height="5"></div>
<afx-hbox data-height="30">
<div data-width="10"></div>
<div style="text-align: left;">
<afx-button iconclass="fa fa-plus-circle" data-id="btaradd"></afx-button>
<afx-button iconclass="fa fa-minus-circle" data-id="btardel"></afx-button>
@ -9,6 +11,7 @@
<div style="text-align: right;">
<afx-button text="__(Extract)" data-id="btarxtract"></afx-button>
</div>
<div data-width="10"></div>
</afx-hbox>
</afx-vbox>
</afx-app-window>

View File

@ -1,82 +0,0 @@
{
"name": "Archive",
"targets": {
"init": {
"jobs": [
{
"name": "vfs-mkdir",
"data": [
"build",
"build/debug",
"build/release"
]
}
]
},
"coffee": {
"require": [
"coffee"
],
"jobs": [
{
"name": "coffee-compile",
"data": {
"src": [
"coffees/main.coffee"
],
"dest": "build/debug/main.js"
}
}
]
},
"uglify": {
"require": [
"terser"
],
"jobs": [
{
"name": "terser-uglify",
"data": [
"build/debug/main.js"
]
}
]
},
"copy": {
"jobs": [
{
"name": "vfs-cp",
"data": {
"src": [
"assets/scheme.html",
"package.json",
"README.md",
"css/main.css"
],
"dest": "build/debug"
}
}
]
},
"release": {
"require": [
"zip"
],
"depend": [
"init",
"coffee",
"uglify",
"copy"
],
"jobs": [
{
"name": "zip-mk",
"data": {
"src": "build/debug",
"dest": "build/release/Archive.zip"
}
}
]
}
}
}

View File

@ -1,3 +1,4 @@
afx-app-window[data-id="Archive"] afx-tree-view .afx-tree-view-folder-close:before{
content: "\f07b";
font-family: "FontAwesome";

View File

@ -1,7 +1,9 @@
<afx-app-window apptitle="Archive" width="500" height="400" data-id="Archive">
<afx-app-window apptitle="Archive" width="250" height="300" data-id="Archive">
<afx-vbox>
<afx-tree-view data-id="filetree"></afx-tree-view>
<afx-hbox data-height="55" padding="10">
<div data-height="5"></div>
<afx-hbox data-height="30">
<div data-width="10"></div>
<div style="text-align: left;">
<afx-button iconclass="fa fa-plus-circle" data-id="btaradd"></afx-button>
<afx-button iconclass="fa fa-minus-circle" data-id="btardel"></afx-button>
@ -9,6 +11,7 @@
<div style="text-align: right;">
<afx-button text="__(Extract)" data-id="btarxtract"></afx-button>
</div>
<div data-width="10"></div>
</afx-hbox>
</afx-vbox>
</afx-app-window>

Binary file not shown.

View File

@ -1,23 +0,0 @@
# Blogger
Blackend for my blog at https://blog.iohub.dev
## Change logs
### v0.2.x-a
* Patch 9: Update to use the new MDE library
* Patch 8: Support for antOS 2.0.x
* Patch 7: Fix sendmail API security bug
* Patch 6: Chage libraries load order
* Patch 5: Add user photo to portfolio
* Patch 4: Add package dependencies
* Patch 3: Correct JSON text decoding
* Patch 2: Bug fix rendering content
* Patch 0-1 Important change: Store raw post content to the database instead of base64 string as before
### v0.1.x-a
* Patch 3-4: Enhance youtube video embedding feature in markdown
* Patch 2: CV Category now can be created when database is not created yet
* Patch 1: Fix package archive broken
* Patch 0: Change default email of the sender

View File

@ -1,32 +0,0 @@
local data = ...
-- print(data.content)
local error_msg = {}
local iserror = false
local tmp_name = "/tmp/"..os.time(os.date("!*t"))
local file = io.open (tmp_name , "w")
if file then
file:write("From: mrsang@lxsang.me\n")
file:write("Subject: " .. data.title .. "\n")
file:write( data.content.."\n")
file:close()
for k,v in pairs(data.to) do
print("sent to:"..v)
local to = v
local cmd = 'cat ' ..tmp_name .. '| sendmail ' .. to
--print(cmd)
local r = os.execute(cmd)
if not r then
iserror = true
table.insert(error_msg, v)
print("Unable to send mail to: "..v)
end
end
else
iserror = true
table.insert(error_msg, "Cannot create mail file")
end
local result = {}
result.error = iserror
result.result = error_msg
return result

View File

@ -1,87 +0,0 @@
{
"name": "Blogger",
"targets": {
"init": {
"jobs": [
{
"name": "vfs-mkdir",
"data": [
"build",
"build/debug",
"build/release"
]
}
]
},
"coffee": {
"require": [
"coffee"
],
"jobs": [
{
"name": "coffee-compile",
"data": {
"src": [
"main.coffee",
"dialogs.coffee",
"tags.coffee"
],
"dest": "build/debug/main.js"
}
}
]
},
"uglify": {
"require": [
"terser"
],
"jobs": [
{
"name": "terser-uglify",
"data": [
"build/debug/main.js"
]
}
]
},
"copy": {
"jobs": [
{
"name": "vfs-cp",
"data": {
"src": [
"scheme.html",
"cvsection.html",
"api/sendmail.lua",
"sendmail.html",
"package.json",
"README.md",
"main.css"
],
"dest": "build/debug"
}
}
]
},
"release": {
"require": [
"zip"
],
"depend": [
"init",
"coffee",
"uglify",
"copy"
],
"jobs": [
{
"name": "zip-mk",
"data": {
"src": "build/debug",
"dest": "build/release/Blogger.zip"
}
}
]
}
}
}

View File

@ -1,23 +0,0 @@
# Blogger
Blackend for my blog at https://blog.iohub.dev
## Change logs
### v0.2.x-a
* Patch 9: Update to use the new MDE library
* Patch 8: Support for antOS 2.0.x
* Patch 7: Fix sendmail API security bug
* Patch 6: Chage libraries load order
* Patch 5: Add user photo to portfolio
* Patch 4: Add package dependencies
* Patch 3: Correct JSON text decoding
* Patch 2: Bug fix rendering content
* Patch 0-1 Important change: Store raw post content to the database instead of base64 string as before
### v0.1.x-a
* Patch 3-4: Enhance youtube video embedding feature in markdown
* Patch 2: CV Category now can be created when database is not created yet
* Patch 1: Fix package archive broken
* Patch 0: Change default email of the sender

View File

@ -1,30 +0,0 @@
<afx-app-window data-id = "blogger-cv-sec-win" apptitle="Porforlio section" width="450" height="400">
<afx-vbox padding="5">
<afx-hbox data-height = "30" >
<afx-label data-width= "70" text = "__(Title)"></afx-label>
<input type = "text" name="title" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30" >
<afx-label text = "__(Subtitle)" data-width= "70"></afx-label>
<input type = "text" name="subtitle" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30" >
<afx-label text = "__(Location)" data-width= "70"></afx-label>
<input type = "text" name="location" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30" >
<afx-label text = "__(From)" data-width= "70"></afx-label>
<input type = "text" name="start" input-class = "user-input"></input>
<afx-label text = "To:" style="text-align:center;" data-width= "70"></afx-label>
<input type = "text" name="end" input-class = "user-input"></input>
</afx-hbox>
<afx-label data-height = "30" text = "Content" style = "margin-left:5px;"></afx-label>
<div data-id="editor-container">
<textarea name="content" data-id = "contentarea" ></textarea>
</div>
<div data-height = "35" style="text-align: right;">
<afx-switch data-id = "section-publish" data-width="30"></afx-switch>
<afx-button iconclass = "fa fa-save" data-id = "bt-cv-sec-save" text = "__(Save)"></afx-button>
</div>
</afx-vbox>
</afx-app-window>

View File

@ -1,78 +0,0 @@
afx-app-window[data-id="blogger-win"] afx-hbox[data-id="user-container"] afx-label i.label-text{
font-weight: bold;
}
afx-app-window .lbl-header i.label-text{
font-weight: bold;
}
afx-app-window[data-id="blogger-win"] afx-hbox[data-id="cv-container"] .cat-header{
border-bottom: 1px solid #cbcbcb;
text-align: center;
}
afx-app-window[data-id="blogger-win"] .cv-side-bar-btn
{
text-align: right;
margin: 0;
padding: 0;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] > .list-container > ul .afx-cv-sec-title .label-text{
font-weight: bold;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] afx-blogger-cvsection-item afx-label {
display: block;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] afx-blogger-cvsection-item p {
padding: 0;
margin: 0;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] afx-blogger-cvsection-item .afx-cv-sec-period,
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] afx-blogger-cvsection-item .afx-cv-sec-loc {
text-align: right;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] afx-blogger-cvsection-item afx-cv-sec-content{
text-align: justify;
overflow-wrap: break-word;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] > div.list-container > ul li.selected {
border: 1px solid #116cd6;
background-color: transparent;
border-radius: 5px;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] .closable::before{
content: "\f014";
font-size: 14px;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] .period-end::before{
content: "-";
}
afx-app-window[data-id ='blogger-win'] .editor-toolbar{
background-color: white;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "blog-list"] > div.list-container > ul li afx-label {
display: block;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "blog-list"] > div.list-container > ul .afx-blogpost-title .label-text{
font-weight: bold;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "blog-list"] > div.list-container > ul .blog-dates .label-text{
font-size: 10px;
font-weight: normal;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "blog-list"] > div.list-container > ul li.selected {
background-color: #116cd6;
color:white;
}

File diff suppressed because one or more lines are too long

View File

@ -1,14 +0,0 @@
{
"app":"Blogger",
"name":"Blogging application",
"description":"Backend manager for blogging",
"info":{
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.2.9-a",
"category":"Internet",
"iconclass":"fa fa-book",
"dependencies": ["SimpleMDE@2.18.0-r","Katex@0.11.1-r"],
"mimes":["none"]
}

View File

@ -1,88 +0,0 @@
<afx-app-window data-id = "blogger-win" apptitle="Blogger" width="650" height="500">
<afx-hbox >
<afx-tab-container data-id = "tabcontainer" dir = "row" tabbarwidth= "40">
<afx-hbox data-id="user-container" data-height="100%" iconclass="fa fa-user-circle">
<afx-vbox>
<afx-hbox data-height = "30">
<afx-label data-width= "70" text = "__(Full name)"></afx-label>
<input type = "text" name="fullname" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Address)" data-width= "70"></afx-label>
<input type = "text" name="address" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Phone)" data-width= "70"></afx-label>
<input type = "text" name="Phone" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Email)" data-width= "70"></afx-label>
<input type = "text" name="email" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Url)" data-width= "70"></afx-label>
<input type = "text" name="url" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Photo)" data-width= "70"></afx-label>
<input type = "text" name="photo" data-id="photo" readonly="readonly" input-class = "user-input"></input>
</afx-hbox>
<afx-label data-height = "30" text = "__(Short biblio)"></afx-label>
<textarea name="shortbiblio" input-class = "user-input"></textarea>
<afx-hbox data-height = "35" style="text-align: right;">
<afx-button iconclass = "fa fa-save" data-id = "bt-user-save" text = "__(Save)"></afx-button>
</afx-hbox>
</afx-vbox>
</afx-hbox>
<afx-hbox data-id="cv-container" data-height="100%" iconclass="fa fa-info-circle">
<div data-width="5"></div>
<afx-vbox data-width="150" min-width="100">
<afx-label class="lbl-header" data-height = "23" text = "__(Categories)" iconclass = "fa fa-bars"></afx-label>
<afx-tree-view data-id = "cv-list" ></afx-tree-view>
<div data-height="35" class = "cv-side-bar-btn">
<afx-button data-id = "cv-cat-add" text = "" iconclass = "fa fa-plus-circle"></afx-button>
<afx-button data-id = "cv-cat-del" text = "" iconclass = "fa fa-minus-circle"></afx-button>
<afx-button data-id = "cv-cat-edit" text = "" iconclass = "fa fa-pencil-square-o"></afx-button>
</div>
</afx-vbox>
<afx-resizer data-width = "2"></afx-resizer>
<afx-vbox>
<afx-list-view data-id = "cv-sec-list" ></afx-list-view>
<afx-hbox data-height="35" >
<afx-label data-id = "cv-sec-status"></afx-label>
<div class = "cv-side-bar-btn">
<afx-button data-id = "cv-sec-add" text = "" iconclass = "fa fa-plus-circle"></afx-button>
<afx-button data-id = "cv-sec-edit" text = "" iconclass = "fa fa-pencil-square-o"></afx-button>
<afx-button data-id = "cv-sec-move" text = "" iconclass = "fa fa-exchange"></afx-button>
</div>
</afx-hbox>
</afx-vbox>
<div data-width="5"></div>
</afx-hbox>
<afx-hbox data-id = "blog-container" data-height="100%" iconclass="fa fa-book">
<afx-list-view data-id = "blog-list" min-width="100" data-width="200"></afx-list-view>
<afx-resizer data-width = "3"></afx-resizer>
<afx-vbox>
<div data-id = "editor-container">
<textarea data-id="markarea" ></textarea>
</div>
<afx-label text = "__(Tags)" style="font-weight:bold;" data-height="25" ></afx-label>
<afx-hbox data-height="25">
<input type = "text" data-id = "input-tags" ></input>
<div data-width="5"></div>
<afx-switch data data-id = "blog-publish" data-width="30"></afx-switch>
<div data-width="5"></div>
</afx-hbox>
<div data-height="5"></div>
</afx-vbox>
</afx-hbox>
</afx-tab-container>
</afx-hbox>
</afx-app-window>

View File

@ -1,20 +0,0 @@
<afx-app-window data-id = "blogger-send-mail-win" apptitle="Send mail" width="500" height="400" resizable = "false">
<afx-hbox>
<afx-menu data-width="150" data-id="email-list"></afx-menu>
<afx-resizer data-width="3"></afx-resizer>
<div data-width="5"></div>
<afx-vbox >
<div data-height="5"></div>
<afx-label data-height="20" text = "__(Title)"></afx-label>
<input type = "text" data-height="20" name="title" data-id = "mail-title"></input>
<afx-label data-height = "20" text = "Content" ></afx-label>
<textarea name="content" data-id = "contentarea" ></textarea>
<div data-height="5"></div>
<afx-hbox data-height = "30">
<div></div>
<afx-button iconclass = "fa fa-paper-plane" data-id = "bt-sendmail" data-width="60" text = "__(Send)"></afx-button>
</afx-hbox>
</afx-vbox>
<div data-width="5"></div>
</afx-hbox>
</afx-app-window>

View File

@ -1,32 +0,0 @@
local data = ...
-- print(data.content)
local error_msg = {}
local iserror = false
local tmp_name = "/tmp/"..os.time(os.date("!*t"))
local file = io.open (tmp_name , "w")
if file then
file:write("From: mrsang@lxsang.me\n")
file:write("Subject: " .. data.title .. "\n")
file:write( data.content.."\n")
file:close()
for k,v in pairs(data.to) do
print("sent to:"..v)
local to = v
local cmd = 'cat ' ..tmp_name .. '| sendmail ' .. to
--print(cmd)
local r = os.execute(cmd)
if not r then
iserror = true
table.insert(error_msg, v)
print("Unable to send mail to: "..v)
end
end
else
iserror = true
table.insert(error_msg, "Cannot create mail file")
end
local result = {}
result.error = iserror
result.result = error_msg
return result

Binary file not shown.

View File

@ -1,30 +0,0 @@
<afx-app-window data-id = "blogger-cv-sec-win" apptitle="Porforlio section" width="450" height="400">
<afx-vbox padding="5">
<afx-hbox data-height = "30" >
<afx-label data-width= "70" text = "__(Title)"></afx-label>
<input type = "text" name="title" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30" >
<afx-label text = "__(Subtitle)" data-width= "70"></afx-label>
<input type = "text" name="subtitle" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30" >
<afx-label text = "__(Location)" data-width= "70"></afx-label>
<input type = "text" name="location" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30" >
<afx-label text = "__(From)" data-width= "70"></afx-label>
<input type = "text" name="start" input-class = "user-input"></input>
<afx-label text = "To:" style="text-align:center;" data-width= "70"></afx-label>
<input type = "text" name="end" input-class = "user-input"></input>
</afx-hbox>
<afx-label data-height = "30" text = "Content" style = "margin-left:5px;"></afx-label>
<div data-id="editor-container">
<textarea name="content" data-id = "contentarea" ></textarea>
</div>
<div data-height = "35" style="text-align: right;">
<afx-switch data-id = "section-publish" data-width="30"></afx-switch>
<afx-button iconclass = "fa fa-save" data-id = "bt-cv-sec-save" text = "__(Save)"></afx-button>
</div>
</afx-vbox>
</afx-app-window>

View File

@ -1,189 +0,0 @@
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
# AnTOS Web desktop is is licensed under the GNU General Public
# License v3.0, see the LICENCE file for more information
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU General Public License
#along with this program. If not, see https://www.gnu.org/licenses/.
class BloggerCategoryDialog extends this.OS.GUI.BasicDialog
constructor: () ->
super "BloggerCategoryDialog", BloggerCategoryDialog.scheme
main: () ->
super.main()
@tree = @find "tree"
@txtinput = @find "txtinput"
(@find "bt-ok").onbtclick = (e) =>
sel = @tree.selectedItem
return @notify __("Please select a parent category") unless sel
seldata = sel.data
val = @txtinput.value
return @notify __("Please enter category name") if val is "" and not @data.selonly
return @notify __("Parent can not be the category itself") if @data.cat and @data.cat.id is seldata.id
@handle { p: seldata, value: val } if @handle
@quit()
(@find "bt-cancel").onbtclick = (e) =>
@quit()
if @data and @data.tree
if @data and @data.cat
@txtinput.value = @data.cat.name
if @data.cat.pid is "0"
seldata = @data.tree
else
seldata = @findDataByID @data.cat.pid, @data.tree.nodes
seldata.selected = true if seldata
@tree.data = @data.tree
@tree.expandAll()
# TODO set selected category name
findDataByID: (id, list) ->
for data in list
return data if data.id is id
if data.nodes
@findDataByID id, data.nodes
return undefined
BloggerCategoryDialog.scheme = """
<afx-app-window width='300' height='400'>
<afx-vbox padding="5">
<afx-label text="__(Pick a parent)" data-height="25" class="lbl-header" ></afx-label>
<afx-tree-view data-id="tree" ></afx-tree-view>
<afx-label text="__(Category name)" data-height="25" class="lbl-header" ></afx-label>
<input type="text" data-height="25" data-id = "txtinput"/ >
<afx-hbox data-height = '35'>
<div style=' text-align:right;'>
<afx-button data-id = "bt-ok" text = "__(Ok)"></afx-button>
<afx-button data-id = "bt-cancel" text = "__(Cancel)"></afx-button>
</div>
</afx-hbox>
</afx-vbox>
</afx-app-window>
"""
# This dialog is use for cv section editing
class BloggerCVSectionDiaglog extends this.OS.GUI.BasicDialog
constructor: (parent) ->
file = "#{parent.meta().path}/cvsection.html".asFileHandle()
super "BloggerCVSectionDiaglog", file
main: () ->
super.main()
@editor = new EasyMDE
autoDownloadFontAwesome: false
element: @find "contentarea"
status: false
toolbar: false
($ (@select '[class = "CodeMirror-scroll"]')[0]).css "min-height", "50px"
($ (@select '[class="CodeMirror cm-s-paper CodeMirror-wrap"]')[0]).css "min-height", "50px"
inputs = @select "[input-class='user-input']"
(($ v).val @data.section[v.name] for v in inputs ) if @data and @data.section
@editor.value @data.section.content if @data and @data.section
(@find "section-publish").swon = (if @data and @data.section and Number(@data.section.publish) then true else false)
(@find "bt-cv-sec-save").onbtclick = (e) =>
data = {}
data[v.name] = ($ v).val() for v in inputs
data.content = @editor.value()
return @notify __("Title or content must not be blank") if data.title is "" and data.content is ""
#return @notify "Content must not be blank" if data.content is ""
data.id = @data.section.id if @data and @data.section
val = (@find "section-publish").swon
if val is true
data.publish = 1
else
data.publish = 0
@handle data if @handle
@quit()
@on "resize", () => @resizeContent()
@resizeContent()
resizeContent: () ->
container = @find "editor-container"
children = ($ ".EasyMDEContainer", container).children()
cheight = ($ container).height() - 30
($ children[0]).css("height", cheight + "px")
# this dialog is for send mail
class BloggerSendmailDiaglog extends this.OS.GUI.BasicDialog
constructor: (parent) ->
file = "#{parent.meta().path}/sendmail.html".asFileHandle()
super "BloggerSendmailDiaglog", file
main: () ->
super.main()
@subdb = new @.parent._api.DB("subscribers")
@maillinglist = @find "email-list"
title = (new RegExp "^#+(.*)\n", "g").exec @data.content
(@find "mail-title").value = title[1]
content = (@data.content.substring 0, 500) + "..."
(@find "contentarea").value = BloggerSendmailDiaglog.template.format @data.id, content
@subdb.find {}
.then (d) =>
for v in d
v.text = v.name
v.switch = true
v.checked = true
@maillinglist. items = d
.catch (e) =>
@error __("Cannot fetch subscribers data: {0}", e.toString()), e
(@find "bt-sendmail").onbtclick = (e) =>
items = @maillinglist.items
emails = []
for v in items
if v.checked is true
console.log v.email
emails.push v.email
return @notify __("No email selected") if emails.length is 0
# send the email
data =
path: "#{@parent.path()}/sendmail.lua",
parameters:
to: emails,
title: (@find "mail-title").value,
content: (@find "contentarea").value
@_api.apigateway data, false
.then (d) =>
return @notify __("Unable to send mail to: {0}", d.result.join(", ")) if d.error
@quit()
.catch (e) =>
console.log e
@error __("Error sending mail: {0}", e.toString()), e
BloggerSendmailDiaglog.template = """
Hello,
Xuan Sang LE has just published a new post on his blog: https://blog.lxsang.me/post/id/{0}
==========
{1}
==========
Read the full article via:
https://blog.lxsang.me/post/id/{0}
You receive this email because you have been subscribed to his blog.
Have a nice day,
Sent from Blogger, an AntOS application
"""

View File

@ -1,506 +0,0 @@
# Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
# AnTOS Web desktop is is licensed under the GNU General Public
# License v3.0, see the LICENCE file for more information
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU General Public License
#along with this program. If not, see https://www.gnu.org/licenses/.
class Blogger extends this.OS.application.BaseApplication
constructor: (args) ->
super "Blogger", args
main: () ->
@user = {}
@cvlist = @find "cv-list"
@cvlist.ontreeselect = (d) =>
return unless d
data = d.data.item.data
@CVSectionByCID Number(data.id)
@inputtags = @.find "input-tags"
@bloglist = @find "blog-list"
@seclist = @find "cv-sec-list"
el = @find("photo")
$(el)
.click (e) =>
@openDialog("FileDialog", {
title: __("Select image file"),
mimes: ["image/.*"]
})
.then (d) =>
el.value = d.file.path
.catch (e) => @error __("Unable to get file"), e
@userdb = new @_api.DB("user")
@cvcatdb = new @_api.DB("cv_cat")
@cvsecdb = new @_api.DB("cv_sections")
@blogdb = new @_api.DB("blogs")
@tabcontainer = @find "tabcontainer"
@tabcontainer.ontabselect = (e) =>
@fetchData e.data.container.aid
(@find "bt-user-save").onbtclick = (e) =>
@saveUser()
(@find "cv-cat-add").onbtclick = (e) =>
fn = (tree) =>
@openDialog(new BloggerCategoryDialog(), {
title: __("Add category"),
tree: tree
}).then (d) =>
c =
name: d.value,
pid: d.p.id,
publish: 1
@cvcatdb.save c
.then (r) =>
@refreshCVCat()
.catch (e) => @error __("Cannot add new category"), e
.catch (e) => @error e.toString(), e
@fetchCVCat()
.then (tree) => fn(tree)
.catch (e) =>
data =
text: "Porfolio",
id:"0",
nodes: []
fn(data)
@error __("Unable to fetch categories"), e
(@find "cv-cat-edit").onbtclick = (e) =>
sel = @cvlist.selectedItem
return unless sel
cat = sel.data
return unless cat
@fetchCVCat().then (tree) =>
@openDialog(new BloggerCategoryDialog(), {
title: __("Edit category"),
tree: tree, cat: cat
}).then (d) =>
c =
id: cat.id,
publish: cat.publish,
pid: d.p.id,
name: d.value
@cvcatdb.save c
.then (r) =>
@refreshCVCat()
.catch (e) =>
@error __("Cannot Edit category"), e
.catch (e) => @error __("Unable to fetch categories"), e
(@find "cv-cat-del").onbtclick = (e) =>
sel = @cvlist.selectedItem
return unless sel
cat = sel.data
return unless cat
@openDialog("YesNoDialog", {
title: __("Delete category") ,
iconclass: "fa fa-question-circle",
text: __("Do you really want to delete: {0}?", cat.name)
}).then (d) =>
return unless d
@deleteCVCat cat
.catch (e) => @error e.toString(), e
(@find "cv-sec-add").onbtclick = (e) =>
sel = @cvlist.selectedItem
return unless sel
cat = sel.data
return @notify __("Please select a category") unless cat and cat.id isnt "0"
@openDialog(new BloggerCVSectionDiaglog(@), {
title: __("New section entry for {0}", cat.name)
}).then (d) =>
d.cid = Number cat.id
d.start = Number d.start
d.end = Number d.end
# d.publish = 1
@cvsecdb.save d
.then (r) =>
@CVSectionByCID Number(cat.id)
.catch (e) => @error __("Cannot save section: {0}", e.toString()), e
(@find "cv-sec-move").onbtclick = (e) =>
sel = (@find "cv-sec-list").selectedItem
return @notify __("Please select a section to move") unless sel
sec = sel.data
@fetchCVCat().then (tree) =>
@openDialog(new BloggerCategoryDialog(),{
title: __("Move to"),
tree: tree,
selonly: true
}).then (d) =>
c =
id: sec.id,
cid: d.p.id
@cvsecdb.save c
.then (r) =>
@CVSectionByCID(sec.cid)
(@find "cv-sec-list").unselect()
.catch (e) => @error __("Cannot move section"), e
(@find "cv-sec-edit").onbtclick = (e) =>
sel = (@find "cv-sec-list").selectedItem
return @notify __("Please select a section to edit") unless sel
sec = sel.data
@openDialog(new BloggerCVSectionDiaglog(@), {
title: __("Modify section entry"),
section: sec
}).then (d) =>
d.cid = Number sec.cid
d.start = Number d.start
d.end = Number d.end
#d.publish = Number sec.publish
@cvsecdb.save d
.then (r) =>
@CVSectionByCID Number(sec.cid)
.catch (e) => return @error __("Cannot save section: {0}", e.toString()), e
@seclist.onitemclose = (e) =>
return unless e
data = e.data.item.data
@openDialog("YesNoDialog", {
iconclass: "fa fa-question-circle",
text: __("Do you really want to delete: {0}?", data.title)
}).then (b) =>
return unless b
@cvsecdb.delete data.id
.then (r) =>
@seclist.delete e.data.item
.catch (e) => @error __("Cannot delete the section: {0}", e.toString()), e
return false
@editor = new EasyMDE
element: @find "markarea"
autoDownloadFontAwesome: false
autofocus: true
tabSize: 4
indentWithTabs: true
toolbar: [
{
name: __("New"),
className: "fa fa-file",
action: (e) =>
@bloglist.unselect()
@clearEditor()
},
{
name: __("Save"),
className: "fa fa-save",
action: (e) =>
@saveBlog()
}
, "|", "bold", "italic", "heading", "|", "quote", "code",
"unordered-list", "ordered-list", "|", "link",
"image", "table", "horizontal-rule",
{
name: "image",
className: "fa fa-file-image-o",
action: (e) =>
@openDialog("FileDialog", {
title: __("Select image file"),
mimes: ["image/.*"]
}).then (d) =>
d.file.path.asFileHandle().publish()
.then (r) =>
doc = @editor.codemirror.getDoc()
doc.replaceSelection "![](#{@_api.handle.shared}/#{r.result})"
.catch (e) => @error __("Cannot export file for embedding to text"), e
},
{
name:"Youtube",
className: "fa fa-youtube",
action: (e) =>
doc = @editor.codemirror.getDoc()
doc.replaceSelection "[[youtube:]]"
}
"|",
{
name: __("Preview"),
className: "fa fa-eye no-disable",
action: (e) =>
@previewOn = !@previewOn
EasyMDE.togglePreview e
#/console.log @select ".editor-preview editor-preview-active"
renderMathInElement @find "editor-container"
},
"|",
{
name: __("Send mail"),
className: "fa fa-paper-plane",
action: (e) =>
sel = @bloglist.selectedItem
return @error __("No post selected") unless sel
data = sel.data
@openDialog(new BloggerSendmailDiaglog(@), {
title: __("Send mail"),
content: @editor.value(),
id: data.id
})
.then (d) ->
console.log "Email sent"
}
],
@bloglist.onlistselect = (e) =>
el = @bloglist.selectedItem
return unless el
sel = el.data
return unless sel
@blogdb.get Number(sel.id)
.then (r) =>
@editor.value r.content
@inputtags.value = r.tags
(@find "blog-publish").swon = if Number(r.publish) then true else false
.catch (e) =>
@error __("Cannot fetch the entry content"), e
@bloglist.onitemclose = (e) =>
return unless e
el = e.data.item
data = el.data
@openDialog("YesNoDialog", {
title: __("Delete a post"),
iconclass: "fa fa-question-circle",
text: __("Do you really want to delete this post ?")
}).then (b) =>
return unless b
@blogdb.delete data.id
.then (r) =>
@bloglist.delete el
@bloglist.unselect()
@clearEditor()
return false
@bindKey "CTRL-S", () =>
sel = @tabcontainer.selectedTab
return unless sel and sel.container.aid is "blog-container"
@saveBlog()
@on "resize", () =>
@resizeContent()
@resizeContent()
@loadBlogs()
# @fetchData 0
# USER TAB
fetchData: (idx) ->
switch idx
when "user-container" #user info
@userdb.get null
.then (d) =>
@user = d[0]
inputs = @select "[input-class='user-input']"
($ v).val @user[v.name] for v in inputs
.catch (e) => @error __("Cannot fetch user data"), e
when "cv-container" # category
@refreshCVCat()
else
@loadBlogs()
saveUser:() ->
inputs = @select "[input-class='user-input']"
@user[v.name] = ($ v).val() for v in inputs
return @notify __("Full name must be entered") if not @user.fullname or @user.fullname is ""
#console.log @user
@userdb.save @user
.then (r) =>
return @notify __("User data updated")
.catch (e) => return @error __("Cannot save user data"), e
# PORFOLIO TAB
refreshCVCat: () ->
@fetchCVCat().then (data) =>
@cvlist.data = data
@cvlist.expandAll()
.catch (e) => @error __("Unable to load categories"), e
fetchCVCat: () ->
new Promise (resolve, reject) =>
data =
text: "Porfolio",
id:"0",
nodes: []
cnd =
order:
name: "ASC"
@cvcatdb.find cnd
.then (d) =>
@catListToTree d, data, "0"
resolve data
.catch (e) -> reject __e e
#it = (@cvlist.find "pid", "2")[0]
#@cvlist.set "selectedItem", it
catListToTree: (table, data, id) ->
result = (v for v in table when v.pid is id)
return data.nodes = null if result.length is 0
for v in result
v.nodes = []
v.text = v.name
@catListToTree table, v, v.id
#v.nodes = null if v.nodes.length is 0
data.nodes.push v
deleteCVCat: (cat) ->
me = @
ids = []
func = (c) ->
ids.push c.id
func(v) for v in c.nodes if c.nodes
func(cat)
cond = ({ "=": { cid: v } } for v in ids)
# delete all content
@cvsecdb.delete({ "or": cond }).then (r) =>
cond = ({ "=": { id: v } } for v in ids)
@cvcatdb.delete({ "or": cond }).then (re) =>
@refreshCVCat()
@seclist.data=[]
.catch (e) =>
@error __("Cannot delete the category: {0} [{1}]", cat.name, e.toString()), e
.catch (e) =>
@error __("Cannot delete all content of: {0} [{1}]", cat.name, e.toString()), e
CVSectionByCID: (cid) ->
cond =
exp:
"=":
cid: cid
order:
start: "DESC"
@cvsecdb.find(cond).then (d) =>
items = []
(@find "cv-sec-status").text = __("Found {0} sections", d.length)
for v in d
v.closable = true
v.tag = "afx-blogger-cvsection-item"
v.start = Number(v.start)
v.end = Number(v.end)
v.start = undefined if v.start < 1000
v.end = undefined if v.end < 1000
items.push v
@seclist.data = items
.catch (e) => @error e.toString(), e
# blog
saveBlog: () ->
sel = undefined
selel = @bloglist.selectedItem
sel = selel.data if selel
tags = @inputtags.value
content = @editor.value()
title = (new RegExp "^#+(.*)\n", "g").exec content
return @notify __("Please insert a title in the text: beginning with heading") unless title and title.length is 2
return @notify __("Please enter tags") if tags is ""
d = new Date()
data =
content: content
title: title[1].trim()
tags: tags
ctime: if sel then sel.ctime else d.timestamp()
ctimestr: if sel then sel.ctimestr else d.toString()
utime: d.timestamp()
utimestr: d.toString()
rendered: @process(@editor.options.previewRender(content))
publish: if (@find "blog-publish").swon then 1 else 0
data.id = sel.id if sel
#save the data
@blogdb.save data
.then (r) =>
@loadBlogs()
.catch (e) => @error __("Cannot save blog: {0}", e.toString()), e
process: (text) ->
# find video tag and rendered it
embed = (id) ->
return """
<iframe
class = "embeded-video"
width="560" height="315"
src="https://www.youtube.com/embed/#{id}"
frameborder="0" allow="encrypted-media" allowfullscreen
></iframe>
"""
re = /\[\[youtube:([^\]]*)\]\]/g
replace = []
while (found = re.exec text) isnt null
replace.push found
return text unless replace.length > 0
ret = ""
begin = 0
for it in replace
ret += text.substring begin, it.index
ret += embed(it[1])
begin = it.index + it[0].length
ret += text.substring begin, text.length
#console.log ret
return ret
clearEditor:() ->
@.editor.value ""
@.inputtags.value = ""
(@.find "blog-publish").swon = false
# load blog
loadBlogs: () ->
selidx = -1
el = @bloglist.selectedItem
selidx = $(el).index()
cond =
order:
ctime: "DESC"
fields: [
"id",
"title",
"ctimestr",
"ctime",
"utime",
"utimestr"
]
@blogdb.find cond
.then (r) =>
v.tag = "afx-blogger-post-item" for v in r
@bloglist.data = r
if selidx isnt -1
@bloglist.selected = selidx
else
@clearEditor()
@bloglist.selected = -1
.catch (e) => @error __("No post found: {0}", e.toString()), e
resizeContent: () ->
container = @find "editor-container"
children = ($ ".EasyMDEContainer", container).children()
titlebar = (($ @scheme).find ".afx-window-top")[0]
toolbar = children[0]
statusbar = children[3]
cheight = ($ @scheme).height() - ($ titlebar).height() - ($ toolbar).height() - ($ statusbar).height() - 90
($ children[1]).css("height", cheight + "px")
Blogger.singleton = true
Blogger.dependencies = [
"pkg://SimpleMDE/main.js",
"pkg://SimpleMDE/main.css"
"pkg://Katex/main.js",
"pkg://Katex/main.css",
]
this.OS.register "Blogger", Blogger

View File

@ -1,78 +0,0 @@
afx-app-window[data-id="blogger-win"] afx-hbox[data-id="user-container"] afx-label i.label-text{
font-weight: bold;
}
afx-app-window .lbl-header i.label-text{
font-weight: bold;
}
afx-app-window[data-id="blogger-win"] afx-hbox[data-id="cv-container"] .cat-header{
border-bottom: 1px solid #cbcbcb;
text-align: center;
}
afx-app-window[data-id="blogger-win"] .cv-side-bar-btn
{
text-align: right;
margin: 0;
padding: 0;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] > .list-container > ul .afx-cv-sec-title .label-text{
font-weight: bold;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] afx-blogger-cvsection-item afx-label {
display: block;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] afx-blogger-cvsection-item p {
padding: 0;
margin: 0;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] afx-blogger-cvsection-item .afx-cv-sec-period,
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] afx-blogger-cvsection-item .afx-cv-sec-loc {
text-align: right;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] afx-blogger-cvsection-item afx-cv-sec-content{
text-align: justify;
overflow-wrap: break-word;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] > div.list-container > ul li.selected {
border: 1px solid #116cd6;
background-color: transparent;
border-radius: 5px;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] .closable::before{
content: "\f014";
font-size: 14px;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "cv-sec-list"] .period-end::before{
content: "-";
}
afx-app-window[data-id ='blogger-win'] .editor-toolbar{
background-color: white;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "blog-list"] > div.list-container > ul li afx-label {
display: block;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "blog-list"] > div.list-container > ul .afx-blogpost-title .label-text{
font-weight: bold;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "blog-list"] > div.list-container > ul .blog-dates .label-text{
font-size: 10px;
font-weight: normal;
}
afx-app-window[data-id="blogger-win"] afx-list-view[ data-id = "blog-list"] > div.list-container > ul li.selected {
background-color: #116cd6;
color:white;
}

View File

@ -1,14 +0,0 @@
{
"app":"Blogger",
"name":"Blogging application",
"description":"Backend manager for blogging",
"info":{
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.2.9-a",
"category":"Internet",
"iconclass":"fa fa-book",
"dependencies": ["SimpleMDE@2.18.0-r","Katex@0.11.1-r"],
"mimes":["none"]
}

View File

@ -1,14 +0,0 @@
{
"name": "Blogger",
"css": ["main.css"],
"javascripts": [],
"coffees": ["main.coffee", "dialogs.coffee", "tags.coffee"],
"copies": [
"scheme.html",
"cvsection.html",
"api/sendmail.lua",
"sendmail.html",
"package.json",
"README.md"
]
}

View File

@ -1,88 +0,0 @@
<afx-app-window data-id = "blogger-win" apptitle="Blogger" width="650" height="500">
<afx-hbox >
<afx-tab-container data-id = "tabcontainer" dir = "row" tabbarwidth= "40">
<afx-hbox data-id="user-container" data-height="100%" iconclass="fa fa-user-circle">
<afx-vbox>
<afx-hbox data-height = "30">
<afx-label data-width= "70" text = "__(Full name)"></afx-label>
<input type = "text" name="fullname" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Address)" data-width= "70"></afx-label>
<input type = "text" name="address" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Phone)" data-width= "70"></afx-label>
<input type = "text" name="Phone" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Email)" data-width= "70"></afx-label>
<input type = "text" name="email" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Url)" data-width= "70"></afx-label>
<input type = "text" name="url" input-class = "user-input"></input>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Photo)" data-width= "70"></afx-label>
<input type = "text" name="photo" data-id="photo" readonly="readonly" input-class = "user-input"></input>
</afx-hbox>
<afx-label data-height = "30" text = "__(Short biblio)"></afx-label>
<textarea name="shortbiblio" input-class = "user-input"></textarea>
<afx-hbox data-height = "35" style="text-align: right;">
<afx-button iconclass = "fa fa-save" data-id = "bt-user-save" text = "__(Save)"></afx-button>
</afx-hbox>
</afx-vbox>
</afx-hbox>
<afx-hbox data-id="cv-container" data-height="100%" iconclass="fa fa-info-circle">
<div data-width="5"></div>
<afx-vbox data-width="150" min-width="100">
<afx-label class="lbl-header" data-height = "23" text = "__(Categories)" iconclass = "fa fa-bars"></afx-label>
<afx-tree-view data-id = "cv-list" ></afx-tree-view>
<div data-height="35" class = "cv-side-bar-btn">
<afx-button data-id = "cv-cat-add" text = "" iconclass = "fa fa-plus-circle"></afx-button>
<afx-button data-id = "cv-cat-del" text = "" iconclass = "fa fa-minus-circle"></afx-button>
<afx-button data-id = "cv-cat-edit" text = "" iconclass = "fa fa-pencil-square-o"></afx-button>
</div>
</afx-vbox>
<afx-resizer data-width = "2"></afx-resizer>
<afx-vbox>
<afx-list-view data-id = "cv-sec-list" ></afx-list-view>
<afx-hbox data-height="35" >
<afx-label data-id = "cv-sec-status"></afx-label>
<div class = "cv-side-bar-btn">
<afx-button data-id = "cv-sec-add" text = "" iconclass = "fa fa-plus-circle"></afx-button>
<afx-button data-id = "cv-sec-edit" text = "" iconclass = "fa fa-pencil-square-o"></afx-button>
<afx-button data-id = "cv-sec-move" text = "" iconclass = "fa fa-exchange"></afx-button>
</div>
</afx-hbox>
</afx-vbox>
<div data-width="5"></div>
</afx-hbox>
<afx-hbox data-id = "blog-container" data-height="100%" iconclass="fa fa-book">
<afx-list-view data-id = "blog-list" min-width="100" data-width="200"></afx-list-view>
<afx-resizer data-width = "3"></afx-resizer>
<afx-vbox>
<div data-id = "editor-container">
<textarea data-id="markarea" ></textarea>
</div>
<afx-label text = "__(Tags)" style="font-weight:bold;" data-height="25" ></afx-label>
<afx-hbox data-height="25">
<input type = "text" data-id = "input-tags" ></input>
<div data-width="5"></div>
<afx-switch data data-id = "blog-publish" data-width="30"></afx-switch>
<div data-width="5"></div>
</afx-hbox>
<div data-height="5"></div>
</afx-vbox>
</afx-hbox>
</afx-tab-container>
</afx-hbox>
</afx-app-window>

View File

@ -1,20 +0,0 @@
<afx-app-window data-id = "blogger-send-mail-win" apptitle="Send mail" width="500" height="400" resizable = "false">
<afx-hbox>
<afx-menu data-width="150" data-id="email-list"></afx-menu>
<afx-resizer data-width="3"></afx-resizer>
<div data-width="5"></div>
<afx-vbox >
<div data-height="5"></div>
<afx-label data-height="20" text = "__(Title)"></afx-label>
<input type = "text" data-height="20" name="title" data-id = "mail-title"></input>
<afx-label data-height = "20" text = "Content" ></afx-label>
<textarea name="content" data-id = "contentarea" ></textarea>
<div data-height="5"></div>
<afx-hbox data-height = "30">
<div></div>
<afx-button iconclass = "fa fa-paper-plane" data-id = "bt-sendmail" data-width="60" text = "__(Send)"></afx-button>
</afx-hbox>
</afx-vbox>
<div data-width="5"></div>
</afx-hbox>
</afx-app-window>

View File

@ -1,63 +0,0 @@
Ant = this
class CVSectionListItemTag extends this.OS.GUI.tag.ListViewItemTag
constructor: () ->
super()
ondatachange: () ->
return unless @data
v = @data
nativel = ["content", "start", "end" ]
@closable = v.closable
for k, el of @refs
if v[k] and v[k] isnt ""
if nativel.includes k
$(el).text v[k]
else
el.text = v[k]
reload: () ->
init:() ->
itemlayout: () ->
{ 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", CVSectionListItemTag
class BlogPostListItemTag extends this.OS.GUI.tag.ListViewItemTag
constructor: () ->
super()
ondatachange: (v) ->
return unless @data
v = @data
v.closable = true
@closable = v.closable
@refs.title.text = v.title
@refs.ctimestr.text = __("Created: {0}", v.ctimestr)
@refs.utimestr.text = __("Updated: {0}", v.utimestr)
reload: () ->
init:() ->
itemlayout: () ->
{ 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", BlogPostListItemTag

View File

@ -3,8 +3,6 @@ A back-end tool for my online document hub [https://doc.iohub.dev/antos/](https:
## Change logs
### v0.2.5-a
* Use the new MDE library
### v0.2.3-a
* Chage app category name
### v0.2.1-a

View File

@ -1,83 +0,0 @@
{
"name": "Booklet",
"targets": {
"init": {
"jobs": [
{
"name": "vfs-mkdir",
"data": [
"build",
"build/debug",
"build/release"
]
}
]
},
"coffee": {
"require": [
"coffee"
],
"jobs": [
{
"name": "coffee-compile",
"data": {
"src": [
"coffees/main.coffee",
"coffees/common.coffee"
],
"dest": "build/debug/main.js"
}
}
]
},
"uglify": {
"require": [
"terser"
],
"jobs": [
{
"name": "terser-uglify",
"data": [
"build/debug/main.js"
]
}
]
},
"copy": {
"jobs": [
{
"name": "vfs-cp",
"data": {
"src": [
"assets/scheme.html",
"package.json",
"README.md",
"css/main.css"
],
"dest": "build/debug"
}
}
]
},
"release": {
"require": [
"zip"
],
"depend": [
"init",
"coffee",
"uglify",
"copy"
],
"jobs": [
{
"name": "zip-mk",
"data": {
"src": "build/debug",
"dest": "build/release/Booklet.zip"
}
}
]
}
}
}

View File

@ -3,8 +3,6 @@ A back-end tool for my online document hub [https://doc.iohub.dev/antos/](https:
## Change logs
### v0.2.5-a
* Use the new MDE library
### v0.2.3-a
* Chage app category name
### v0.2.1-a

File diff suppressed because one or more lines are too long

View File

@ -7,9 +7,9 @@
"author": "Xuan Sang LE",
"email": "mrsang@lxsang.me"
},
"version":"0.2.5-a",
"version":"0.2.4-a",
"category":"Office",
"iconclass":"bi bi-journals",
"dependencies": ["SimpleMDE@2.18.0-r","Katex@0.11.1-r"],
"dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"],
"mimes":["dir"]
}

Binary file not shown.

View File

@ -166,7 +166,7 @@ class Booklet extends this.OS.application.BaseApplication
@previewOn = false
@editormux = false
@editor = new EasyMDE
@editor = new SimpleMDE
element: markarea
autoDownloadFontAwesome: false
autofocus: true
@ -232,7 +232,7 @@ class Booklet extends this.OS.application.BaseApplication
name: __("Preview"),
className: "fa fa-eye no-disable",
action: (e) =>
EasyMDE.togglePreview e
SimpleMDE.togglePreview e
#/console.log @select ".editor-preview editor-preview-active"
renderMathInElement @find "mycontainer"
@renderLocalElement()
@ -246,7 +246,7 @@ class Booklet extends this.OS.application.BaseApplication
preview.innerHTML = html
@on "resize", (e) => @resizeContent()
@on "hboxchange", (e) => @resizeContent()
@bindKey "ALT-N", () => @actionFile "#{@name}-New"
@bindKey "ALT-O", () => @actionFile "#{@name}-Open"
@bindKey "CTRL-S", () => @actionFile "#{@name}-Save"
@ -263,12 +263,12 @@ class Booklet extends this.OS.application.BaseApplication
@currentToc.descFile.cache = @editor.value()
resizeContent: () ->
children = ($ ".EasyMDEContainer", @container).children()
children = ($ @container).children()
titlebar = (($ @scheme).find ".afx-window-top")[0]
toolbar = children[0]
statusbar = children[3]
toolbar = children[1]
statusbar = children[4]
cheight = ($ @scheme).height() - ($ titlebar).height() - ($ toolbar).height() - ($ statusbar).height() - 40
($ children[1]).css("height", cheight + "px")
($ children[2]).css("height", cheight + "px")
menu: () ->

View File

@ -7,9 +7,9 @@
"author": "Xuan Sang LE",
"email": "mrsang@lxsang.me"
},
"version":"0.2.5-a",
"version":"0.2.4-a",
"category":"Office",
"iconclass":"bi bi-journals",
"dependencies": ["SimpleMDE@2.18.0-r","Katex@0.11.1-r"],
"dependencies": ["SimpleMDE@1.11.2-r","Katex@0.11.1-r"],
"mimes":["dir"]
}

View File

@ -6,7 +6,6 @@ Clipper use `html2canvas` to capture AntOS desktop or a specific window.
It is able to crop the captured image before saving to a file
## Change logs
* v0.1.4-a minor changes to adapt to new AntOS v2.0.x
* v0.1.3-a change app category
* v0.1.2-a use ALT-S as global shortcut for screen capture
* v0.1.1-a use CTRL-S as global shortcut for screen capture

View File

@ -1,7 +1,7 @@
<afx-app-window apptitle="Clipper" width="500" height="400" data-id="Clipper">
<afx-hbox >
<afx-vbox>
<div data-height="35" data-id="toolbar">
<div data-height="30" data-id="toolbar">
<afx-button data-id="btnCptScreen" text="__(Capture screen)" iconclass="fa fa-camera-retro"></afx-button>
<afx-button data-id="btnCptWindow" text="__(Capture a window)" iconclass="fa fa-window-maximize"></afx-button>
<afx-button data-id="btnCrop" text="__(Crop)" toggle="true" selected="false" iconclass="fa fa-crop"></afx-button>

View File

@ -1,104 +0,0 @@
{
"name": "Clipper",
"targets": {
"init": {
"jobs": [
{
"name": "vfs-mkdir",
"data": [
"build",
"build/debug",
"build/release"
]
}
]
},
"coffee": {
"require": [
"coffee"
],
"jobs": [
{
"name": "coffee-compile",
"data": {
"src": [
"coffees/main.coffee"
],
"dest": "build/debug/coffee-main.js"
}
}
]
},
"cat": {
"jobs": [
{
"name": "vfs-cat",
"data": {
"src": [
"build/debug/coffee-main.js",
"javascripts/html2canvas.js"
],
"dest": "build/debug/main.js"
}
},
{
"name": "vfs-rm",
"data": [
"build/debug/coffee-main.js"
]
}
]
},
"uglify": {
"require": [
"terser"
],
"jobs": [
{
"name": "terser-uglify",
"data": [
"build/debug/main.js"
]
}
]
},
"copy": {
"jobs": [
{
"name": "vfs-cp",
"data": {
"src": [
"assets/scheme.html",
"assets/bg.jpg",
"package.json",
"README.md",
"css/main.css"
],
"dest": "build/debug"
}
}
]
},
"release": {
"require": [
"zip"
],
"depend": [
"init",
"coffee",
"cat",
"uglify",
"copy"
],
"jobs": [
{
"name": "zip-mk",
"data": {
"src": "build/debug",
"dest": "build/release/Clipper.zip"
}
}
]
}
}
}

View File

@ -6,7 +6,6 @@ Clipper use `html2canvas` to capture AntOS desktop or a specific window.
It is able to crop the captured image before saving to a file
## Change logs
* v0.1.4-a minor changes to adapt to new AntOS v2.0.x
* v0.1.3-a change app category
* v0.1.2-a use ALT-S as global shortcut for screen capture
* v0.1.1-a use CTRL-S as global shortcut for screen capture

View File

@ -1,3 +1,4 @@
afx-app-window[data-id = "Clipper"] div[data-id = "wrapper"] {
overflow: auto;
background-image: url("bg.jpg");

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.1.4-a",
"version":"0.1.3-a",
"category":"Utility",
"iconclass":"fa fa-scissors",
"mimes":["none"],

View File

@ -1,7 +1,7 @@
<afx-app-window apptitle="Clipper" width="500" height="400" data-id="Clipper">
<afx-hbox >
<afx-vbox>
<div data-height="35" data-id="toolbar">
<div data-height="30" data-id="toolbar">
<afx-button data-id="btnCptScreen" text="__(Capture screen)" iconclass="fa fa-camera-retro"></afx-button>
<afx-button data-id="btnCptWindow" text="__(Capture a window)" iconclass="fa fa-window-maximize"></afx-button>
<afx-button data-id="btnCrop" text="__(Crop)" toggle="true" selected="false" iconclass="fa fa-crop"></afx-button>

Binary file not shown.

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.1.4-a",
"version":"0.1.3-a",
"category":"Utility",
"iconclass":"fa fa-scissors",
"mimes":["none"],

View File

@ -3,5 +3,4 @@ A simple yet powerful code/text editor.
CodePad is a text editor based on the ACE editor.
## Change logs
- v0.1.6-a: adapt to new AntOS v2.0.x
- v0.1.5-a: CodePad moved out of AntOS based system as regular AntOS package

View File

@ -1,7 +1,34 @@
afx-app-window[data-id = "codepad"] .ace_editor {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container
{
/*border-top: 1px solid #272822;*/
overflow: hidden;
overflow-x: auto;
font-size: 12px;
scrollbar-width: none;
/*scrollbar-color: #656565 transparent;*/
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container::-webkit-scrollbar {
height: 0;
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container::-webkit-scrollbar-track {
background: transparent;
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container::-webkit-scrollbar-thumb {
background-color: #656565;
border: 0;
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container > ul
{
width: intrinsic;
width: -moz-max-content;
width: -webkit-max-content;
width: max-content;
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view ul afx-list-item:nth-child(even) li.selected,
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container > ul > afx-list-item > li.selected{
@ -13,12 +40,14 @@ afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-contai
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view afx-list-view i.closable:before {
color:afafaf;
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view ul .afx-list-item:nth-child(even) li,
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view ul afx-list-item:nth-child(even) li,
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container > ul li{
background-color:#333333;
color:#afafaf;
border-radius: 0;
border: 0;
padding-top: 5px;
padding-bottom: 5px;
padding-right: 20px;
border-right: 1px solid #272822;
}
@ -65,6 +94,48 @@ afx-app-window[data-id = "codepad"] .afx-window-wrapper div[data-id="statctn"] a
padding-left: 10px;
}
afx-app-window[data-id = "cmd-win"] .afx-window-wrapper{
border-radius: 0px;
border: 0;
/*border: 1px solid #37373d;*/
background-color: transparent;
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.65);
}
afx-app-window[data-id = "cmd-win"] .afx-window-wrapper afx-list-view ul afx-list-item:nth-child(even) li
{
background-color: transparent;
}
afx-app-window[data-id = "cmd-win"] .afx-window-wrapper afx-list-view afx-list-item li{
background-color: transparent;
color:#afafaf;
}
afx-app-window[data-id = "cmd-win"] .afx-window-wrapper div.list-container > ul li:hover{
background-color: #37373d;
}
afx-app-window[data-id = "cmd-win"] .afx-window-wrapper afx-list-view ul afx-list-item:nth-child(even) li.selected,
afx-app-window[data-id = "cmd-win"] .afx-window-wrappe dafx-list-viewafx-list-view ul li.selected
{
background-color: #116cd6;
color:white;
}
afx-app-window[data-id = "cmd-win"] .afx-window-top{
height: 0;
border:0;
}
afx-app-window[data-id = "cmd-win"] input{
border: 1px solid #007acc;
border-radius: 0;
font-size: 12px;
color:#afafaf;
background-color:#272822;
padding-left: 5px;
margin: 3px;
}
afx-app-window[data-id = "cmd-win"] .afx-window-content{
background-color:#272822;
}
afx-app-window[data-id = "codepad"] div[data-id="output-tab"] {
overflow-y: auto;

View File

@ -10,17 +10,17 @@
<afx-vbox>
<afx-hbox>
<afx-vbox data-id="left-panel">
<afx-tab-bar closable="true" data-height="35" data-id = "left-tabbar"></afx-tab-bar>
<afx-tab-bar closable="true" data-height="26" data-id = "left-tabbar"></afx-tab-bar>
<div data-id="left-editorarea"></div>
</afx-vbox>
<afx-resizer data-width="3"></afx-resizer>
<afx-vbox data-id="right-panel">
<afx-tab-bar closable="true" data-height="35" data-id = "right-tabbar"></afx-tab-bar>
<afx-tab-bar closable="true" data-height="26" data-id = "right-tabbar"></afx-tab-bar>
<div data-id="right-editorarea"></div>
</afx-vbox>
</afx-hbox>
<afx-resizer data-height = "3" dir = "ve" attachnext = "true" ></afx-resizer>
<afx-tab-container data-id = "bottombar" data-height="150" min-height="150" tabbarheight= "35">
<afx-tab-container data-id = "bottombar" data-height="150" min-height="150" tabbarheight= "22">
<afx-hbox tabname="__(Output)" iconclass = "fa fa-file-text" class = "bottom-tab-content">
<afx-button text = "" data-id="logger-clear" iconclass="fa fa-trash" data-width="21"></afx-button>
<div data-id="output-tab" iconclass = "fa fa-file-text" >

View File

@ -3,5 +3,4 @@ A simple yet powerful code/text editor.
CodePad is a text editor based on the ACE editor.
## Change logs
- v0.1.6-a: adapt to new AntOS v2.0.x
- v0.1.5-a: CodePad moved out of AntOS based system as regular AntOS package

View File

@ -1,7 +1,34 @@
afx-app-window[data-id = "codepad"] .ace_editor {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container
{
/*border-top: 1px solid #272822;*/
overflow: hidden;
overflow-x: auto;
font-size: 12px;
scrollbar-width: none;
/*scrollbar-color: #656565 transparent;*/
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container::-webkit-scrollbar {
height: 0;
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container::-webkit-scrollbar-track {
background: transparent;
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container::-webkit-scrollbar-thumb {
background-color: #656565;
border: 0;
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container > ul
{
width: intrinsic;
width: -moz-max-content;
width: -webkit-max-content;
width: max-content;
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view ul afx-list-item:nth-child(even) li.selected,
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container > ul > afx-list-item > li.selected{
@ -13,12 +40,14 @@ afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-contai
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view afx-list-view i.closable:before {
color:afafaf;
}
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view ul .afx-list-item:nth-child(even) li,
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view ul afx-list-item:nth-child(even) li,
afx-app-window[data-id = "codepad"] afx-tab-bar> afx-list-view > div.list-container > ul li{
background-color:#333333;
color:#afafaf;
border-radius: 0;
border: 0;
padding-top: 5px;
padding-bottom: 5px;
padding-right: 20px;
border-right: 1px solid #272822;
}
@ -65,6 +94,48 @@ afx-app-window[data-id = "codepad"] .afx-window-wrapper div[data-id="statctn"] a
padding-left: 10px;
}
afx-app-window[data-id = "cmd-win"] .afx-window-wrapper{
border-radius: 0px;
border: 0;
/*border: 1px solid #37373d;*/
background-color: transparent;
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.65);
}
afx-app-window[data-id = "cmd-win"] .afx-window-wrapper afx-list-view ul afx-list-item:nth-child(even) li
{
background-color: transparent;
}
afx-app-window[data-id = "cmd-win"] .afx-window-wrapper afx-list-view afx-list-item li{
background-color: transparent;
color:#afafaf;
}
afx-app-window[data-id = "cmd-win"] .afx-window-wrapper div.list-container > ul li:hover{
background-color: #37373d;
}
afx-app-window[data-id = "cmd-win"] .afx-window-wrapper afx-list-view ul afx-list-item:nth-child(even) li.selected,
afx-app-window[data-id = "cmd-win"] .afx-window-wrappe dafx-list-viewafx-list-view ul li.selected
{
background-color: #116cd6;
color:white;
}
afx-app-window[data-id = "cmd-win"] .afx-window-top{
height: 0;
border:0;
}
afx-app-window[data-id = "cmd-win"] input{
border: 1px solid #007acc;
border-radius: 0;
font-size: 12px;
color:#afafaf;
background-color:#272822;
padding-left: 5px;
margin: 3px;
}
afx-app-window[data-id = "cmd-win"] .afx-window-content{
background-color:#272822;
}
afx-app-window[data-id = "codepad"] div[data-id="output-tab"] {
overflow-y: auto;

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
"email": "xsang.le@gmail.com",
"licences": "GPLv3"
},
"version":"0.1.6-b",
"version":"0.1.5-b",
"category":"Development",
"iconclass":"fa fa-pencil-square-o",
"dependencies": ["ACECore@1.4.12-r"],

View File

@ -10,17 +10,17 @@
<afx-vbox>
<afx-hbox>
<afx-vbox data-id="left-panel">
<afx-tab-bar closable="true" data-height="35" data-id = "left-tabbar"></afx-tab-bar>
<afx-tab-bar closable="true" data-height="26" data-id = "left-tabbar"></afx-tab-bar>
<div data-id="left-editorarea"></div>
</afx-vbox>
<afx-resizer data-width="3"></afx-resizer>
<afx-vbox data-id="right-panel">
<afx-tab-bar closable="true" data-height="35" data-id = "right-tabbar"></afx-tab-bar>
<afx-tab-bar closable="true" data-height="26" data-id = "right-tabbar"></afx-tab-bar>
<div data-id="right-editorarea"></div>
</afx-vbox>
</afx-hbox>
<afx-resizer data-height = "3" dir = "ve" attachnext = "true" ></afx-resizer>
<afx-tab-container data-id = "bottombar" data-height="150" min-height="150" tabbarheight= "35">
<afx-tab-container data-id = "bottombar" data-height="150" min-height="150" tabbarheight= "22">
<afx-hbox tabname="__(Output)" iconclass = "fa fa-file-text" class = "bottom-tab-content">
<afx-button text = "" data-id="logger-clear" iconclass="fa fa-trash" data-width="21"></afx-button>
<div data-id="output-tab" iconclass = "fa fa-file-text" >

Binary file not shown.

View File

@ -8,7 +8,7 @@
"email": "xsang.le@gmail.com",
"licences": "GPLv3"
},
"version":"0.1.6-b",
"version":"0.1.5-b",
"category":"Development",
"iconclass":"fa fa-pencil-square-o",
"dependencies": ["ACECore@1.4.12-r"],

View File

@ -320,8 +320,7 @@ namespace OS {
this.bindKey("CTRL-ALT-B", () => this.build());
this.fileview.ondragndrop = (e) => {
//const src = e.data.from.data.path.asFileHandle();
const src = e.data.from[0].data.path.asFileHandle();
const src = e.data.from.data.path.asFileHandle();
const des = e.data.to.data.path;
return src
.move(`${des}/${src.basename}`)
@ -331,12 +330,12 @@ namespace OS {
if (p1.length < p2.length) {
e.data.to.update(p1);
(e.data
.from[0] as GUI.tag.TreeViewTag).parent.update(
.from as GUI.tag.TreeViewTag).parent.update(
p2
);
} else {
(e.data
.from[0] as GUI.tag.TreeViewTag).parent.update(
.from as GUI.tag.TreeViewTag).parent.update(
p2
);
e.data.to.update(p1);

View File

@ -1,15 +0,0 @@
# 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

View File

@ -1,5 +0,0 @@
<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>

View File

@ -1,15 +0,0 @@
# 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

View File

@ -1,54 +0,0 @@
(function() {
var DBDecoder;
DBDecoder = class DBDecoder extends this.OS.application.BaseApplication {
constructor(args) {
super("DBDecoder", args);
}
main() {
var bt;
bt = this.find("decoder");
this.db = new this._api.DB("blogs");
return bt.onbtclick = (e) => {
// decode the database
return this.db.find("1=1").then((data) => {
var i, len, v;
for (i = 0, len = data.length; i < len; i++) {
v = data[i];
v.content = atob(v.content);
v.rendered = atob(v.rendered);
}
return this.saveDB(data).then(() => {
return this.notify("Data base saved");
}).catch((e) => {
return this.error(e.toString(), e);
});
});
};
}
saveDB(list) {
return new Promise((resolve, reject) => {
var record;
if (list.length === 0) {
return resolve();
}
record = list.shift();
return this.db.save(record).then(() => {
return this.saveDB(list).then(() => {
return resolve();
}).catch((e) => {
return reject(__e(e));
});
}).catch((e) => {
return reject(__e(e));
});
});
}
};
this.OS.register("DBDecoder", DBDecoder);
}).call(this);

View File

@ -1,14 +0,0 @@
{
"app":"DBDecoder",
"name":"DBDecoder",
"description":"DBDecoder",
"info":{
"author": "",
"email": ""
},
"version":"0.0.2-a",
"category":"Other",
"iconclass":"fa fa-adn",
"mimes":["none"],
"locale": {}
}

View File

@ -1,5 +0,0 @@
<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>

View File

@ -1,29 +0,0 @@
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

View File

@ -1,14 +0,0 @@
{
"app":"DBDecoder",
"name":"DBDecoder",
"description":"DBDecoder",
"info":{
"author": "",
"email": ""
},
"version":"0.0.2-a",
"category":"Other",
"iconclass":"fa fa-adn",
"mimes":["none"],
"locale": {}
}

View File

@ -1,7 +0,0 @@
{
"name": "DBDecoder",
"css": [],
"javascripts": [],
"coffees": ["coffees/main.coffee"],
"copies": ["assets/scheme.html", "package.json", "README.md"]
}

View File

@ -2,5 +2,4 @@
View and edit files in diff mode
## Change logs
- 0.1.6-a: adapt to new AntOS v2.0.x
- Add dependencies

View File

@ -4,7 +4,7 @@
<afx-file-view data-id="fileview" min-width="150" data-width="150" view="tree" status="false"></afx-file-view>
<afx-resizer data-width="3"></afx-resizer>
<afx-vbox>
<afx-hbox data-height="30">
<afx-hbox data-height="20">
<afx-label data-id="left-file" class="file-label"></afx-label>
<afx-label data-id="right-file" class="file-label"></afx-label>
</afx-hbox>

View File

@ -2,5 +2,4 @@
View and edit files in diff mode
## Change logs
- 0.1.6-a: adapt to new AntOS v2.0.x
- Add dependencies

View File

@ -7,7 +7,7 @@
"author": "",
"edsdmail": ""
},
"version":"0.1.6-a",
"version":"0.1.5-a",
"category":"Development",
"iconclass":"bi bi-file-diff-fill",
"mimes":["none"],

View File

@ -4,7 +4,7 @@
<afx-file-view data-id="fileview" min-width="150" data-width="150" view="tree" status="false"></afx-file-view>
<afx-resizer data-width="3"></afx-resizer>
<afx-vbox>
<afx-hbox data-height="30">
<afx-hbox data-height="20">
<afx-label data-id="left-file" class="file-label"></afx-label>
<afx-label data-id="right-file" class="file-label"></afx-label>
</afx-hbox>

Some files were not shown because too many files have changed in this diff Show More