Skip to content

Commit

Permalink
v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ansigroup committed Sep 4, 2019
1 parent 0e657aa commit b4026a6
Show file tree
Hide file tree
Showing 8 changed files with 3,477 additions and 3,292 deletions.
1,170 changes: 8 additions & 1,162 deletions README.md

Large diffs are not rendered by default.

677 changes: 677 additions & 0 deletions README_KR.md

Large diffs are not rendered by default.

605 changes: 605 additions & 0 deletions README_ZH.md

Large diffs are not rendered by default.

2,138 changes: 1,075 additions & 1,063 deletions SimpleAssets.abi

Large diffs are not rendered by default.

2,138 changes: 1,075 additions & 1,063 deletions build/SimpleAssets/SimpleAssets.abi

Large diffs are not rendered by default.

Binary file modified build/SimpleAssets/SimpleAssets.wasm
Binary file not shown.
35 changes: 33 additions & 2 deletions include/SimpleAssets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,24 @@ CONTRACT SimpleAssets : public contract{
* @param stemplate is stringified json with key:state values, where key is key from mdata or idata and
* state indicates recommended way of displaying field:
* url, img, webgl, mp3, video, hide (ie. don't display), etc.
* @param imgpriority is json with assosiation category with tipe of image or video
* Example EOS:img, USD:mp3, KOLOBOK:webglb
* types of image
* txt - default
* url - show as clickable URL
* img - link to img file
* webgl - link to webgl file
* mp3 - link to mp3 file
* video - link to video file
* hide - do not show
* imgb - image as string in binary format
* webglb - webgl binary
* mp3b - mp3 binary
* videob - video binary
*
* @return no return value
*/
ACTION regauthor( name author, string data, string stemplate );
ACTION regauthor( name author, string data, string stemplate, string imgpriority );
using regauthor_action = action_wrapper< "regauthor"_n, &SimpleAssets::regauthor >;

/*
Expand All @@ -76,9 +91,24 @@ CONTRACT SimpleAssets : public contract{
* @param stemplate is stringified json with key:state values, where key is key from mdata or idata and
* state indicates recommended way of displaying field:
* url, img, webgl, mp3, video, hide (ie. don't display), etc.
* @param imgpriority is json with assosiation category with tipe of image or video
* Example EOS:img, USD:mp3, KOLOBOK:webglb
* types of image
* txt - default
* url - show as clickable URL
* img - link to img file
* webgl - link to webgl file
* mp3 - link to mp3 file
* video - link to video file
* hide - do not show
* imgb - image as string in binary format
* webglb - webgl binary
* mp3b - mp3 binary
* videob - video binary
*
* @return no return value.
*/
ACTION authorupdate( name author, string data, string stemplate );
ACTION authorupdate( name author, string data, string stemplate, string imgpriority );
using authorupdate_action = action_wrapper< "authorupdate"_n, &SimpleAssets::authorupdate >;

/*
Expand Down Expand Up @@ -517,6 +547,7 @@ CONTRACT SimpleAssets : public contract{
name author;
string data;
string stemplate;
string imgpriority;

auto primary_key() const {
return author.value;
Expand Down
6 changes: 4 additions & 2 deletions src/SimpleAssets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ACTION SimpleAssets::updatever( string version ) {
configs.set( tokenconfigs{ "simpleassets"_n, version }, _self );
}

ACTION SimpleAssets::regauthor( name author, string data, string stemplate ) {
ACTION SimpleAssets::regauthor( name author, string data, string stemplate, string imgpriority ) {

require_auth( author );
require_recipient( author );
Expand All @@ -19,14 +19,15 @@ ACTION SimpleAssets::regauthor( name author, string data, string stemplate ) {
s.author = author;
s.data = data;
s.stemplate = stemplate;
s.imgpriority = imgpriority;
});
}
else {
check( false, "Registration Error. You're probably already registered. Try the authupdate action." );
}
}

ACTION SimpleAssets::authorupdate( name author, string data, string stemplate ) {
ACTION SimpleAssets::authorupdate( name author, string data, string stemplate, string imgpriority ) {

require_auth( author );
require_recipient( author );
Expand All @@ -41,6 +42,7 @@ ACTION SimpleAssets::authorupdate( name author, string data, string stemplate )
author_.modify( itr, author, [&]( auto& s ) {
s.data = data;
s.stemplate = stemplate;
s.imgpriority = imgpriority;
});
}
}
Expand Down

0 comments on commit b4026a6

Please sign in to comment.