Browse Source

fix: on project changes, truncate the description properly (to avoid screen zooming in) and widen the table

pull/193/head
Trent Larson 2 weeks ago
parent
commit
f61cb6eea7
  1. 60
      src/views/NewActivityView.vue

60
src/views/NewActivityView.vue

@ -29,7 +29,7 @@
v-if="newOffersToUser.length > 0" v-if="newOffersToUser.length > 0"
:icon="showOffersDetails ? 'chevron-down' : 'chevron-right'" :icon="showOffersDetails ? 'chevron-down' : 'chevron-right'"
class="cursor-pointer ml-4 mr-4 text-lg" class="cursor-pointer ml-4 mr-4 text-lg"
@click="expandOffersToUserAndMarkRead()" @click.prevent="expandOffersToUserAndMarkRead()"
/> />
</div> </div>
<router-link to="/recent-offers-to-user" class="text-blue-500"> <router-link to="/recent-offers-to-user" class="text-blue-500">
@ -67,7 +67,7 @@
<!-- New line that appears on hover or when the offer is clicked --> <!-- New line that appears on hover or when the offer is clicked -->
<div <div
class="absolute left-0 w-full text-left text-gray-500 text-sm hidden group-hover:flex cursor-pointer items-center" class="absolute left-0 w-full text-left text-gray-500 text-sm hidden group-hover:flex cursor-pointer items-center"
@click="markOffersAsReadStartingWith(offer.jwtId)" @click.prevent="markOffersAsReadStartingWith(offer.jwtId)"
> >
<span class="inline-block w-8 h-px bg-gray-500 mr-2" /> <span class="inline-block w-8 h-px bg-gray-500 mr-2" />
Click to keep all above as unread offers Click to keep all above as unread offers
@ -96,7 +96,7 @@
showOffersToUserProjectsDetails ? 'chevron-down' : 'chevron-right' showOffersToUserProjectsDetails ? 'chevron-down' : 'chevron-right'
" "
class="cursor-pointer ml-4 mr-4 text-lg" class="cursor-pointer ml-4 mr-4 text-lg"
@click="expandOffersToUserProjectsAndMarkRead()" @click.prevent="expandOffersToUserProjectsAndMarkRead()"
/> />
</div> </div>
<router-link to="/recent-offers-to-user-projects" class="text-blue-500"> <router-link to="/recent-offers-to-user-projects" class="text-blue-500">
@ -136,7 +136,7 @@
<!-- New line that appears on hover --> <!-- New line that appears on hover -->
<div <div
class="absolute left-0 w-full text-left text-gray-500 text-sm hidden group-hover:flex cursor-pointer items-center" class="absolute left-0 w-full text-left text-gray-500 text-sm hidden group-hover:flex cursor-pointer items-center"
@click="markOffersToUserProjectsAsReadStartingWith(offer.jwtId)" @click.prevent="markOffersToUserProjectsAsReadStartingWith(offer.jwtId)"
> >
<span class="inline-block w-8 h-px bg-gray-500 mr-2" /> <span class="inline-block w-8 h-px bg-gray-500 mr-2" />
Click to keep all above as unread offers Click to keep all above as unread offers
@ -167,7 +167,7 @@
showStarredProjectChangesDetails ? 'chevron-down' : 'chevron-right' showStarredProjectChangesDetails ? 'chevron-down' : 'chevron-right'
" "
class="cursor-pointer ml-4 mr-4 text-lg" class="cursor-pointer ml-4 mr-4 text-lg"
@click="expandStarredProjectChangesAndMarkRead()" @click.prevent="expandStarredProjectChangesAndMarkRead()"
/> />
</div> </div>
</div> </div>
@ -179,27 +179,31 @@
:key="projectChange.plan.handleId" :key="projectChange.plan.handleId"
class="mt-4 relative group" class="mt-4 relative group"
> >
<span class="font-medium">{{ <div class="flex items-center gap-2">
projectChange.plan.name || "Unnamed Project" <div class="flex-1 min-w-0">
}}</span> <span class="font-medium">{{
<span projectChange.plan.name || "Unnamed Project"
v-if="projectChange.plan.description" }}</span>
class="text-gray-600 truncate" <span
> v-if="projectChange.plan.description"
- {{ projectChange.plan.description }} class="text-gray-600 block truncate"
</span> >
<router-link {{ projectChange.plan.description }}
:to="{ </span>
path: </div>
'/project/' + encodeURIComponent(projectChange.plan.handleId), <router-link
}" :to="{
class="text-blue-500" path:
> '/project/' + encodeURIComponent(projectChange.plan.handleId),
<font-awesome }"
icon="file-lines" class="text-blue-500 flex-shrink-0"
class="pl-2 text-blue-500 cursor-pointer" >
/> <font-awesome
</router-link> icon="file-lines"
class="text-blue-500 cursor-pointer"
/>
</router-link>
</div>
<!-- Show what changed --> <!-- Show what changed -->
<div <div
v-if="getPlanDifferences(projectChange.plan.handleId)" v-if="getPlanDifferences(projectChange.plan.handleId)"
@ -236,7 +240,7 @@
class="hover:bg-gray-50" class="hover:bg-gray-50"
> >
<td <td
class="border border-gray-300 px-3 py-2 font-medium text-gray-800" class="border border-gray-300 px-3 py-2 font-medium text-gray-800 break-words"
> >
{{ getDisplayFieldName(field) }} {{ getDisplayFieldName(field) }}
</td> </td>
@ -259,7 +263,7 @@
<!-- New line that appears on hover --> <!-- New line that appears on hover -->
<div <div
class="absolute left-0 w-full text-left text-gray-500 text-sm hidden group-hover:flex cursor-pointer items-center" class="absolute left-0 w-full text-left text-gray-500 text-sm hidden group-hover:flex cursor-pointer items-center"
@click=" @click.prevent="
markStarredProjectChangesAsReadStartingWith( markStarredProjectChangesAsReadStartingWith(
projectChange.plan.jwtId!, projectChange.plan.jwtId!,
) )

Loading…
Cancel
Save