~phw/discourse-listenbrainz

204a4dde31b76c3dd2108b70eaef8c543690d39d — Philipp Wolfer 4 months ago 2ef23a0
Fixed import for Ember htmlSafe function

For compatibility with latest discourse
M assets/javascripts/discourse/components/listenbrainz-generic-cover.js => assets/javascripts/discourse/components/listenbrainz-generic-cover.js +3 -2
@@ 1,10 1,11 @@
import Component from '@glimmer/component'
import { tracked } from '@glimmer/tracking'
import { action } from "@ember/object"
import { htmlSafe } from "@ember/template"

export default class GenericCoverComponent extends Component {
    @tracked src = null
    @tracked style = Ember.String.htmlSafe('opacity: 0;')
    @tracked style = htmlSafe('opacity: 0;')
    @tracked opacity = 0

    constructor(owner, args) {


@@ 19,6 20,6 @@ export default class GenericCoverComponent extends Component {

    @action
    onLoad() {
        this.style = Ember.String.htmlSafe('opacity: 1;')
        this.style = htmlSafe('opacity: 1;')
    }
}

M assets/javascripts/discourse/components/listenbrainz-profile.js => assets/javascripts/discourse/components/listenbrainz-profile.js +2 -1
@@ 1,5 1,6 @@
import Component from '@glimmer/component'
import { tracked } from '@glimmer/tracking'
import { htmlSafe } from "@ember/template"
import { ajax } from 'discourse/lib/ajax'
import I18n from 'I18n'
import { escapeExpression } from 'discourse/lib/utilities'


@@ 34,7 35,7 @@ export default class ProfileComponent extends Component {
            recording.artist_name, 'artist', artist_mbid)
        const title = wrapMbidLink(
            recording.track_name, 'recording', recording.recording_mbid)
        return Ember.String.htmlSafe(I18n.t('listenbrainz.profile.top_recording', {
        return htmlSafe(I18n.t('listenbrainz.profile.top_recording', {
            artist,
            title,
        }))