Compare commits

2 Commits

Author SHA1 Message Date
23b64bef4a Merge branch 'origin/2.0.x' to master
All checks were successful
gitea-sync/antosdk-apps/pipeline/head This commit looks good
2024-04-29 11:43:45 +02:00
c15318f31b update to latest backend changes 2023-02-17 12:37:26 +01:00
13 changed files with 1 additions and 197 deletions

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,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

@ -1,24 +0,0 @@
afx-app-window[data-id = "Docify"] .header .label-text
{
font-weight: bold;
}
div[data-id = "preview-container"]
{
overflow: auto;
display: block;
}
canvas[data-id = "preview-canvas"]
{
display: block;
margin:0 auto;
}
afx-app-window[data-id = "DocifyPrintDialog"] i.label-text {
font-weight: bold;
}
afx-app-window[data-id = "DocifyPrintDialog"] input[type="radio"] {
margin: 0;
height: 12px;
margin-left: 10px;
}