const ProviderProxy = require('riotclient-async-provider-proxy');
const components = ProviderProxy.components;
const computed = components.computed;
components.defineElement('lol-blocked-summoner', {
styles: require('./blocked-summoner.styl'),
computed: {
summonerInfo: computed.if('summoner.name === ""',
computed.resource('/lol-summoner/v1/summoners/{{summoner.id}}')),
name: 'summonerInfo.displayName || summoner.name'
},
unblockFriend: function() {
ProviderProxy.ajax.delete('/lol-chat/v1/blocked-players/' + this.summoner.id).then(() => {
this.sounds.success.play();
});
}
});
|