mirror of
https://ghfast.top/https://github.com/discourse/discourse-ai.git
synced 2026-07-16 11:36:23 +08:00
Previously we had some hardcoded markup with scss making a loading indicator wave. This code was being duplicated and used in both semantic search and summarization. We want to add the indicator wave to the AI helper diff modal as well and have the text flashing instead of the loading spinner. To ensure we do not repeat ourselves, in this PR we turn the summary indicator wave into a reusable template only component called: `AiIndicatorWave`. We then apply the usage of that component to semantic search, summarization, and the composer helper modal.
12 lines
313 B
Text
12 lines
313 B
Text
const indicatorDots = [".", ".", "."];
|
|
const AiIndicatorWave = <template>
|
|
{{#if @loading}}
|
|
<span class="ai-indicator-wave">
|
|
{{#each indicatorDots as |dot|}}
|
|
<span class="ai-indicator-wave__dot">{{dot}}</span>
|
|
{{/each}}
|
|
</span>
|
|
{{/if}}
|
|
</template>;
|
|
|
|
export default AiIndicatorWave;
|