channel-folders: Add UI to create new channel folder.

This commit adds a button besides the folder dropdowin in
stream settings UI which can be used to create a new folder.
This commit is contained in:
Sahil Batra
2025-05-29 18:22:10 +05:30
committed by Tim Abbott
parent 7c01e61e5a
commit 32287a084b
10 changed files with 143 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import * as blueslip from "./blueslip.ts";
import * as bot_data from "./bot_data.ts";
import * as browser_history from "./browser_history.ts";
import {buddy_list} from "./buddy_list.ts";
import * as channel_folders from "./channel_folders.ts";
import * as compose_call from "./compose_call.ts";
import * as compose_call_ui from "./compose_call_ui.ts";
import * as compose_closed_ui from "./compose_closed_ui.ts";
@@ -113,6 +114,18 @@ export function dispatch_normal_event(event) {
attachments_ui.update_attachments(event);
break;
case "channel_folder":
switch (event.op) {
case "add": {
channel_folders.add(event.channel_folder);
break;
}
default:
blueslip.error("Unexpected event type channel_folder/" + event.op);
break;
}
break;
case "custom_profile_fields":
realm.custom_profile_fields = event.fields;
settings_profile_fields.populate_profile_fields(realm.custom_profile_fields);