Project description
OnePlace is a web-application built on Steem and Golos blockchains. As a basis we took Vue.js with SSR module for frontend and LoopBack for backend. Our project is fully open-source under MIT license.
Technology stack: Node.js, Vue.js, Loopback, Redis, MySQL
Website: https://oneplace.media
Latest release on Github • Installation guide
Added features
Beneficiary whitelist
This feature allows us to drop beneficiary fees for chosen accounts. The accounts are selected by two principles:
- Accounts that are whitelisted in the database.
- Accounts that have voted our app @oneplace as a witness.
Relevant code added to publish extensions:
const extensions = []
if(!account.inWhiteList && !~account.witness_votes.indexOf('oneplace'))
extensions.push([0, {beneficiaries: [{account: this.beneficiarie, weight: 500}]}])
Excluded tags
Sometimes there is a need to prevent some tags from publication in our client whether it's due to content restrictions or to avoid content conflict with other dApps. We have added a blacklist for tags that should be avoided. When trying to add such tag, a notice that the tag is not allowed for publication will be displayed.
Tag input validation was modified by checking for notExcludeTag
condition:
<input
type="text"
class="publish__tags-input input"
:placeholder="$t('publish.typeTagsHere')"
v-validate="'firstIsLetter|lastIsLetterOrDigit|validTag|notExcludeTag|max:64'"
name="tag"
v-show="tags.length < 5"
@keydown.enter.prevent="addTag($event.target)"
>
...
let excludeTags = []
Validator.extend('notExcludeTag', {
getMessage: field => 'Use only letters, digits and one dash',
validate: value => !~excludeTags.indexOf(value)
})
...
// set for check validation
excludeTags = this.$store.state.publish.tags.blackList.map(tag => tag.text)