Skip to content

Commit

Permalink
fix: various minor updates - starting materials changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CS76 committed Aug 1, 2024
1 parent 6077ac6 commit f901b2b
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 91 deletions.
5 changes: 1 addition & 4 deletions app/Listeners/ProjectDeletion.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ class ProjectDeletion
/**
* Create the event listener.
*/
public function __construct()
{

}
public function __construct() {}

/**
* Handle the event.
Expand Down
4 changes: 1 addition & 3 deletions app/Providers/CephStorageServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,5 @@ public function boot()
*
* @return void
*/
public function register()
{
}
public function register() {}
}
4 changes: 1 addition & 3 deletions app/Providers/MinioStorageServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,5 @@ public function boot()
*
* @return void
*/
public function register()
{
}
public function register() {}
}
27 changes: 24 additions & 3 deletions resources/js/Pages/Project/Show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,20 @@
</span>
</div>
</div>
<div
v-if="!canUpdateProject"
class="flex-nowrap right ml-auto"
>
<img
:src="
project.project_photo_url
? project.project_photo_url
: 'https://via.placeholder.com/400x200'
"
:alt="project.name"
class="h-24 w-72 rounded-md object-cover"
/>
</div>
<div class="flex-nowrap">
<Link
v-if="canManageProjectSetings"
Expand Down Expand Up @@ -333,7 +347,8 @@
!project.is_public &&
!project.is_published &&
!project.is_deleted &&
!project.doi
!project.doi &&
role != 'reviewer'
"
class="flex-nowrap"
>
Expand Down Expand Up @@ -935,7 +950,10 @@
</div>
</div>
<!-- Citation -->
<div class="mb-8">
<div
v-if="canUpdateProject || project.citations.length > 0"
class="mb-8"
>
<div class="relative">
<div
class="absolute inset-0 flex items-center"
Expand Down Expand Up @@ -972,7 +990,10 @@
</div>

<!-- Author -->
<div class="mb-8">
<div
v-if="canUpdateProject || project.authors.length > 0"
class="mb-8"
>
<div class="relative">
<div
class="absolute inset-0 flex items-center"
Expand Down
5 changes: 4 additions & 1 deletion resources/js/Pages/Study/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
<div class="divide-y divide-gray-200 sm:col-span-9">
<div class="py-3 px-4 sm:p-6 lg:pb-8">
<div class="mt-0">
<div class="mb-4">
<div
v-if="canUpdateStudy || study.tags.length > 0"
class="mb-4"
>
<div class="relative">
<div
class="absolute inset-0 flex items-center"
Expand Down
166 changes: 89 additions & 77 deletions resources/js/Shared/StudyCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,89 +3,101 @@
v-if="study"
class="flex flex-col border rounded-lg shadow-lg transition ease-in-out delay-150 duration-300 overflow-hidden"
>
<div class="relative overflow-hidden bg-white-200">
<div class="pt-2 px-2">
<ul role="list">
<li
class="col-span-1 divide-y divide-gray-200 cursor-pointer"
>
<div
class="bg-white rounded-t-md flex justify-center items-center"
<Link
:href="
preview
? route('preview', [obfuscationCode, study.id, 'study'])
: route('dashboard.studies', [study.id])
"
>
<div class="relative overflow-hidden bg-white-200">
<div class="pt-2 px-2">
<ul role="list">
<li
class="col-span-1 divide-y divide-gray-200 cursor-pointer"
>
<span
v-if="
molecules[0] &&
molecules[0].canonical_smiles
"
<div
class="bg-white rounded-t-md flex justify-center items-center"
>
<Depictor2D
class="py-2"
:molecule="molecules[0].canonical_smiles"
:show-download="false"
></Depictor2D>
</span>
<span v-else>
<div class="h-64">
<div
class="absolute inset-0 flex items-center justify-center"
>
<h2 class="text-gray-200 font-bold">
<i
>-- molecule(s) information
missing --</i
>
</h2>
<span
v-if="
molecules[0] &&
molecules[0].canonical_smiles
"
>
<Depictor2D
class="py-2"
:molecule="
molecules[0].canonical_smiles
"
:show-download="false"
></Depictor2D>
</span>
<span v-else>
<div class="h-64">
<div
class="absolute inset-0 flex items-center justify-center"
>
<h2 class="text-gray-200 font-bold">
<i
>-- molecule(s) information
missing --</i
>
</h2>
</div>
</div>
</div>
</span>
</div>
</li>
</ul>
<div class="bg-white"></div>
</span>
</div>
</li>
</ul>
<div class="bg-white"></div>
</div>
</div>
</div>
<div class="flex-1 border-t bg-white p-3 flex flex-col justify-between">
<div>
<small v-if="study.identifier" class="text-gray-500 float-left"
>#{{ study.identifier }}</small
>
<div class="float-right">
<div v-if="study.is_public" class="flex items-center mt-1">
<svg
class="h-3 w-3 mr-1 text-green-400 inline"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 64 64"
width="512"
height="512"
<div
class="flex-1 border-t bg-white p-3 flex flex-col justify-between"
>
<div>
<small
v-if="study.identifier"
class="text-gray-500 float-left"
>#{{ study.identifier }}</small
>
<div class="float-right">
<div
v-if="study.is_public"
class="flex items-center mt-1"
>
<g id="globe">
<path
d="M53.85,47.85A27,27,0,0,1,24,57.8V56l3-3V49l4-4V42l4,4h5l2-2h8Z"
/>
<path
d="M42,20.59v2.56L38.07,27H31l-5.36,5.26L31,37.51v5.06L27.44,39H22.86L16,32.11V24.2L11.8,20h-4A27,27,0,0,1,32,5a26.55,26.55,0,0,1,7.06.94L36,9H30v4l4,4h4.33Z"
/>
<path
d="M32,60A28,28,0,1,1,60,32,28,28,0,0,1,32,60ZM32,6A26,26,0,1,0,58,32,26,26,0,0,0,32,6Z"
/>
</g>
</svg>
<svg
class="h-3 w-3 mr-1 text-green-400 inline"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 64 64"
width="512"
height="512"
>
<g id="globe">
<path
d="M53.85,47.85A27,27,0,0,1,24,57.8V56l3-3V49l4-4V42l4,4h5l2-2h8Z"
/>
<path
d="M42,20.59v2.56L38.07,27H31l-5.36,5.26L31,37.51v5.06L27.44,39H22.86L16,32.11V24.2L11.8,20h-4A27,27,0,0,1,32,5a26.55,26.55,0,0,1,7.06.94L36,9H30v4l4,4h4.33Z"
/>
<path
d="M32,60A28,28,0,1,1,60,32,28,28,0,0,1,32,60ZM32,6A26,26,0,1,0,58,32,26,26,0,0,0,32,6Z"
/>
</g>
</svg>

<p class="text-xs text-gray-600">Public</p>
</div>
<div v-else class="flex items-center mt-1">
<LockClosedIcon class="w-3 h-3 mr-1 text-teal-600" />
<p class="text-xs text-gray-600">Private</p>
<p class="text-xs text-gray-600">Public</p>
</div>
<div v-else class="flex items-center mt-1">
<LockClosedIcon
class="w-3 h-3 mr-1 text-teal-600"
/>
<p class="text-xs text-gray-600">Private</p>
</div>
</div>
</div>
</div>
<Link
:href="
preview
? route('preview', [obfuscationCode, study.id, 'study'])
: route('dashboard.studies', [study.id])
"
>

<div
class="flex items-center font-bold truncate text-lg text-gray-600"
>
Expand All @@ -108,8 +120,8 @@
{{ formatDate(study.updated_at) }}
</div>
</div>
</Link>
</div>
</div>
</Link>
</div>
</template>

Expand Down

0 comments on commit f901b2b

Please sign in to comment.