Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/app/components/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const Select = ({
>
<Combobox.Options
className={cx(
'absolute max-h-60 w-full overflow-auto rounded-b-md bg-white py-1 z-10 text-base shadow-lg outline-0 focus:outline-none sm:text-sm',
'absolute max-h-60 w-auto overflow-auto rounded-b-md bg-white py-1 z-10 text-base shadow-lg outline-0 focus:outline-none sm:text-sm',
label ? 'mt-14' : 'mt-8'
)}
>
Expand Down
9 changes: 8 additions & 1 deletion frontend/app/components/UploadControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { processSVG } from '~/lib/utils.js'
import { triggerColorPresets } from '~/lib/presets.js'

export type UploadControlProps = {
name: string
value: string
setImage: (value: string, color?: string) => void
}

Expand Down Expand Up @@ -35,7 +37,11 @@ const resizeImage = (img: HTMLImageElement, maxSize: number = 100): string => {
return canvas.toDataURL('image/png')
}

export const UploadControl = ({ setImage }: UploadControlProps) => {
export const UploadControl = ({
setImage,
name,
value
}: UploadControlProps) => {
const fileInputRef = useRef<HTMLInputElement>(null)
const defaultColor = triggerColorPresets[0]

Expand Down Expand Up @@ -83,6 +89,7 @@ export const UploadControl = ({ setImage }: UploadControlProps) => {
ref={fileInputRef}
onChange={handleFileChange}
/>
<input type="hidden" name={name} value={value} />
<Button
className="max-h-8"
aria-label="Upload image"
Expand Down
2 changes: 2 additions & 0 deletions frontend/app/components/compositions/ToolConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ const WidgetConfig = ({
}}
/>
<UploadControl
name="widgetTriggerIcon"
value={config?.widgetTriggerIcon}
setImage={(value, color) => {
setToolConfig({
...config,
Expand Down
1 change: 0 additions & 1 deletion frontend/app/lib/message.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const messageStorage = createCookieSessionStorage<
path: '/',
httpOnly: true,
sameSite: 'none',
partitioned: true,
maxAge: ONE_MINUTE_IN_S,
secrets: ['MY_SUPER_SECRET_TOKEN'],
secure: process.env.ENABLE_INSECURE_MESSAGE_COOKIE
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/lib/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ export const widgetControlOptions = [
},
{
value: 'buttonbackground',
label: 'Btn background'
label: 'Button background'
},
{
value: 'buttontext',
label: 'Btn Text'
label: 'Button Text'
},
{
value: 'trigger',
Expand Down
3 changes: 2 additions & 1 deletion frontend/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export default {
width: {
'256': '72rem',
'148': '42rem',
'128': '36rem'
'128': '36rem',
'md': '28rem'
},
height: {
'148': '42rem'
Expand Down