Skip to content

Commit

Permalink
Move other images to CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
backspace committed Feb 1, 2024
1 parent 446fc9a commit ac7b4f8
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/host/app/components/ai-assistant/message/index.gts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ import { FailureBordered } from '@cardstack/boxel-ui/icons';

import { type CardDef } from 'https://cardstack.com/base/card-api';

import assistantIcon1x from '../ai-assist-icon.webp';
import assistantIcon2x from '../[email protected]';
import assistantIcon3x from '../[email protected]';

import type { ComponentLike } from '@glint/template';

interface Signature {
Expand Down Expand Up @@ -47,11 +43,7 @@ export default class AiAssistantMessage extends Component<Signature> {
>
<div class='meta'>
{{#if @isFromAssistant}}
{{! template-lint-disable no-inline-styles style-concatenation }}
<div
class='ai-avatar'
style='background-image: image-set(url({{assistantIcon1x}}) 1x, url({{assistantIcon2x}}) 2x, url({{assistantIcon3x}}) 3x)'
></div>
<div class='ai-avatar'></div>
{{else if @profileAvatar}}
<@profileAvatar />
{{/if}}
Expand Down Expand Up @@ -116,6 +108,12 @@ export default class AiAssistantMessage extends Component<Signature> {
.ai-avatar {
width: var(--ai-assistant-message-avatar-size);
height: var(--ai-assistant-message-avatar-size);
background-image: image-set(
url('../ai-assist-icon.webp') 1x,
url('../[email protected]') 2x,
url('../[email protected]')
);
background-repeat: no-repeat;
background-size: var(--ai-assistant-message-avatar-size);
}
Expand Down

0 comments on commit ac7b4f8

Please sign in to comment.