Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ android {
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-community-file-opener')
implementation project(':capacitor-app')
implementation project(':capacitor-filesystem')

}
Expand Down
3 changes: 3 additions & 0 deletions android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/
include ':capacitor-community-file-opener'
project(':capacitor-community-file-opener').projectDir = new File('../node_modules/@capacitor-community/file-opener/android')

include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')

include ':capacitor-filesystem'
project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android')
19 changes: 15 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"dependencies": {
"@capacitor-community/file-opener": "^7.0.1",
"@capacitor/android": "^7.3.0",
"@capacitor/app": "^7.0.2",
"@capacitor/core": "^7.3.0",
"@capacitor/filesystem": "^7.1.1",
"@emoji-mart/data": "^1.2.1",
Expand Down Expand Up @@ -119,7 +120,8 @@
"web3-eth-contract": "^4.7.2",
"web3-providers-http": "^4.2.0",
"web3-utils": "^4.3.3",
"web3-validator": "^2.0.6"
"web3-validator": "^2.0.6",
"zod": "^3.25.76"
},
"devDependencies": {
"@capacitor/assets": "^3.0.5",
Expand Down
52 changes: 52 additions & 0 deletions src/assets/styles/components/_chat.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,39 @@ $scroll-bar-width: 4px;
}
}

&__download-attachments-btn {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: transparent;
border: none;

&--left {
left: -48px;
}

&--right {
right: -48px;
}

&__icon {
color: map.get(colors.$adm-colors, 'grey');
}
}

&__message {
display: flex;
flex-direction: row;
padding: 8px 16px;
border-radius: 16px;
position: relative;

&--with-attachments {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
box-shadow: none;
}

&::after {
content: "";
position: absolute;
Expand Down Expand Up @@ -447,6 +473,19 @@ $scroll-bar-width: 4px;
&--green {
background-color: map.get(settings.$green, 'lighten-5');
}

&--with-attachments {
box-shadow: none;
}
}

&__message-container {
&--with-attachments {
box-shadow:
0 1px 10px hsla(0, 0%, 39.2%, 0.06),
0 1px 1px hsla(0, 0%, 39.2%, 0.04),
0 2px 10px -1px hsla(0, 0%, 39.2%, 0.02);
}
}

&__sender {
Expand Down Expand Up @@ -561,6 +600,19 @@ $scroll-bar-width: 4px;
&--green {
background-color: map.get(settings.$grey, 'darken-3');
}

&--with-attachments {
box-shadow: none;
}
}

&__message-container {
&--with-attachments {
box-shadow:
0 1px 10px hsla(0, 0%, 39.2%, 0.06),
0 1px 1px hsla(0, 0%, 39.2%, 0.04),
0 2px 10px -1px hsla(0, 0%, 39.2%, 0.02);
}
}

&__message-container--right:not(&__message-container--grouped) .a-chat__message::after {
Expand Down
16 changes: 15 additions & 1 deletion src/components/AChat/AChat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,19 @@ const scrollTo = (position: number) => {
}
}

const scrollByOffset = (offset: number) => {
const formPadding = 8
const entireOffset = offset + formPadding

if (messagesRef.value) {
const scrollBottom =
messagesRef.value.scrollHeight -
(messagesRef.value.scrollTop + messagesRef.value.clientHeight)

messagesRef.value.scrollTop += scrollBottom > entireOffset ? 0 : entireOffset
}
}

const scrollToMessage = (index: number) => {
if (!messagesRef.value) return

Expand Down Expand Up @@ -265,7 +278,8 @@ defineExpose({
scrollToMessageEasy,
maintainScrollPosition,
scrollToMessage,
scrollTo
scrollTo,
scrollByOffset
})

const spinnerTop = computed(() => {
Expand Down
Loading