Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
davixdedem committed Dec 8, 2023
1 parent beb14be commit 2b1e859
Show file tree
Hide file tree
Showing 7 changed files with 501 additions and 95 deletions.
8 changes: 3 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ android {

defaultConfig {
applicationId = "com.magix.atcommand"
minSdk = 33
minSdk = 30
targetSdk = 33
versionCode = 3
versionName = "0.0.2"

versionCode = 5
versionName = "0.0.4"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

Expand Down Expand Up @@ -48,7 +47,6 @@ dependencies {
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
implementation("com.github.mik3y:usb-serial-for-android:3.7.0")
implementation("com.google.android.gms:play-services-location:21.0.1")

}


242 changes: 242 additions & 0 deletions app/src/main/assets/assets/css/custom_index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
@import url('https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600,700,800');
* {
box-sizing: border-box;
}
body {
background-color: #FFE53B;
background-image: linear-gradient(147deg, #FFE53B 0%, #fd3838 74%);
min-height: 100vh;
font-family: 'Fira Sans', sans-serif;
display: flex;
}

.blog-slider {
width: 95%;
position: relative;
max-width: 800px;
margin: auto;
background: #fff;
box-shadow: 0px 14px 80px rgba(34, 35, 58, 0.2);
padding: 25px;
border-radius: 25px;
height: 400px;
transition: all .3s;


@media screen and (max-width: 992px) {
max-width: 680px;
height: 400px;
}

@media screen and (max-width: 768px) {
min-height: 500px;
height: auto;
margin: 180px auto;
}


@media screen and (max-height: 500px) and (min-width: 992px) {
height: 350px;
}

&__item {
display: flex;
align-items: center;

@media screen and (max-width: 768px) {
flex-direction: column;
}

&.swiper-slide-active {
.blog-slider__img {
img {
opacity: 1;
transition-delay: .3s;
}
}
.blog-slider__content {
> * {

opacity: 1;
transform: none;

@for $i from 0 to 15 {
&:nth-child(#{$i + 1}) {
transition-delay: $i * 0.1 + 0.3s;
}
}

}
}
}

}

&__img {
// width: 40%;
width: 300px;
flex-shrink: 0;
height: 300px;
background-image: linear-gradient(147deg, #fe8a39 0%, #fd3838 74%);
box-shadow: 4px 13px 30px 1px rgba(252, 56, 56, 0.2);
border-radius: 20px;
transform: translateX(-80px);

overflow: hidden;

&:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(147deg, #fe8a39 0%, #fd3838 74%);
border-radius: 20px;
opacity: 0.8;
}

img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
opacity: 0;
border-radius: 20px;
transition: all .3s;
}


@media screen and (max-width: 992px) {
// width: 45%;
}
@media screen and (max-width: 768px) {
transform: translateY(-50%);
width: 90%;
}
@media screen and (max-width: 576px) {
width: 95%;
}
@media screen and (max-height: 500px) and (min-width: 992px) {
height: 270px;
}
}

&__content {
// width: 60%;
padding-right: 25px;
@media screen and (max-width: 992px) {
// width: 55%;
}
@media screen and (max-width: 768px) {
margin-top: -80px;
text-align: center;
padding: 0 30px;
}

@media screen and (max-width: 576px) {
padding: 0
}
> * {
opacity: 0;
transform: translateY(25px);
transition: all .4s;


}

}

&__code {
color: #7b7992;
margin-bottom: 15px;
display: block;
font-weight: 500;
}

&__title {
font-size: 24px;
font-weight: 700;
color: #0d0925;
margin-bottom: 20px;
}

&__text {
color: #4e4a67;
margin-bottom: 30px;
line-height: 1.5em;
}

&__button {
display: inline-flex;
background-image: linear-gradient(147deg, #fe8a39 0%, #fd3838 74%);
padding: 15px 35px;
border-radius: 50px;
color: #fff;
box-shadow: 0px 14px 80px rgba(252, 56, 56, 0.4);
text-decoration: none;
font-weight: 500;
justify-content: center;
text-align: center;
letter-spacing: 1px;
@media screen and (max-width: 576px) {
width: 100%;
}

}
.swiper-container-horizontal>.swiper-pagination-bullets, .swiper-pagination-custom, .swiper-pagination-fraction {
bottom: 10px;
left: 0;
width: 100%;

}
&__pagination {
position: absolute;
z-index: 21;
right: 20px;
width: 11px!important;
text-align: center;
left: auto!important;
top: 50%;
bottom: auto!important;
transform: translateY(-50%);
@media screen and (max-width: 768px) {
transform: translateX(-50%);
left: 50%!important;
top: 205px;
width: 100%!important;
display: flex;
justify-content: center;
align-items: center;
}
&.swiper-pagination-bullets .swiper-pagination-bullet {
margin: 8px 0;
@media screen and (max-width: 768px) {
margin: 0 5px;
}
}

.swiper-pagination-bullet {
width: 11px;
height: 11px;
display: block;
border-radius: 10px;
background: #062744;
opacity: 0.2;
transition: all .3s;
&-active {
opacity: 1;
background: #fd3838;
height: 30px;
box-shadow: 0px 0px 20px rgba(252, 56, 56, 0.3);

@media screen and (max-width: 768px) {
height: 11px;
width: 30px;
}
}
}

}

}
61 changes: 61 additions & 0 deletions app/src/main/assets/assets/js/custom-chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,67 @@ function hideContacts() {
});
}

// Disabilito la TextArea in caso di device disconnesso
function disableTextareaAndLoadingIndicator() {
var textareaElement = document.getElementById('messageInput');
var loadingIndicator = document.getElementById('loadingIndicator');
var sendButton = document.querySelector('.btn.btn-primary.btn-icon.send-icon.rounded-circle.text-light.mb-1');
var locationLink = document.getElementById('buttonLocation');
var dropdownMenu = document.querySelector('.dropdown-menu');
var attachmentElement = document.querySelector('.attachment');

if (textareaElement && loadingIndicator && sendButton && locationLink && dropdownMenu && attachmentElement) {
textareaElement.disabled = true; // Disabilita l'area di testo
textareaElement.style.opacity = '0.8'; // Opacità al 50% per oscurare l'area di testo
textareaElement.style.color = 'black'; // Rende il testo della textarea nero

loadingIndicator.style.display = 'block'; // Mostra l'indicatore di caricamento

sendButton.style.pointerEvents = 'none'; // Disabilita gli eventi di puntatore sul pulsante
sendButton.style.opacity = '0'; // Opacità al 50% per oscurare il pulsante

locationLink.style.display = 'none'; // Rende invisibile l'elemento con ID "buttonLocation"

dropdownMenu.style.display = 'none'; // Rende invisibile l'elemento con classe "dropdown-menu"

attachmentElement.style.display = 'none'; // Rende invisibile l'elemento con classe "attachment"

textareaElement.value = 'In order to chat, connect the dev board.'; // Inserisce il testo nella textarea
} else {
console.log('Elementi non trovati');
}
}

//Funzione che ri-abilita la TextArea per un device connesso
function enableTextareaAndLoadingIndicator() {
var textareaElement = document.getElementById('messageInput');
var loadingIndicator = document.getElementById('loadingIndicator');
var sendButton = document.querySelector('.btn.btn-primary.btn-icon.send-icon.rounded-circle.text-light.mb-1');
var locationLink = document.getElementById('buttonLocation');
var dropdownMenu = document.querySelector('.dropdown-menu');
var attachmentElement = document.querySelector('.attachment');

if (textareaElement && loadingIndicator && sendButton && locationLink && dropdownMenu && attachmentElement) {
textareaElement.disabled = false; // Riabilita l'area di testo
textareaElement.style.opacity = '1'; // Ripristina l'opacità
textareaElement.style.color = ''; // Ripristina il colore del testo della textarea

loadingIndicator.style.display = 'none'; // Nasconde l'indicatore di caricamento

sendButton.style.pointerEvents = ''; // Riattiva gli eventi di puntatore sul pulsante
sendButton.style.opacity = '1'; // Ripristina l'opacità del pulsante

locationLink.style.display = ''; // Riattiva l'elemento con ID "buttonLocation"

dropdownMenu.style.display = ''; // Riattiva l'elemento con classe "dropdown-menu"

attachmentElement.style.display = ''; // Riattiva l'elemento con classe "attachment"

textareaElement.value = ''; // Cancella il testo nella textarea
} else {
console.log('Elementi non trovati');
}
}

// Avviene quando la pagina è stata caricata
window.onload = function() {
Expand Down
Loading

0 comments on commit 2b1e859

Please sign in to comment.