Skip to content

Commit ae04201

Browse files
committed
added support for gitlab
1 parent 09f09c5 commit ae04201

File tree

4 files changed

+532
-182
lines changed

4 files changed

+532
-182
lines changed

src/manifest.json

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,34 @@
1717
"content_scripts": [
1818
{
1919
"matches": [
20-
"*://groups.google.com/forum/*",
20+
"*://groups.google.com/forum/*",
2121
"*://groups.google.com/g/*",
22-
"*://mail.google.com/*",
23-
"*://outlook.live.com/*",
24-
"*://outlook.office.com/*",
25-
"*://mail.yahoo.com/*"
22+
"*://mail.google.com/*",
23+
"*://outlook.live.com/*",
24+
"*://outlook.office.com/*",
25+
"*://mail.yahoo.com/*"
2626
],
27-
"js": ["scripts/jquery-3.2.1.min.js", "scripts/emailClientAdapter.js", "scripts/scrumHelper.js"]
27+
"js": [
28+
"scripts/jquery-3.2.1.min.js",
29+
"scripts/emailClientAdapter.js",
30+
"scripts/scrumHelper.js"
31+
]
2832
}
2933
],
30-
3134
"content_security_policy": {
3235
"extension_pages": "script-src 'self'; object-src 'self';"
3336
},
34-
"web_accessible_resources": [{
35-
"resources": [
36-
"/icons/night-mode.png",
37-
"icons/night-mode.png"
38-
],
39-
"matches": ["<all_urls>"]
40-
}],
37+
"web_accessible_resources": [
38+
{
39+
"resources": [
40+
"/icons/night-mode.png",
41+
"icons/night-mode.png"
42+
],
43+
"matches": [
44+
"<all_urls>"
45+
]
46+
}
47+
],
4148
"permissions": [
4249
"tabs",
4350
"storage",
@@ -52,4 +59,4 @@
5259
"*://*.yahoo.com/*",
5360
"https://api.github.com/*"
5461
]
55-
}
62+
}

src/popup.html

Lines changed: 106 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!DOCTYPE html>
22
<html>
3+
34
<head>
45
<meta charset="UTF-8">
56
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -8,61 +9,90 @@
89
<link rel="stylesheet" type="text/css" href="index.css">
910
<script src="./scripts/fontawesome.js"></script>
1011
<style type="text/css">
11-
html,body{
12-
width: 375px !important;
13-
height: 600px !important;
14-
max-height: 600px !important;
15-
overflow-y: scroll;
16-
background: #eae4e4;
17-
}
18-
</style>
12+
html,
13+
body {
14+
width: 375px !important;
15+
height: 600px !important;
16+
max-height: 600px !important;
17+
overflow-y: scroll;
18+
background: #eae4e4;
19+
}
20+
</style>
1921
</head>
22+
2023
<body>
2124
<div class="pl-1 py-4 rounded-2xl">
2225
<div class="bg-white px-4 py-4 mx-2 mb-2 rounded-3xl">
23-
<div class="flex justify-between py-2">
24-
<h3 class="text-3xl font-semibold ">Scrum Helper</h3>
25-
<img src="icons/night-mode.png" alt="Night Mode" class="w-7 h-7 mx-3 cursor-pointer">
26-
</div>
27-
<div>
28-
<p class="">Report your development progress by auto-fetching your Git activity for a selected period</p>
29-
</div>
30-
26+
<div class="flex justify-between py-2">
27+
<h3 class="text-3xl font-semibold ">Scrum Helper</h3>
28+
<img src="icons/night-mode.png" alt="Night Mode" class="w-7 h-7 mx-3 cursor-pointer">
29+
</div>
30+
<div>
31+
<p class="">Report your development progress by auto-fetching your Git activity for a selected period</p>
32+
</div>
33+
3134
<div class="center mt-2 ">
32-
<label class="flex items-center justify-center gap-2">
33-
Disable
34-
<input type="checkbox" value="" id="enable" class="sr-only peer" checked>
35-
<div class="relative w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600 dark:peer-checked:bg-blue-600"></div>
36-
<span class=""></span>
37-
Enable
38-
</label>
35+
<label class="flex items-center justify-center gap-2">
36+
Disable
37+
<input type="checkbox" value="" id="enable" class="sr-only peer" checked>
38+
<div
39+
class="relative w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600 dark:peer-checked:bg-blue-600">
40+
</div>
41+
<span class=""></span>
42+
Enable
43+
</label>
3944
</div>
4045
</div>
41-
46+
4247
<div class="rounded-2xl">
4348
<div class=" border-gray-100 border-2 bg-white rounded-3xl px-4 py-4 mx-2 my-2">
4449
<div>
4550
<h4>Your Project Name</h4>
46-
<input id="projectName" type="text" class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2" placeholder="Enter your project name">
51+
<input id="projectName" type="text"
52+
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
53+
placeholder="Enter your project name">
4754
</div>
48-
<div>
55+
<div class="mb-4">
56+
<h4>Platform</h4>
57+
<div class="flex gap-4">
58+
<label class="flex items-center gap-2">
59+
<input type="radio" name="platform" value="github" checked class="form-radio">
60+
GitHub
61+
</label>
62+
<label class="flex items-center gap-2">
63+
<input type="radio" name="platform" value="gitlab" class="form-radio">
64+
GitLab
65+
</label>
66+
</div>
67+
</div>
68+
<div id="githubUsernameContainer">
4969
<h4>Your Github Username</h4>
50-
<input id="githubUsername" type="text" class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2" placeholder="Required for fetching your contributions">
70+
<input id="githubUsername" type="text"
71+
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
72+
placeholder="Required for fetching your contributions">
73+
</div>
74+
<div id="gitlabUsernameContainer" class="hidden">
75+
<h4>Your GitLab Username</h4>
76+
<input id="gitlabUsername" type="text"
77+
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
78+
placeholder="Required for fetching your contributions">
5179
</div>
52-
80+
5381
<div>
5482
<p class="text-sm">Fetch your contributions between:</p>
5583
<div class="flex justify-between items-center my-2 mx-4">
5684
<div class="flex items-center gap-2">
57-
<input type="radio" id="lastWeekContribution" name="timeframe" class="form-radio" onclick="toggleRadio(this)">
85+
<input type="radio" id="lastWeekContribution" name="timeframe" class="form-radio"
86+
onclick="toggleRadio(this)">
5887
<label for="lastWeekContribution">Last 7 days</label>
5988
</div>
6089
<div class="flex items-center gap-2">
61-
<input type="radio" id="yesterdayContribution" name="timeframe" class="form-radio" onclick="toggleRadio(this)">
90+
<input type="radio" id="yesterdayContribution" name="timeframe" class="form-radio"
91+
onclick="toggleRadio(this)">
6292
<label for="yesterdayContribution">Last 1 day</label>
6393
</div>
6494
</div>
65-
95+
6696
<div id="customDateContainer" class="flex justify-between items-center mt-2">
6797
<div>
6898
<label for="startingDate">Start Date:</label>
@@ -74,79 +104,84 @@ <h4>Your Github Username</h4>
74104
</div>
75105
</div>
76106
</div>
77-
107+
78108
<div class="col s12">
79109
<br />
80110
<input type="checkbox" id="showOpenLabel" class="form-checkbox h-4 w-4 text-blue-600">
81-
<label id="checkboxLabel" for="showOpenLabel" class="text-gray-700 font-medium text-sm">Show Open/Closed Label</label>
111+
<label id="checkboxLabel" for="showOpenLabel" class="text-gray-700 font-medium text-sm">Show Open/Closed
112+
Label</label>
82113
</div>
83114
<div class="my-4">
84115
<p class="text-sm font-medium">What is blocking you from making progress?</p>
85-
<input id="userReason" type="text" class="w-full text-gray-800 mt-3 rounded-xl px-4 py-1" placeholder="Enter your reason">
116+
<input id="userReason" type="text" class="w-full text-gray-800 mt-3 rounded-xl px-4 py-1"
117+
placeholder="Enter your reason">
86118
<hr class="border-t-2 border-gray-700 mt-1 ">
87119
</div>
88120
<div>
89121
<div>
90122
<h6 class="text-base font-semibold">Scrum Report</h6>
91-
<div id="scrumReport"
92-
contenteditable="true"
93-
class="min-h-[200px] overflow-y-auto whitespace-pre-wrap border-2 border-gray-200 bg-gray-100 rounded-xl text-gray-800 p-2 my-2">
123+
<div id="scrumReport" contenteditable="true"
124+
class="min-h-[200px] overflow-y-auto whitespace-pre-wrap border-2 border-gray-200 bg-gray-100 rounded-xl text-gray-800 p-2 my-2">
94125
</div>
95126
</div>
96127
<div class="flex justify-between gap-2">
97-
<button id="generateReport" class="flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded">
98-
<i class="fa fa-refresh"></i> Generate Report
128+
<button id="generateReport"
129+
class="flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded">
130+
<i class="fa fa-refresh"></i> Generate Report
99131
</button>
100-
<button id="copyReport" class="flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded">
101-
<i class="fa fa-copy"></i> Copy Report
132+
<button id="copyReport"
133+
class="flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded">
134+
<i class="fa fa-copy"></i> Copy Report
102135
</button>
103-
</div>
136+
</div>
137+
104138

105-
106139
<div class="border-gray-100 border-2 bg-white rounded-3xl px-4 py-2 mx-2 my-2">
107140
<div>
108141
<h4 class="font-semibold text-xl">Note:</h4>
109142
<ul class="text-xs list-disc list-inside">
110-
<li>The PRs fetched are based on the most recent review by any contributor. If you reviewed a PR 10 days ago and someone else reviewed it 2 days ago, it will still appear in your activity for the past week. (<a target="_blank" href="https://github.com/fossasia/scrum_helper/issues/20">See this issue</a>.)
143+
<li>The PRs fetched are based on the most recent review by any contributor. If you reviewed a PR 10 days
144+
ago and someone else reviewed it 2 days ago, it will still appear in your activity for the past week.
145+
(<a target="_blank" href="https://github.com/fossasia/scrum_helper/issues/20">See this issue</a>.)
111146
</li>
112-
<li>Please note that some discrepancies may occur in the generated SCRUM. We recommend manually reviewing and editing the report to ensure accuracy before sharing
147+
<li>Please note that some discrepancies may occur in the generated SCRUM. We recommend manually
148+
reviewing and editing the report to ensure accuracy before sharing
113149
</li>
114150
</ul>
115151
</div>
116152
</div>
153+
</div>
117154
</div>
118-
</div>
119155

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>
135-
</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>
156+
<div class="mt-6 border-t border-gray-300">
157+
<div class="bg-white rounded-3xl mx-2 mt-4 mb-2 p-4 border border-gray-100 shadow-sm">
158+
<div class="flex items-center justify-center space-x-3">
159+
<a target="_blank" href="https://github.com/fossasia/scrum_helper"
160+
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">
161+
<i class="fa fa-code text-sm"></i>
162+
<span class="text-sm font-medium">View Code</span>
163+
</a>
164+
<a target="_blank" href="https://github.com/fossasia/scrum_helper/issues"
165+
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">
166+
<i class="fa fa-bug text-sm"></i>
167+
<span class="text-sm font-medium">Report Issue</span>
168+
</a>
169+
</div>
170+
</div>
171+
<div class="mt-3 pt-3 border-t border-gray-200 flex justify-center items-center py-5">
172+
<p class="text-xs text-gray-600 text-center">
173+
Made with ❤️ by <strong>FOSSASIA</strong>
174+
<span class="text-gray-500 dark:text-gray-300">v2.0</span>
175+
</p>
176+
</div>
177+
</div>
142178
</div>
143179
</div>
144-
</div>
145-
</div>
146180
<script src="scripts/jquery-3.2.1.min.js"></script>
147181
<script type="text/javascript" type="text/javascript" src="materialize/js/materialize.min.js"></script>
148182
<script src="scripts/main.js"></script>
149183
<script src="scripts/scrumHelper.js"></script>
150184
<script src="scripts/popup.js"></script>
151185
</body>
152-
</html>
186+
187+
</html>

0 commit comments

Comments
 (0)