JC Brand 3 년 전
부모
커밋
1a6a7ade73
7개의 변경된 파일48개의 추가작업 그리고 31개의 파일을 삭제
  1. 1 0
      CHANGES.md
  2. 1 1
      src/converse.js
  3. 0 28
      src/plugins/chatview/styles/index.scss
  4. 1 1
      src/plugins/fullscreen/index.js
  5. 2 1
      src/plugins/singleton/index.js
  6. 41 0
      src/plugins/singleton/singleton.scss
  7. 2 0
      webpack.html

+ 1 - 0
CHANGES.md

@@ -14,6 +14,7 @@
 - #2423: Could not find dependency "converse-controlbox" for plugin "converse-muc"
 - #2647: Singleton mode doesn't work
 - #2704: Send button doesn't work in a multi-user chat
+- #2715: Singleton + fullscreen mode styling issue
 - #2718: Message is not displayed if it contains an invalid URL
 - #2725: Send new presence status to all connected MUCs
 - #2728: Not sending headers with upload request

+ 1 - 1
src/converse.js

@@ -34,7 +34,7 @@ import "./plugins/register/index.js";       // XEP-0077 In-band registration
 import "./plugins/roomslist/index.js";      // Show currently open chat rooms
 import "./plugins/rootview/index.js";
 import "./plugins/rosterview/index.js";
-import "./plugins/singleton.js";
+import "./plugins/singleton/index.js";
 /* END: Removable components */
 
 

+ 0 - 28
src/plugins/chatview/styles/index.scss

@@ -102,37 +102,9 @@
                 overflow: hidden;
             }
         }
-
-        &.converse-singleton {
-            .flyout {
-                border: none !important;
-            }
-            .chat-head {
-                padding: 0.5em;
-            }
-            .chatbox {
-                margin: 0;
-                position: relative;
-            }
-        }
     }
 
     converse-chats.converse-fullscreen  {
-        &.converse-singleton {
-            .chatbox {
-                @include make-col-ready();
-                @include media-breakpoint-up(md) {
-                    @include make-col(12);
-                }
-                @include media-breakpoint-up(lg) {
-                    @include make-col(12);
-                }
-                @include media-breakpoint-up(xl) {
-                    @include make-col(12);
-                }
-            }
-        }
-
         &:not(.converse-singleton) {
             .chatbox {
                 @include media-breakpoint-up(md) {

+ 1 - 1
src/plugins/fullscreen/index.js

@@ -6,7 +6,7 @@
 import "@converse/headless/plugins/muc/index.js";
 import "plugins/chatview/index.js";
 import "plugins/controlbox/index.js";
-import "plugins/singleton.js";
+import "plugins/singleton/index.js";
 import { api, converse } from "@converse/headless/core";
 import { isUniView } from '@converse/headless/utils/core.js';
 

+ 2 - 1
src/plugins/singleton.js → src/plugins/singleton/index.js

@@ -1,11 +1,12 @@
 /**
- * @module converse-singleton
  * @copyright JC Brand
  * @license Mozilla Public License (MPLv2)
  * @description A plugin which restricts Converse to only one chat.
  */
 import { api, converse } from "@converse/headless/core";
 
+import './singleton.scss';
+
 
 converse.plugins.add('converse-singleton', {
 

+ 41 - 0
src/plugins/singleton/singleton.scss

@@ -0,0 +1,41 @@
+@import "bootstrap/scss/functions";
+@import "bootstrap/scss/variables";
+@import "bootstrap/scss/mixins";
+@import "bootstrap/scss/media";
+
+
+.conversejs {
+    converse-chats.converse-embedded,
+    converse-chats.converse-fullscreen  {
+        &.converse-singleton {
+            .flyout {
+                border: none !important;
+            }
+            .chat-head {
+                padding: 0.5em;
+            }
+            .chatbox {
+                margin: 0;
+                position: relative;
+                margin-left: -15px;
+            }
+        }
+    }
+
+    converse-chats.converse-fullscreen  {
+        &.converse-singleton {
+            .chatbox {
+                @include make-col-ready();
+                @include media-breakpoint-up(md) {
+                    @include make-col(12);
+                }
+                @include media-breakpoint-up(lg) {
+                    @include make-col(12);
+                }
+                @include media-breakpoint-up(xl) {
+                    @include make-col(12);
+                }
+            }
+        }
+    }
+}

+ 2 - 0
webpack.html

@@ -25,6 +25,8 @@
             show_send_button: true,
             auto_away: 300,
             message_limit: 300,
+            // singleton: true,
+            // auto_join_rooms: ['ttt@conference.chat.example.org'],
             auto_register_muc_nickname: true,
             loglevel: 'debug',
             // modtools_disable_assign: ['owner', 'moderator', 'participant', 'visitor'],