history-react.less 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  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. z-index: 1;
  72. top: 0;
  73. display: block;
  74. padding-top: 12px;
  75. padding-bottom: 4px;
  76. line-height: 20px;
  77. background-color: @white;
  78. }
  79. .history-version-details {
  80. display: flex;
  81. align-items: flex-start;
  82. padding-top: 8px;
  83. padding-bottom: 8px;
  84. &:hover {
  85. cursor: pointer;
  86. background-color: @neutral-10;
  87. }
  88. }
  89. .history-version-selected {
  90. background-color: @green-10;
  91. }
  92. .history-version-metadata-time {
  93. display: block;
  94. margin-bottom: 4px;
  95. color: @neutral-90;
  96. &:last-child {
  97. margin-bottom: initial;
  98. }
  99. }
  100. .history-version-metadata-users,
  101. .history-version-changes {
  102. margin: 0;
  103. padding: 0;
  104. list-style: none;
  105. }
  106. .history-version-metadata-users {
  107. display: inline;
  108. > li {
  109. display: inline-flex;
  110. align-items: center;
  111. margin-right: 8px;
  112. }
  113. }
  114. .history-version-changes {
  115. > li {
  116. margin-bottom: 4px;
  117. }
  118. }
  119. .history-version-user-badge-color {
  120. @size: 8px;
  121. display: inline-block;
  122. width: @size;
  123. height: @size;
  124. margin-right: 4px;
  125. border-radius: 2px;
  126. }
  127. .history-version-day,
  128. .history-version-change-action,
  129. .history-version-metadata-users,
  130. .history-version-origin,
  131. .history-version-saved-by {
  132. color: @neutral-70;
  133. }
  134. .history-version-change-doc {
  135. color: @neutral-90;
  136. }
  137. .history-version-divider {
  138. margin: 6px 8px;
  139. border-color: @neutral-20;
  140. }
  141. .history-version-badge {
  142. margin-bottom: 4px;
  143. margin-right: 10px;
  144. }
  145. .history-version-label {
  146. margin-bottom: 4px;
  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-version-saved-by {
  166. &-label {
  167. margin-right: 8px;
  168. }
  169. }
  170. .dropdown.open {
  171. .history-version-dropdown-menu-btn {
  172. background-color: rgba(@neutral-90, 0.08);
  173. box-shadow: initial;
  174. }
  175. }
  176. .history-version-dropdown-menu-btn {
  177. @size: 30px;
  178. padding: 0;
  179. width: @size;
  180. height: @size;
  181. font-size: @font-size-small;
  182. color: @neutral-90;
  183. background-color: transparent;
  184. &:hover,
  185. &:active {
  186. z-index: initial;
  187. background-color: rgba(@neutral-90, 0.08);
  188. box-shadow: initial;
  189. }
  190. }
  191. .history-version-main-details {
  192. flex: 1;
  193. }
  194. .history-loading-panel {
  195. padding-top: 10rem;
  196. font-family: @font-family-serif;
  197. text-align: center;
  198. }
  199. .history-file-entity-operation-badge {
  200. flex: 0 0 auto;
  201. text-transform: lowercase;
  202. margin-left: 0.5em;
  203. font-size: 0.7em;
  204. background: @history-file-badge-bg;
  205. color: @history-file-badge-color;
  206. border-radius: 8px;
  207. line-height: 1;
  208. padding: 2px 4px 3px;
  209. margin-top: 2px;
  210. }
  211. .history-react-toolbar {
  212. display: flex;
  213. align-items: center;
  214. .history-react-toolbar-file-info {
  215. flex: 1;
  216. text-align: right;
  217. }
  218. .history-react-toolbar-time {
  219. font-weight: 700;
  220. }
  221. .history-react-toolbar-restore-file-button {
  222. margin-left: 5px;
  223. }
  224. }
  225. }
  226. .history-version-label-tooltip {
  227. padding: 6px;
  228. text-align: initial;
  229. &-row {
  230. margin-bottom: 6.25px;
  231. &:last-child {
  232. margin-bottom: initial;
  233. }
  234. }
  235. }
  236. .history-version-dropdown-menu {
  237. [role='menuitem'] {
  238. padding: 10px 12px;
  239. color: @neutral-90;
  240. &:hover,
  241. &:focus {
  242. color: @neutral-90;
  243. background-color: @neutral-10;
  244. }
  245. }
  246. }
  247. .document-diff-container {
  248. height: 100%;
  249. display: flex;
  250. flex-direction: column;
  251. position: relative;
  252. .cm-viewer-container,
  253. .cm-editor {
  254. height: 100%;
  255. }
  256. .previous-highlight-button,
  257. .next-highlight-button {
  258. position: absolute;
  259. right: 16px;
  260. }
  261. .previous-highlight-button {
  262. top: 16px;
  263. }
  264. .next-highlight-button {
  265. bottom: 16px;
  266. }
  267. }
  268. .history-file-tree {
  269. display: flex !important; // To work around jQuery layout's inline styles
  270. flex-direction: column;
  271. flex-grow: 1;
  272. max-height: 100%;
  273. ul.history-file-tree-list {
  274. margin: 0;
  275. overflow-x: hidden;
  276. height: 100%;
  277. flex-grow: 1;
  278. position: relative;
  279. overflow-y: auto;
  280. .history-file-tree-item > ul,
  281. ul[role='tree'] {
  282. margin-left: 22px;
  283. }
  284. li.bottom-buffer {
  285. min-height: @line-height-computed;
  286. }
  287. li {
  288. line-height: @file-tree-line-height;
  289. position: relative;
  290. &:focus {
  291. outline: none;
  292. }
  293. .history-file-tree-item {
  294. color: @file-tree-item-color;
  295. cursor: pointer;
  296. white-space: nowrap;
  297. overflow: hidden;
  298. text-overflow: clip;
  299. user-select: none;
  300. &:focus {
  301. outline: none;
  302. }
  303. &:hover {
  304. background-color: @file-tree-item-hover-bg;
  305. // When the entity is a subfolder, the DOM element is "indented" via margin-left. This makes the
  306. // element not fill the entire file-tree width (as it's spaced from the left-hand side via margin)
  307. // and, in consequence, the background gets clipped. The ::before pseudo-selector is used to fill
  308. // the empty space.
  309. .fake-full-width-bg(@file-tree-item-hover-bg);
  310. }
  311. .history-file-tree-folder-button,
  312. .history-file-tree-item-button {
  313. .reset-button;
  314. &:focus {
  315. outline: none;
  316. }
  317. }
  318. .history-file-tree-item-button {
  319. width: 100%;
  320. overflow: hidden;
  321. text-overflow: ellipsis;
  322. text-align: left;
  323. padding-right: 40px;
  324. font-weight: normal;
  325. display: inline-flex;
  326. flex-direction: row;
  327. align-items: center;
  328. justify-content: space-between;
  329. .history-file-tree-item-button-text {
  330. display: inline-flex;
  331. margin-right: 5px;
  332. &.strikethrough {
  333. text-decoration: line-through;
  334. }
  335. }
  336. .history-file-tree-item-button-badge {
  337. text-transform: capitalize;
  338. &:hover {
  339. background-color: @neutral-20;
  340. }
  341. }
  342. }
  343. }
  344. i.fa {
  345. color: @file-tree-item-icon-color;
  346. font-size: 14px;
  347. &.file-tree-icon {
  348. margin-right: 4px;
  349. margin-left: 8px;
  350. }
  351. &.file-tree-folder-icon {
  352. margin-right: 4px;
  353. }
  354. &.file-tree-expand-icon {
  355. margin-left: 8px;
  356. }
  357. }
  358. i.fa-folder-open,
  359. i.fa-folder {
  360. color: @file-tree-item-folder-color;
  361. font-size: 14px;
  362. }
  363. }
  364. li.selected > .history-file-tree-item {
  365. color: @file-tree-item-selected-color;
  366. background-color: @file-tree-item-selected-bg;
  367. font-weight: bold;
  368. > div > i.fa,
  369. > button > i.fa,
  370. > i.fa {
  371. color: @file-tree-item-selected-color;
  372. }
  373. .fake-full-width-bg(@file-tree-item-selected-bg);
  374. }
  375. }
  376. }