_conversation.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  1. .conversation-title {
  2. display: block;
  3. line-height: 36px;
  4. white-space: nowrap;
  5. overflow: hidden;
  6. text-overflow: ellipsis;
  7. padding: 0 46px;
  8. -webkit-user-select: text;
  9. }
  10. .conversation-name + .conversation-number {
  11. &:before {
  12. content:"\00b7"; // &middot
  13. font-weight: bold;
  14. padding: 0 5px 0 4px;
  15. }
  16. }
  17. .conversation {
  18. background-color: #ffffff;
  19. height: 100%;
  20. .panel {
  21. height: calc(100% - #{$header-height});
  22. overflow-y: scroll;
  23. .container {
  24. padding-top: 20px;
  25. max-width: 950px;
  26. margin: 0 auto;
  27. padding: 20px;
  28. }
  29. }
  30. .main.panel {
  31. display: flex;
  32. flex-direction: column;
  33. overflow: initial;
  34. .discussion-container {
  35. flex-grow: 1;
  36. position: relative;
  37. max-width: 100%;
  38. margin: 0;
  39. .bar-container {
  40. height: 5px;
  41. }
  42. .message-list {
  43. position: absolute;
  44. top: 0;
  45. height: 100%;
  46. width: 100%;
  47. margin: 0;
  48. padding: 2em 20px 0;
  49. overflow-y: auto;
  50. }
  51. }
  52. }
  53. }
  54. .key-verification {
  55. label {
  56. display: block;
  57. margin: 10px 0;
  58. font-size: $font-size-small;
  59. }
  60. .key, .placeholder {
  61. padding: 0 1em;
  62. -webkit-user-select: text;
  63. }
  64. .key {
  65. display: inline-block;
  66. font-family: monospace;
  67. padding: 10px;
  68. margin-bottom: 20px;
  69. background: $grey_l;
  70. border: solid 1px $grey_l2;
  71. border-radius: $border-radius;
  72. }
  73. .placeholder {
  74. font-weight: bold;
  75. }
  76. .qr {
  77. border-radius: 200px;
  78. border: solid 1px $grey_l2;
  79. width: 150px;
  80. height: 150px;
  81. text-align: center;
  82. padding: 25px;
  83. margin: 10px auto;
  84. canvas {
  85. display: none;
  86. }
  87. img {
  88. display: inline-block;
  89. max-width: 100%;
  90. }
  91. }
  92. }
  93. .message-detail {
  94. .key-conflict-dialogue {
  95. border-radius: $border-radius;
  96. margin: 20px 0;
  97. .header {
  98. border-radius: $border-radius $border-radius 0 0;
  99. background: #F3F3A7;
  100. margin: 0;
  101. padding: 10px 20px
  102. }
  103. .content {
  104. padding: 20px;
  105. border: 2px solid #F3F3A7;
  106. }
  107. button.resolve {
  108. outline: none;
  109. border: none;
  110. border-radius: $border-radius;
  111. color: white;
  112. font-weight: bold;
  113. line-height: 36px;
  114. padding: 0 20px;
  115. float: right;
  116. background: $blue;
  117. margin-left: 20px;
  118. }
  119. .hideKeys, .showKeys {
  120. float: right;
  121. line-height: 36px;
  122. }
  123. }
  124. .message-container {
  125. background: white;
  126. padding: 20px 0;
  127. .sender {
  128. display: none;
  129. }
  130. }
  131. .info {
  132. padding: 1em;
  133. .label {
  134. font-weight: bold;
  135. padding-right: 1em;
  136. vertical-align: top;
  137. }
  138. button {
  139. border: none;
  140. border-radius: $border-radius;
  141. color: white;
  142. padding: 0.5em;
  143. font-weight: bold;
  144. span {
  145. vertical-align: middle;
  146. }
  147. }
  148. }
  149. .contacts .contact-detail {
  150. padding: 0 36px;
  151. margin-bottom: 5px;
  152. .error-icon-container {
  153. float: right;
  154. }
  155. .error-message {
  156. margin: 6px 0 0;
  157. font-size: $font-size-small;
  158. font-weight: bold;
  159. color: red;
  160. }
  161. }
  162. h3 {
  163. font-size: 1em;
  164. padding: 5px;
  165. }
  166. button.conflict {
  167. float: right;
  168. background: #d00;
  169. }
  170. button.cancel {
  171. float: right;
  172. color: $grey_d;
  173. border: solid 1px #ccc;
  174. }
  175. }
  176. .message-list {
  177. .error-icon {
  178. cursor: pointer;
  179. }
  180. .advisory {
  181. text-align: center;
  182. .content {
  183. display: inline-block;
  184. padding: 5px 10px;
  185. background: #fff5c4;
  186. border-radius: $border-radius;
  187. }
  188. }
  189. }
  190. li.entry .error-icon-container {
  191. position: absolute;
  192. top: 0;
  193. left: calc(100% + 5px);
  194. height: 100%;
  195. .error-icon {
  196. display: block;
  197. height: 100%;
  198. }
  199. .error-message {
  200. display: none;
  201. position: absolute;
  202. background: black;
  203. color: white;
  204. border-radius: $border-radius;
  205. padding: 0.5em;
  206. font-weight: normal;
  207. bottom: calc(50% + 18px);
  208. left: -84px;
  209. width: 180px;
  210. z-index: 10;
  211. &:before {
  212. display: block;
  213. content: '';
  214. position: absolute;
  215. bottom: -16px;
  216. left: 50%;
  217. border: 6px solid transparent;
  218. border-top: 10px solid #000000;
  219. }
  220. }
  221. &:hover .error-message { display: inline-block; }
  222. }
  223. .error-icon {
  224. display: inline-block;
  225. width: $error-icon-size;
  226. height: $error-icon-size;
  227. position: relative;
  228. @include color-svg('/images/warning.svg', red);
  229. }
  230. .group {
  231. li.entry .unregistered-user-error {
  232. display: none;
  233. }
  234. }
  235. .group-update {
  236. font-size: smaller;
  237. }
  238. .private .entry .avatar,
  239. .private .sender,
  240. .outgoing .sender {
  241. display: none;
  242. }
  243. .sender {
  244. font-size: smaller;
  245. opacity: 0.8;
  246. margin-bottom: 5px;
  247. font-weight: bold;
  248. }
  249. .timestamp {
  250. margin-right: 3px;
  251. white-space: nowrap;
  252. }
  253. .message-container,
  254. .message-list {
  255. list-style: none;
  256. li {
  257. max-width: 800px;
  258. margin: 0 auto 10px;
  259. &::after {
  260. visibility: hidden;
  261. display: block;
  262. font-size: 0;
  263. content: " ";
  264. clear: both;
  265. height: 0;
  266. }
  267. }
  268. .bubble {
  269. position: relative;
  270. left: -2px;
  271. display: inline-block;
  272. vertical-align: top;
  273. word-wrap: break-word;
  274. margin-left: 8px;
  275. max-width: 30em;
  276. text-align: -webkit-auto;
  277. -webkit-user-select: text;
  278. @media(max-width: $big-avatar-min-width - 1px) {
  279. max-width: calc(100% - 45px - #{$error-icon-size}); // avatar size + padding + error-icon size
  280. }
  281. .body {
  282. white-space: pre-wrap;
  283. a {
  284. word-break: break-all
  285. }
  286. }
  287. p {
  288. margin: 0;
  289. }
  290. }
  291. .meta {
  292. font-size: smaller;
  293. margin-top: 3px;
  294. text-align: right;
  295. line-height: 18px;
  296. .hasRetry + .timestamp {
  297. &:before {
  298. content:"\00b7"; // &middot
  299. font-weight: bold;
  300. padding: 0 5px 0 4px;
  301. text-decoration: none;
  302. opacity: 0.5;
  303. }
  304. }
  305. .retry {
  306. text-decoration: underline;
  307. cursor: pointer;
  308. }
  309. .hasRetry, .timestamp, .status, .timer {
  310. float: left;
  311. }
  312. .timestamp, .status {
  313. cursor: pointer;
  314. opacity: 0.5;
  315. &:hover {
  316. opacity: 1.0;
  317. }
  318. }
  319. }
  320. .status {
  321. width: 18px;
  322. height: 18px;
  323. }
  324. .sent .status {
  325. display: inline-block;
  326. @include color-svg('/images/check.svg', black);
  327. }
  328. .delivered .status {
  329. display: inline-block;
  330. @include color-svg('/images/double-check.svg', black);
  331. }
  332. .pending .status {
  333. display: inline-block;
  334. background: none;
  335. &:before { content: '...'; }
  336. }
  337. .incoming {
  338. .avatar, .bubble {
  339. float: left;
  340. }
  341. }
  342. .outgoing {
  343. .meta {
  344. float: right;
  345. }
  346. .error-icon-container {
  347. left: auto;
  348. right: calc(100% + 5px);
  349. }
  350. .avatar, .bubble {
  351. float: right;
  352. }
  353. .bubble {
  354. clear: left;
  355. }
  356. }
  357. @keyframes shake {
  358. 0% { transform: translateX(0px); }
  359. 25% { transform: translateX(-5px); }
  360. 50% { transform: translateX(0px); }
  361. 75% { transform: translateX(5px); }
  362. 100% { transform: translateX(0px); }
  363. }
  364. .expired .bubble {
  365. animation: shake 0.2s linear 3;
  366. }
  367. .timer {
  368. display: none;
  369. .hourglass {
  370. vertical-align: middle;
  371. }
  372. }
  373. .control {
  374. .bubble {
  375. .content {
  376. font-style: italic;
  377. }
  378. &::before, &::after {
  379. display: none;
  380. }
  381. }
  382. }
  383. .attachments {
  384. a {
  385. font-style: italic;
  386. display: block;
  387. padding: 1em;
  388. background-color: #ccc;
  389. }
  390. img, audio, video {
  391. max-width: 100%;
  392. max-height: 300px;
  393. }
  394. video {
  395. background: black;
  396. min-height: 300px;
  397. min-width: 280px;
  398. }
  399. img {
  400. cursor: pointer;
  401. }
  402. }
  403. .outgoing .avatar {
  404. display: none;
  405. }
  406. .bubble .content.error-message {
  407. cursor: pointer;
  408. font-style: italic;
  409. }
  410. .key-conflict {
  411. padding: 15px 10px;
  412. button {
  413. margin-top: 5px;
  414. }
  415. }
  416. }
  417. .message-list,
  418. .message-container,
  419. .key-conflict-dialogue {
  420. .avatar {
  421. height: 36px;
  422. width: 36px;
  423. line-height: 36px;
  424. }
  425. }
  426. .bottom-bar {
  427. box-sizing: content-box;
  428. $button-width: 36px;
  429. padding: 5px 5px 5px 0;
  430. background: $grey_l;
  431. form.active {
  432. outline: solid 1px $blue;
  433. }
  434. form.send {
  435. background: #ffffff;
  436. }
  437. input, textarea {
  438. color: $grey_d;
  439. }
  440. .attachment-previews {
  441. padding: 0 36px;
  442. .attachment-preview {
  443. padding: 13px 10px 0;
  444. }
  445. img {
  446. border: 2px solid #ddd;
  447. border-radius: $border-radius;
  448. max-height: 100px;
  449. }
  450. .close {
  451. position: absolute;
  452. top: 5px;
  453. right: 2px;
  454. background: #999;
  455. &:hover {
  456. background: $grey;
  457. }
  458. }
  459. }
  460. .flex {
  461. display: flex;
  462. flex-direction: row;
  463. .send-message {
  464. flex-grow: 1;
  465. }
  466. }
  467. .choose-file {
  468. float: left;
  469. height: 36px;
  470. }
  471. .send-message {
  472. display: block;
  473. max-height: 100px;
  474. padding: 10px;
  475. border: 0;
  476. outline: 0;
  477. z-index: 5;
  478. resize: none;
  479. font-size: 1em;
  480. font-family: inherit;
  481. &[disabled=disabled] {
  482. background: transparent;
  483. }
  484. }
  485. .capture-audio {
  486. float: right;
  487. height: 36px;
  488. }
  489. }
  490. .toast {
  491. position: absolute;
  492. bottom: 0;
  493. margin: 0 2em 3em;
  494. padding: 0.5em 1.5em;
  495. background: rgba(0, 0, 0, 0.75);
  496. color: white;
  497. box-shadow: 0 0 5px 0 black;
  498. border-radius: $border-radius;
  499. font-size: $font-size-small;
  500. z-index: 100;
  501. }
  502. .confirmation-dialog {
  503. .content {
  504. max-width: 350px;
  505. margin: 100px auto;
  506. padding: 1em;
  507. background: white;
  508. border-radius: $border-radius;
  509. overflow: auto;
  510. box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.2);
  511. .message {
  512. text-align: center;
  513. }
  514. .buttons {
  515. margin-top: 10px;
  516. button {
  517. float: right;
  518. margin-left: 10px;
  519. background-color: $grey_l;
  520. border-radius: $border-radius;
  521. outline: none;
  522. padding: 5px 8px;
  523. border: 1px solid $grey_l2;
  524. &:focus {
  525. border-color: $grey_l4;
  526. }
  527. &:hover {
  528. background-color: $grey_l2;
  529. border-color: $grey_l3;
  530. }
  531. }
  532. }
  533. }
  534. }
  535. .message-list li.keychange {
  536. text-align: center;
  537. .content {
  538. display: inline-block;
  539. padding: 5px 10px;
  540. background: #fff5c4;
  541. color: $grey_d;
  542. border-radius: $border-radius;
  543. }
  544. }