Skip to content

Commit 6102295

Browse files
authored
Merge branch 'master' into commits
2 parents 9b1dfcb + 181be30 commit 6102295

File tree

10 files changed

+1221
-1081
lines changed

10 files changed

+1221
-1081
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
5. Click the Scrum Helper icon on your browser toolbar
2424
6. Fill in your settings in the popup (GitHub username, date range, etc.)
2525

26-
### For Firefox:
26+
<!-- ### For Firefox:
2727
2828
1. Clone this repository to your local machine.
2929
2. Open Firefox and navigate to `about:debugging`
@@ -36,7 +36,7 @@
3636
3737
**Note for Firefox users:** The extension will be automatically removed when you close Firefox. You'll need to reload it each time you start a new browser session by repeating steps 2-5.
3838
39-
**Persistence Note:** If you need the extension to persist between sessions, use Firefox Developer Edition. You can enable persistence by setting `xpinstall.signatures.required` to `false` in the browser's configuration.
39+
**Persistence Note:** If you need the extension to persist between sessions, use Firefox Developer Edition. You can enable persistence by setting `xpinstall.signatures.required` to `false` in the browser's configuration. -->
4040

4141
## Usage
4242

@@ -80,8 +80,12 @@ $ npm install
8080

8181
![POPUP](docs/images/popup.png)
8282

83+
![POPUP2](docs/images/popup2.png)
84+
8385
![STANDALONE](docs/images/standalone.png)
8486

87+
![SETTINGSMENU](docs/images/settings.png)
88+
8589
## Using Scrum Helper with Your Own GitHub Organization
8690

8791
Scrum Helper is not limited to the [FOSSASIA](https://github.com/fossasia) organization. You can easily configure it to fetch and generate SCRUM reports for your own GitHub organization or repositories.
@@ -116,7 +120,6 @@ Scrum Helper is not limited to the [FOSSASIA](https://github.com/fossasia) organ
116120
* Save your changes.
117121
* For Chrome: Rebuild or reload the extension in your browser (`chrome://extensions` → Refresh your extension).
118122
* For Firefox: Reload the temporary add-on by going to `about:debugging`"This Firefox" → Click "Reload" next to your extension.
119-
120123
4. **How to Obtain a GitHub Personal Access Token**
121124

122125
- To use Scrum Helper with authenticated requests (for higher rate limits and private repositories), you need a GitHub personal access token.
@@ -151,8 +154,6 @@ Scrum Helper is not limited to the [FOSSASIA](https://github.com/fossasia) organ
151154
5. **Get Customized SCRUM Reports**
152155
- The reports will now be generated using contributions from your organization.
153156

154-
155-
156157
## About contributing
157158

158159
- Follow the Issues and PRs templates as far as possible.

docs/images/popup.png

-590 Bytes
Loading

docs/images/popup2.png

28 KB
Loading

docs/images/settings.png

42.8 KB
Loading

docs/images/standalone.png

-36.9 KB
Loading

src/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
@import "tailwindcss";
23
@tailwind base;
34
@tailwind components;
@@ -367,7 +368,6 @@ body,input,div,h3,h4,p,label,hr, #scrumReport{
367368
box-shadow: 0 1px 4px rgba(0,0,0,0.18);
368369
}
369370

370-
/* Only affects popup, not email */
371371
.popup-commit-list {
372372
margin: 8px 0 8px 18px;
373373
padding-left: 0;

src/popup.html

Lines changed: 121 additions & 82 deletions
Large diffs are not rendered by default.

src/scripts/main.js

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ function handleBodyOnLoad() {
6868
lastWeekContributionElement.checked = items.lastWeekContribution;
6969
handleLastWeekContributionChange();
7070
}
71-
else if (items.lastWeekContribution !== false) {
71+
else if (items.lastWeekContribution !== false) {
7272
lastWeekContributionElement.checked = true;
7373
handleLastWeekContributionChange();
7474
}
7575
if (items.yesterdayContribution) {
7676
yesterdayContributionElement.checked = items.yesterdayContribution;
7777
handleYesterdayContributionChange();
7878
}
79-
else if (items.yesterdayContribution !== false) {
79+
else if (items.yesterdayContribution !== false) {
8080
yesterdayContributionElement.checked = true;
8181
handleYesterdayContributionChange();
8282
}
@@ -91,29 +91,29 @@ function handleBodyOnLoad() {
9191
}
9292

9393
document.getElementById('refreshCache').addEventListener('click', async (e) => {
94-
const button = e.currentTarget;
95-
button.classList.add('loading');
96-
button.disabled = true;
97-
98-
try {
99-
const tabs = await chrome.tabs.query({active: true, currentWindow: true});
100-
await chrome.tabs.sendMessage(tabs[0].id, {
101-
action: 'forceRefresh',
102-
timestamp: Date.now()
103-
});
104-
105-
// Reload the active tab to re-inject content
106-
chrome.tabs.reload(tabs[0].id);
107-
108-
Materialize.toast({html: 'Data refreshed successfully!', classes: 'green'});
109-
} catch (err) {
110-
console.error('Refresh failed:', err);
111-
} finally {
112-
setTimeout(() => {
113-
button.classList.remove('loading');
114-
button.disabled = false;
115-
}, 500);
116-
}
94+
const button = e.currentTarget;
95+
button.classList.add('loading');
96+
button.disabled = true;
97+
98+
try {
99+
const tabs = await chrome.tabs.query({ active: true, currentWindow: true });
100+
await chrome.tabs.sendMessage(tabs[0].id, {
101+
action: 'forceRefresh',
102+
timestamp: Date.now()
103+
});
104+
105+
// Reload the active tab to re-inject content
106+
chrome.tabs.reload(tabs[0].id);
107+
108+
Materialize.toast({ html: 'Data refreshed successfully!', classes: 'green' });
109+
} catch (err) {
110+
console.error('Refresh failed:', err);
111+
} finally {
112+
setTimeout(() => {
113+
button.classList.remove('loading');
114+
button.disabled = false;
115+
}, 500);
116+
}
117117
});
118118

119119
function handleEnableChange() {
@@ -132,21 +132,21 @@ function handleLastWeekContributionChange() {
132132
let value = lastWeekContributionElement.checked;
133133
let labelElement = document.querySelector("label[for='lastWeekContribution']");
134134
if (value) {
135-
startingDateElement.disabled = true;
136-
endingDateElement.disabled = true;
135+
startingDateElement.readOnly = true;
136+
endingDateElement.readOnly = true;
137137
endingDateElement.value = getToday();
138138
startingDateElement.value = getLastWeek();
139139
handleEndingDateChange();
140140
handleStartingDateChange();
141141
labelElement.classList.add("selectedLabel");
142142
labelElement.classList.remove("unselectedLabel");
143143
} else {
144-
startingDateElement.disabled = false;
145-
endingDateElement.disabled = false;
144+
startingDateElement.readOnly = false;
145+
endingDateElement.readOnly = false;
146146
labelElement.classList.add("unselectedLabel");
147147
labelElement.classList.remove("selectedLabel");
148148
}
149-
149+
150150
chrome.storage.local.set({ lastWeekContribution: value });
151151
}
152152

@@ -155,17 +155,17 @@ function handleYesterdayContributionChange() {
155155
let labelElement = document.querySelector("label[for='yesterdayContribution']");
156156

157157
if (value) {
158-
startingDateElement.disabled = true;
159-
endingDateElement.disabled = true;
158+
startingDateElement.readOnly = true;
159+
endingDateElement.readOnly = true;
160160
endingDateElement.value = getToday();
161161
startingDateElement.value = getYesterday();
162-
handleEndingDateChange();
163-
handleStartingDateChange();
162+
handleEndingDateChange();
163+
handleStartingDateChange();
164164
labelElement.classList.add("selectedLabel");
165165
labelElement.classList.remove("unselectedLabel");
166166
} else {
167-
startingDateElement.disabled = false;
168-
endingDateElement.disabled = false;
167+
startingDateElement.readOnly = false;
168+
endingDateElement.readOnly = false;
169169
labelElement.classList.add("unselectedLabel");
170170
labelElement.classList.remove("selectedLabel");
171171
}
@@ -192,7 +192,7 @@ function getYesterday() {
192192
let yesterdayMonth = yesterday.getMonth() + 1;
193193
let yesterdayWeekDay = yesterday.getDate();
194194
let yesterdayYear = yesterday.getFullYear();
195-
let yesterdayPadded =
195+
let yesterdayPadded =
196196
('0000' + yesterdayYear.toString()).slice(-4) +
197197
'-' +
198198
('00' + yesterdayMonth.toString()).slice(-2) +
@@ -236,11 +236,11 @@ function handleOpenLabelChange() {
236236
let labelElement = document.querySelector("label[for='showOpenLabel']");
237237

238238
if (value) {
239-
labelElement.classList.add("selectedLabel");
240-
labelElement.classList.remove("unselectedLabel");
239+
labelElement.classList.add("selectedLabel");
240+
labelElement.classList.remove("unselectedLabel");
241241
} else {
242-
labelElement.classList.add("unselectedLabel");
243-
labelElement.classList.remove("selectedLabel");
242+
labelElement.classList.add("unselectedLabel");
243+
labelElement.classList.remove("selectedLabel");
244244
}
245245

246246
chrome.storage.local.set({ showOpenLabel: value });

0 commit comments

Comments
 (0)