App.vue 22 KB

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