-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
150 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export interface StudyInfoDto { | ||
subjectId: string; | ||
studyName: string; | ||
shortDescription: string; | ||
infoUrl: string; | ||
privacyPolicyUrl: string; | ||
contactName: string; | ||
contactEmail: string; | ||
appVersion: string; | ||
currentlyActiveTrackers: string[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import { StudyInfoDto } from '../../shared/dto/StudyInfoDto'; | ||
|
||
type Commands = { | ||
createExperienceSample: (promptedAt: number, question: string, response: number) => Promise<void>; | ||
closeExperienceSamplingWindow: () => Promise<void>; | ||
getStudyInfo: () => Promise<StudyInfoDto>; | ||
}; | ||
export default Commands; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<script lang="ts" setup> | ||
import typedIpcRenderer from '../utils/typedIpcRenderer'; | ||
import { onMounted, ref } from 'vue'; | ||
import { StudyInfoDto } from '../../shared/dto/StudyInfoDto'; | ||
const studyInfo = ref<StudyInfoDto>(); | ||
onMounted(async () => { | ||
studyInfo.value = await typedIpcRenderer.invoke('getStudyInfo'); | ||
}); | ||
</script> | ||
<template> | ||
<div class="h-full p-4"> | ||
<!-- center spinner across the screen --> | ||
<div v-if="!studyInfo" class="flex h-full items-center justify-center"> | ||
<span class="loading loading-spinner loading-lg"></span> | ||
</div> | ||
<article v-else class="lg:prose-lg prose mx-auto mt-8 align-top"> | ||
<h1> | ||
<span class="primary-blue">{{ studyInfo.studyName }}</span> | ||
</h1> | ||
<div class="badge badge-neutral fixed right-0 top-0 mr-4 mt-4"> | ||
Version {{ studyInfo.appVersion }} | ||
</div> | ||
<p>{{ studyInfo.shortDescription }}</p> | ||
<table class="table-auto"> | ||
<tbody> | ||
<tr> | ||
<td>Your Subject Id:</td> | ||
<td> | ||
<span class="badge badge-neutral">{{ studyInfo.subjectId }}</span> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Contact:</td> | ||
<td>{{ studyInfo.contactName }} ({{ studyInfo.contactEmail }})</td> | ||
</tr> | ||
<tr> | ||
<td>Study Website:</td> | ||
<td>{{ studyInfo.infoUrl }}</td> | ||
</tr> | ||
<tr> | ||
<td>Privacy Policy:</td> | ||
<td>{{ studyInfo.privacyPolicyUrl }}</td> | ||
</tr> | ||
<tr> | ||
<td>Active Trackers:</td> | ||
<td>{{ studyInfo.currentlyActiveTrackers.join(', ') }}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</article> | ||
</div> | ||
</template> | ||
<style lang="less"> | ||
@import '../styles/index'; | ||
.primary-blue { | ||
color: @primary-color; | ||
} | ||
</style> |