mirror of
https://github.com/discourse/discourse-solved.git
synced 2026-09-18 07:22:14 -04:00
In https://github.com/discourse/discourse-solved/pull/342 we moved solutions away from topic_custom_fields into proper tables, with the tables as the proper source of truth to a topic's solution. The user's /my/activity/solved route uses user_actions which is not accurate, and a user has reported a bug where their solution is not reflected there (user actions are not a good representation of what a topic's solution is). This commit introduces - a new route to get solutions, and is mindful `hide_user_profiles_from_public` and such settings - also mindful of PMs and private categories - a new template that makes use of the `<UserStream>` to load posts safely and avoid reimplementation
17 lines
492 B
Plaintext
17 lines
492 B
Plaintext
import RouteTemplate from "ember-route-template";
|
|
import EmptyState from "discourse/components/empty-state";
|
|
import UserStream from "discourse/components/user-stream";
|
|
|
|
export default RouteTemplate(
|
|
<template>
|
|
{{#if @controller.model.stream.noContent}}
|
|
<EmptyState
|
|
@title={{@controller.model.emptyState.title}}
|
|
@body={{@controller.model.emptyState.body}}
|
|
/>
|
|
{{else}}
|
|
<UserStream @stream={{@controller.model.stream}} />
|
|
{{/if}}
|
|
</template>
|
|
);
|