added 260907 version of worker toolkit

This commit is contained in:
2026-09-08 20:30:51 -04:00
parent cbd3f0f8ca
commit 97aca37663
1283 changed files with 142951 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
import Ember from 'ember';
const {
get,
computed,
Component,
getProperties,
inject: { service },
computed: {
alias,
},
} = Ember;
export default Component.extend({
tagName: 'a',
classNames: ['emoji-reaction'],
classNameBindings: ['isParticipated'],
emojis: service(),
session: service(),
isParticipated: alias('reaction.participated'),
style: computed('reaction.value', function() {
return get(this, `emojis.styledMap.${get(this, 'reaction.value')}`);
}),
click() {
if(!get(this, 'session.isAuthenticated')) {
return;
}
let { store, reaction } = getProperties(this, 'store', 'reaction');
let {
participated,
reactable_id,
reactable_type,
} = getProperties(reaction, 'participated', 'reactable_id', 'reactable_type');
if (participated) {
reaction
.destroyRecord()
.then(() => store.findRecord(reactable_type.toLowerCase(), reactable_id));
} else {
this.onParticipate(get(reaction, 'value'));
}
},
});