"events" -> "actions"

This commit is contained in:
Johannes
2023-04-14 20:54:57 +02:00
parent 3778ed80d4
commit d470b6576f
9 changed files with 21 additions and 23 deletions

View File

@@ -22,11 +22,9 @@ export default function AddNoCodeEventModalDummy({ open, setOpen }: EventDetailM
<CursorArrowRaysIcon />
</div>
<div>
<div className="text-xl font-medium text-slate-700 dark:text-slate-300">
Add No-Code Event
</div>
<div className="text-xl font-medium text-slate-700 dark:text-slate-300">Add Action</div>
<div className="text-sm text-slate-500">
Create a new no-code event to filter your user base with.
Create a new user action to display surveys when it&apos;s triggered.
</div>
</div>
</div>

View File

@@ -113,7 +113,7 @@ export default function Steps() {
setAddEventModalOpen(true);
}}>
<CursorArrowRaysIcon className="mr-2 h-5 w-5 text-white" />
Add No-Code Event
Add Actions
</Button>
</div>
</div>

View File

@@ -86,7 +86,7 @@ export default function EnvironmentsNavbar({ environmentId, session }: Environme
current: pathname?.includes("/people"),
},
{
name: "Events & Attributes",
name: "Actions & Attributes",
href: `/environments/${environmentId}/events`,
icon: FilterIcon,
current: pathname?.includes("/events") || pathname?.includes("/attributes"),

View File

@@ -85,9 +85,9 @@ export default function AddNoCodeEventModal({
<CursorArrowRaysIcon />
</div>
<div>
<div className="text-xl font-medium text-slate-700">Add Trigger Event</div>
<div className="text-xl font-medium text-slate-700">Add Action</div>
<div className="text-sm text-slate-500">
Create a new trigger event to show the survey at a specific point in the user journey.
Track a user action to display surveys when it&apos;s performed.
</div>
</div>
</div>
@@ -258,7 +258,7 @@ export default function AddNoCodeEventModal({
Cancel
</Button>
<Button variant="primary" type="submit">
Add event
Add Action
</Button>
</div>
</div>

View File

@@ -42,13 +42,13 @@ export default function EventClassesList({ environmentId }) {
setAddEventModalOpen(true);
}}>
<CursorArrowRaysIcon className="mr-2 h-5 w-5 text-white" />
Add No-Code Event
Add Action
</Button>
</div>
<div className="rounded-lg border border-slate-200">
<div className="grid h-12 grid-cols-7 content-center rounded-lg bg-slate-100 text-left text-sm font-semibold text-slate-900">
<div className="col-span-4 pl-6 ">Name</div>
<div className="text-center"># events</div>
<div className="col-span-4 pl-6 ">User Actions</div>
<div className="text-center"># Reps</div>
<div className="text-center">Created</div>
<div className="text-center">
<span className="sr-only">Edit</span>

View File

@@ -62,15 +62,15 @@ export default function EventSettingsTab({ environmentId, eventClassId, setOpen
/>
</div>
<div className="my-6">
<Label>Event Type</Label>
<Label>Action Type</Label>
{eventClass.type === "code" ? (
<p className="text-sm text-slate-600">
This is a code event. Please make changes in your code base.
This is a code action. Please make changes in your code base.
</p>
) : eventClass.type === "noCode" ? (
<div>
<Label className="mb-3 mt-1 block font-normal text-slate-500">
You cannot change the event type. Please add a new event instead.
You cannot change the action type. Please add a new action instead.
</Label>
<RadioGroup defaultValue={eventClass.noCodeConfig.type} className="flex">
<div className="flex items-center space-x-2 rounded-lg bg-slate-50 p-3">
@@ -95,7 +95,7 @@ export default function EventSettingsTab({ environmentId, eventClassId, setOpen
</div>
) : eventClass.type === "automatic" ? (
<p className="text-sm text-slate-600">
This event was created automatically. You cannot make changes to it.
This action was created automatically. You cannot make changes to it.
</p>
) : null}
</div>

View File

@@ -77,7 +77,7 @@ export default function WhenToSendCard({ environmentId, localSurvey, setLocalSur
<div>
<p className="font-semibold text-slate-800">When to ask</p>
<p className="mt-1 truncate text-sm text-slate-500">
Choose the events which trigger the survey.
Choose the actions which trigger the survey.
</p>
</div>
</div>
@@ -99,17 +99,17 @@ export default function WhenToSendCard({ environmentId, localSurvey, setLocalSur
<SelectItem value={eventClass.id}>{eventClass.name}</SelectItem>
))}
<button
className="flex w-full items-center space-x-2 rounded-md p-1 text-sm font-semibold text-slate-800 hover:bg-slate-100 hover:text-slate-500 "
className="flex w-full items-center space-x-2 rounded-md p-1 text-sm font-semibold text-slate-800 hover:bg-slate-100 hover:text-slate-500"
value="none"
onClick={() => {
setAddEventModalOpen(true);
}}>
<PlusIcon className="mr-1 h-5 w-5" />
Create Event
Add Action
</button>
</SelectContent>
</Select>
<p className="mx-2 text-sm">event is triggered</p>
<p className="mx-2 text-sm">action is performed</p>
<button onClick={() => removeTriggerEvent(idx)}>
<TrashIcon className="ml-3 h-4 w-4 text-slate-400" />
</button>

View File

@@ -10,7 +10,7 @@ export default function EventsAttributesTabs({ activeId, environmentId }: Events
const tabs = [
{
id: "events",
label: "Events",
label: "Actions",
icon: <CursorArrowRaysIcon />,
href: `/environments/${environmentId}/events`,
},

View File

@@ -36,12 +36,12 @@ export default function WidgetStatusIndicator({ environmentId, type }: WidgetSta
title: "Not implemented yet.",
subtitle: "Formbricks widget not yet implemented.",
},
running: { icon: CheckIcon, color: "green", title: "Receiving data.", subtitle: "Last event received:" },
running: { icon: CheckIcon, color: "green", title: "Receiving data.", subtitle: "Last action received:" },
issue: {
icon: ExclamationTriangleIcon,
color: "amber",
title: "There might be an issue.",
subtitle: "Last event received:",
subtitle: "Last action received:",
},
};