mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-29 20:51:09 -04:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			dark-base-
			...
			dark-file-
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 1875c319f9 | 
| @ -21,6 +21,7 @@ | ||||
|       group | ||||
|       min-h-[100px] | ||||
|       bg-gray-50 | ||||
|       dark:bg-gray-700 dark:border-gray-600 | ||||
|     " | ||||
|     :class="avatar ? 'w-32 h-32' : 'w-full'" | ||||
|   > | ||||
| @ -49,7 +50,7 @@ | ||||
|  | ||||
|       <a | ||||
|         href="#" | ||||
|         class="absolute z-30 bg-white rounded-full -bottom-3 -right-3 group" | ||||
|         class="absolute z-30 bg-white rounded-full -bottom-3 -right-3 group dark:bg-gray-900" | ||||
|         @click.prevent.stop="onBrowse" | ||||
|       > | ||||
|         <BaseIcon | ||||
| @ -95,7 +96,7 @@ | ||||
|  | ||||
|     <div | ||||
|       v-else-if="localFiles.length && avatar && !multiple" | ||||
|       class="flex w-full h-full border border-gray-200 rounded" | ||||
|       class="flex w-full h-full border border-gray-200 rounded dark:border-gray-600" | ||||
|     > | ||||
|       <img | ||||
|         v-if="localFiles[0].image" | ||||
| @ -169,10 +170,11 @@ | ||||
|           -right-3 | ||||
|           group | ||||
|           hover:border-gray-300 | ||||
|           dark:border-gray-600 dark:bg-gray-900 dark:hover:border-gray-700 | ||||
|         " | ||||
|         @click.prevent.stop="onAvatarRemove(localFiles[0])" | ||||
|       > | ||||
|         <BaseIcon name="XIcon" class="h-4 text-xl leading-6 text-black" /> | ||||
|         <BaseIcon name="XIcon" class="h-4 text-xl leading-6 text-black dark:text-white" /> | ||||
|       </a> | ||||
|     </div> | ||||
|  | ||||
| @ -195,6 +197,7 @@ | ||||
|           hover:border-gray-500 | ||||
|           relative | ||||
|           max-w-md | ||||
|           dark:border-gray-600 dark:bg-transparent dark:hover:border-gray-700 | ||||
|         " | ||||
|         @click.prevent | ||||
|       > | ||||
| @ -270,6 +273,7 @@ | ||||
|             -right-3 | ||||
|             group | ||||
|             hover:border-gray-300 | ||||
|             dark:border-gray-600 dark:bg-gray-900 dark:hover:border-gray-700 | ||||
|           " | ||||
|           @click.prevent.stop="onFileRemove(index)" | ||||
|         > | ||||
| @ -293,6 +297,7 @@ | ||||
|           hover:border-gray-500 | ||||
|           relative | ||||
|           max-w-md | ||||
|           dark:border-gray-600 dark:bg-gray-800 dark:hover:border-gray-700 | ||||
|         " | ||||
|         @click.prevent | ||||
|       > | ||||
| @ -368,10 +373,11 @@ | ||||
|             -right-3 | ||||
|             group | ||||
|             hover:border-gray-300 | ||||
|             dark:border-gray-600 dark:bg-gray-900 dark:hover:border-gray-700 | ||||
|           " | ||||
|           @click.prevent.stop="onFileRemove(index)" | ||||
|         > | ||||
|           <BaseIcon name="XIcon" class="h-4 text-xl leading-6 text-black" /> | ||||
|           <BaseIcon name="XIcon" class="h-4 text-xl leading-6 text-black dark:text-white" /> | ||||
|         </a> | ||||
|       </a> | ||||
|     </div> | ||||
|  | ||||
| @ -7,18 +7,11 @@ | ||||
|             relative | ||||
|             overflow-hidden | ||||
|             bg-white | ||||
|             border-b | ||||
|             border-gray-200 | ||||
|             border-b border-gray-200 | ||||
|             shadow | ||||
|             sm:rounded-lg | ||||
|             dark:shadow-glass | ||||
|             dark:border | ||||
|             dark:border-white/10 | ||||
|             dark:bg-gray-800/70 | ||||
|           " | ||||
|         > | ||||
|           <BaseDarkHighlight v-if="darkHighlight" class="z-[-1]" /> | ||||
|  | ||||
|           <slot name="header" /> | ||||
|           <table :class="tableClass"> | ||||
|             <thead :class="theadClass"> | ||||
| @ -58,11 +51,7 @@ | ||||
|               <tr | ||||
|                 v-for="placeRow in placeholderCount" | ||||
|                 :key="placeRow" | ||||
|                 :class=" | ||||
|                   placeRow % 2 === 0 | ||||
|                     ? 'bg-white dark:bg-gray-800' | ||||
|                     : 'bg-gray-50 dark:bg-gray-800' | ||||
|                 " | ||||
|                 :class="placeRow % 2 === 0 ? 'bg-white' : 'bg-gray-50'" | ||||
|               > | ||||
|                 <td | ||||
|                   v-for="column in columns" | ||||
| @ -86,11 +75,7 @@ | ||||
|               <tr | ||||
|                 v-for="(row, index) in sortedRows" | ||||
|                 :key="index" | ||||
|                 :class=" | ||||
|                   index % 2 === 0 | ||||
|                     ? 'bg-white dark:bg-transparent' | ||||
|                     : 'bg-gray-50 dark:bg-gray-700/20 dark:border-y dark:border-gray-600' | ||||
|                 " | ||||
|                 :class="index % 2 === 0 ? 'bg-white' : 'bg-gray-50'" | ||||
|               > | ||||
|                 <td | ||||
|                   v-for="column in columns" | ||||
| @ -118,10 +103,7 @@ | ||||
|               justify-center | ||||
|               w-full | ||||
|               h-full | ||||
|               bg-white | ||||
|               bg-opacity-60 | ||||
|               dark:bg-gray-700 | ||||
|               dark:bg-opacity-60 | ||||
|               bg-white bg-opacity-60 | ||||
|             " | ||||
|           > | ||||
|             <SpinnerIcon class="w-10 h-10 text-primary-500" /> | ||||
| @ -181,12 +163,9 @@ const props = defineProps({ | ||||
|   sortOrder: { type: String, default: '' }, | ||||
|   tableClass: { | ||||
|     type: String, | ||||
|     default: 'min-w-full divide-y divide-gray-200 dark:divide-gray-600', | ||||
|   }, | ||||
|   theadClass: { | ||||
|     type: String, | ||||
|     default: 'bg-gray-50 dark:bg-gray-800 dark:text-white', | ||||
|     default: 'min-w-full divide-y divide-gray-200', | ||||
|   }, | ||||
|   theadClass: { type: String, default: 'bg-gray-50' }, | ||||
|   tbodyClass: { type: String, default: '' }, | ||||
|   noResultsMessage: { | ||||
|     type: String, | ||||
| @ -207,10 +186,6 @@ const props = defineProps({ | ||||
|     type: Number, | ||||
|     default: 3, | ||||
|   }, | ||||
|   darkHighlight: { | ||||
|     type: Boolean, | ||||
|     default: false, | ||||
|   }, | ||||
| }) | ||||
|  | ||||
| let rows = reactive([]) | ||||
| @ -261,7 +236,7 @@ function getColumn(columnName) { | ||||
|  | ||||
| function getThClass(column) { | ||||
|   let classes = | ||||
|     'whitespace-nowrap px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:text-white' | ||||
|     'whitespace-nowrap px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider' | ||||
|  | ||||
|   if (column.defaultThClass) { | ||||
|     classes = column.defaultThClass | ||||
| @ -281,8 +256,7 @@ function getThClass(column) { | ||||
| } | ||||
|  | ||||
| function getTdClass(column) { | ||||
|   let classes = | ||||
|     'px-6 py-4 text-sm text-gray-500 whitespace-nowrap dark:text-gray-300' | ||||
|   let classes = 'px-6 py-4 text-sm text-gray-500 whitespace-nowrap' | ||||
|  | ||||
|   if (column.defaultTdClass) { | ||||
|     classes = column.defaultTdClass | ||||
| @ -335,7 +309,6 @@ function changeSorting(column) { | ||||
|   } | ||||
|  | ||||
|   if (!usesLocalData.value) { | ||||
|     if (pagination.value) pagination.value.currentPage = 1 | ||||
|     mapDataToRows() | ||||
|   } | ||||
| } | ||||
| @ -353,9 +326,7 @@ async function pageChange(page) { | ||||
|   await mapDataToRows() | ||||
| } | ||||
|  | ||||
| async function refresh(isPreservePage = false) { | ||||
|   if (pagination.value && !isPreservePage) pagination.value.currentPage = 1 | ||||
|  | ||||
| async function refresh() { | ||||
|   await mapDataToRows() | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	