mirror of
https://github.com/owncast/owncast.git
synced 2025-11-01 10:55:57 +08:00
Feature: emoji editor (#2411)
* Custom emoji editor: implement backend This reuses the logo upload code * Implement emoji edit admin interface Again reuse base64 logic from the logo upload * Allow toggling between uploaded and default emojis * Add route that always serves uploaded emojis This is needed for the admin emoji interface, as otherwise the emojis will 404 if custom emojis are disabled * Fix linter warnings * Remove custom/uploaded emoji logic * Reset timer after emoji deletion * Setup: copy built-in emojis to emoji directory
This commit is contained in:
@ -39,7 +39,7 @@ func Start() error {
|
||||
http.HandleFunc("/logo", controllers.GetLogo)
|
||||
|
||||
// Return a single emoji image.
|
||||
http.HandleFunc("/img/emoji/", controllers.GetCustomEmojiImage)
|
||||
http.HandleFunc(config.EmojiDir, controllers.GetCustomEmojiImage)
|
||||
|
||||
// return the logo
|
||||
|
||||
@ -156,6 +156,12 @@ func Start() error {
|
||||
// Set the following state of a follower or follow request.
|
||||
http.HandleFunc("/api/admin/followers/approve", middleware.RequireAdminAuth(admin.ApproveFollower))
|
||||
|
||||
// Upload custom emoji
|
||||
http.HandleFunc("/api/admin/emoji/upload", middleware.RequireAdminAuth(admin.UploadCustomEmoji))
|
||||
|
||||
// Delete custom emoji
|
||||
http.HandleFunc("/api/admin/emoji/delete", middleware.RequireAdminAuth(admin.DeleteCustomEmoji))
|
||||
|
||||
// Update config values
|
||||
|
||||
// Change the current streaming key in memory
|
||||
|
||||
Reference in New Issue
Block a user