App.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284
  1. <template>
  2. <div class="upper-container">
  3. <banned v-if="banned" />
  4. <div v-else class="upper-container">
  5. <router-view
  6. :key="$route.fullPath"
  7. class="main-container"
  8. :class="{ 'main-container-modal-active': aModalIsOpen }"
  9. />
  10. <what-is-new v-show="modals.whatIsNew" />
  11. <login-modal v-if="modals.login" />
  12. <register-modal v-if="modals.register" />
  13. <create-playlist-modal v-if="modals.createPlaylist" />
  14. </div>
  15. </div>
  16. </template>
  17. <script>
  18. import { mapState, mapActions, mapGetters } from "vuex";
  19. import Toast from "toasters";
  20. import { defineAsyncComponent } from "vue";
  21. import ws from "./ws";
  22. import aw from "./aw";
  23. import keyboardShortcuts from "./keyboardShortcuts";
  24. export default {
  25. components: {
  26. WhatIsNew: defineAsyncComponent(() =>
  27. import("@/components/modals/WhatIsNew.vue")
  28. ),
  29. LoginModal: defineAsyncComponent(() =>
  30. import("@/components/modals/Login.vue")
  31. ),
  32. RegisterModal: defineAsyncComponent(() =>
  33. import("@/components/modals/Register.vue")
  34. ),
  35. CreatePlaylistModal: defineAsyncComponent(() =>
  36. import("@/components/modals/CreatePlaylist.vue")
  37. ),
  38. Banned: defineAsyncComponent(() => import("@/pages/Banned.vue"))
  39. },
  40. replace: false,
  41. data() {
  42. return {
  43. apiDomain: "",
  44. socketConnected: true,
  45. keyIsDown: false
  46. };
  47. },
  48. computed: {
  49. ...mapState({
  50. loggedIn: state => state.user.auth.loggedIn,
  51. role: state => state.user.auth.role,
  52. username: state => state.user.auth.username,
  53. userId: state => state.user.auth.userId,
  54. banned: state => state.user.auth.banned,
  55. modals: state => state.modalVisibility.modals,
  56. currentlyActive: state => state.modalVisibility.currentlyActive,
  57. nightmode: state => state.user.preferences.nightmode,
  58. activityWatch: state => state.user.preferences.activityWatch
  59. }),
  60. ...mapGetters({
  61. socket: "websockets/getSocket"
  62. }),
  63. aModalIsOpen() {
  64. return Object.keys(this.currentlyActive).length > 0;
  65. }
  66. },
  67. watch: {
  68. socketConnected(connected) {
  69. if (!connected) this.disconnectedMessage.show();
  70. else this.disconnectedMessage.hide();
  71. },
  72. nightmode(nightmode) {
  73. if (nightmode) this.enableNightMode();
  74. else this.disableNightMode();
  75. },
  76. activityWatch(activityWatch) {
  77. if (activityWatch) aw.enable();
  78. else aw.disable();
  79. }
  80. },
  81. async mounted() {
  82. document.onkeydown = ev => {
  83. const event = ev || window.event;
  84. const { keyCode } = event;
  85. const shift = event.shiftKey;
  86. const ctrl = event.ctrlKey;
  87. const alt = event.altKey;
  88. const identifier = `${keyCode}.${shift}.${ctrl}`;
  89. if (this.keyIsDown === identifier) return;
  90. this.keyIsDown = identifier;
  91. keyboardShortcuts.handleKeyDown(event, keyCode, shift, ctrl, alt);
  92. };
  93. document.onkeyup = () => {
  94. this.keyIsDown = "";
  95. };
  96. // ctrl + alt + n
  97. keyboardShortcuts.registerShortcut("nightmode", {
  98. keyCode: 78,
  99. ctrl: true,
  100. alt: true,
  101. handler: () => {
  102. localStorage.setItem("nightmode", !this.nightmode);
  103. if (this.loggedIn) {
  104. this.socket.dispatch(
  105. "users.updatePreferences",
  106. { nightmode: !this.nightmode },
  107. res => {
  108. if (res.status !== "success")
  109. new Toast(res.message);
  110. }
  111. );
  112. }
  113. this.changeNightmode(!this.nightmode);
  114. }
  115. });
  116. keyboardShortcuts.registerShortcut("closeModal", {
  117. keyCode: 27,
  118. shift: false,
  119. ctrl: false,
  120. handler: () => {
  121. if (Object.keys(this.currentlyActive).length !== 0)
  122. this.closeCurrentModal();
  123. }
  124. });
  125. if (localStorage.getItem("github_redirect")) {
  126. this.$router.push(localStorage.getItem("github_redirect"));
  127. localStorage.removeItem("github_redirect");
  128. }
  129. this.disconnectedMessage = new Toast({
  130. content: "Could not connect to the server.",
  131. persistent: true,
  132. interactable: false
  133. });
  134. this.disconnectedMessage.hide();
  135. ws.onConnect(true, () => {
  136. this.socketConnected = true;
  137. });
  138. ws.onDisconnect(true, () => {
  139. this.socketConnected = false;
  140. });
  141. this.apiDomain = await lofig.get("apiDomain");
  142. this.$router.isReady(() => {
  143. if (this.$route.query.err) {
  144. let { err } = this.$route.query;
  145. err = err
  146. .replace(new RegExp("<", "g"), "&lt;")
  147. .replace(new RegExp(">", "g"), "&gt;");
  148. this.$router.push({ query: {} });
  149. new Toast({ content: err, timeout: 20000 });
  150. }
  151. if (this.$route.query.msg) {
  152. let { msg } = this.$route.query;
  153. msg = msg
  154. .replace(new RegExp("<", "g"), "&lt;")
  155. .replace(new RegExp(">", "g"), "&gt;");
  156. this.$router.push({ query: {} });
  157. new Toast({ content: msg, timeout: 20000 });
  158. }
  159. });
  160. if (localStorage.getItem("nightmode") === "true") {
  161. this.changeNightmode(true);
  162. this.enableNightMode();
  163. }
  164. this.socket.dispatch("users.getPreferences", res => {
  165. if (res.status === "success") {
  166. const { preferences } = res.data;
  167. this.changeAutoSkipDisliked(preferences.autoSkipDisliked);
  168. this.changeNightmode(preferences.nightmode);
  169. this.changeActivityLogPublic(preferences.activityLogPublic);
  170. this.changeAnonymousSongRequests(
  171. preferences.anonymousSongRequests
  172. );
  173. this.changeActivityWatch(preferences.activityWatch);
  174. if (this.nightmode) this.enableNightMode();
  175. else this.disableNightMode();
  176. }
  177. });
  178. this.socket.on("keep.event:user.session.deleted", () =>
  179. window.location.reload()
  180. );
  181. },
  182. methods: {
  183. enableNightMode: () => {
  184. document
  185. .getElementsByTagName("body")[0]
  186. .classList.add("night-mode");
  187. },
  188. disableNightMode: () => {
  189. document
  190. .getElementsByTagName("body")[0]
  191. .classList.remove("night-mode");
  192. },
  193. ...mapActions("modalVisibility", ["closeCurrentModal"]),
  194. ...mapActions("user/preferences", [
  195. "changeNightmode",
  196. "changeAutoSkipDisliked",
  197. "changeActivityLogPublic",
  198. "changeAnonymousSongRequests",
  199. "changeActivityWatch"
  200. ])
  201. }
  202. };
  203. </script>
  204. <style lang="scss">
  205. @import "tippy.js/dist/tippy.css";
  206. @import "tippy.js/animations/scale.css";
  207. :root {
  208. --primary-color: var(--blue);
  209. --blue: rgb(2, 166, 242);
  210. --light-blue: rgb(163, 224, 255);
  211. --dark-blue: rgb(0, 102, 244);
  212. --teal: rgb(0, 209, 178);
  213. --purple: rgb(143, 40, 140);
  214. --light-purple: rgb(170, 141, 216);
  215. --yellow: rgb(241, 196, 15);
  216. --light-pink: rgb(228, 155, 166);
  217. --dark-pink: rgb(234, 72, 97);
  218. --orange: rgb(255, 94, 0);
  219. --dark-orange: rgb(250, 50, 0);
  220. --green: rgb(68, 189, 50);
  221. --red: rgb(231, 77, 60);
  222. --white: rgb(255, 255, 255);
  223. --black: rgb(0, 0, 0);
  224. --light-grey: rgb(245, 245, 245);
  225. --light-grey-2: rgb(221, 221, 221);
  226. --light-grey-3: rgb(195, 193, 195);
  227. --grey: rgb(107, 107, 107);
  228. --grey-2: rgb(113, 113, 113);
  229. --grey-3: rgb(126, 126, 126);
  230. --dark-grey: rgb(77, 77, 77);
  231. --dark-grey-2: rgb(51, 51, 51);
  232. --dark-grey-3: rgb(34, 34, 34);
  233. --dark-grey-4: rgb(26, 26, 26);
  234. --youtube: rgb(189, 46, 46);
  235. }
  236. .night-mode {
  237. div {
  238. // background-color: var(--black);
  239. color: var(--light-grey-2);
  240. }
  241. #toasts-container .toast {
  242. // color: var(--dark-grey-2);
  243. // background-color: var(--light-grey-3) !important;
  244. // &:last-of-type {
  245. // background-color: var(--light-grey) !important;
  246. // }
  247. }
  248. h1,
  249. h2,
  250. h3,
  251. h4,
  252. h5,
  253. h6 {
  254. color: var(--white) !important;
  255. }
  256. p:not(.help),
  257. label,
  258. .label {
  259. color: var(--light-grey-2) !important;
  260. }
  261. .section,
  262. .content {
  263. background-color: var(--dark-grey-3) !important;
  264. }
  265. .content-box,
  266. .step:not(.selected) {
  267. background-color: var(--dark-grey-3) !important;
  268. }
  269. .tippy-box[data-theme~="songActions"] {
  270. background-color: var(--dark-grey);
  271. }
  272. }
  273. body.night-mode {
  274. background-color: var(--black) !important;
  275. }
  276. #toasts-container {
  277. z-index: 10000 !important;
  278. .toast {
  279. font-weight: 600;
  280. // background-color: var(--dark-grey) !important;
  281. // &:last-of-type {
  282. // background-color: var(--dark-grey-2) !important;
  283. // }
  284. }
  285. }
  286. html {
  287. overflow: auto !important;
  288. height: 100%;
  289. }
  290. body {
  291. background-color: var(--light-grey);
  292. color: var(--dark-grey);
  293. height: 100%;
  294. font-family: "Inter", Helvetica, Arial, sans-serif;
  295. }
  296. h1,
  297. h2,
  298. h3,
  299. h4,
  300. h5,
  301. h6,
  302. .sidebar-title {
  303. font-family: "Inter", Helvetica, Arial, sans-serif;
  304. }
  305. .modal-card-title {
  306. font-weight: 600;
  307. font-family: "Inter", Helvetica, Arial, sans-serif;
  308. }
  309. p,
  310. button,
  311. input,
  312. select,
  313. textarea {
  314. font-family: "Inter", Helvetica, Arial, sans-serif;
  315. }
  316. #page-title {
  317. margin-top: 0;
  318. font-size: 35px;
  319. text-align: center;
  320. }
  321. @media only screen and (min-width: 700px) {
  322. #page-title {
  323. margin: 0;
  324. margin-bottom: 30px;
  325. font-size: 40px;
  326. }
  327. }
  328. .upper-container {
  329. height: 100%;
  330. }
  331. .main-container {
  332. height: 100%;
  333. min-height: 100vh;
  334. display: flex;
  335. flex-direction: column;
  336. > .container {
  337. flex: 1 0 auto;
  338. }
  339. }
  340. .main-container.main-container-modal-active {
  341. height: 100% !important;
  342. overflow: hidden;
  343. }
  344. a {
  345. color: var(--primary-color);
  346. text-decoration: none;
  347. }
  348. .modal-card {
  349. margin: 0 !important;
  350. }
  351. .absolute-a {
  352. width: 100%;
  353. height: 100%;
  354. position: absolute;
  355. top: 0;
  356. left: 0;
  357. }
  358. .alert {
  359. padding: 20px;
  360. color: var(--white);
  361. background-color: var(--red);
  362. position: fixed;
  363. top: 50px;
  364. right: 50px;
  365. font-size: 2em;
  366. border-radius: 5px;
  367. z-index: 10000000;
  368. }
  369. .night-mode {
  370. .tippy-box {
  371. border: 1px solid var(--light-grey-3);
  372. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25),
  373. 0 10px 10px rgba(0, 0, 0, 0.22);
  374. background-color: var(--white);
  375. &:not([data-theme~="songActions"]) > .tippy-arrow::before {
  376. border-top-color: var(--white);
  377. }
  378. .tippy-content {
  379. color: var(--black);
  380. }
  381. &[data-theme~="songActions"] {
  382. background-color: var(--dark-grey-2);
  383. border: 0 !important;
  384. i,
  385. a {
  386. color: var(--white);
  387. }
  388. .youtube-icon {
  389. background-color: var(--white);
  390. }
  391. }
  392. &[data-theme~="addToPlaylist"] {
  393. background-color: var(--dark-grey-2);
  394. border: 0 !important;
  395. .nav-dropdown-items {
  396. .nav-item {
  397. background-color: var(--dark-grey);
  398. &:focus {
  399. outline-color: var(--dark-grey);
  400. }
  401. p {
  402. color: var(--white);
  403. }
  404. }
  405. }
  406. }
  407. }
  408. .tippy-box[data-placement^="top"] {
  409. &[data-theme~="songActions"],
  410. &[data-theme~="addToPlaylist"] {
  411. > .tippy-arrow::before {
  412. border-top-color: var(--dark-grey-2);
  413. }
  414. }
  415. }
  416. .tippy-box[data-placement^="bottom"] {
  417. &[data-theme~="songActions"],
  418. &[data-theme~="addToPlaylist"] {
  419. > .tippy-arrow::before {
  420. border-bottom-color: var(--dark-grey-2);
  421. }
  422. }
  423. }
  424. .tippy-box[data-placement^="left"] {
  425. &[data-theme~="songActions"],
  426. &[data-theme~="addToPlaylist"] {
  427. > .tippy-arrow::before {
  428. border-left-color: var(--dark-grey-2);
  429. }
  430. }
  431. }
  432. .tippy-box[data-placement^="right"] {
  433. &[data-theme~="songActions"],
  434. &[data-theme~="addToPlaylist"] {
  435. > .tippy-arrow::before {
  436. border-right-color: var(--dark-grey-2);
  437. }
  438. }
  439. }
  440. }
  441. .tippy-box[data-theme~="info"] {
  442. font-size: 12px;
  443. letter-spacing: 1px;
  444. }
  445. .tippy-box[data-theme~="confirm"] {
  446. background-color: var(--red);
  447. .tippy-content {
  448. padding: 0;
  449. }
  450. a {
  451. padding: 15px;
  452. line-height: 25px;
  453. color: var(--white);
  454. border-bottom: 0;
  455. font-size: 15px;
  456. font-weight: 600;
  457. &:hover,
  458. &:focus {
  459. filter: brightness(90%);
  460. }
  461. }
  462. }
  463. .tippy-box[data-theme~="songActions"] {
  464. font-size: 15px;
  465. padding: 5px 10px;
  466. border: 1px solid var(--light-grey-3);
  467. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  468. background-color: var(--white);
  469. .button {
  470. width: 146px;
  471. }
  472. .addToPlaylistDropdown .tippy-popper {
  473. max-width: unset;
  474. }
  475. i,
  476. a {
  477. display: inline-block;
  478. cursor: pointer;
  479. color: var(--dark-grey);
  480. vertical-align: middle;
  481. &:hover,
  482. &:focus {
  483. filter: brightness(90%);
  484. }
  485. &:not(:first) {
  486. margin-left: 5px;
  487. }
  488. }
  489. .play-icon {
  490. color: var(--green);
  491. }
  492. .edit-icon,
  493. .view-icon,
  494. .add-to-playlist-icon,
  495. .add-to-queue-icon {
  496. color: var(--primary-color);
  497. }
  498. .hide-icon {
  499. color: var(--light-grey-3);
  500. }
  501. .stop-icon,
  502. .delete-icon {
  503. color: var(--red);
  504. }
  505. .report-icon {
  506. color: var(--yellow);
  507. }
  508. }
  509. .tippy-box[data-placement^="top"] {
  510. &[data-theme~="songActions"],
  511. &[data-theme~="addToPlaylist"] {
  512. > .tippy-arrow::before {
  513. border-top-color: var(--white);
  514. }
  515. }
  516. &[data-theme~="confirm"] > .tippy-arrow::before {
  517. border-top-color: var(--red);
  518. }
  519. }
  520. .tippy-box[data-placement^="bottom"] {
  521. &[data-theme~="songActions"],
  522. &[data-theme~="addToPlaylist"] {
  523. > .tippy-arrow::before {
  524. border-bottom-color: var(--white);
  525. }
  526. }
  527. &[data-theme~="confirm"] > .tippy-arrow::before {
  528. border-bottom-color: var(--red);
  529. }
  530. }
  531. .tippy-box[data-placement^="left"] {
  532. &[data-theme~="songActions"],
  533. &[data-theme~="addToPlaylist"] {
  534. > .tippy-arrow::before {
  535. border-left-color: var(--white);
  536. }
  537. }
  538. &[data-theme~="confirm"] > .tippy-arrow::before {
  539. border-left-color: var(--red);
  540. }
  541. }
  542. .tippy-box[data-placement^="right"] {
  543. &[data-theme~="songActions"],
  544. &[data-theme~="addToPlaylist"] {
  545. > .tippy-arrow::before {
  546. border-right-color: var(--white);
  547. }
  548. }
  549. &[data-theme~="confirm"] > .tippy-arrow::before {
  550. border-right-color: var(--red);
  551. }
  552. }
  553. .tippy-box[data-theme~="addToPlaylist"] {
  554. font-size: 15px;
  555. padding: 5px;
  556. border: 1px solid var(--light-grey-3);
  557. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  558. background-color: var(--white);
  559. color: var(--dark-grey);
  560. .nav-dropdown-items {
  561. .nav-item {
  562. width: 100%;
  563. justify-content: flex-start;
  564. border: 0;
  565. padding: 10px;
  566. font-size: 15.5px;
  567. height: 36px;
  568. background: var(--light-grey);
  569. border-radius: 5px;
  570. cursor: pointer;
  571. .checkbox-control {
  572. display: flex;
  573. flex-direction: row;
  574. align-items: center;
  575. p {
  576. margin-left: 10px;
  577. }
  578. .switch {
  579. position: relative;
  580. display: inline-block;
  581. flex-shrink: 0;
  582. width: 40px;
  583. height: 24px;
  584. }
  585. .switch input {
  586. opacity: 0;
  587. width: 0;
  588. height: 0;
  589. }
  590. .slider {
  591. position: absolute;
  592. cursor: pointer;
  593. top: 0;
  594. left: 0;
  595. right: 0;
  596. bottom: 0;
  597. background-color: #ccc;
  598. transition: 0.2s;
  599. border-radius: 34px;
  600. }
  601. .slider:before {
  602. position: absolute;
  603. content: "";
  604. height: 16px;
  605. width: 16px;
  606. left: 4px;
  607. bottom: 4px;
  608. background-color: white;
  609. transition: 0.2s;
  610. border-radius: 50%;
  611. }
  612. input:checked + .slider {
  613. background-color: var(--primary-color);
  614. }
  615. input:focus + .slider {
  616. box-shadow: 0 0 1px var(--primary-color);
  617. }
  618. input:checked + .slider:before {
  619. transform: translateX(16px);
  620. }
  621. }
  622. &:focus {
  623. outline-color: var(--light-grey-3);
  624. }
  625. &:not(:last-of-type) {
  626. margin-bottom: 5px;
  627. }
  628. }
  629. }
  630. .tippy-content > div {
  631. display: flex;
  632. flex-direction: column;
  633. button {
  634. width: 150px;
  635. &:not(:last-of-type) {
  636. margin-bottom: 10px;
  637. }
  638. }
  639. }
  640. }
  641. .select {
  642. &:after {
  643. border-color: var(--primary-color);
  644. border-width: 1.5px;
  645. margin-top: -3px;
  646. }
  647. select {
  648. height: 36px;
  649. }
  650. }
  651. .button:focus,
  652. .button:active {
  653. border-color: var(--light-grey-2) !important;
  654. }
  655. .input:focus,
  656. .input:active,
  657. .textarea:focus,
  658. .textarea:active,
  659. .select select:focus,
  660. .select select:active {
  661. border-color: var(--primary-color) !important;
  662. }
  663. button.delete:focus {
  664. background-color: rgba(10, 10, 10, 0.3);
  665. }
  666. .tag {
  667. padding-right: 6px !important;
  668. }
  669. .button {
  670. &:hover,
  671. &:focus {
  672. filter: brightness(95%);
  673. }
  674. &.is-success {
  675. background-color: var(--green) !important;
  676. }
  677. &.is-primary {
  678. background-color: var(--primary-color) !important;
  679. }
  680. &.is-danger {
  681. background-color: var(--red) !important;
  682. }
  683. &.is-info {
  684. background-color: var(--primary-color) !important;
  685. }
  686. &.is-warning {
  687. background-color: var(--yellow) !important;
  688. }
  689. }
  690. .input,
  691. .button {
  692. height: 36px;
  693. }
  694. .fadein-helpbox-enter-active {
  695. transition-duration: 0.3s;
  696. transition-timing-function: ease-in;
  697. }
  698. .fadein-helpbox-leave-active {
  699. transition-duration: 0.3s;
  700. transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
  701. }
  702. .fadein-helpbox-enter-to,
  703. .fadein-helpbox-leave {
  704. max-height: 100px;
  705. overflow: hidden;
  706. }
  707. .fadein-helpbox-enter,
  708. .fadein-helpbox-leave-to {
  709. overflow: hidden;
  710. max-height: 0;
  711. }
  712. .control {
  713. margin-bottom: 5px !important;
  714. }
  715. .input-with-button {
  716. .control {
  717. margin-right: 0px !important;
  718. }
  719. input,
  720. select {
  721. width: 100%;
  722. height: 36px;
  723. border-radius: 3px 0 0 3px;
  724. border-right: 0;
  725. border-color: var(--light-grey-3);
  726. }
  727. .button {
  728. height: 36px;
  729. border-radius: 0 3px 3px 0;
  730. }
  731. }
  732. .page-title {
  733. margin: 0 0 50px 0;
  734. }
  735. .material-icons {
  736. user-select: none;
  737. -webkit-user-select: none;
  738. }
  739. .icon-with-button {
  740. margin-right: 3px;
  741. font-size: 18px;
  742. }
  743. .verified-song {
  744. font-size: 17px;
  745. color: var(--primary-color);
  746. }
  747. .section-title,
  748. h4.section-title {
  749. font-size: 26px;
  750. font-weight: 600;
  751. margin: 0px;
  752. }
  753. .section-description {
  754. font-size: 16px;
  755. font-weight: 400;
  756. margin-bottom: 10px !important;
  757. }
  758. .section-horizontal-rule {
  759. margin: 15px 0 30px 0;
  760. }
  761. .section-margin-bottom {
  762. height: 30px;
  763. }
  764. .margin-top-zero {
  765. margin-top: 0 !important;
  766. }
  767. .margin-bottom-zero {
  768. margin-bottom: 0 !important;
  769. }
  770. /** Universial items e.g. playlist items, queue items, activity items */
  771. .item-draggable {
  772. cursor: move;
  773. }
  774. .universal-item {
  775. display: flex;
  776. flex-direction: row;
  777. flex-grow: 1;
  778. align-items: center;
  779. justify-content: space-between;
  780. padding: 7.5px;
  781. border: 1px solid var(--light-grey-3);
  782. border-radius: 3px;
  783. overflow: hidden;
  784. .item-thumbnail {
  785. width: 65px;
  786. height: 65px;
  787. margin: -7.5px;
  788. border-radius: 3px 0 0 3px;
  789. }
  790. .item-title {
  791. font-size: 20px;
  792. overflow: hidden;
  793. text-overflow: ellipsis;
  794. white-space: nowrap;
  795. }
  796. .item-description {
  797. font-size: 14px;
  798. overflow: hidden;
  799. text-overflow: ellipsis;
  800. white-space: nowrap;
  801. }
  802. .universal-item-actions {
  803. display: flex;
  804. flex-direction: row;
  805. margin-left: 10px;
  806. justify-content: center;
  807. @media screen and (max-width: 800px) {
  808. flex-wrap: wrap;
  809. }
  810. .action-dropdown-icon {
  811. display: flex;
  812. color: var(--primary-color);
  813. }
  814. .icons-group {
  815. display: flex;
  816. align-items: center;
  817. a {
  818. padding: 0;
  819. }
  820. }
  821. .button {
  822. width: 146px;
  823. }
  824. i,
  825. span {
  826. cursor: pointer;
  827. color: var(--dark-grey);
  828. &:hover,
  829. &:focus {
  830. filter: brightness(90%);
  831. }
  832. &:not(:first-child) {
  833. margin-left: 5px;
  834. }
  835. }
  836. .play-icon {
  837. color: var(--green);
  838. }
  839. .edit-icon,
  840. .view-icon,
  841. .add-to-playlist-icon {
  842. color: var(--primary-color);
  843. }
  844. .hide-icon {
  845. color: var(--light-grey-3);
  846. }
  847. .stop-icon,
  848. .delete-icon {
  849. color: var(--red);
  850. }
  851. .report-icon {
  852. color: var(--yellow);
  853. }
  854. }
  855. }
  856. .save-button-mixin {
  857. min-width: 200px;
  858. &:disabled {
  859. background-color: var(--light-grey) !important;
  860. color: var(--black);
  861. }
  862. }
  863. .save-button-transition-enter-active {
  864. transition: all 0.1s ease;
  865. }
  866. .save-button-transition-enter {
  867. transform: translateX(20px);
  868. opacity: 0;
  869. }
  870. .youtube-icon {
  871. margin-right: 3px;
  872. height: 20px;
  873. width: 20px;
  874. -webkit-mask: url("/assets/social/youtube.svg") no-repeat center;
  875. mask: url("/assets/social/youtube.svg") no-repeat center;
  876. background-color: var(--youtube);
  877. }
  878. #forgot-password {
  879. display: flex;
  880. justify-content: flex-start;
  881. margin: 5px 0;
  882. }
  883. .steps-fade-enter-active,
  884. .steps-fade-leave-active {
  885. transition: all 0.3s ease;
  886. }
  887. .steps-fade-enter,
  888. .steps-fade-leave-to {
  889. opacity: 0;
  890. }
  891. .skip-step {
  892. background-color: var(--grey-3);
  893. color: var(--white);
  894. }
  895. #steps {
  896. display: flex;
  897. align-items: center;
  898. justify-content: center;
  899. height: 50px;
  900. margin-top: 36px;
  901. @media screen and (max-width: 300px) {
  902. display: none;
  903. }
  904. .step {
  905. display: flex;
  906. align-items: center;
  907. justify-content: center;
  908. border-radius: 100%;
  909. border: 1px solid var(--dark-grey);
  910. min-width: 50px;
  911. min-height: 50px;
  912. background-color: var(--white);
  913. font-size: 30px;
  914. cursor: pointer;
  915. &.selected {
  916. background-color: var(--primary-color);
  917. color: var(--white) !important;
  918. border: 0;
  919. }
  920. }
  921. .divider {
  922. display: flex;
  923. justify-content: center;
  924. width: 180px;
  925. height: 1px;
  926. background-color: var(--dark-grey);
  927. }
  928. }
  929. .content-box {
  930. margin-top: 90px;
  931. border-radius: 3px;
  932. background-color: var(--white);
  933. border: 1px solid var(--dark-grey);
  934. max-width: 580px;
  935. padding: 40px;
  936. @media screen and (max-width: 300px) {
  937. margin-top: 30px;
  938. padding: 30px 20px;
  939. }
  940. }
  941. .content-box-optional-helper {
  942. margin-top: 15px;
  943. color: var(--primary-color);
  944. text-decoration: underline;
  945. font-size: 16px;
  946. a {
  947. color: var(--primary-color);
  948. }
  949. }
  950. .content-box-title {
  951. font-size: 25px;
  952. color: var(--black);
  953. }
  954. .content-box-description {
  955. font-size: 14px;
  956. color: var(--dark-grey);
  957. }
  958. .content-box-inputs {
  959. margin-top: 35px;
  960. .input-with-button {
  961. .button {
  962. width: 105px;
  963. }
  964. @media screen and (max-width: 450px) {
  965. flex-direction: column;
  966. }
  967. }
  968. label {
  969. font-size: 11px;
  970. }
  971. #change-password-button {
  972. margin-top: 36px;
  973. width: 175px;
  974. }
  975. }
  976. #password-visibility-container {
  977. display: flex;
  978. align-items: center;
  979. a {
  980. width: 0;
  981. margin-left: -30px;
  982. z-index: 0;
  983. top: 2px;
  984. position: relative;
  985. color: var(--light-grey-1);
  986. }
  987. }
  988. .news-item {
  989. font-family: "Karla";
  990. border-radius: 5px;
  991. padding: 20px;
  992. border: unset !important;
  993. box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);
  994. * {
  995. font-family: Karla, Arial, sans-serif;
  996. font-size: 16px;
  997. }
  998. h1 {
  999. font-size: 40px;
  1000. &:first-of-type {
  1001. margin-top: 0;
  1002. }
  1003. }
  1004. h2 {
  1005. font-size: 30px;
  1006. }
  1007. h3 {
  1008. font-size: 25px;
  1009. }
  1010. h4,
  1011. h5,
  1012. h6 {
  1013. font-size: 20px;
  1014. }
  1015. h1,
  1016. h2,
  1017. h3,
  1018. h4,
  1019. h5,
  1020. h6 {
  1021. margin: 10px 0;
  1022. }
  1023. ul {
  1024. list-style: unset;
  1025. }
  1026. li {
  1027. margin-left: 30px;
  1028. }
  1029. blockquote {
  1030. padding: 0px 15px;
  1031. color: #6a737d;
  1032. border-left: 0.25em solid #dfe2e5;
  1033. }
  1034. code {
  1035. font-style: italic;
  1036. }
  1037. }
  1038. .checkbox-control {
  1039. display: flex;
  1040. flex-direction: row;
  1041. align-items: center;
  1042. p {
  1043. margin-left: 10px;
  1044. }
  1045. .switch {
  1046. position: relative;
  1047. display: inline-block;
  1048. flex-shrink: 0;
  1049. width: 40px;
  1050. height: 24px;
  1051. }
  1052. .switch input {
  1053. opacity: 0;
  1054. width: 0;
  1055. height: 0;
  1056. }
  1057. .slider {
  1058. position: absolute;
  1059. cursor: pointer;
  1060. top: 0;
  1061. left: 0;
  1062. right: 0;
  1063. bottom: 0;
  1064. background-color: #ccc;
  1065. transition: 0.2s;
  1066. border-radius: 34px;
  1067. }
  1068. .slider:before {
  1069. position: absolute;
  1070. content: "";
  1071. height: 16px;
  1072. width: 16px;
  1073. left: 4px;
  1074. bottom: 4px;
  1075. background-color: white;
  1076. transition: 0.2s;
  1077. border-radius: 50%;
  1078. }
  1079. input:checked + .slider {
  1080. background-color: var(--primary-color);
  1081. }
  1082. input:focus + .slider {
  1083. box-shadow: 0 0 1px var(--primary-color);
  1084. }
  1085. input:checked + .slider:before {
  1086. transform: translateX(16px);
  1087. }
  1088. }
  1089. </style>