Skip to content

Commit 65cc1c3

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 a2428b6 commit 65cc1c3

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

app/renderer/css/main.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,31 @@ webview.focus {
386386
font-size: 14px;
387387
}
388388

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

app/renderer/js/main.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,23 @@ window.addEventListener("load", async () => {
12151215
>${t.__("Do Not Disturb")}</span
12161216
>
12171217
</div>
1218+
<div id="dnd-dropdown" class="dnd-dropdown hidden">
1219+
<div class="dnd-dropdown-item" data-minutes="30">
1220+
${t.__("30 minutes")}
1221+
</div>
1222+
<div class="dnd-dropdown-item" data-minutes="60">
1223+
${t.__("1 hour")}
1224+
</div>
1225+
<div class="dnd-dropdown-item" data-minutes="180">
1226+
${t.__("3 hours")}
1227+
</div>
1228+
<div class="dnd-dropdown-item" data-minutes="720">
1229+
${t.__("12 hours")}
1230+
</div>
1231+
<div class="dnd-dropdown-item" data-minutes="forever">
1232+
${t.__("Until I resume")}
1233+
</div>
1234+
</div>
12181235
<div class="action-button hidden" id="reload-action">
12191236
<i class="material-icons md-48">refresh</i>
12201237
<span id="reload-tooltip" style="display: none"

0 commit comments

Comments
 (0)