file_sync.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. :root {
  2. --ls-color-file-sync-error: var(--color-red-600);
  3. --ls-color-file-sync-pending: var(--color-yellow-600);
  4. --ls-color-file-sync-idle: var(--color-green-600);
  5. }
  6. .cp__file-sync, .cp__rtc-sync {
  7. &-indicator {
  8. .ui__button.cloud {
  9. @apply relative;
  10. &.on {
  11. @apply after:content-['*'];
  12. &:after {
  13. @apply absolute bottom-2.5 right-1 w-[7px] h-[7px] rounded-full opacity-100 text-transparent;
  14. background-color: var(--ls-color-file-sync-pending);
  15. }
  16. &.syncing {
  17. &:after {
  18. background-color: var(--ls-color-file-sync-pending);
  19. }
  20. }
  21. &.queuing {
  22. &:after {
  23. background-color: var(--ls-color-file-sync-pending);
  24. }
  25. }
  26. &.idle {
  27. &:after {
  28. background-color: var(--ls-color-file-sync-idle);
  29. }
  30. }
  31. }
  32. }
  33. .debug-status {
  34. position: absolute;
  35. top: 0;
  36. right: 0;
  37. background: #bd0000;
  38. color: white;
  39. font-size: 14px;
  40. padding: 5px 8px;
  41. }
  42. .dropdown-wrapper {
  43. width: 90vw;
  44. position: fixed;
  45. right: 5vw;
  46. .head-ctls {
  47. position: absolute;
  48. right: 10px;
  49. transform: translateY(8px);
  50. }
  51. .cp__file-sync-indicator-progress-pane {
  52. }
  53. @screen md {
  54. width: 400px;
  55. position: absolute;
  56. right: -10px;
  57. }
  58. > .py-1 {
  59. padding: 0;
  60. }
  61. .menu-link {
  62. white-space: normal;
  63. word-break: break-all;
  64. font-size: 13px;
  65. padding: 6px 20px;
  66. &.is-first-placeholder {
  67. padding: 0 !important;
  68. user-select: none;
  69. pointer-events: none;
  70. margin-top: 5px;
  71. &:hover {
  72. background-color: unset !important;
  73. }
  74. }
  75. i.ti {
  76. transform: translate(0);
  77. margin-right: 5px;
  78. }
  79. }
  80. .files-history.is-first, .file-item.is-first {
  81. margin-top: 40px;
  82. position: relative;
  83. &:before {
  84. margin-top: -30px;
  85. margin-left: -15px;
  86. margin-right: -15px;
  87. content: "Recently Synced";
  88. display: flex;
  89. font-weight: 600;
  90. font-size: 11px;
  91. text-transform: uppercase;
  92. opacity: .4;
  93. padding: 2px 10px 6px;
  94. }
  95. }
  96. .file-item.is-first {
  97. margin-top: 5px;
  98. padding: 0 6px;
  99. &:before {
  100. margin: 0;
  101. content: "Upcoming Sync";
  102. }
  103. }
  104. }
  105. .menu-links-outer {
  106. @apply py-0;
  107. }
  108. .menu-links-wrapper {
  109. padding: 4px 0;
  110. max-height: calc(70vh - 120px) !important;
  111. overflow-y: auto;
  112. .title-wrap {
  113. flex: 1;
  114. }
  115. }
  116. &.is-enabled-progress-pane {
  117. .head-ctls {
  118. display: none;
  119. }
  120. .menu-links-outer {
  121. &.is-list-active {
  122. .menu-links-wrapper, .head-ctls {
  123. display: block !important;
  124. }
  125. .menu-links-wrapper {
  126. overflow-y: auto;
  127. }
  128. }
  129. }
  130. .menu-links-wrapper {
  131. @apply p-0 hidden overflow-hidden;
  132. > .menu-link:last-child {
  133. padding-bottom: 16px;
  134. }
  135. }
  136. }
  137. }
  138. &-indicator-progress-pane {
  139. @apply px-4 pt-4 pb-3 w-full overflow-hidden;
  140. -webkit-font-smoothing: antialiased;
  141. background-color: var(--ls-quaternary-background-color);
  142. .ti {
  143. @apply translate-y-0;
  144. &.ls-icon-thumb-up {
  145. @apply translate-x-[0.5px];
  146. }
  147. }
  148. > .a {
  149. @apply flex justify-between text-gray-200;
  150. > .al {
  151. @apply flex text-base flex-1 w-0.5 items-center space-x-2 font-semibold;
  152. > strong {
  153. @apply flex items-center justify-center font-extralight text-gray-800;
  154. background-color: var(--ls-color-file-sync-pending);
  155. border-radius: 4px;
  156. height: 24px;
  157. width: 24px;
  158. &.is-no-active {
  159. background-color: var(--ls-color-file-sync-idle);
  160. }
  161. }
  162. > span {
  163. @apply w-full overflow-hidden overflow-ellipsis pr-2;
  164. }
  165. }
  166. > .ar {
  167. @apply relative;
  168. top: -4px;
  169. }
  170. }
  171. > .b {
  172. @apply flex items-center justify-between pt-2 pb-3 text-sm;
  173. .bl {
  174. @apply flex items-center leading-none pt-2;
  175. }
  176. }
  177. > .c {
  178. @apply flex items-center text-gray-200 relative;
  179. top: -3px;
  180. .cl {
  181. @apply text-sm leading-6 flex flex-1 items-center overflow-hidden;
  182. }
  183. .progress-bar {
  184. @apply flex flex-1 items-center overflow-hidden relative;
  185. height: 7px;
  186. top: 1px;
  187. border-radius: 4px;
  188. background-color: var(--ls-secondary-background-color);
  189. i {
  190. transition: width .5s;
  191. height: 100%;
  192. width: 0;
  193. border-radius: 4px;
  194. background-color: var(--ls-link-text-color);
  195. }
  196. }
  197. }
  198. }
  199. &-indicator-progress-pie {
  200. width: 16px;
  201. height: 16px;
  202. border-radius: 50%;
  203. display: inline-block;
  204. margin-right: 2px;
  205. margin-bottom: -1px;
  206. }
  207. &-page-histories {
  208. @apply flex;
  209. width: unset;
  210. height: 85vh;
  211. margin: 20px -32px -32px -32px;
  212. overflow: hidden;
  213. border-top: 1px solid var(--ls-tertiary-border-color);
  214. @screen md {
  215. width: 90vw;
  216. }
  217. > h1 {
  218. white-space: nowrap;
  219. overflow: hidden;
  220. text-overflow: ellipsis;
  221. width: 90%;
  222. }
  223. &-left {
  224. @apply flex h-full;
  225. visibility: hidden;
  226. flex-basis: 100%;
  227. .version-list {
  228. @apply list-none m-0 h-full;
  229. overflow-y: auto;
  230. flex-basis: 30%;
  231. border-right: 1px solid var(--ls-tertiary-border-color);
  232. &-item {
  233. .item-link {
  234. @apply py-2 px-3;
  235. border-bottom: 1px solid var(--ls-tertiary-border-color);
  236. transition: background-color .3s;
  237. &:hover, &.active {
  238. background-color: var(--ls-tertiary-background-color);
  239. }
  240. &:active {
  241. opacity: .8;
  242. }
  243. > strong {
  244. display: block;
  245. white-space: nowrap;
  246. overflow: hidden;
  247. text-overflow: ellipsis;
  248. }
  249. }
  250. }
  251. }
  252. > article {
  253. @apply flex-1 overflow-hidden h-full;
  254. /* fix inner content overflow */
  255. width: 0;
  256. .raw-content-editor, .extensions__code {
  257. height: 99.9%;
  258. }
  259. .extensions__code-lang {
  260. display: none;
  261. }
  262. .code-editor {
  263. margin-top: 0;
  264. }
  265. }
  266. @screen md {
  267. flex-basis: 60%;
  268. }
  269. }
  270. &-right {
  271. @apply flex-1 h-full hidden pt-4;
  272. visibility: hidden;
  273. border-left: 1px solid var(--ls-secondary-border-color);
  274. padding-left: 30px;
  275. padding-bottom: 50px;
  276. overflow-y: auto;
  277. @screen md {
  278. display: block;
  279. }
  280. }
  281. &.is-list-ready {
  282. .cp__file-sync-page-histories {
  283. &-left, &-right {
  284. visibility: visible;
  285. }
  286. }
  287. .ready-loading {
  288. display: none;
  289. }
  290. }
  291. }
  292. &-welcome-logseq-sync, &-unavailable-logseq-sync {
  293. > .head-bg {
  294. @apply flex m-auto mb-10 w-auto sm:w-[500px];
  295. background-image: url("../img/file-sync-welcome-backer-dark.png");
  296. background-size: contain;
  297. background-repeat: no-repeat;
  298. background-position: center;
  299. padding-top: 86px;
  300. max-width: 90vw;
  301. > strong {
  302. @apply block bg-gray-200 rounded text-gray-700 text-[10px] font-semibold px-2 py-0.5 opacity-40
  303. m-auto translate-y-8;
  304. }
  305. }
  306. > h1, > h2 {
  307. @apply flex justify-center text-center;
  308. }
  309. > h2 {
  310. @apply text-sm opacity-80 pt-3;
  311. }
  312. }
  313. &-unavailable-logseq-sync {
  314. > .head-bg {
  315. background-image: url("../img/file-sync-unavailale-nonbacker-dark.png");
  316. }
  317. }
  318. &-related-normal-modal {
  319. .icon-wrap {
  320. @apply rounded flex justify-center items-center;
  321. width: 48px;
  322. height: 48px;
  323. background-color: var(--ls-quaternary-background-color);
  324. > .ti {
  325. font-size: 34px;
  326. opacity: .9;
  327. }
  328. }
  329. > .folder-tip {
  330. @apply mt-5 py-4 rounded-md;
  331. -webkit-font-smoothing: antialiased;
  332. background-color: var(--ls-quaternary-background-color);
  333. .ti {
  334. font-weight: 400;
  335. font-size: 20px;
  336. }
  337. h3, h3 > span {
  338. @apply dark:text-white flex items-center space-x-2 font-semibold opacity-95;
  339. }
  340. h4 {
  341. @apply text-sm opacity-50 pt-1;
  342. }
  343. .out-icloud {
  344. @apply w-full;
  345. button {
  346. @apply w-full border-none rounded-t-none translate-y-4;
  347. }
  348. }
  349. }
  350. > .input-hints {
  351. @apply flex-nowrap md:flex-wrap;
  352. background-color: var(--ls-primary-background-color);
  353. &.strength-wrap {
  354. @apply flex-wrap;
  355. }
  356. .strength-item {
  357. @apply whitespace-nowrap flex items-center leading-none opacity-60;
  358. .ti {
  359. @apply scale-75;
  360. }
  361. &.included {
  362. @apply text-green-700 font-bold;
  363. .ti {
  364. @apply scale-90 font-bold;
  365. }
  366. }
  367. }
  368. }
  369. > .input-pw-strength {
  370. > .indicator {
  371. @apply space-x-1.5;
  372. > i {
  373. @apply flex-1 bg-gray-200 overflow-hidden cursor-help opacity-90;
  374. font-size: 0;
  375. height: 5px;
  376. border-radius: 2px;
  377. &.active:first-child {
  378. @apply bg-red-500;
  379. }
  380. &.active:nth-child(2) {
  381. @apply bg-yellow-300;
  382. }
  383. &.active:nth-child(3) {
  384. @apply bg-blue-400;
  385. }
  386. &.active:last-child {
  387. @apply bg-green-500;
  388. }
  389. }
  390. }
  391. }
  392. > .cloud-tip {
  393. background-color: var(--ls-tertiary-background-color);
  394. > ul {
  395. > li.it {
  396. @apply flex flex-1 border-l-2 justify-center items-center flex-col py-4;
  397. border-color: var(--ls-quaternary-background-color);
  398. &:first-child {
  399. @apply border-l-0;
  400. }
  401. h1 {
  402. @apply text-5xl relative;
  403. sup {
  404. @apply absolute text-lg font-semibold right-0 translate-x-8 opacity-60;
  405. }
  406. }
  407. h2 {
  408. @apply text-xs opacity-80 pt-2;
  409. }
  410. }
  411. }
  412. }
  413. .init-remote-pw-tips {
  414. > div {
  415. background-color: var(--ls-tertiary-background-color);
  416. padding: 6px 10px;
  417. font-size: 14px;
  418. border-radius: 4px;
  419. p > span {
  420. opacity: .6;
  421. }
  422. }
  423. }
  424. }
  425. }
  426. html[data-theme='light'] {
  427. .cp__file-sync {
  428. &-welcome-logseq-sync {
  429. > .head-bg {
  430. background-image: url("../img/file-sync-welcome-backer-light.png");
  431. }
  432. }
  433. &-unavailable-logseq-sync {
  434. > .head-bg {
  435. background-image: url("../img/file-sync-unavailale-nonbacker-light.png");
  436. }
  437. }
  438. &-related-normal-modal {
  439. .icon-wrap {
  440. background-color: #908E8B;
  441. .ti {
  442. color: whitesmoke;
  443. }
  444. }
  445. > .folder-tip {
  446. background-color: var(--ls-tertiary-background-color);
  447. }
  448. > .input-hints {
  449. background-color: #e1e1e1;
  450. }
  451. }
  452. &-indicator-progress-pane {
  453. background-color: var(--ls-tertiary-background-color);
  454. > .a, > .c {
  455. @apply text-gray-700;
  456. }
  457. .progress-bar {
  458. background-color: var(--ls-quaternary-background-color);
  459. }
  460. }
  461. }
  462. }
  463. html:not(.is-electron) {
  464. .cp__file-sync {
  465. &-indicator {
  466. a.cloud .ti {
  467. opacity: .9;
  468. }
  469. }
  470. }
  471. }