Skip to content

Commit 29b8116

Browse files
committed
home button
Signed-off-by: Vedansh Saini <[email protected]>
1 parent ef91d8b commit 29b8116

File tree

3 files changed

+37
-10
lines changed

3 files changed

+37
-10
lines changed

src/index.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,4 +338,18 @@ body,input,div,h3,h4,p,label,hr, #scrumReport{
338338

339339
.dark-mode .tooltip-container.tooltip-right .tooltip-bubble::after {
340340
border-color: transparent #374151 transparent transparent;
341+
}
342+
#homeButton {
343+
background: none;
344+
border: none;
345+
outline: none;
346+
cursor: pointer;
347+
display: flex;
348+
align-items: center;
349+
}
350+
#homeButton:active {
351+
background: #e5e7eb;
352+
}
353+
.dark-mode #homeButton:active {
354+
background: #374151;
341355
}

src/popup.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<div class="pl-1 py-4 rounded-2xl">
2222
<div class="bg-white px-4 py-4 mx-2 mb-2 rounded-3xl">
2323
<div class="flex justify-between py-2">
24-
<h3 class="text-3xl font-semibold ">Scrum Helper</h3>
24+
<h3 id="scrumHelperHeading" class="text-3xl font-semibold cursor-pointer">Scrum Helper</h3>
2525
<img src="icons/night-mode.png" alt="Night Mode" class="w-7 h-7 mx-3 cursor-pointer">
2626
</div>
2727
<div>
@@ -36,9 +36,14 @@ <h3 class="text-3xl font-semibold ">Scrum Helper</h3>
3636
<span class=""></span>
3737
Enable
3838
</label>
39-
<button id="settingsToggle">
40-
<img id="settingsIcon" src="icons/settings-light.png" alt="Settings" class="w-7 h-7 mx-3 cursor-pointer">
41-
</button>
39+
<div class="flex">
40+
<button id="homeButton" title="Go to Report" class="ml-1 p-2 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition" style="font-size: 2.5rem;">
41+
<i class="fa fa-home text-4xl text-gray-600 dark:text-gray-300"></i>
42+
</button>
43+
<button id="settingsToggle">
44+
<img id="settingsIcon" src="icons/settings-light.png" alt="Settings" class="w-7 h-7 mx-3 cursor-pointer">
45+
</button>
46+
</div>
4247
</div>
4348
</div>
4449

src/scripts/popup.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ document.addEventListener('DOMContentLoaded', function() {
4747
const darkModeToggle = document.querySelector('img[alt="Night Mode"]');
4848
const settingsIcon = document.getElementById('settingsIcon');
4949
const body = document.body;
50+
const homeButton = document.getElementById('homeButton');
51+
const scrumHelperHeading = document.getElementById('scrumHelperHeading');
52+
const settingsToggle = document.getElementById('settingsToggle');
53+
const reportSection = document.getElementById('reportSection');
54+
const settingsSection = document.getElementById('settingsSection');
55+
56+
let isSettingsVisible = false;
5057

5158
chrome.storage.local.get(['darkMode'], function(result) {
5259
if(result.darkMode) {
@@ -261,12 +268,6 @@ document.addEventListener('DOMContentLoaded', function() {
261268
});
262269
}
263270

264-
const settingsToggle = document.getElementById('settingsToggle');
265-
const reportSection = document.getElementById('reportSection');
266-
const settingsSection = document.getElementById('settingsSection');
267-
268-
let isSettingsVisible = false;
269-
270271
function showReportView() {
271272
isSettingsVisible = false;
272273
reportSection.classList.remove('hidden');
@@ -293,6 +294,13 @@ document.addEventListener('DOMContentLoaded', function() {
293294
});
294295
}
295296

297+
if (homeButton) {
298+
homeButton.addEventListener('click', showReportView);
299+
}
300+
if (scrumHelperHeading) {
301+
scrumHelperHeading.addEventListener('click', showReportView);
302+
}
303+
296304
showReportView();
297305

298306
});

0 commit comments

Comments
 (0)