Skip to content

Commit aab4b5d

Browse files
committed
rebased, removed extensive logging and commits. removed unused functions
Signed-off-by: Vedansh Saini <[email protected]>
1 parent e797517 commit aab4b5d

File tree

4 files changed

+179
-265
lines changed

4 files changed

+179
-265
lines changed

src/index.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,25 @@ li {
6464
transition: color 0.3s ease-in-out, font-weight 0.3s ease-in-out;
6565
}
6666

67+
#scrumReport {
68+
border: 1px solid #ccc;
69+
padding: 10px;
70+
min-height: 200px;
71+
max-height: 400px;
72+
overflow-y: auto;
73+
background-color: white;
74+
}
75+
76+
#scrumReport:focus {
77+
outline: none;
78+
border-color: #26a69a;
79+
}
80+
81+
#scrumReport a {
82+
color: #26a69a;
83+
text-decoration: none;
84+
}
85+
86+
#scrumReport a:hover {
87+
text-decoration: underline;
88+
}

src/popup.html

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ <h6 class="center">
7575
</div>
7676
<div>
7777
<h6>Scrum Report</h3>
78-
<textarea name="" id="scrumReport" class="materialize-textarea" style="min-height: 200px;" placeholder="Your scrum report will appear here..."></textarea>
78+
<div id="scrumReport" contenteditable="true"
79+
class="materialize-textarea border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
80+
style="min-height: 200px; overflow-y: auto; white-space: pre-wrap;">
81+
</div>
7982
</div>
8083
<div style="display: flex; justify-content: space-between; gap: 10px;">
8184
<button id="generateReport" class="btn waves-effect waves-light">
@@ -109,27 +112,8 @@ <h6>
109112
</div>
110113
<script src="scripts/jquery-3.2.1.min.js"></script>
111114
<script type="text/javascript" type="text/javascript" src="materialize/js/materialize.min.js"></script>
115+
<script src="scripts/scrumHelper.js"></script>
112116
<script src="scripts/main.js"></script>
113-
<script>
114-
document.addEventListener('DOMContentLoaded', function() {
115-
const generateBtn = document.getElementById('generateReport');
116-
const copyBtn = document.getElementById('copyReport');
117-
118-
generateBtn.addEventListener('click', function() {
119-
this.innerHTML = '<i class="fa fa-spinner fa-spin"></i> Generating...';
120-
this.disabled = true;
121-
122-
// Call the scrum generation function
123-
window.generateScrumReport();
124-
});
125-
126-
copyBtn.addEventListener('click', function() {
127-
const scrumReport = document.getElementById('scrumReport');
128-
scrumReport.select();
129-
document.execCommand('copy');
130-
Materialize.toast('Report copied to clipboard!', 3000);
131-
});
132-
});
133-
</script>
117+
<script src="scripts/popup.js"></script>
134118
</body>
135119
</html>

src/scripts/popup.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
document.addEventListener('DOMContentLoaded', function() {
2+
const generateBtn = document.getElementById('generateReport');
3+
const copyBtn = document.getElementById('copyReport');
4+
5+
generateBtn.addEventListener('click', function() {
6+
this.innerHTML = '<i class="fa fa-spinner fa-spin"></i> Generating...';
7+
this.disabled = true;
8+
9+
// Call the scrum generation function
10+
window.generateScrumReport();
11+
});
12+
13+
copyBtn.addEventListener('click', function() {
14+
const scrumReport = document.getElementById('scrumReport');
15+
const range = document.createRange();
16+
range.selectNodeContents(scrumReport);
17+
const selection = window.getSelection();
18+
selection.removeAllRanges();
19+
selection.addRange(range);
20+
document.execCommand('copy');
21+
selection.removeAllRanges();
22+
Materialize.toast('Report copied to clipboard!', 3000);
23+
});
24+
});

0 commit comments

Comments
 (0)