Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
]
},
"dependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.1.14",
"javascript-time-ago": "^2.5.11",
"json-colorizer": "^3.0.1",
"open": "^10.1.0",
Expand Down
11 changes: 10 additions & 1 deletion src/gui/src/UI/Settings/UITabAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import UIWindowChangeEmail from './UIWindowChangeEmail.js';
import UIWindowChangeUsername from '../UIWindowChangeUsername.js';
import UIWindowConfirmUserDeletion from './UIWindowConfirmUserDeletion.js';
import UIWindowManageSessions from '../UIWindowManageSessions.js';
import UIWindow from '../UIWindow.js';
import UIWindow from '../UIWindow.js'

// About
export default {
Expand All @@ -37,6 +37,7 @@ export default {
h += `<div style="overflow: hidden; display: flex; margin-bottom: 20px; flex-direction: column; align-items: center;">`;
h += `<div class="profile-picture change-profile-picture" style="background-image: url('${html_encode(window.user?.profile?.picture ?? window.icons['profile.svg'])}');">`;
h += `</div>`;
h += `<button class="button remove-profile-picture" style="margin-top: 10px;">${i18n('remove_profile_picture')}</button>`;
h += `</div>`;

// change password button
Expand Down Expand Up @@ -177,5 +178,13 @@ export default {
}
}
})

// Add event listener for the "Remove Profile Picture" button
document.querySelector('.remove-profile-picture').addEventListener('click', () => {
update_profile(window.user.username, { picture: null }); // Clear the profile picture
document.querySelector('.profile-picture').style.backgroundImage = `url('${window.icons['profile.svg']}')`; // Revert to default avatar
$('.profile-image').css('background-image', `url('${window.icons['profile.svg']}')`); // Update other UI elements
$('.profile-image').removeClass('profile-image-has-picture');
});
},
};