history-react.less 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. @versions-list-width: 320px;
  2. @history-toolbar-height: 40px;
  3. history-root {
  4. height: 100%;
  5. display: block;
  6. }
  7. .history-react {
  8. display: flex;
  9. height: 100%;
  10. background-color: @history-main-bg;
  11. .history-header {
  12. height: @history-toolbar-height;
  13. background-color: @history-react-header-bg;
  14. color: @history-react-header-color;
  15. font-size: @font-size-small;
  16. display: flex;
  17. flex-direction: column;
  18. justify-content: center;
  19. box-sizing: border-box;
  20. }
  21. .doc-panel {
  22. flex: 1;
  23. display: flex;
  24. flex-direction: column;
  25. .toolbar-container {
  26. border-bottom: 1px solid @history-react-separator-color;
  27. padding: 0 8px;
  28. }
  29. .doc-container {
  30. flex: 1;
  31. overflow-y: auto;
  32. }
  33. }
  34. .change-list {
  35. display: flex;
  36. flex-direction: column;
  37. width: @versions-list-width;
  38. font-size: @font-size-small;
  39. border-left: 1px solid @history-react-separator-color;
  40. box-sizing: content-box;
  41. }
  42. .toggle-switch-label {
  43. flex: 1;
  44. span {
  45. display: block;
  46. }
  47. }
  48. .history-version-list-container {
  49. flex: 1;
  50. overflow-y: auto;
  51. }
  52. .history-all-versions-scroller {
  53. overflow-y: auto;
  54. height: 100%;
  55. }
  56. .history-all-versions-container {
  57. position: relative;
  58. }
  59. .history-versions-bottom {
  60. position: absolute;
  61. height: 8em;
  62. bottom: 0;
  63. }
  64. .history-toggle-switch-container,
  65. .history-version-day,
  66. .history-version-details {
  67. padding: 0 16px;
  68. }
  69. .history-version-day {
  70. position: sticky;
  71. top: 0;
  72. display: block;
  73. padding-top: 12px;
  74. padding-bottom: 4px;
  75. line-height: 20px;
  76. background-color: @white;
  77. }
  78. .history-version-details {
  79. padding-top: 8px;
  80. padding-bottom: 8px;
  81. &:hover {
  82. cursor: pointer;
  83. background-color: @neutral-10;
  84. }
  85. }
  86. .history-version-selected {
  87. background-color: @green-10;
  88. }
  89. .history-version-metadata-time {
  90. display: block;
  91. margin-bottom: 4px;
  92. color: @neutral-90;
  93. &:last-child {
  94. margin-bottom: initial;
  95. }
  96. }
  97. .history-version-metadata-users,
  98. .history-version-changes {
  99. margin: 0;
  100. padding: 0;
  101. list-style: none;
  102. }
  103. .history-version-metadata-users {
  104. display: inline;
  105. > li {
  106. display: inline-flex;
  107. align-items: center;
  108. margin-right: 8px;
  109. }
  110. }
  111. .history-version-changes {
  112. > li {
  113. margin-bottom: 4px;
  114. }
  115. }
  116. .history-version-user-badge-color {
  117. @size: 8px;
  118. display: inline-block;
  119. width: @size;
  120. height: @size;
  121. margin-right: 4px;
  122. border-radius: 2px;
  123. }
  124. .history-version-day,
  125. .history-version-change-action,
  126. .history-version-metadata-users,
  127. .history-version-origin,
  128. .history-version-saved-by {
  129. color: @neutral-70;
  130. }
  131. .history-version-change-doc {
  132. color: @neutral-90;
  133. }
  134. .history-version-divider {
  135. margin: 6px 8px;
  136. border-color: @neutral-20;
  137. }
  138. .history-version-badge {
  139. margin-bottom: 4px;
  140. margin-right: 10px;
  141. }
  142. .history-version-saved-by {
  143. margin-bottom: 4px;
  144. &-label {
  145. margin-right: 8px;
  146. }
  147. &:last-child {
  148. margin-bottom: initial;
  149. }
  150. }
  151. .loading {
  152. padding-top: 10rem;
  153. font-family: @font-family-serif;
  154. text-align: center;
  155. }
  156. & > .loading {
  157. flex: 1;
  158. }
  159. .history-all-versions-scroller .loading {
  160. position: sticky;
  161. bottom: 0;
  162. padding: @line-height-computed / 2 0;
  163. background-color: @gray-lightest;
  164. }
  165. .history-loading-panel {
  166. padding-top: 10rem;
  167. font-family: @font-family-serif;
  168. text-align: center;
  169. }
  170. .history-file-entity-operation-badge {
  171. flex: 0 0 auto;
  172. text-transform: lowercase;
  173. margin-left: 0.5em;
  174. font-size: 0.7em;
  175. background: @history-file-badge-bg;
  176. color: @history-file-badge-color;
  177. border-radius: 8px;
  178. line-height: 1;
  179. padding: 2px 4px 3px;
  180. margin-top: 2px;
  181. }
  182. .history-react-toolbar {
  183. display: flex;
  184. justify-content: space-between;
  185. align-items: center;
  186. width: 100%;
  187. .history-react-toolbar-time {
  188. font-weight: 700;
  189. }
  190. }
  191. }
  192. .history-version-label-tooltip {
  193. padding: 6px;
  194. text-align: initial;
  195. &-row {
  196. margin-bottom: 6.25px;
  197. &:last-child {
  198. margin-bottom: initial;
  199. }
  200. }
  201. }
  202. .document-diff-container {
  203. height: 100%;
  204. display: flex;
  205. flex-direction: column;
  206. position: relative;
  207. .cm-viewer-container,
  208. .cm-editor {
  209. height: 100%;
  210. }
  211. .previous-highlight-button,
  212. .next-highlight-button {
  213. position: absolute;
  214. right: 16px;
  215. }
  216. .previous-highlight-button {
  217. top: 16px;
  218. }
  219. .next-highlight-button {
  220. bottom: 16px;
  221. }
  222. }
  223. .history-file-tree {
  224. display: flex !important; // To work around jQuery layout's inline styles
  225. flex-direction: column;
  226. flex-grow: 1;
  227. max-height: 100%;
  228. ul.history-file-tree-list {
  229. margin: 0;
  230. overflow-x: hidden;
  231. height: 100%;
  232. flex-grow: 1;
  233. position: relative;
  234. overflow-y: auto;
  235. .history-file-tree-item > ul,
  236. ul[role='tree'] {
  237. margin-left: 22px;
  238. }
  239. li.bottom-buffer {
  240. min-height: @line-height-computed;
  241. }
  242. li {
  243. line-height: @file-tree-line-height;
  244. position: relative;
  245. &:focus {
  246. outline: none;
  247. }
  248. .history-file-tree-item {
  249. color: @file-tree-item-color;
  250. cursor: pointer;
  251. white-space: nowrap;
  252. overflow: hidden;
  253. text-overflow: clip;
  254. user-select: none;
  255. &:focus {
  256. outline: none;
  257. }
  258. &:hover {
  259. background-color: @file-tree-item-hover-bg;
  260. // When the entity is a subfolder, the DOM element is "indented" via margin-left. This makes the
  261. // element not fill the entire file-tree width (as it's spaced from the left-hand side via margin)
  262. // and, in consequence, the background gets clipped. The ::before pseudo-selector is used to fill
  263. // the empty space.
  264. .fake-full-width-bg(@file-tree-item-hover-bg);
  265. }
  266. .history-file-tree-folder-button,
  267. .history-file-tree-item-button {
  268. .reset-button;
  269. &:focus {
  270. outline: none;
  271. }
  272. }
  273. .history-file-tree-item-button {
  274. width: 100%;
  275. overflow: hidden;
  276. text-overflow: ellipsis;
  277. text-align: left;
  278. padding-right: 40px;
  279. font-weight: normal;
  280. display: inline-flex;
  281. flex-direction: row;
  282. align-items: center;
  283. justify-content: space-between;
  284. .history-file-tree-item-button-text {
  285. display: inline-flex;
  286. margin-right: 5px;
  287. }
  288. .history-file-tree-item-button-badge {
  289. text-transform: capitalize;
  290. &:hover {
  291. background-color: @neutral-20;
  292. }
  293. }
  294. }
  295. }
  296. i.fa {
  297. color: @file-tree-item-icon-color;
  298. font-size: 14px;
  299. &.file-tree-icon {
  300. margin-right: 4px;
  301. margin-left: 8px;
  302. }
  303. &.file-tree-folder-icon {
  304. margin-right: 4px;
  305. }
  306. &.file-tree-expand-icon {
  307. margin-left: 8px;
  308. }
  309. }
  310. i.fa-folder-open,
  311. i.fa-folder {
  312. color: @file-tree-item-folder-color;
  313. font-size: 14px;
  314. }
  315. }
  316. li.selected > .history-file-tree-item {
  317. color: @file-tree-item-selected-color;
  318. background-color: @file-tree-item-selected-bg;
  319. font-weight: bold;
  320. > div > i.fa,
  321. > button > i.fa,
  322. > i.fa {
  323. color: @file-tree-item-selected-color;
  324. }
  325. .fake-full-width-bg(@file-tree-item-selected-bg);
  326. }
  327. }
  328. }