Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
intrn(chat): make subkind computed
Browse files Browse the repository at this point in the history
  • Loading branch information
lemredd committed Oct 13, 2022
1 parent 8b8f1b0 commit bef9374
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<input
type="hidden"
name="data[attributes][data][subkind]"
value="image"/>
class="sub-kind"
:value="subKind"/>
<input
type="hidden"
name="data[relationships][chatMessageActivity][data][id]"
Expand Down Expand Up @@ -47,7 +48,9 @@
{{ filename }}
</small>
</div>
<div class="preview-file-container bg-true-gray-200 flex items-center px-3 py-2">
<div
v-if="isAcceptingFile"
class="preview-file-container bg-true-gray-200 flex items-center px-3 py-2">
<span class="material-icons mr-2">
attachment
</span>
Expand Down Expand Up @@ -102,7 +105,8 @@ const props = defineProps<{
}>()
const isAcceptingImage = props.accept.includes("image/")
const isAcceptingFile = props.accept.includes("file/")
const isAcceptingFile = props.accept.includes("*/")
const subKind = computed(() => (isAcceptingImage ? "image" : "file"))
const filename = ref<string|null>(null)
const hasExtracted = computed<boolean>(() => filename.value !== null)
Expand Down

0 comments on commit bef9374

Please sign in to comment.