Skip to content

Commit 6467737

Browse files
committed
working
Signed-off-by: Vedansh Saini <[email protected]>
1 parent d3e92c6 commit 6467737

File tree

5 files changed

+58
-56
lines changed

5 files changed

+58
-56
lines changed

src/index.css

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ body {
77
padding: 0;
88
background-color: rgba(251, 251, 251, 0.6);
99
}
10-
1110
* {
1211
box-sizing: border-box;
1312
}
@@ -89,4 +88,33 @@ body,input,div,h3,h4,p,label,hr, #scrumReport{
8988
.dark-mode hr {
9089
border-color: #505050 !important;
9190
transition: border-color 0.3s ease-in-out;
91+
}
92+
#scrumReport {
93+
font-size: 13px !important;
94+
line-height: 1.5 !important;
95+
}
96+
97+
#scrumReport b {
98+
font-size: 13px !important;
99+
}
100+
101+
#scrumReport li {
102+
font-size: 13px !important;
103+
margin-bottom: 4px !important;
104+
}
105+
106+
.dark-mode #scrumReport {
107+
font-size: 13px !important;
108+
}
109+
110+
.dark-mode #scrumReport b {
111+
font-size: 13px !important;
112+
}
113+
114+
.dark-mode #scrumReport li {
115+
font-size: 13px !important;
116+
}
117+
118+
.dark-mode a {
119+
color: #00b7ff !important;
92120
}

src/popup.html

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<meta http-equiv="X-UA-Compatible" content="ie=edge">
77
<link rel="stylesheet" href="./tailwindcss.css">
8-
<!-- <link href="materialize/css/materialize.min.css" type="text/css" rel="stylesheet"> -->
98
<link rel="stylesheet" type="text/css" href="index.css">
109
<script src="./scripts/fontawesome.js"></script>
1110
<style type="text/css">
1211
html,body{
13-
width: 350px !important;
12+
width: 375px !important;
1413
height: 600px !important;
1514
max-height: 600px !important;
1615
overflow-y: scroll;
@@ -118,10 +117,31 @@ <h4 class="font-semibold text-xl">Note:</h4>
118117
</div>
119118
</div>
120119

121-
<hr class="border-t-2 border-black">
122-
<div class="flex items-center mb-0 justify-center text-xl">
123-
<a target="_blank" href="https://github.com/fossasia/scrum_helper" class="flex items-center"><h6><i class="fa fa-github" aria-hidden="true"></i> view code</h6></a>
120+
<div class="mt-6 border-t border-gray-300">
121+
<div class="bg-white rounded-3xl mx-2 mt-4 mb-2 p-4 border border-gray-100 shadow-sm">
122+
<div class="flex items-center justify-center space-x-3">
123+
<a target="_blank"
124+
href="https://github.com/fossasia/scrum_helper"
125+
class="bg-blue-50 hover:bg-blue-100 text-blue-600 transition-all duration-200 rounded-lg px-4 py-2 flex items-center space-x-2">
126+
<i class="fa fa-code text-sm"></i>
127+
<span class="text-sm font-medium">View Code</span>
128+
</a>
129+
<a target="_blank"
130+
href="https://github.com/fossasia/scrum_helper/issues"
131+
class="bg-blue-50 hover:bg-blue-100 text-blue-600 transition-all duration-200 rounded-lg px-4 py-2 flex items-center space-x-2">
132+
<i class="fa fa-bug text-sm"></i>
133+
<span class="text-sm font-medium">Report Issue</span>
134+
</a>
124135
</div>
136+
</div>
137+
<div class="mt-3 pt-3 border-t border-gray-200 flex justify-center items-center py-5">
138+
<p class="text-xs text-gray-600 text-center">
139+
Made with ❤️ by <strong>FOSSASIA</strong>
140+
<span class="text-gray-500 dark:text-gray-300">v2.0</span>
141+
</p>
142+
</div>
143+
</div>
144+
</div>
125145
</div>
126146
<script src="scripts/jquery-3.2.1.min.js"></script>
127147
<script type="text/javascript" type="text/javascript" src="materialize/js/materialize.min.js"></script>

src/scripts/main.js

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* global $,Materialize*/
21
var enableToggleElement = document.getElementById('enable');
32
var githubUsernameElement = document.getElementById('githubUsername');
43
var projectNameElement = document.getElementById('projectName');
@@ -8,9 +7,7 @@ var startingDateElement = document.getElementById('startingDate');
87
var endingDateElement = document.getElementById('endingDate');
98
var showOpenLabelElement = document.getElementById('showOpenLabel');
109
var userReasonElement = document.getElementById('userReason');
11-
// var gsoc = 0; //0 means gsoc. 1 means gsoc
1210
function handleBodyOnLoad() {
13-
// prefill name
1411
chrome.storage.local.get(
1512
[
1613
'githubUsername',
@@ -23,8 +20,6 @@ function handleBodyOnLoad() {
2320
'userReason',
2421
'lastWeekContribution',
2522
'yesterdayContribution',
26-
// 'gsoc',
27-
// 'selectedTab',
2823
],
2924
(items) => {
3025
if (items.githubUsername) {
@@ -72,21 +67,6 @@ function handleBodyOnLoad() {
7267
yesterdayContributionElement.checked = true;
7368
handleYesterdayContributionChange();
7469
}
75-
76-
// if (items.gsoc == 1) {
77-
// handleGsocClick();
78-
// } else {
79-
// handleCodeheatClick();
80-
// }
81-
// if (items.selectedTab === 'gsoc') {
82-
// handleGsocClick();
83-
// }
84-
// else {
85-
// handleCodeheatClick();
86-
// }
87-
88-
// initialize materialize tabs
89-
// $('.tabs').tabs('select_tab', items.selectedTab === 'gsoc' ? 'gsocBox' : 'codeheatBox' );
9070
},
9171
);
9272
}
@@ -217,22 +197,6 @@ function handleUserReasonChange() {
217197
var value = userReasonElement.value;
218198
chrome.storage.local.set({ userReason: value });
219199
}
220-
// function handleCodeheatClick() {
221-
// gsoc = 0;
222-
// $('#codeheatTab').addClass('active');
223-
// $('.tabs').tabs();
224-
// $('#noDays').text('7 days');
225-
// chrome.storage.local.set({ gsoc: 0, selectedTab: 'codeheat' });
226-
// handleLastWeekContributionChange();
227-
// }
228-
// function handleGsocClick() {
229-
// gsoc = 1;
230-
// $('#gsocTab').addClass('active');
231-
// $('.tabs').tabs();
232-
// $('#noDays').text('1 day');
233-
// chrome.storage.local.set({ gsoc: 1, selectedTab: 'gsoc' });
234-
// handleLastWeekContributionChange();
235-
// }
236200
enableToggleElement.addEventListener('change', handleEnableChange);
237201
githubUsernameElement.addEventListener('keyup', handleGithubUsernameChange);
238202
projectNameElement.addEventListener('keyup', handleProjectNameChange);
@@ -242,6 +206,4 @@ lastWeekContributionElement.addEventListener('change', handleLastWeekContributio
242206
yesterdayContributionElement.addEventListener('change', handleYesterdayContributionChange);
243207
showOpenLabelElement.addEventListener('change', handleOpenLabelChange);
244208
userReasonElement.addEventListener('keyup', handleUserReasonChange);
245-
document.addEventListener('DOMContentLoaded', handleBodyOnLoad);
246-
// document.getElementById('codeheatTab').addEventListener('click', handleCodeheatClick);
247-
// document.getElementById('gsocTab').addEventListener('click', handleGsocClick);
209+
document.addEventListener('DOMContentLoaded', handleBodyOnLoad);

src/scripts/popup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,6 @@ function toggleRadio(radio) {
216216
end: endDateInput.value,
217217
isLastWeek: radio.id === 'lastWeekContribution'
218218
});
219-
window.generateScrumReport();
219+
// window.generateScrumReport();
220220
});
221221
}

src/scripts/scrumHelper.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ function allIncluded(outputTarget = 'email') {
2222
var showOpenLabel = true;
2323
var showClosedLabel = true;
2424
var userReason = '';
25-
var gsoc = 0; //0 means codeheat. 1 means gsoc
2625

2726
var pr_merged_button =
2827
'<div style="vertical-align:middle;display: inline-block;padding: 0px 4px;font-size:9px;font-weight: 600;color: #fff;text-align: center;background-color: #6f42c1;border-radius: 3px;line-height: 12px;margin-bottom: 2px;" class="State State--purple">closed</div>';
@@ -49,16 +48,10 @@ function allIncluded(outputTarget = 'email') {
4948
'lastWeekContribution',
5049
'yesterdayContribution',
5150
'userReason',
52-
'gsoc',
5351
],
5452
(items) => {
5553
console.log("Storage items received:", items);
56-
if (items.gsoc) {
57-
//gsoc
58-
gsoc = 1;
59-
} else {
60-
gsoc = 0; //codeheat
61-
}
54+
6255
if (items.lastWeekContribution) {
6356
lastWeekContribution = true;
6457
handleLastWeekContributionChange();
@@ -136,8 +129,7 @@ function allIncluded(outputTarget = 'email') {
136129
}
137130
function getLastWeek() {
138131
var today = new Date();
139-
var noDays_to_goback = gsoc == 0 ? 7 : 1;
140-
var lastWeek = new Date(today.getFullYear(), today.getMonth(), today.getDate() - noDays_to_goback);
132+
var lastWeek = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 7);
141133
var lastWeekMonth = lastWeek.getMonth() + 1;
142134
var lastWeekDay = lastWeek.getDate();
143135
var lastWeekYear = lastWeek.getFullYear();

0 commit comments

Comments
 (0)