Skip to content

Commit 19b6e5b

Browse files
YuurinBeeJSKitty
andauthored
[Frontend] Add Themes & Update Stylization (#36)
* Add new themes and theme variable updates * Fix hardcoded color in group member hover effect --------- Co-authored-by: JSKitty <mail@jskitty.cat>
1 parent f8ebdf0 commit 19b6e5b

7 files changed

Lines changed: 1370 additions & 19 deletions

File tree

src/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,8 @@ <h2 style="margin-top: 40px">Choose Theme</h2>
717717
<select id="theme-select">
718718
<option value="vector">Vector</option>
719719
<option value="chatstr">Chatstr</option>
720+
<option value="gifverse">Cosmic</option>
721+
<option value="pivx">Keep it Purple</option>
720722
</select>
721723

722724
<!-- Voice Settings Section -->

src/js/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ async function selectFile() {
680680
* @param {string} mode - The theme mode, i.e: light, dark
681681
*/
682682
function applyTheme(theme = 'vector', mode = 'dark') {
683-
document.body.classList.remove('vector-theme', 'chatstr-theme');
683+
document.body.classList.remove('vector-theme', 'chatstr-theme', 'gifverse-theme', 'pivx-theme');
684684
document.body.classList.add(`${theme}-theme`);
685685

686686
domTheme.href = `/themes/${theme}/${mode}.css`;

src/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4270,7 +4270,7 @@ function renderInviteItem(invite) {
42704270
const divInvite = document.createElement('div');
42714271
divInvite.classList.add('chatlist-contact', 'chatlist-invite');
42724272
divInvite.id = `invite-${invite.id || invite.welcome_event_id || groupId}`;
4273-
divInvite.style.borderColor = '#59fcb3';
4273+
divInvite.style.borderColor = getComputedStyle(document.documentElement).getPropertyValue('--icon-color-primary').trim();
42744274

42754275
// Avatar container with group placeholder
42764276
const divAvatarContainer = document.createElement('div');
@@ -4457,7 +4457,7 @@ function renderChat(chat) {
44574457

44584458
// The Chat container (The ID is the Contact's npub)
44594459
const divContact = document.createElement('div');
4460-
if (nUnread) divContact.style.borderColor = '#59fcb3';
4460+
if (nUnread) divContact.style.borderColor = getComputedStyle(document.documentElement).getPropertyValue('--icon-color-primary').trim();
44614461
divContact.classList.add('chatlist-contact');
44624462
divContact.id = `chatlist-${chat.id}`;
44634463

@@ -4567,7 +4567,7 @@ function renderChat(chat) {
45674567
}
45684568
// Apply 'Unread' final styling
45694569
if (nUnread) {
4570-
pTimeAgo.style.color = '#59fcb3';
4570+
pTimeAgo.style.color = getComputedStyle(document.documentElement).getPropertyValue('--icon-color-primary').trim();
45714571
} else {
45724572
// Add 'read' class for smaller font size when no unread messages
45734573
pTimeAgo.classList.add('read');

src/styles.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,7 @@ html, body {
19201920
}
19211921

19221922
#chat-input-send.active .icon {
1923-
background-color: #59fcb3;
1923+
background-color: var(--icon-color-primary);
19241924
opacity: 1;
19251925
}
19261926

@@ -3662,6 +3662,7 @@ input[type="checkbox"]:checked + .neon-toggle:before {
36623662
/* Style options to match whisper model */
36633663
#theme-select option {
36643664
background: #161616;
3665+
text-align: center;
36653666
padding: 10px;
36663667
}
36673668

@@ -3681,6 +3682,13 @@ select:focus::-ms-value {
36813682
margin-right: auto;
36823683
}
36833684

3685+
/* Sound Notification Selection container styles */
3686+
#notif-sound-select option {
3687+
background: #161616;
3688+
padding: 10px;
3689+
text-align: center;
3690+
}
3691+
36843692
/* Delete model button with trash bin icon */
36853693
.btn-delete-model {
36863694
position: absolute;
@@ -4788,6 +4796,8 @@ select:disabled:hover {
47884796
.relay-dialog-close:hover {
47894797
background: rgba(255, 255, 255, 0.1);
47904798
color: #fff;
4799+
transform: scale(1.1);
4800+
transition: transform 0.25s ease;
47914801
}
47924802

47934803
.relay-dialog-content {
@@ -8836,6 +8846,7 @@ hr {
88368846
.notif-custom-container {
88378847
display: flex;
88388848
align-items: center;
8849+
text-align: center;
88398850
margin-bottom: 10px;
88408851
}
88418852

0 commit comments

Comments
 (0)