feat: add character avatars with upload and zoom functionality
- Add avatar upload with file picker dialog - Display avatars in header, chat messages, and settings - Implement clickable avatars with full-screen zoom modal - Enable asset protocol for local file access in Tauri config - Add tauri-plugin-dialog for native file selection - Store avatars in ~/.config/claudia/avatars/ - Support PNG, JPG, JPEG, and WEBP formats - Modal closes on overlay click or ESC key
This commit is contained in:
@@ -135,6 +135,27 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="character-avatar">Avatar (Optional)</label>
|
||||
<div class="avatar-upload">
|
||||
<div id="avatar-preview" class="avatar-preview">
|
||||
<div class="avatar-circle-large"></div>
|
||||
</div>
|
||||
<input
|
||||
type="file"
|
||||
id="character-avatar"
|
||||
accept="image/png,image/jpeg,image/jpg,image/webp"
|
||||
style="display: none;"
|
||||
/>
|
||||
<button type="button" id="upload-avatar-btn" class="btn-secondary">
|
||||
Choose Image
|
||||
</button>
|
||||
<button type="button" id="remove-avatar-btn" class="btn-secondary" style="display: none;">
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="character-system-prompt">System Prompt</label>
|
||||
<textarea
|
||||
@@ -193,5 +214,13 @@
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- Avatar zoom modal -->
|
||||
<div id="avatar-modal" class="avatar-modal" style="display: none;">
|
||||
<div class="avatar-modal-overlay"></div>
|
||||
<div class="avatar-modal-content">
|
||||
<img id="avatar-modal-img" src="" alt="Avatar" />
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user