@nyuccl/smile 0.2.0-beta.4 → 0.2.0-beta.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/module.mjs +109 -21
- package/dist/runtime/components/builtins/AdvertisementView.d.vue.ts +13 -1
- package/dist/runtime/components/builtins/AdvertisementView.vue +7 -3
- package/dist/runtime/components/builtins/AdvertisementView.vue.d.ts +13 -1
- package/dist/runtime/components/builtins/DebriefView.vue +3 -1
- package/dist/runtime/components/builtins/DemographicSurveyView.vue +8 -6
- package/dist/runtime/components/builtins/DeviceSurveyView.vue +5 -3
- package/dist/runtime/components/builtins/ExpView.vue +4 -2
- package/dist/runtime/components/builtins/ExperimentStatusBar.vue +3 -0
- package/dist/runtime/components/builtins/FavoriteColor.vue +3 -1
- package/dist/runtime/components/builtins/FavoriteNumber.vue +3 -1
- package/dist/runtime/components/builtins/InformedConsentModal.vue +5 -3
- package/dist/runtime/components/builtins/InformedConsentView.vue +3 -2
- package/dist/runtime/components/builtins/InstructionsQuiz.vue +7 -5
- package/dist/runtime/components/builtins/InstructionsView.vue +5 -3
- package/dist/runtime/components/builtins/LocalDevBanner.vue +16 -0
- package/dist/runtime/components/builtins/MTurkRecruitView.vue +4 -3
- package/dist/runtime/components/builtins/PresentationModeView.vue +9 -8
- package/dist/runtime/components/builtins/StatusBar.vue +7 -4
- package/dist/runtime/components/builtins/StudyPreviewText.vue +12 -10
- package/dist/runtime/components/builtins/TaskFeedbackSurveyView.vue +3 -1
- package/dist/runtime/components/builtins/ThanksView.vue +22 -21
- package/dist/runtime/components/builtins/WindowSizerView.vue +5 -3
- package/dist/runtime/components/builtins/WithdrawModal.vue +9 -7
- package/dist/runtime/components/builtins/WithdrawView.vue +4 -2
- package/dist/runtime/components/dev/RecruitmentChooserView.vue +532 -224
- package/dist/runtime/components/dev/ResponsiveDeviceContainer.vue +17 -8
- package/dist/runtime/components/dev/SmileDevPresentationView.vue +83 -0
- package/dist/runtime/components/dev/console/ConfigList.vue +14 -11
- package/dist/runtime/components/dev/console/ConsoleConfigPanel.vue +28 -7
- package/dist/runtime/components/dev/console/ConsoleDatabaseBrowsePanel.vue +6 -4
- package/dist/runtime/components/dev/console/ConsoleLogPanel.vue +68 -23
- package/dist/runtime/components/dev/console/DatabaseList.vue +9 -7
- package/dist/runtime/components/dev/console/SmileDevConsole.vue +7 -5
- package/dist/runtime/components/dev/devicePresets.d.ts +4 -4
- package/dist/runtime/components/dev/devicePresets.js +4 -4
- package/dist/runtime/components/dev/menu/DevConfigPanel.vue +3 -1
- package/dist/runtime/components/dev/menu/ResponsiveDeviceSelect.vue +1 -0
- package/dist/runtime/components/dev/menu/SmileDevAppMenu.vue +27 -24
- package/dist/runtime/components/dev/navbar/ColorModeButton.vue +5 -3
- package/dist/runtime/components/dev/navbar/DatabaseButtonGroup.vue +8 -6
- package/dist/runtime/components/dev/navbar/FullScreenButton.vue +4 -2
- package/dist/runtime/components/dev/navbar/KeyCommandNotification.vue +1 -1
- package/dist/runtime/components/dev/navbar/PanelButtonGroup.d.vue.ts +3 -0
- package/dist/runtime/components/dev/navbar/PanelButtonGroup.vue +79 -0
- package/dist/runtime/components/dev/navbar/PanelButtonGroup.vue.d.ts +3 -0
- package/dist/runtime/components/dev/navbar/ReloadButton.vue +3 -1
- package/dist/runtime/components/dev/navbar/ResetButton.vue +3 -1
- package/dist/runtime/components/dev/navbar/RouteJumper.vue +9 -5
- package/dist/runtime/components/dev/navbar/SmileDevNavBar.vue +19 -27
- package/dist/runtime/components/dev/navbar/StepInfoButtonGroup.vue +5 -3
- package/dist/runtime/components/dev/navbar/ViewInfoButtonGroup.vue +13 -10
- package/dist/runtime/components/dev/presentation/DarkModeButton.vue +5 -3
- package/dist/runtime/components/dev/presentation/LogoutButton.vue +2 -1
- package/dist/runtime/components/dev/presentation/PresentationModeResetButton.vue +11 -2
- package/dist/runtime/components/dev/presentation/PresentationNavBar.d.vue.ts +13 -1
- package/dist/runtime/components/dev/presentation/PresentationNavBar.vue +13 -6
- package/dist/runtime/components/dev/presentation/PresentationNavBar.vue.d.ts +13 -1
- package/dist/runtime/components/dev/presentation/QRCodeButton.vue +4 -2
- package/dist/runtime/components/dev/sidebar/AppProgressPanel.vue +23 -21
- package/dist/runtime/components/dev/sidebar/ConfigurationVariablesPanel.vue +7 -5
- package/dist/runtime/components/dev/sidebar/DatabaseStatusInfoPanel.vue +27 -7
- package/dist/runtime/components/dev/sidebar/RandomizationSidebarPanel.vue +9 -5
- package/dist/runtime/components/dev/sidebar/SmileDevSideBar.vue +12 -5
- package/dist/runtime/components/dev/sidebar/StepDataViewer.d.vue.ts +2 -2
- package/dist/runtime/components/dev/sidebar/StepDataViewer.vue +1 -1
- package/dist/runtime/components/dev/sidebar/StepDataViewer.vue.d.ts +2 -2
- package/dist/runtime/components/dev/sidebar/StepExplorerPanel.vue +13 -8
- package/dist/runtime/components/dev/sidebar/StepNode.vue +7 -5
- package/dist/runtime/components/dev/sidebar/StudyInfoPanel.vue +3 -2
- package/dist/runtime/components/forms/MonthYearDayPicker.vue +1 -0
- package/dist/runtime/components/layouts/ConstrainedPage.d.vue.ts +1 -1
- package/dist/runtime/components/layouts/ConstrainedPage.vue.d.ts +1 -1
- package/dist/runtime/components/layouts/ConstrainedTaskWindow.d.vue.ts +2 -2
- package/dist/runtime/components/layouts/ConstrainedTaskWindow.vue +1 -1
- package/dist/runtime/components/layouts/ConstrainedTaskWindow.vue.d.ts +2 -2
- package/dist/runtime/components/layouts/TitleTwoCol.d.vue.ts +1 -1
- package/dist/runtime/components/layouts/TitleTwoCol.vue.d.ts +1 -1
- package/dist/runtime/components/layouts/TwoCol.d.vue.ts +1 -1
- package/dist/runtime/components/layouts/TwoCol.vue.d.ts +1 -1
- package/dist/runtime/components/ui/avatar/Avatar.vue +1 -0
- package/dist/runtime/components/ui/avatar/AvatarFallback.vue +1 -0
- package/dist/runtime/components/ui/badge/Badge.vue +1 -0
- package/dist/runtime/components/ui/badge/index.d.ts +1 -1
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.vue +1 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbItem.vue +1 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbLink.vue +1 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbList.vue +1 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbPage.vue +1 -0
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.vue +1 -0
- package/dist/runtime/components/ui/button/Button.vue +1 -0
- package/dist/runtime/components/ui/button/index.d.ts +2 -2
- package/dist/runtime/components/ui/button-group/ButtonGroup.vue +1 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupItem.vue +1 -0
- package/dist/runtime/components/ui/calendar/Calendar.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarCell.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarGrid.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarGridRow.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarHeadCell.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarHeader.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarHeading.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarNextButton.vue +1 -0
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue +1 -0
- package/dist/runtime/components/ui/card/Card.vue +1 -0
- package/dist/runtime/components/ui/card/CardAction.vue +1 -0
- package/dist/runtime/components/ui/card/CardContent.vue +1 -0
- package/dist/runtime/components/ui/card/CardDescription.vue +1 -0
- package/dist/runtime/components/ui/card/CardFooter.vue +1 -0
- package/dist/runtime/components/ui/card/CardHeader.vue +1 -0
- package/dist/runtime/components/ui/card/CardTitle.vue +1 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.d.vue.ts +6 -6
- package/dist/runtime/components/ui/checkbox/Checkbox.vue +1 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.vue.d.ts +6 -6
- package/dist/runtime/components/ui/checkbox/index.d.ts +2 -2
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.d.vue.ts +4 -4
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +4 -4
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.d.vue.ts +3 -3
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +3 -3
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.d.vue.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.d.vue.ts +3 -3
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +3 -3
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +1 -0
- package/dist/runtime/components/ui/input/Input.d.vue.ts +4 -4
- package/dist/runtime/components/ui/input/Input.vue +1 -0
- package/dist/runtime/components/ui/input/Input.vue.d.ts +4 -4
- package/dist/runtime/components/ui/label/Label.vue +1 -0
- package/dist/runtime/components/ui/multiselect/MultiSelect.d.vue.ts +1 -1
- package/dist/runtime/components/ui/multiselect/MultiSelect.vue +1 -0
- package/dist/runtime/components/ui/multiselect/MultiSelect.vue.d.ts +1 -1
- package/dist/runtime/components/ui/pagination/Pagination.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationContent.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationEllipsis.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationFirst.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationItem.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationLast.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationNext.vue +1 -0
- package/dist/runtime/components/ui/pagination/PaginationPrevious.vue +1 -0
- package/dist/runtime/components/ui/popover/PopoverContent.d.vue.ts +2 -2
- package/dist/runtime/components/ui/popover/PopoverContent.vue +1 -0
- package/dist/runtime/components/ui/popover/PopoverContent.vue.d.ts +2 -2
- package/dist/runtime/components/ui/progress/Progress.vue +1 -0
- package/dist/runtime/components/ui/resizable/ResizableHandle.vue +1 -0
- package/dist/runtime/components/ui/resizable/ResizablePanel.d.vue.ts +1 -1
- package/dist/runtime/components/ui/resizable/ResizablePanel.vue.d.ts +1 -1
- package/dist/runtime/components/ui/resizable/ResizablePanelGroup.vue +1 -0
- package/dist/runtime/components/ui/select/Select.d.vue.ts +1 -1
- package/dist/runtime/components/ui/select/Select.vue.d.ts +1 -1
- package/dist/runtime/components/ui/select/SelectContent.d.vue.ts +2 -2
- package/dist/runtime/components/ui/select/SelectContent.vue +1 -0
- package/dist/runtime/components/ui/select/SelectContent.vue.d.ts +2 -2
- package/dist/runtime/components/ui/select/SelectItem.vue +1 -0
- package/dist/runtime/components/ui/select/SelectLabel.vue +1 -0
- package/dist/runtime/components/ui/select/SelectScrollDownButton.vue +1 -0
- package/dist/runtime/components/ui/select/SelectScrollUpButton.vue +1 -0
- package/dist/runtime/components/ui/select/SelectSeparator.vue +1 -0
- package/dist/runtime/components/ui/select/SelectTrigger.vue +1 -0
- package/dist/runtime/components/ui/separator/Separator.vue +1 -0
- package/dist/runtime/components/ui/sheet/SheetContent.d.vue.ts +1 -1
- package/dist/runtime/components/ui/sheet/SheetContent.vue +1 -0
- package/dist/runtime/components/ui/sheet/SheetContent.vue.d.ts +1 -1
- package/dist/runtime/components/ui/sheet/SheetDescription.vue +1 -0
- package/dist/runtime/components/ui/sheet/SheetFooter.vue +1 -0
- package/dist/runtime/components/ui/sheet/SheetHeader.vue +1 -0
- package/dist/runtime/components/ui/sheet/SheetOverlay.vue +1 -0
- package/dist/runtime/components/ui/sheet/SheetTitle.vue +1 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.d.vue.ts +1 -1
- package/dist/runtime/components/ui/sidebar/Sidebar.vue +1 -0
- package/dist/runtime/components/ui/sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/runtime/components/ui/sidebar/SidebarContent.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarFooter.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroup.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupAction.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupContent.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarGroupLabel.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarHeader.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarInput.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarInset.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenu.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuAction.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuBadge.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.d.vue.ts +1 -1
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue.d.ts +1 -1
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.d.vue.ts +1 -1
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +1 -1
- package/dist/runtime/components/ui/sidebar/SidebarMenuItem.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSub.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubButton.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarMenuSubItem.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarProvider.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarRail.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarSeparator.vue +1 -0
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +1 -0
- package/dist/runtime/components/ui/sidebar/index.d.ts +1 -1
- package/dist/runtime/components/ui/skeleton/Skeleton.vue +1 -0
- package/dist/runtime/components/ui/sonner/Sonner.d.vue.ts +4 -4
- package/dist/runtime/components/ui/sonner/Sonner.vue.d.ts +4 -4
- package/dist/runtime/components/ui/stepper/Stepper.vue +1 -0
- package/dist/runtime/components/ui/stepper/StepperDescription.vue +1 -0
- package/dist/runtime/components/ui/stepper/StepperIndicator.vue +1 -0
- package/dist/runtime/components/ui/stepper/StepperItem.d.vue.ts +1 -1
- package/dist/runtime/components/ui/stepper/StepperItem.vue +1 -0
- package/dist/runtime/components/ui/stepper/StepperItem.vue.d.ts +1 -1
- package/dist/runtime/components/ui/stepper/StepperSeparator.vue +1 -0
- package/dist/runtime/components/ui/stepper/StepperTitle.vue +1 -0
- package/dist/runtime/components/ui/stepper/StepperTrigger.vue +1 -0
- package/dist/runtime/components/ui/switch/Switch.d.vue.ts +2 -2
- package/dist/runtime/components/ui/switch/Switch.vue +1 -0
- package/dist/runtime/components/ui/switch/Switch.vue.d.ts +2 -2
- package/dist/runtime/components/ui/switch/index.d.ts +2 -2
- package/dist/runtime/components/ui/table/Table.vue +1 -0
- package/dist/runtime/components/ui/table/TableBody.vue +1 -0
- package/dist/runtime/components/ui/table/TableCaption.vue +1 -0
- package/dist/runtime/components/ui/table/TableCell.vue +1 -0
- package/dist/runtime/components/ui/table/TableEmpty.vue +1 -0
- package/dist/runtime/components/ui/table/TableFooter.vue +1 -0
- package/dist/runtime/components/ui/table/TableHead.vue +1 -0
- package/dist/runtime/components/ui/table/TableHeader.vue +1 -0
- package/dist/runtime/components/ui/table/TableRow.vue +1 -0
- package/dist/runtime/components/ui/tabs/Tabs.vue +1 -0
- package/dist/runtime/components/ui/tabs/TabsContent.d.vue.ts +2 -2
- package/dist/runtime/components/ui/tabs/TabsContent.vue +1 -0
- package/dist/runtime/components/ui/tabs/TabsContent.vue.d.ts +2 -2
- package/dist/runtime/components/ui/tabs/TabsList.d.vue.ts +1 -1
- package/dist/runtime/components/ui/tabs/TabsList.vue +1 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue.d.ts +1 -1
- package/dist/runtime/components/ui/tabs/TabsTrigger.d.vue.ts +2 -2
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue +1 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue.d.ts +2 -2
- package/dist/runtime/components/ui/tags-input/TagsInput.d.vue.ts +3 -3
- package/dist/runtime/components/ui/tags-input/TagsInput.vue +1 -0
- package/dist/runtime/components/ui/tags-input/TagsInput.vue.d.ts +3 -3
- package/dist/runtime/components/ui/tags-input/TagsInputInput.vue +1 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItem.d.vue.ts +2 -2
- package/dist/runtime/components/ui/tags-input/TagsInputItem.vue +1 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItem.vue.d.ts +2 -2
- package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.vue +1 -0
- package/dist/runtime/components/ui/tags-input/TagsInputItemText.vue +1 -0
- package/dist/runtime/components/ui/textarea/Textarea.d.vue.ts +4 -4
- package/dist/runtime/components/ui/textarea/Textarea.vue +1 -0
- package/dist/runtime/components/ui/textarea/Textarea.vue.d.ts +4 -4
- package/dist/runtime/components/ui/toggle/Toggle.d.vue.ts +2 -2
- package/dist/runtime/components/ui/toggle/Toggle.vue +1 -0
- package/dist/runtime/components/ui/toggle/Toggle.vue.d.ts +2 -2
- package/dist/runtime/components/ui/toggle/index.d.ts +1 -1
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.d.vue.ts +2 -2
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue +1 -0
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue.d.ts +2 -2
- package/dist/runtime/components/ui/toggle-group/ToggleGroupItem.vue +1 -0
- package/dist/runtime/components/ui/tooltip/TooltipContent.d.vue.ts +2 -2
- package/dist/runtime/components/ui/tooltip/TooltipContent.vue +1 -0
- package/dist/runtime/components/ui/tooltip/TooltipContent.vue.d.ts +2 -2
- package/dist/runtime/composables/useAPI.d.ts +2 -2
- package/dist/runtime/composables/useAPI.js +6 -11
- package/dist/runtime/composables/useViewAPI.d.ts +1 -0
- package/dist/runtime/composables/useViewAPI.js +20 -4
- package/dist/runtime/composables/useWindowSizer.d.ts +14 -0
- package/dist/runtime/composables/useWindowSizer.js +48 -0
- package/dist/runtime/core/config.d.ts +78 -48
- package/dist/runtime/core/config.js +21 -27
- package/dist/runtime/core/stepper/Stepper.d.ts +13 -10
- package/dist/runtime/core/stepper/Stepper.js +70 -55
- package/dist/runtime/core/stepper/StepperSerializer.js +32 -14
- package/dist/runtime/core/timeline/Timeline.js +1 -2
- package/dist/runtime/css/main.css +1 -1
- package/dist/runtime/css/smile.css +1 -1
- package/dist/runtime/layouts/development.vue +38 -78
- package/dist/runtime/layouts/experiment.d.vue.ts +7 -10
- package/dist/runtime/layouts/experiment.vue +13 -0
- package/dist/runtime/layouts/experiment.vue.d.ts +7 -10
- package/dist/runtime/layouts/presentation.vue +24 -3
- package/dist/runtime/middleware/timeline.global.js +2 -4
- package/dist/runtime/pages/[...slug].vue +2 -0
- package/dist/runtime/pages/dev/[...slug].vue +2 -0
- package/dist/runtime/pages/dev-login.vue +5 -3
- package/dist/runtime/pages/presentation/[...slug].vue +2 -0
- package/dist/runtime/plugins/dev-sync.client.js +0 -2
- package/dist/runtime/plugins/seed.client.js +1 -3
- package/dist/runtime/plugins/store-sync.client.js +8 -10
- package/dist/runtime/public/images/helpus.png +0 -0
- package/dist/runtime/public/images/smile.svg +78 -0
- package/dist/runtime/public/images/universitylogo.png +0 -0
- package/dist/runtime/server/api/auth/login.post.js +11 -2
- package/dist/runtime/server/api/db-info.get.d.ts +5 -0
- package/dist/runtime/server/api/db-info.get.js +10 -0
- package/dist/runtime/server/api/qr.get.js +1 -2
- package/dist/runtime/server/middleware/dev-auth.js +10 -5
- package/dist/runtime/stores/log.js +4 -7
- package/dist/runtime/stores/smilestore.d.ts +161 -1014
- package/dist/runtime/stores/smilestore.js +39 -7
- package/dist/runtime/utils/utils.js +7 -0
- package/package.json +5 -3
- package/dist/runtime/components/dev/navbar/ViewButton.vue +0 -159
- package/dist/runtime/pages/info.vue +0 -462
- /package/dist/runtime/components/{dev/navbar/ViewButton.d.vue.ts → builtins/LocalDevBanner.d.vue.ts} +0 -0
- /package/dist/runtime/components/{dev/navbar/ViewButton.vue.d.ts → builtins/LocalDevBanner.vue.d.ts} +0 -0
- /package/dist/runtime/{pages/info.d.vue.ts → components/dev/SmileDevPresentationView.d.vue.ts} +0 -0
- /package/dist/runtime/{pages/info.vue.d.ts → components/dev/SmileDevPresentationView.vue.d.ts} +0 -0
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
2
|
+
import { ArrowLeft, ArrowRight, Info, Copy, Check, Dices } from "lucide-vue-next";
|
|
3
|
+
import { ref, computed } from "vue";
|
|
4
|
+
import useViewAPI from "../../composables/useViewAPI";
|
|
5
|
+
import useSmileStore from "../../stores/smilestore";
|
|
3
6
|
const api = useViewAPI();
|
|
7
|
+
const store = useSmileStore();
|
|
8
|
+
const config = store.config;
|
|
9
|
+
const dbInfo = ref(null);
|
|
10
|
+
if (import.meta.client) {
|
|
11
|
+
fetch("/api/db-info").then((r) => r.json()).then((data) => {
|
|
12
|
+
dbInfo.value = data;
|
|
13
|
+
}).catch(() => {
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const selectedService = ref(null);
|
|
17
|
+
const baseUrl = computed(() => {
|
|
18
|
+
if (config.deployURL) return config.deployURL.replace(/\/$/, "");
|
|
19
|
+
if (import.meta.client) return window.location.origin;
|
|
20
|
+
return "https://your-app.vercel.app";
|
|
21
|
+
});
|
|
22
|
+
const isDeployed = computed(() => !!config.deployURL);
|
|
4
23
|
const devUrls = computed(() => {
|
|
5
24
|
const urls = {};
|
|
6
25
|
for (const [key, value] of Object.entries(api.urls)) {
|
|
@@ -8,251 +27,540 @@ const devUrls = computed(() => {
|
|
|
8
27
|
}
|
|
9
28
|
return urls;
|
|
10
29
|
});
|
|
30
|
+
const copied = ref("");
|
|
31
|
+
async function copyToClipboard(text, label) {
|
|
32
|
+
try {
|
|
33
|
+
await navigator.clipboard.writeText(text);
|
|
34
|
+
copied.value = label;
|
|
35
|
+
copied.value = label;
|
|
36
|
+
setTimeout(() => {
|
|
37
|
+
copied.value = "";
|
|
38
|
+
}, 2e3);
|
|
39
|
+
} catch {
|
|
40
|
+
const el = document.createElement("textarea");
|
|
41
|
+
el.value = text;
|
|
42
|
+
document.body.appendChild(el);
|
|
43
|
+
el.select();
|
|
44
|
+
document.execCommand("copy");
|
|
45
|
+
document.body.removeChild(el);
|
|
46
|
+
copied.value = label;
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
copied.value = "";
|
|
49
|
+
}, 2e3);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const services = {
|
|
53
|
+
prolific: {
|
|
54
|
+
name: "Prolific",
|
|
55
|
+
buttonLabel: "Prolific",
|
|
56
|
+
buttonClass: "is-blue",
|
|
57
|
+
description: "Prolific.co is a dedicated platform for online behavioral research with high-quality participants.",
|
|
58
|
+
link: "https://www.prolific.co",
|
|
59
|
+
urlNote: 'Prolific appends query parameters automatically. Use the "Study URL" below as your study link in Prolific.',
|
|
60
|
+
studyUrl: computed(() => `${baseUrl.value}/welcome/prolific`),
|
|
61
|
+
setupSteps: [
|
|
62
|
+
'Go to <a href="https://app.prolific.co" target="_blank" class="underline font-medium">app.prolific.co</a> and create a new study.',
|
|
63
|
+
"Set the <strong>Study URL</strong> to the Prolific URL shown below. Prolific will automatically append <code>PROLIFIC_PID</code>, <code>STUDY_ID</code>, and <code>SESSION_ID</code> query parameters.",
|
|
64
|
+
`Under <strong>Study completion</strong>, select "I'll redirect them using a URL". Set the completion URL to: <code>https://app.prolific.co/submissions/complete?cc=YOUR_CODE</code> (SMILE handles this automatically via the Thanks page).`,
|
|
65
|
+
"Set your <strong>Audience</strong> filters (country, language, demographics, etc.).",
|
|
66
|
+
"Set the estimated <strong>completion time</strong> and <strong>reward</strong>. Prolific requires fair pay (currently min ~$8/hr equivalent).",
|
|
67
|
+
"Click <strong>Preview</strong> to test the external study link opens correctly, then <strong>Publish</strong> when ready."
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
cloudresearch: {
|
|
71
|
+
name: "CloudResearch",
|
|
72
|
+
buttonLabel: "CR",
|
|
73
|
+
buttonClass: "is-pink",
|
|
74
|
+
description: "CloudResearch recruits from several sources, including Mechanical Turk but includes some screening for bots and server farms.",
|
|
75
|
+
link: "https://www.cloudresearch.com/",
|
|
76
|
+
urlNote: "CloudResearch appends <code>assignmentId</code>, <code>hitId</code>, <code>turkSubmitTo</code>, and <code>workerId</code> as query parameters.",
|
|
77
|
+
studyUrl: computed(() => `${baseUrl.value}/welcome/cloudresearch`),
|
|
78
|
+
setupSteps: [
|
|
79
|
+
'Go to <a href="https://app.cloudresearch.com" target="_blank" class="underline font-medium">app.cloudresearch.com</a> and create a new study.',
|
|
80
|
+
'Choose <strong>"Survey / External Link"</strong> as your study type.',
|
|
81
|
+
"Set the <strong>Survey URL</strong> to the CloudResearch URL shown below.",
|
|
82
|
+
'Under <strong>Completion Code Settings</strong>, choose "I will generate a unique code". SMILE auto-generates a completion code on the Thanks page that participants copy back.',
|
|
83
|
+
"Configure your <strong>participant requirements</strong> (approval rate, location, etc.).",
|
|
84
|
+
"Set <strong>payment</strong> and <strong>number of participants</strong>.",
|
|
85
|
+
"Use the <strong>Preview</strong> button to verify the link works, then <strong>Launch</strong>."
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
mturk: {
|
|
89
|
+
name: "Mechanical Turk",
|
|
90
|
+
buttonLabel: "AMT",
|
|
91
|
+
buttonClass: "is-yellow",
|
|
92
|
+
extraButtons: true,
|
|
93
|
+
// has AMT Preview Mode button
|
|
94
|
+
description: "Amazon Mechanical Turk is the original wild-west of online crowd labor markets.",
|
|
95
|
+
link: "https://mturk.com",
|
|
96
|
+
urlNote: "MTurk uses an ExternalQuestion HIT type. The URL must be HTTPS. MTurk appends <code>assignmentId</code>, <code>hitId</code>, <code>turkSubmitTo</code>, and <code>workerId</code>.",
|
|
97
|
+
studyUrl: computed(() => `${baseUrl.value}/mturk`),
|
|
98
|
+
setupSteps: [
|
|
99
|
+
`You'll need the <strong>AWS CLI</strong> or a tool like <a href="https://github.com/Mechanical-Turk-Requester" target="_blank" class="underline font-medium">Boto3 (Python)</a> to create ExternalQuestion HITs.`,
|
|
100
|
+
'Create an ExternalQuestion XML pointing to the MTurk URL shown below: <pre class="mt-1 p-2 bg-muted rounded text-xs overflow-x-auto"><ExternalQuestion xmlns="...">\n <ExternalURL>YOUR_MTURK_URL</ExternalURL>\n <FrameHeight>800</FrameHeight>\n</ExternalQuestion></pre>',
|
|
101
|
+
"Create the HIT using <code>create_hit_type</code> and <code>create_hit_with_hit_type</code> (or equivalent).",
|
|
102
|
+
"SMILE handles the MTurk form submission automatically \u2014 when participants finish, the Thanks page posts their completion to <code>turkSubmitTo</code>.",
|
|
103
|
+
"For testing, use the <strong>MTurk Sandbox</strong> (<code>https://workersandbox.mturk.com</code>) before publishing to production.",
|
|
104
|
+
'Monitor HITs via the <a href="https://requester.mturk.com" target="_blank" class="underline font-medium">Requester dashboard</a>.'
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
citizensci: {
|
|
108
|
+
name: "Citizen Science",
|
|
109
|
+
buttonLabel: "CitizenSci",
|
|
110
|
+
buttonClass: "is-green",
|
|
111
|
+
description: "Citizen Science is a stand-in for a possible future platform run by the lab.",
|
|
112
|
+
urlNote: "Parameters <code>CITIZEN_ID</code>, <code>CITIZEN_STUDY_ID</code>, and <code>CITIZEN_SESSION_ID</code> are appended by the referring portal.",
|
|
113
|
+
studyUrl: computed(() => `${baseUrl.value}/welcome/citizensci`),
|
|
114
|
+
setupSteps: [
|
|
115
|
+
"Configure your citizen science portal to link to the URL shown below.",
|
|
116
|
+
"The portal should append <code>CITIZEN_ID</code>, <code>CITIZEN_STUDY_ID</code>, and <code>CITIZEN_SESSION_ID</code> as query parameters to identify participants.",
|
|
117
|
+
"SMILE will read these parameters and store them in the participant's recruitment info.",
|
|
118
|
+
"On completion, participants see a standard Thanks page. Configure your portal to accept the SMILE completion code if needed."
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
sona: {
|
|
122
|
+
name: "SONA",
|
|
123
|
+
buttonLabel: "SONA",
|
|
124
|
+
buttonClass: "is-orange",
|
|
125
|
+
description: 'SONA is a platform for running experiments from the university "for credit" pool of students.',
|
|
126
|
+
urlNote: "SONA appends a <code>survey_code</code> query parameter that is used to grant credit upon completion.",
|
|
127
|
+
studyUrl: computed(() => `${baseUrl.value}/welcome/sona/?survey_code=%SURVEY_CODE%`),
|
|
128
|
+
setupSteps: [
|
|
129
|
+
"Log in to your university's SONA system and create a new <strong>Online External Study</strong>.",
|
|
130
|
+
"Set the <strong>Study URL</strong> to the SONA URL shown below. SONA will automatically replace <code>%SURVEY_CODE%</code> with the participant's unique code.",
|
|
131
|
+
"Under <strong>Study Information</strong>, set the estimated duration and number of credits.",
|
|
132
|
+
"Set your <strong>Participant Restrictions</strong> (prerequisites, disqualifiers, etc.).",
|
|
133
|
+
"Configure the following environment variables in your deployment: <code>VITE_SONA_URL</code> (your SONA domain), <code>VITE_SONA_EXPERIMENT_ID</code>, and <code>VITE_SONA_CREDIT_TOKEN</code>.",
|
|
134
|
+
"SMILE automatically redirects participants back to SONA to grant credit upon completion."
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
sona_paid: {
|
|
138
|
+
name: "SONA Paid",
|
|
139
|
+
buttonLabel: "SONA Paid",
|
|
140
|
+
buttonClass: "is-teal",
|
|
141
|
+
description: "SONA Paid is a platform for running paid experiments from the university pool.",
|
|
142
|
+
urlNote: "Same as SONA credit but uses separate config for paid study completion.",
|
|
143
|
+
studyUrl: computed(() => `${baseUrl.value}/welcome/sona_paid/?survey_code=%SURVEY_CODE%`),
|
|
144
|
+
setupSteps: [
|
|
145
|
+
"Log in to your university's SONA system and create a new <strong>Online External Study</strong> (paid type).",
|
|
146
|
+
"Set the <strong>Study URL</strong> to the SONA Paid URL shown below.",
|
|
147
|
+
"Configure payment amount and study duration.",
|
|
148
|
+
"Configure the following environment variables: <code>VITE_SONA_PAID_URL</code>, <code>VITE_SONA_PAID_EXPERIMENT_ID</code>, and <code>VITE_SONA_PAID_CREDIT_TOKEN</code>.",
|
|
149
|
+
"SMILE automatically redirects participants back to SONA for payment upon completion."
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
spark: {
|
|
153
|
+
name: "SPARK",
|
|
154
|
+
buttonLabel: "SPARK",
|
|
155
|
+
buttonClass: "is-red",
|
|
156
|
+
description: "SPARK is a recruitment service from the Hartley Lab for adolescent participants of various ages.",
|
|
157
|
+
urlNote: "SPARK appends <code>subject_ID</code>, <code>participant_ID</code>, <code>age</code>, and <code>gender</code> as query parameters.",
|
|
158
|
+
studyUrl: computed(() => `${baseUrl.value}/welcome/spark`),
|
|
159
|
+
setupSteps: [
|
|
160
|
+
"Coordinate with the SPARK platform team to register your study.",
|
|
161
|
+
"Provide the SPARK URL shown below as the study link.",
|
|
162
|
+
"SPARK will append participant demographic information (subject ID, participant ID, age, gender) as query parameters.",
|
|
163
|
+
"Upon completion, SMILE redirects participants back to the SPARK completion endpoint."
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
panda: {
|
|
167
|
+
name: "PANDA",
|
|
168
|
+
buttonLabel: "PANDA",
|
|
169
|
+
buttonClass: "is-coral",
|
|
170
|
+
description: "PANDA (Princeton and NYU Discoveries in Action) is a recruitment platform for younger participants.",
|
|
171
|
+
link: "https://www.discoveriesinaction.org",
|
|
172
|
+
urlNote: "PANDA appends an <code>ID</code> query parameter to identify the participant.",
|
|
173
|
+
studyUrl: computed(() => `${baseUrl.value}/welcome/panda`),
|
|
174
|
+
setupSteps: [
|
|
175
|
+
'Register your study with the <a href="https://www.discoveriesinaction.org" target="_blank" class="underline font-medium">PANDA platform</a>.',
|
|
176
|
+
"Provide the PANDA URL shown below as the study link.",
|
|
177
|
+
"PANDA loads studies in dual iframes (mobile/desktop). SMILE automatically detects and handles the hidden iframe.",
|
|
178
|
+
"Note: PANDA clears localStorage on each session start to support families running the study multiple times.",
|
|
179
|
+
"Upon completion, participants see a generic thanks message. No redirect is performed."
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
web: {
|
|
183
|
+
name: "Anonymous Web User",
|
|
184
|
+
buttonLabel: "Anon Web",
|
|
185
|
+
buttonClass: "is-purple",
|
|
186
|
+
description: "Anonymous web user is not referred by any recruitment service.",
|
|
187
|
+
urlNote: "No special query parameters. Share this URL directly.",
|
|
188
|
+
studyUrl: computed(() => `${baseUrl.value}/welcome`),
|
|
189
|
+
setupSteps: [
|
|
190
|
+
"Share the URL shown below via email, social media, QR code, or any other channel.",
|
|
191
|
+
"Participants are assigned a random anonymous ID. No recruitment service metadata is collected.",
|
|
192
|
+
"Since there is no external payment system, you'll need to arrange compensation separately if applicable.",
|
|
193
|
+
"This mode is useful for pilot testing, demos, or unpaid studies."
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
const currentService = computed(() => services[selectedService.value]);
|
|
11
198
|
</script>
|
|
12
199
|
|
|
13
200
|
<template>
|
|
14
|
-
<!-- Main container with responsive padding -->
|
|
15
201
|
<div class="px-4 md:px-8 lg:px-12 pt-10 pb-10 bg-background text-foreground global-color-mode">
|
|
16
|
-
<!--
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
202
|
+
<!-- Detail view for selected service -->
|
|
203
|
+
<template v-if="selectedService && currentService">
|
|
204
|
+
<!-- Back button -->
|
|
205
|
+
<button
|
|
206
|
+
class="inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground mb-6 transition-colors"
|
|
207
|
+
@click="selectedService = null"
|
|
208
|
+
>
|
|
209
|
+
<ArrowLeft class="size-4" />
|
|
210
|
+
Back to all services
|
|
211
|
+
</button>
|
|
26
212
|
|
|
27
|
-
|
|
28
|
-
|
|
213
|
+
<!-- Service header -->
|
|
214
|
+
<div class="mb-6">
|
|
215
|
+
<h1 class="text-2xl font-bold mb-1">
|
|
216
|
+
{{ currentService.name }}
|
|
217
|
+
</h1>
|
|
218
|
+
<p class="text-muted-foreground">
|
|
219
|
+
{{ currentService.description }}
|
|
220
|
+
</p>
|
|
221
|
+
</div>
|
|
29
222
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
size="xs"
|
|
46
|
-
class="is-blue"
|
|
47
|
-
>
|
|
48
|
-
<a :href="devUrls['prolific']"><i-lucide-dices /> Prolific User
|
|
49
|
-
<i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
|
|
50
|
-
</a>
|
|
51
|
-
</Button>
|
|
52
|
-
</CardContent>
|
|
53
|
-
</Card>
|
|
223
|
+
<!-- Test as user button -->
|
|
224
|
+
<div class="mb-6">
|
|
225
|
+
<Button
|
|
226
|
+
as-child
|
|
227
|
+
variant="default"
|
|
228
|
+
size="sm"
|
|
229
|
+
:class="currentService.buttonClass"
|
|
230
|
+
>
|
|
231
|
+
<a :href="devUrls[selectedService]">
|
|
232
|
+
<Dices class="size-4" />
|
|
233
|
+
Test as {{ currentService.name }}
|
|
234
|
+
<ArrowRight class="size-4" />
|
|
235
|
+
</a>
|
|
236
|
+
</Button>
|
|
237
|
+
</div>
|
|
54
238
|
|
|
55
|
-
<!--
|
|
56
|
-
<
|
|
57
|
-
<
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
239
|
+
<!-- Study URL -->
|
|
240
|
+
<div :class="['mb-6 p-4 rounded-md border', isDeployed ? 'bg-muted/50' : 'bg-destructive/5 border-destructive/30']">
|
|
241
|
+
<div class="flex items-center gap-2 mb-1">
|
|
242
|
+
<h3 class="font-semibold">
|
|
243
|
+
Study URL
|
|
244
|
+
</h3>
|
|
245
|
+
</div>
|
|
246
|
+
<template v-if="!isDeployed">
|
|
247
|
+
<p class="text-sm font-medium text-destructive mb-2">
|
|
248
|
+
This is a local development URL and cannot be shared with participants. Deploy your study and navigate to /dev to get a shareable recruitment URL.
|
|
249
|
+
</p>
|
|
250
|
+
</template>
|
|
251
|
+
<p
|
|
252
|
+
class="text-sm text-muted-foreground mb-2"
|
|
253
|
+
v-html="currentService.urlNote"
|
|
254
|
+
/>
|
|
255
|
+
<div class="flex items-center gap-2">
|
|
256
|
+
<code :class="['flex-1 text-sm px-3 py-2 rounded break-all', isDeployed ? 'bg-muted select-all' : 'bg-muted/50 select-none text-muted-foreground line-through']">
|
|
257
|
+
{{ currentService.studyUrl.value }}
|
|
258
|
+
</code>
|
|
65
259
|
<Button
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
class="is-pink"
|
|
260
|
+
v-if="isDeployed"
|
|
261
|
+
variant="outline"
|
|
262
|
+
size="sm"
|
|
263
|
+
@click="copyToClipboard(currentService.studyUrl.value, `study-${selectedService}`)"
|
|
71
264
|
>
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
265
|
+
<Check
|
|
266
|
+
v-if="copied === `study-${selectedService}`"
|
|
267
|
+
class="size-3.5"
|
|
268
|
+
/>
|
|
269
|
+
<Copy
|
|
270
|
+
v-else
|
|
271
|
+
class="size-3.5"
|
|
272
|
+
/>
|
|
273
|
+
{{ copied === `study-${selectedService}` ? 'Copied!' : 'Copy' }}
|
|
75
274
|
</Button>
|
|
76
|
-
</
|
|
77
|
-
</
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
78
277
|
|
|
79
|
-
<!--
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
278
|
+
<!-- Setup Instructions -->
|
|
279
|
+
<h3 class="font-semibold mb-3">
|
|
280
|
+
Setup Instructions
|
|
281
|
+
</h3>
|
|
282
|
+
<ol class="list-decimal list-outside ml-5 space-y-3 text-base text-muted-foreground">
|
|
283
|
+
<li
|
|
284
|
+
v-for="(step, i) in currentService.setupSteps"
|
|
285
|
+
:key="i"
|
|
286
|
+
class="leading-relaxed"
|
|
287
|
+
v-html="step"
|
|
288
|
+
/>
|
|
289
|
+
</ol>
|
|
290
|
+
</template>
|
|
291
|
+
|
|
292
|
+
<!-- Card grid view -->
|
|
293
|
+
<template v-else>
|
|
294
|
+
<div class="mb-6 flex items-start gap-6">
|
|
295
|
+
<!-- Left column: logo + QR -->
|
|
296
|
+
<div class="shrink-0 flex flex-col items-end gap-3">
|
|
297
|
+
<img
|
|
298
|
+
src="/_smile/images/smile.svg"
|
|
299
|
+
alt="SMILE"
|
|
300
|
+
class="w-52"
|
|
95
301
|
>
|
|
302
|
+
<template v-if="isDeployed">
|
|
96
303
|
<a
|
|
97
|
-
href="/
|
|
98
|
-
|
|
99
|
-
|
|
304
|
+
:href="`/api/qr?url=${encodeURIComponent(baseUrl)}`"
|
|
305
|
+
download="qr.svg"
|
|
306
|
+
title="Download QR code"
|
|
307
|
+
>
|
|
308
|
+
<img
|
|
309
|
+
:src="`/api/qr?url=${encodeURIComponent(baseUrl)}`"
|
|
310
|
+
alt="QR Code"
|
|
311
|
+
class="w-24 h-24"
|
|
312
|
+
>
|
|
100
313
|
</a>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
size="xs"
|
|
107
|
-
class="is-yellow"
|
|
108
|
-
>
|
|
109
|
-
<a :href="devUrls['mturk']"><i-lucide-dices /> AMT User
|
|
110
|
-
<i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
|
|
111
|
-
</a>
|
|
112
|
-
</Button>
|
|
113
|
-
</CardContent>
|
|
114
|
-
</Card>
|
|
314
|
+
<p class="text-xs text-muted-foreground text-right">
|
|
315
|
+
Share this QR code with participants. Click to download.
|
|
316
|
+
</p>
|
|
317
|
+
</template>
|
|
318
|
+
</div>
|
|
115
319
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<Button
|
|
126
|
-
id="citizen_tester"
|
|
127
|
-
as-child
|
|
128
|
-
variant="default"
|
|
129
|
-
size="xs"
|
|
130
|
-
class="is-green"
|
|
131
|
-
>
|
|
132
|
-
<a :href="devUrls['citizensci']"><i-lucide-dices /> Citizen Sci User
|
|
133
|
-
<i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
|
|
134
|
-
</a>
|
|
135
|
-
</Button>
|
|
136
|
-
</CardContent>
|
|
137
|
-
</Card>
|
|
320
|
+
<!-- Right column: text + details -->
|
|
321
|
+
<div>
|
|
322
|
+
<h1 class="text-3xl font-bold mb-2">
|
|
323
|
+
Welcome to Smile Developer Mode
|
|
324
|
+
</h1>
|
|
325
|
+
<p class="text-lg mb-4">
|
|
326
|
+
You can use this to test your application, read the docs, QA your data, and recruit participants through
|
|
327
|
+
multiple platforms.
|
|
328
|
+
</p>
|
|
138
329
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
</Card>
|
|
330
|
+
<!-- Experiment Details -->
|
|
331
|
+
<div class="min-w-0">
|
|
332
|
+
<dl class="grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 text-sm">
|
|
333
|
+
<dt class="text-muted-foreground/60">
|
|
334
|
+
Project
|
|
335
|
+
</dt>
|
|
336
|
+
<dd class="font-mono flex items-center gap-1">
|
|
337
|
+
{{ config.projectName || config.projectRef || '(not set)' }}
|
|
338
|
+
<button
|
|
339
|
+
class="text-muted-foreground hover:text-foreground transition-colors"
|
|
340
|
+
@click="copyToClipboard(config.projectName || config.projectRef || '', 'project')"
|
|
341
|
+
>
|
|
342
|
+
<Check
|
|
343
|
+
v-if="copied === 'project'"
|
|
344
|
+
class="size-3"
|
|
345
|
+
/><Copy
|
|
346
|
+
v-else
|
|
347
|
+
class="size-3"
|
|
348
|
+
/>
|
|
349
|
+
</button>
|
|
350
|
+
</dd>
|
|
161
351
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
</a>
|
|
181
|
-
</Button>
|
|
182
|
-
</CardContent>
|
|
183
|
-
</Card>
|
|
352
|
+
<dt class="text-muted-foreground/60">
|
|
353
|
+
Code Name
|
|
354
|
+
</dt>
|
|
355
|
+
<dd class="font-mono flex items-center gap-1">
|
|
356
|
+
{{ config.codeName || '(not set)' }}
|
|
357
|
+
<button
|
|
358
|
+
class="text-muted-foreground hover:text-foreground transition-colors"
|
|
359
|
+
@click="copyToClipboard(config.codeName || '', 'codename')"
|
|
360
|
+
>
|
|
361
|
+
<Check
|
|
362
|
+
v-if="copied === 'codename'"
|
|
363
|
+
class="size-3"
|
|
364
|
+
/><Copy
|
|
365
|
+
v-else
|
|
366
|
+
class="size-3"
|
|
367
|
+
/>
|
|
368
|
+
</button>
|
|
369
|
+
</dd>
|
|
184
370
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
</a>
|
|
204
|
-
</Button>
|
|
205
|
-
</CardContent>
|
|
206
|
-
</Card>
|
|
371
|
+
<dt class="text-muted-foreground/60">
|
|
372
|
+
Version
|
|
373
|
+
</dt>
|
|
374
|
+
<dd class="font-mono flex items-center gap-1">
|
|
375
|
+
{{ config.smileVersion || '(not set)' }}
|
|
376
|
+
<button
|
|
377
|
+
class="text-muted-foreground hover:text-foreground transition-colors"
|
|
378
|
+
@click="copyToClipboard(config.smileVersion || '', 'version')"
|
|
379
|
+
>
|
|
380
|
+
<Check
|
|
381
|
+
v-if="copied === 'version'"
|
|
382
|
+
class="size-3"
|
|
383
|
+
/><Copy
|
|
384
|
+
v-else
|
|
385
|
+
class="size-3"
|
|
386
|
+
/>
|
|
387
|
+
</button>
|
|
388
|
+
</dd>
|
|
207
389
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
<CardContent class="flex justify-end flex-1 items-end">
|
|
218
|
-
<Button
|
|
219
|
-
id="panda_tester"
|
|
220
|
-
as-child
|
|
221
|
-
variant="default"
|
|
222
|
-
size="xs"
|
|
223
|
-
class="is-coral"
|
|
224
|
-
>
|
|
225
|
-
<a :href="devUrls['panda']"><i-lucide-dices /> PANDA User
|
|
226
|
-
<i-lucide-arrow-right class="inline-block ml-1 w-4 h-4" />
|
|
227
|
-
</a>
|
|
228
|
-
</Button>
|
|
229
|
-
</CardContent>
|
|
230
|
-
</Card>
|
|
390
|
+
<template v-if="dbInfo">
|
|
391
|
+
<dt class="text-muted-foreground/60">
|
|
392
|
+
Database
|
|
393
|
+
</dt>
|
|
394
|
+
<dd class="font-mono flex items-center gap-1">
|
|
395
|
+
<span class="text-xs">{{ dbInfo.type }}</span>
|
|
396
|
+
<code class="text-xs text-muted-foreground">{{ dbInfo.url }}</code>
|
|
397
|
+
</dd>
|
|
398
|
+
</template>
|
|
231
399
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
400
|
+
<template v-if="config.github?.repoName">
|
|
401
|
+
<dt class="text-muted-foreground/60">
|
|
402
|
+
Repo
|
|
403
|
+
</dt>
|
|
404
|
+
<dd class="font-mono flex items-center gap-1">
|
|
405
|
+
<a
|
|
406
|
+
:href="`https://github.com/${config.github.owner}/${config.github.repoName}`"
|
|
407
|
+
target="_blank"
|
|
408
|
+
class="text-[var(--link-button-foreground)] underline"
|
|
409
|
+
>{{ config.github.owner }}/{{ config.github.repoName }}</a>
|
|
410
|
+
<span class="text-muted-foreground">({{ config.github.branch || '?' }})</span>
|
|
411
|
+
<button
|
|
412
|
+
class="text-muted-foreground hover:text-foreground transition-colors"
|
|
413
|
+
@click="copyToClipboard(`https://github.com/${config.github.owner}/${config.github.repoName}`, 'repo')"
|
|
414
|
+
>
|
|
415
|
+
<Check
|
|
416
|
+
v-if="copied === 'repo'"
|
|
417
|
+
class="size-3"
|
|
418
|
+
/><Copy
|
|
419
|
+
v-else
|
|
420
|
+
class="size-3"
|
|
421
|
+
/>
|
|
422
|
+
</button>
|
|
423
|
+
</dd>
|
|
424
|
+
|
|
425
|
+
<dt class="text-muted-foreground/60">
|
|
426
|
+
Commit
|
|
427
|
+
</dt>
|
|
428
|
+
<dd class="font-mono flex items-start gap-1">
|
|
429
|
+
<a
|
|
430
|
+
v-if="config.github.lastCommitHash"
|
|
431
|
+
:href="config.github.commitURL"
|
|
432
|
+
target="_blank"
|
|
433
|
+
class="text-[var(--link-button-foreground)] underline text-xs"
|
|
434
|
+
>{{ config.github.lastCommitHash }}</a>
|
|
435
|
+
<span
|
|
436
|
+
v-if="config.github.lastCommitMsg"
|
|
437
|
+
class="text-muted-foreground text-xs"
|
|
438
|
+
>{{ config.github.lastCommitMsg }}
|
|
439
|
+
<button
|
|
440
|
+
v-if="config.github.lastCommitHash"
|
|
441
|
+
class="inline-flex align-middle text-muted-foreground hover:text-foreground transition-colors ml-1"
|
|
442
|
+
@click="copyToClipboard(config.github.lastCommitHash, 'commit')"
|
|
443
|
+
>
|
|
444
|
+
<Check
|
|
445
|
+
v-if="copied === 'commit'"
|
|
446
|
+
class="size-3"
|
|
447
|
+
/><Copy
|
|
448
|
+
v-else
|
|
449
|
+
class="size-3"
|
|
450
|
+
/>
|
|
451
|
+
</button>
|
|
452
|
+
</span>
|
|
453
|
+
</dd>
|
|
454
|
+
</template>
|
|
455
|
+
</dl>
|
|
456
|
+
|
|
457
|
+
<!-- Mode URLs -->
|
|
458
|
+
<div :class="['flex flex-col gap-1 mt-2 pt-2 border-t text-xs', { 'opacity-50': !isDeployed }]">
|
|
459
|
+
<div
|
|
460
|
+
v-for="{ label, suffix, key } in [
|
|
461
|
+
{ label: 'Dev', suffix: '/dev/', key: 'dev' },
|
|
462
|
+
{ label: 'Production', suffix: '/', key: 'prod' },
|
|
463
|
+
{ label: 'Presentation', suffix: '/presentation/', key: 'pres' },
|
|
464
|
+
]"
|
|
465
|
+
:key="key"
|
|
466
|
+
class="flex items-center gap-1"
|
|
467
|
+
>
|
|
468
|
+
<span class="text-muted-foreground/60 w-20">{{ label }}:</span>
|
|
469
|
+
<code class="bg-muted px-1.5 py-0.5 rounded">{{ baseUrl }}{{ suffix }}</code>
|
|
470
|
+
<button
|
|
471
|
+
:disabled="!isDeployed"
|
|
472
|
+
:class="['transition-colors', isDeployed ? 'text-muted-foreground hover:text-foreground' : 'text-muted-foreground/30 cursor-not-allowed']"
|
|
473
|
+
@click="isDeployed && copyToClipboard(`${baseUrl}${suffix}`, key)"
|
|
474
|
+
>
|
|
475
|
+
<Check
|
|
476
|
+
v-if="copied === key"
|
|
477
|
+
class="size-3"
|
|
478
|
+
/>
|
|
479
|
+
<Copy
|
|
480
|
+
v-else
|
|
481
|
+
class="size-3"
|
|
482
|
+
/>
|
|
483
|
+
</button>
|
|
484
|
+
</div>
|
|
485
|
+
</div>
|
|
486
|
+
<p
|
|
487
|
+
v-if="!isDeployed"
|
|
488
|
+
class="text-xs italic mt-1"
|
|
489
|
+
>
|
|
490
|
+
Deploy your study to get shareable URLs.
|
|
491
|
+
</p>
|
|
492
|
+
</div>
|
|
493
|
+
</div>
|
|
494
|
+
</div>
|
|
495
|
+
|
|
496
|
+
<hr class="my-4">
|
|
497
|
+
|
|
498
|
+
<div class="grid grid-cols-2 @3xl:grid-cols-3 gap-4">
|
|
499
|
+
<Card
|
|
500
|
+
v-for="(svc, key) in services"
|
|
501
|
+
:key="key"
|
|
502
|
+
class="flex flex-col"
|
|
503
|
+
>
|
|
504
|
+
<CardHeader>
|
|
505
|
+
<div class="flex items-center justify-between gap-2">
|
|
506
|
+
<CardTitle>{{ svc.name }}</CardTitle>
|
|
507
|
+
<TooltipProvider>
|
|
508
|
+
<Tooltip>
|
|
509
|
+
<TooltipTrigger as-child>
|
|
510
|
+
<button
|
|
511
|
+
class="shrink-0 text-muted-foreground hover:text-foreground hover:bg-accent transition-all p-1 rounded"
|
|
512
|
+
@click="selectedService = key"
|
|
513
|
+
>
|
|
514
|
+
<Info class="size-3.5" />
|
|
515
|
+
</button>
|
|
516
|
+
</TooltipTrigger>
|
|
517
|
+
<TooltipContent>
|
|
518
|
+
<p>How to use {{ svc.name }}</p>
|
|
519
|
+
</TooltipContent>
|
|
520
|
+
</Tooltip>
|
|
521
|
+
</TooltipProvider>
|
|
522
|
+
</div>
|
|
523
|
+
<CardDescription>{{ svc.description }}</CardDescription>
|
|
524
|
+
</CardHeader>
|
|
525
|
+
<CardContent class="flex justify-end flex-1 items-end gap-2">
|
|
526
|
+
<div class="flex items-end gap-2">
|
|
527
|
+
<template v-if="key === 'mturk'">
|
|
528
|
+
<Button
|
|
529
|
+
as-child
|
|
530
|
+
variant="secondary"
|
|
531
|
+
size="xs"
|
|
532
|
+
class="is-light-yellow"
|
|
533
|
+
>
|
|
534
|
+
<a href="/dev/mturk?assignmentId=ASSIGNMENT_ID_NOT_AVAILABLE&hitId=123RVWYBAZW00EXAMPLE&turkSubmitTo=https://www.mturk.com/&workerId=AZ3456EXAMPLE">
|
|
535
|
+
Preview
|
|
536
|
+
<ArrowRight class="inline-block ml-1 w-4 h-4" />
|
|
537
|
+
</a>
|
|
538
|
+
</Button>
|
|
539
|
+
</template>
|
|
540
|
+
<Button
|
|
541
|
+
as-child
|
|
542
|
+
variant="default"
|
|
543
|
+
size="xs"
|
|
544
|
+
:class="svc.buttonClass"
|
|
545
|
+
>
|
|
546
|
+
<a :href="devUrls[key]">
|
|
547
|
+
<Dices />
|
|
548
|
+
{{ svc.buttonLabel }}
|
|
549
|
+
<ArrowRight class="inline-block ml-1 w-4 h-4" />
|
|
550
|
+
</a>
|
|
551
|
+
</Button>
|
|
552
|
+
</div>
|
|
553
|
+
</CardContent>
|
|
554
|
+
</Card>
|
|
555
|
+
</div>
|
|
556
|
+
</template>
|
|
253
557
|
</div>
|
|
254
558
|
</template>
|
|
255
559
|
|
|
560
|
+
<style>
|
|
561
|
+
.global-color-mode a:not([class*=is-]){color:var(--link-button-foreground)}
|
|
562
|
+
</style>
|
|
563
|
+
|
|
256
564
|
<style scoped>
|
|
257
|
-
.is-blue{background-color
|
|
565
|
+
.is-blue{background-color:var(--recruit-blue)}.is-blue,.is-red{color:var(--recruit-text)}.is-red{background-color:var(--recruit-red)}.is-light-yellow{background-color:var(--recruit-yellow-light);color:var(--recruit-text)}.is-yellow{background-color:var(--recruit-yellow)}.is-pink,.is-yellow{color:var(--recruit-text)}.is-pink{background-color:var(--recruit-pink)}.is-green{background-color:var(--recruit-green)}.is-green,.is-orange{color:var(--recruit-text)}.is-orange{background-color:var(--recruit-orange)}.is-teal{background-color:var(--recruit-teal)}.is-coral,.is-teal{color:var(--recruit-text)}.is-coral{background-color:var(--recruit-coral)}.is-purple{background-color:var(--recruit-purple);border:none;color:var(--recruit-text)}@media screen and (max-width:599px){.text-4xl{font-size:1.5em}}@media screen and (max-width:418px){.text-4xl{display:none}}
|
|
258
566
|
</style>
|