From 0f8e373225f437b45a65f1b8068d62ad3bd7cd2d Mon Sep 17 00:00:00 2001 From: flashwave Date: Tue, 20 Feb 2024 21:13:34 +0000 Subject: [PATCH] Small code alignments fixes. --- src/mami.js/ui/channels.js | 6 +++--- src/mami.js/ui/chat-input.js | 4 ++-- src/mami.js/ui/chat-interface.js | 4 ++-- src/mami.js/ui/chat-layout.js | 4 ++-- src/mami.js/ui/chat-sidebar.js | 4 ++-- src/mami.js/ui/input-menus.js | 4 ++-- src/mami.js/ui/menus.js | 14 +++++++------- src/mami.js/ui/uploads.js | 2 -- 8 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/mami.js/ui/channels.js b/src/mami.js/ui/channels.js index 21a93f0..acfc1fa 100644 --- a/src/mami.js/ui/channels.js +++ b/src/mami.js/ui/channels.js @@ -4,9 +4,9 @@ #include ui/menus.js Umi.UI.Channels = (function() { - const sidebarChannel = 'sidebar__channel', - sidebarChannelCurrent = 'sidebar__channel--current', - sidebarChannelUnread = 'sidebar__channel--unread'; + const sidebarChannel = 'sidebar__channel'; + const sidebarChannelCurrent = 'sidebar__channel--current'; + const sidebarChannelUnread = 'sidebar__channel--unread'; const markUnread = function(id, mode) { if(!id) diff --git a/src/mami.js/ui/chat-input.js b/src/mami.js/ui/chat-input.js index f8931be..60b244a 100644 --- a/src/mami.js/ui/chat-input.js +++ b/src/mami.js/ui/chat-input.js @@ -3,8 +3,8 @@ #include ui/chat-input-menus.js Umi.UI.ChatInput = function() { - const menus = new Umi.UI.ChatInputMenus, - main = new Umi.UI.ChatInputMain; + const menus = new Umi.UI.ChatInputMenus; + const main = new Umi.UI.ChatInputMain; const html = $e({ tag: 'form', diff --git a/src/mami.js/ui/chat-interface.js b/src/mami.js/ui/chat-interface.js index 5e6c9d7..a530938 100644 --- a/src/mami.js/ui/chat-interface.js +++ b/src/mami.js/ui/chat-interface.js @@ -3,8 +3,8 @@ #include ui/chat-input.js Umi.UI.ChatInterface = function() { - const messages = new Umi.UI.ChatMessageList, - input = new Umi.UI.ChatInput; + const messages = new Umi.UI.ChatMessageList; + const input = new Umi.UI.ChatInput; const html = $e({ attrs: { diff --git a/src/mami.js/ui/chat-layout.js b/src/mami.js/ui/chat-layout.js index b3ba9a5..ff20cd2 100644 --- a/src/mami.js/ui/chat-layout.js +++ b/src/mami.js/ui/chat-layout.js @@ -4,8 +4,8 @@ // this needs revising at some point but will suffice for now Umi.UI.ChatLayout = function() { - const sideBar = new Umi.UI.ChatSideBar, - main = new Umi.UI.ChatInterface; + const sideBar = new Umi.UI.ChatSideBar; + const main = new Umi.UI.ChatInterface; const html = $e({ attrs: { diff --git a/src/mami.js/ui/chat-sidebar.js b/src/mami.js/ui/chat-sidebar.js index e836108..b133334 100644 --- a/src/mami.js/ui/chat-sidebar.js +++ b/src/mami.js/ui/chat-sidebar.js @@ -3,8 +3,8 @@ #include ui/chat-sidebar-buttons.js Umi.UI.ChatSideBar = function() { - const container = new Umi.UI.ChatSideBarContainer, - buttons = new Umi.UI.ChatSideBarButtons; + const container = new Umi.UI.ChatSideBarContainer; + const buttons = new Umi.UI.ChatSideBarButtons; const html = $e({ attrs: { diff --git a/src/mami.js/ui/input-menus.js b/src/mami.js/ui/input-menus.js index 76906cc..b6032f1 100644 --- a/src/mami.js/ui/input-menus.js +++ b/src/mami.js/ui/input-menus.js @@ -5,8 +5,8 @@ Umi.UI.InputMenus = (function() { const ids = []; let current = ''; - const inputMenuActive = 'input__menu--active', - inputButtonActive = 'input__button--active'; + const inputMenuActive = 'input__menu--active'; + const inputButtonActive = 'input__button--active'; const toggle = function(baseId) { const button = 'umi-msg-menu-btn-' + baseId, diff --git a/src/mami.js/ui/menus.js b/src/mami.js/ui/menus.js index 21cee08..43e209a 100644 --- a/src/mami.js/ui/menus.js +++ b/src/mami.js/ui/menus.js @@ -3,13 +3,13 @@ Umi.UI.Menus = (function() { const ids = []; - const sidebarMenu = 'sidebar__menu', - sidebarMenuActive = 'sidebar__menu--active', - sidebarMenuHidden = 'sidebar__menu--hidden', - sidebarSelectorMode = 'sidebar__selector-mode', - sidebarSelectorModeActive = 'sidebar__selector-mode--active', - sidebarSelectorModeAttention = 'sidebar__selector-mode--attention', - sidebarSelectorModeHidden = 'sidebar__selector-mode--hidden'; + const sidebarMenu = 'sidebar__menu'; + const sidebarMenuActive = 'sidebar__menu--active'; + const sidebarMenuHidden = 'sidebar__menu--hidden'; + const sidebarSelectorMode = 'sidebar__selector-mode'; + const sidebarSelectorModeActive = 'sidebar__selector-mode--active'; + const sidebarSelectorModeAttention = 'sidebar__selector-mode--attention'; + const sidebarSelectorModeHidden = 'sidebar__selector-mode--hidden'; const attention = function(baseId, mode) { if(mode === undefined) diff --git a/src/mami.js/ui/uploads.js b/src/mami.js/ui/uploads.js index f488715..e78c6ca 100644 --- a/src/mami.js/ui/uploads.js +++ b/src/mami.js/ui/uploads.js @@ -2,8 +2,6 @@ #include ui/menus.js Umi.UI.Uploads = (function() { - - return { create: function(fileName) { const uploadHistory = Umi.UI.Menus.Get('uploads');