Sorry I am new to mithril and laravel.
There is some features (like I want to disable downvote in for/gamification for my own forum)
However, tried modifying
vendor/fof/gamification/js/dist
t.add("downvote", M.a.component({
icon: "fas fa-" + a + "-down",
className: "Post-vote Post-downvote",
style: !1 !== e ? "color:" + s.a.forum.data.attributes.themePrimaryColor : "",
// disabled: !o.discussion().canVote(),
disabled: 0 && !o.discussion().canVote(),
onclick: function() {
if (s.a.session.user) {
if (o.discussion().canVote()) {
var t = o.data.relationships.upvotes.data,
a = o.data.relationships.downvotes.data;
e = !e, n = !1, o.save([n, e, "vote"]), t.some(function(o, n) {
if (o.id === s.a.session.user.id()) return t.splice(n, 1), !0
}), a.some(function(t, o) {
if (t.id === s.a.session.user.id()) return a.splice(o, 1), !0
}), e && a.unshift({
type: "users",
id: s.a.session.user.id()
})
}
} else s.a.modal.show(new D.a)
}
and also I tried the command of
php flarum cache:clear
but still the javascript didn't update after ctrl+shift+R
I guess I have to rebuild the js with some command?
Thanks.