Skip to content

Commit 9b6b47a

Browse files
committed
tooltips: Add HTML structure and CSS for DND duration dropdown.
Introduces a hidden dropdown menu with preset duration options and accompanying styles. This prepares the UI for timed DND selection.
1 parent 2d87043 commit 9b6b47a

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

app/renderer/css/main.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,31 @@ webview.focus {
378378
font-size: 14px;
379379
}
380380

381+
.dnd-dropdown {
382+
position: absolute;
383+
left: 60px;
384+
background-color: rgb(32 33 36 / 100%); /* closer to Zulip's sidebars */
385+
border: 1px solid rgb(60 60 60 / 100%);
386+
border-radius: 8px;
387+
color: rgb(240 240 240 / 100%);
388+
z-index: 1000;
389+
padding: 4px 0;
390+
font-size: 13px;
391+
font-family: arial, sans-serif;
392+
min-width: 150px;
393+
box-shadow: 0 4px 12px rgb(0 0 0 / 40%);
394+
}
395+
396+
.dnd-dropdown-item {
397+
padding: 8px 16px;
398+
cursor: pointer;
399+
transition: background-color 0.15s ease;
400+
}
401+
402+
.dnd-dropdown-item:hover {
403+
background-color: rgb(60 60 60 / 100%);
404+
}
405+
381406
#loading-tooltip::after,
382407
#dnd-tooltip::after,
383408
#back-tooltip::after,

app/renderer/js/main.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,15 @@ window.addEventListener("load", async () => {
12101210
>${t.__("Do Not Disturb")}</span
12111211
>
12121212
</div>
1213+
<div id="dnd-dropdown" class="dropdown hidden">
1214+
<div class="dnd-dropdown-item" data-minutes="30">30 minutes</div>
1215+
<div class="dnd-dropdown-item" data-minutes="60">1 hour</div>
1216+
<div class="dnd-dropdown-item" data-minutes="180">3 hours</div>
1217+
<div class="dnd-dropdown-item" data-minutes="720">12 hours</div>
1218+
<div class="dnd-dropdown-item" data-minutes="forever">
1219+
Until I resume
1220+
</div>
1221+
</div>
12131222
<div class="action-button hidden" id="reload-action">
12141223
<i class="material-icons md-48">refresh</i>
12151224
<span id="reload-tooltip" style="display: none"

0 commit comments

Comments
 (0)