Skip to content

Commit

Permalink
Battery app updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jjophi authored Oct 16, 2023
1 parent 88d8eb6 commit ec3aa12
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
12 changes: 8 additions & 4 deletions battery-calcuator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ <h2 class="page-title">
<span class="subtext">SWIS - ADCP Edition</span>
<span>Battery Capacity Requirement Calculator</span>
</h2>
<div class="bc-button-group" style="color: #000;">
<div class="bc-button-group">
<button @click="copyURL" title="Copy URL">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#9a9a9a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
<div class="bc-info-box" v-if="showInfo">URL copied</div>
</button>
<button @click="showHelp = !showHelp" title="Help">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#9a9a9a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-help-circle"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>
Expand Down Expand Up @@ -238,8 +239,6 @@ <h5>Additional Info</h5>
MF: 24000,
HF: 64000,
MAX_TOTAL_TX_DURATION: 43200, //12 hours
MAX_TRANSMISSIONS: 12 ,// 12 times a day
IDLE_DURATION: 900, //15 minutes
IDLE_TIME: 15, //mins
RX_POWER: 4, //watts
SLEEP_POWER: 0.01, //watts
Expand All @@ -254,14 +253,14 @@ <h5>Additional Info</h5>

//misc vars
const showHelp = ref(false);
const showInfo = ref(false);

//Error Messages
const noErrors = ref(false);

const rangeError = ref('');
const recoModemError = ref('');
const filesizeError = ref('');
// const modemError = ref('');
let commonError = ref('');

const errors = reactive({
Expand Down Expand Up @@ -531,6 +530,10 @@ <h5>Additional Info</h5>
tempEl.select();
document.execCommand('copy');
document.body.removeChild(tempEl);
showInfo.value = true;
setTimeout( function() {
showInfo.value = false;
}, 1200);
}

onMounted(() => {
Expand Down Expand Up @@ -568,6 +571,7 @@ <h5>Additional Info</h5>

return {
showHelp,
showInfo,
rangeError,
recoModemError,
filesizeError,
Expand Down
20 changes: 18 additions & 2 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4161,12 +4161,29 @@ p.small-title {
font-size: 1.8rem;
color: #e6782f;
}

.bc-button-group {
position: absolute;
bottom: 0;
right: 0;
}
.bc-info-box {
display: block;
position: absolute;
width: 114px;
font-size: 14px;
bottom: -36px;
right: 0;
padding: 9px;
background-color: #6c6c6c;
color: #fff;
border-radius: 4px;
animation: showInfo 1s ease-out 1 forwards;
}
@keyframes showInfo {
0% {opacity: 1;}
70% {opacity: 1;}
100% {opacity: 0;}
}
.bc-header button {
background: transparent;
border: none;
Expand Down Expand Up @@ -4208,7 +4225,6 @@ p.small-title {
}
.bc-wrapper .bc-row.two-col {
grid-template-columns: 1fr 319px;

}
.bc-wrapper .bc-label {
padding-right: 1rem;
Expand Down

0 comments on commit ec3aa12

Please sign in to comment.