DEV: Decorate boosted and AI results
This commit is contained in:
parent
775610b1c2
commit
e7a3a50d86
|
@ -5,6 +5,11 @@ export default class SearchResultDecoration extends Component {
|
|||
<template>
|
||||
<div class="ai-result__icon">
|
||||
{{icon "discourse-sparkles"}}
|
||||
<span>AI</span>
|
||||
</div>
|
||||
<div class="boosted-result__icon">
|
||||
{{icon "rocket"}}
|
||||
<span>Boosted</span>
|
||||
</div>
|
||||
</template>
|
||||
}
|
|
@ -4,6 +4,6 @@ export default apiInitializer("1.15.0", (api) => {
|
|||
api.modifyClass("component:search-result-entry", {
|
||||
pluginId: "discourse-ai",
|
||||
|
||||
classNameBindings: ["bulkSelectEnabled", "post.generatedByAI:ai-result"],
|
||||
classNameBindings: ["bulkSelectEnabled", "post.generatedByAI:ai-result", "post.boosted:boosted-result"],
|
||||
});
|
||||
});
|
||||
|
|
|
@ -55,8 +55,13 @@
|
|||
.fps-result {
|
||||
padding: 0.5rem;
|
||||
|
||||
.ai-result__icon {
|
||||
.ai-result__icon, .boosted-result__icon {
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 0.5em;
|
||||
font-size: var(--font-down-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,11 +69,17 @@
|
|||
border-radius: var(--d-border-radius);
|
||||
|
||||
.ai-result__icon {
|
||||
display: inline;
|
||||
margin-right: 0.5rem;
|
||||
margin-left: auto;
|
||||
font-size: var(--font-up-2);
|
||||
display: block;
|
||||
background: var(--tertiary-low);
|
||||
color: var(--tertiary);
|
||||
}
|
||||
}
|
||||
|
||||
.boosted-result {
|
||||
.boosted-result__icon {
|
||||
display: block;
|
||||
color: var(--success);
|
||||
background: var(--success-low);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue