Skip to content

Commit

Permalink
add attachments menu to chat
Browse files Browse the repository at this point in the history
  • Loading branch information
jannickheisch committed Jan 29, 2024
1 parent 9967ac8 commit 304ce38
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 10 additions & 1 deletion android/tinySSB/app/src/main/assets/web/tremola.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
</div>

<div id='attach-menu' class='attach-menu-overlay'>
<button class="attach-menu-item-button">Send sketch</button>
<!--
<button class="attach-menu-item-button" onclick="menu_take_picture();">Take picture</button>
<button class="attach-menu-item-button" onclick="menu_pick_image();">Attach file</button>
-->
</div>

<div id="div:modal_img" style="display: none; position: fixed; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9);">
Expand Down Expand Up @@ -535,7 +538,13 @@
</div>

<table id="div:textarea" class="neutral" style="height: 56px; width: calc(100% - 6pt); display: none; border: 3px inset #ebf4fa /*var(--light)*/; margin: 3pt;" width=100%>
<tr><td width=95%><textarea id='draft' rows=3 placeholder='Tap here to type'></textarea>

<tr><td width=95%>
<div style="position: relative;">

<textarea id='draft' rows=3 placeholder='Tap here to type' style="padding-right: 40px;"></textarea>
<button id="attachmentButton" onclick="chat_open_attachments_menu()" class="flat buttontext" style="background-image: url('img/paperclip.svg'); background-color: transparent; width: 45px; height: 45px; position: absolute; right: 2px; top: 46%; transform: translateY(-50%);"></button>
</div>
<!-- td width=5% height=100%><button id='btn:attach' class="flat passive buttontext"><font size=+2>&#x1F4CE;</font><br><font size=small>Attach</font></button></td -->
<td width=8% height=100%><button id='btn:attach' class="flat white buttontext" onclick="btnBridge(this);" style="background-image: url('img/record.svg'); fill: #fff; width: 50px; height: 50px; margin-bottom: 4px;"></button>
<td width=5% height=100%><button id='btn:preview' class="flat passive buttontext" onclick="showPreview();" style="background-image: url('img/send-button.svg'); width: 50px; height: 50px; margin-bottom: 4px;">&nbsp;<!-- font size=+2>&#x1F440;</font><br><font size=small>Preview</font --></button>
Expand Down
6 changes: 6 additions & 0 deletions android/tinySSB/app/src/main/assets/web/tremola_ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,4 +557,10 @@ function refresh_connection_progressbar(min_entries, old_min_entries, old_want_e
}
}

function chat_open_attachments_menu() {
closeOverlay()
document.getElementById('overlay-bg').style.display = 'initial'
document.getElementById('attach-menu').style.display = 'initial'
}

// ---

0 comments on commit 304ce38

Please sign in to comment.