Skip to content

Commit bdcd81f

Browse files
committed
ui changes made
1 parent 510c765 commit bdcd81f

File tree

5 files changed

+235
-336
lines changed

5 files changed

+235
-336
lines changed

src/index.css

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -417,51 +417,4 @@ hr,
417417

418418
.dark-mode .token-preview-char {
419419
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
420-
}
421-
422-
/* Organization validation styles */
423-
#validateOrgBtn {
424-
transition: all 0.2s ease;
425-
min-width: 80px;
426-
}
427-
428-
#validateOrgBtn:disabled {
429-
opacity: 0.7;
430-
cursor: not-allowed;
431-
}
432-
433-
#validateOrgBtn i {
434-
transition: all 0.2s ease;
435-
}
436-
437-
#orgValidationStatus {
438-
transition: all 0.3s ease;
439-
padding: 4px 8px;
440-
border-radius: 4px;
441-
font-weight: 500;
442-
}
443-
444-
#orgValidationStatus i {
445-
margin-right: 4px;
446-
}
447-
448-
/* Dark mode organization validation */
449-
.dark-mode #validateOrgBtn {
450-
border-color: #404040;
451-
}
452-
453-
.dark-mode #orgValidationStatus {
454-
background-color: rgba(255, 255, 255, 0.05);
455-
}
456-
457-
/* Organization input focus styles */
458-
#orgInput:focus {
459-
outline: none;
460-
border-color: #3b82f6;
461-
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
462-
}
463-
464-
.dark-mode #orgInput:focus {
465-
border-color: #60a5fa;
466-
box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
467420
}

src/popup.html

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,13 @@ <h4>Organization Name</h4>
140140
</span>
141141
</span>
142142
</div>
143-
<div class="flex gap-2 items-center">
143+
<div class="flex items-center mt-4">
144144
<input id="orgInput" type="text"
145-
class="flex-1 border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
145+
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
146146
placeholder="Enter organization name (default: fossasia)">
147-
<button id="validateOrgBtn"
148-
class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded flex items-center gap-2 transition-colors duration-200"
149-
title="Validate organization name">
150-
<i class="fa fa-check"></i>
151-
<span>Set</span>
152-
</button>
153-
</div>
154-
<div id="orgValidationStatus" class="text-sm mt-1 hidden">
155-
<!-- Status messages will be shown here -->
147+
<button id="setOrgBtn" type="button"
148+
class="ml-2 px-5 py-2 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-xl text-base my-2 h-[44px] flex-shrink-0"
149+
style="min-width:60px;">Set</button>
156150
</div>
157151
</div>
158152
<div class="">

src/scripts/main.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,19 @@ function handleLastWeekContributionChange() {
123123
let value = lastWeekContributionElement.checked;
124124
let labelElement = document.querySelector("label[for='lastWeekContribution']");
125125
if (value) {
126-
startingDateElement.readOnly = true;
127-
endingDateElement.readOnly = true;
128-
endingDateElement.value = getToday();
129-
startingDateElement.value = getLastWeek();
130-
handleEndingDateChange();
131-
handleStartingDateChange();
132-
labelElement.classList.add("selectedLabel");
133-
labelElement.classList.remove("unselectedLabel");
126+
startingDateElement.readOnly = true;
127+
endingDateElement.readOnly = true;
128+
endingDateElement.value = getToday();
129+
startingDateElement.value = getLastWeek();
130+
handleEndingDateChange();
131+
handleStartingDateChange();
132+
labelElement.classList.add("selectedLabel");
133+
labelElement.classList.remove("unselectedLabel");
134134
} else {
135-
startingDateElement.readOnly = false;
136-
endingDateElement.readOnly = false;
137-
labelElement.classList.add("unselectedLabel");
138-
labelElement.classList.remove("selectedLabel");
135+
startingDateElement.readOnly = false;
136+
endingDateElement.readOnly = false;
137+
labelElement.classList.add("unselectedLabel");
138+
labelElement.classList.remove("selectedLabel");
139139
}
140140

141141
chrome.storage.local.set({ lastWeekContribution: value });

0 commit comments

Comments
 (0)