App.vue 22 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280
  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. i,
  473. a {
  474. display: inline-block;
  475. cursor: pointer;
  476. color: var(--dark-grey);
  477. vertical-align: middle;
  478. &:hover,
  479. &:focus {
  480. filter: brightness(90%);
  481. }
  482. &:not(:first) {
  483. margin-left: 5px;
  484. }
  485. }
  486. .play-icon {
  487. color: var(--green);
  488. }
  489. .edit-icon,
  490. .view-icon,
  491. .add-to-playlist-icon,
  492. .add-to-queue-icon {
  493. color: var(--primary-color);
  494. }
  495. .hide-icon {
  496. color: var(--light-grey-3);
  497. }
  498. .stop-icon,
  499. .delete-icon {
  500. color: var(--red);
  501. }
  502. .report-icon {
  503. color: var(--yellow);
  504. }
  505. }
  506. .tippy-box[data-placement^="top"] {
  507. &[data-theme~="songActions"],
  508. &[data-theme~="addToPlaylist"] {
  509. > .tippy-arrow::before {
  510. border-top-color: var(--white);
  511. }
  512. }
  513. &[data-theme~="confirm"] > .tippy-arrow::before {
  514. border-top-color: var(--red);
  515. }
  516. }
  517. .tippy-box[data-placement^="bottom"] {
  518. &[data-theme~="songActions"],
  519. &[data-theme~="addToPlaylist"] {
  520. > .tippy-arrow::before {
  521. border-bottom-color: var(--white);
  522. }
  523. }
  524. &[data-theme~="confirm"] > .tippy-arrow::before {
  525. border-bottom-color: var(--red);
  526. }
  527. }
  528. .tippy-box[data-placement^="left"] {
  529. &[data-theme~="songActions"],
  530. &[data-theme~="addToPlaylist"] {
  531. > .tippy-arrow::before {
  532. border-left-color: var(--white);
  533. }
  534. }
  535. &[data-theme~="confirm"] > .tippy-arrow::before {
  536. border-left-color: var(--red);
  537. }
  538. }
  539. .tippy-box[data-placement^="right"] {
  540. &[data-theme~="songActions"],
  541. &[data-theme~="addToPlaylist"] {
  542. > .tippy-arrow::before {
  543. border-right-color: var(--white);
  544. }
  545. }
  546. &[data-theme~="confirm"] > .tippy-arrow::before {
  547. border-right-color: var(--red);
  548. }
  549. }
  550. .tippy-box[data-theme~="addToPlaylist"] {
  551. font-size: 15px;
  552. padding: 5px;
  553. border: 1px solid var(--light-grey-3);
  554. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  555. background-color: var(--white);
  556. color: var(--dark-grey);
  557. .nav-dropdown-items {
  558. .nav-item {
  559. width: 100%;
  560. justify-content: flex-start;
  561. border: 0;
  562. padding: 10px;
  563. font-size: 15.5px;
  564. height: 36px;
  565. background: var(--light-grey);
  566. border-radius: 5px;
  567. cursor: pointer;
  568. .checkbox-control {
  569. display: flex;
  570. flex-direction: row;
  571. align-items: center;
  572. p {
  573. margin-left: 10px;
  574. }
  575. .switch {
  576. position: relative;
  577. display: inline-block;
  578. flex-shrink: 0;
  579. width: 40px;
  580. height: 24px;
  581. }
  582. .switch input {
  583. opacity: 0;
  584. width: 0;
  585. height: 0;
  586. }
  587. .slider {
  588. position: absolute;
  589. cursor: pointer;
  590. top: 0;
  591. left: 0;
  592. right: 0;
  593. bottom: 0;
  594. background-color: #ccc;
  595. transition: 0.2s;
  596. border-radius: 34px;
  597. }
  598. .slider:before {
  599. position: absolute;
  600. content: "";
  601. height: 16px;
  602. width: 16px;
  603. left: 4px;
  604. bottom: 4px;
  605. background-color: white;
  606. transition: 0.2s;
  607. border-radius: 50%;
  608. }
  609. input:checked + .slider {
  610. background-color: var(--primary-color);
  611. }
  612. input:focus + .slider {
  613. box-shadow: 0 0 1px var(--primary-color);
  614. }
  615. input:checked + .slider:before {
  616. transform: translateX(16px);
  617. }
  618. }
  619. &:focus {
  620. outline-color: var(--light-grey-3);
  621. }
  622. &:not(:last-of-type) {
  623. margin-bottom: 5px;
  624. }
  625. }
  626. }
  627. .tippy-content > span {
  628. display: flex;
  629. flex-direction: column;
  630. button {
  631. width: 150px;
  632. &:not(:last-of-type) {
  633. margin-bottom: 10px;
  634. }
  635. }
  636. }
  637. }
  638. .select {
  639. &:after {
  640. border-color: var(--primary-color);
  641. border-width: 1.5px;
  642. margin-top: -3px;
  643. }
  644. select {
  645. height: 36px;
  646. }
  647. }
  648. .button:focus,
  649. .button:active {
  650. border-color: var(--light-grey-2) !important;
  651. }
  652. .input:focus,
  653. .input:active,
  654. .textarea:focus,
  655. .textarea:active,
  656. .select select:focus,
  657. .select select:active {
  658. border-color: var(--primary-color) !important;
  659. }
  660. button.delete:focus {
  661. background-color: rgba(10, 10, 10, 0.3);
  662. }
  663. .tag {
  664. padding-right: 6px !important;
  665. }
  666. .button {
  667. &:hover,
  668. &:focus {
  669. filter: brightness(95%);
  670. }
  671. &.is-success {
  672. background-color: var(--green) !important;
  673. }
  674. &.is-primary {
  675. background-color: var(--primary-color) !important;
  676. }
  677. &.is-danger {
  678. background-color: var(--red) !important;
  679. }
  680. &.is-info {
  681. background-color: var(--primary-color) !important;
  682. }
  683. &.is-warning {
  684. background-color: var(--yellow) !important;
  685. }
  686. }
  687. .input,
  688. .button {
  689. height: 36px;
  690. }
  691. .fadein-helpbox-enter-active {
  692. transition-duration: 0.3s;
  693. transition-timing-function: ease-in;
  694. }
  695. .fadein-helpbox-leave-active {
  696. transition-duration: 0.3s;
  697. transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
  698. }
  699. .fadein-helpbox-enter-to,
  700. .fadein-helpbox-leave {
  701. max-height: 100px;
  702. overflow: hidden;
  703. }
  704. .fadein-helpbox-enter,
  705. .fadein-helpbox-leave-to {
  706. overflow: hidden;
  707. max-height: 0;
  708. }
  709. .control {
  710. margin-bottom: 5px !important;
  711. }
  712. .input-with-button {
  713. .control {
  714. margin-right: 0px !important;
  715. }
  716. input,
  717. select {
  718. width: 100%;
  719. height: 36px;
  720. border-radius: 3px 0 0 3px;
  721. border-right: 0;
  722. border-color: var(--light-grey-3);
  723. }
  724. .button {
  725. height: 36px;
  726. border-radius: 0 3px 3px 0;
  727. }
  728. }
  729. .page-title {
  730. margin: 0 0 50px 0;
  731. }
  732. .material-icons {
  733. user-select: none;
  734. -webkit-user-select: none;
  735. }
  736. .icon-with-button {
  737. margin-right: 3px;
  738. font-size: 18px;
  739. }
  740. .verified-song {
  741. font-size: 17px;
  742. color: var(--primary-color);
  743. }
  744. .section-title,
  745. h4.section-title {
  746. font-size: 26px;
  747. font-weight: 600;
  748. margin: 0px;
  749. }
  750. .section-description {
  751. font-size: 16px;
  752. font-weight: 400;
  753. margin-bottom: 10px !important;
  754. }
  755. .section-horizontal-rule {
  756. margin: 15px 0 30px 0;
  757. }
  758. .section-margin-bottom {
  759. height: 30px;
  760. }
  761. .margin-top-zero {
  762. margin-top: 0 !important;
  763. }
  764. .margin-bottom-zero {
  765. margin-bottom: 0 !important;
  766. }
  767. /** Universial items e.g. playlist items, queue items, activity items */
  768. .item-draggable {
  769. cursor: move;
  770. }
  771. .universal-item {
  772. display: flex;
  773. flex-direction: row;
  774. flex-grow: 1;
  775. align-items: center;
  776. justify-content: space-between;
  777. padding: 7.5px;
  778. border: 1px solid var(--light-grey-3);
  779. border-radius: 3px;
  780. overflow: hidden;
  781. .item-thumbnail {
  782. width: 65px;
  783. height: 65px;
  784. margin: -7.5px;
  785. border-radius: 3px 0 0 3px;
  786. }
  787. .item-title {
  788. font-size: 20px;
  789. overflow: hidden;
  790. text-overflow: ellipsis;
  791. white-space: nowrap;
  792. }
  793. .item-description {
  794. font-size: 14px;
  795. overflow: hidden;
  796. text-overflow: ellipsis;
  797. white-space: nowrap;
  798. }
  799. .universal-item-actions {
  800. display: flex;
  801. flex-direction: row;
  802. margin-left: 10px;
  803. justify-content: center;
  804. @media screen and (max-width: 800px) {
  805. flex-wrap: wrap;
  806. }
  807. .action-dropdown-icon {
  808. display: flex;
  809. color: var(--primary-color);
  810. }
  811. .icons-group {
  812. display: flex;
  813. align-items: center;
  814. a {
  815. padding: 0;
  816. }
  817. }
  818. .button {
  819. width: 146px;
  820. }
  821. i,
  822. span {
  823. cursor: pointer;
  824. // color: var(--dark-grey);
  825. &:hover,
  826. &:focus {
  827. filter: brightness(90%);
  828. }
  829. &:not(:first-child) {
  830. margin-left: 5px;
  831. }
  832. }
  833. .play-icon {
  834. color: var(--green);
  835. }
  836. .edit-icon,
  837. .view-icon,
  838. .add-to-playlist-icon {
  839. color: var(--primary-color);
  840. }
  841. .hide-icon {
  842. color: var(--light-grey-3);
  843. }
  844. .stop-icon,
  845. .delete-icon {
  846. color: var(--red);
  847. }
  848. .report-icon {
  849. color: var(--yellow);
  850. }
  851. }
  852. }
  853. .save-button-mixin {
  854. min-width: 200px;
  855. &:disabled {
  856. background-color: var(--light-grey) !important;
  857. color: var(--black);
  858. }
  859. }
  860. .save-button-transition-enter-active {
  861. transition: all 0.1s ease;
  862. }
  863. .save-button-transition-enter {
  864. transform: translateX(20px);
  865. opacity: 0;
  866. }
  867. .youtube-icon {
  868. margin-right: 3px;
  869. height: 20px;
  870. width: 20px;
  871. -webkit-mask: url("/assets/social/youtube.svg") no-repeat center;
  872. mask: url("/assets/social/youtube.svg") no-repeat center;
  873. background-color: var(--youtube);
  874. }
  875. #forgot-password {
  876. display: flex;
  877. justify-content: flex-start;
  878. margin: 5px 0;
  879. }
  880. .steps-fade-enter-active,
  881. .steps-fade-leave-active {
  882. transition: all 0.3s ease;
  883. }
  884. .steps-fade-enter,
  885. .steps-fade-leave-to {
  886. opacity: 0;
  887. }
  888. .skip-step {
  889. background-color: var(--grey-3);
  890. color: var(--white);
  891. }
  892. #steps {
  893. display: flex;
  894. align-items: center;
  895. justify-content: center;
  896. height: 50px;
  897. margin-top: 36px;
  898. @media screen and (max-width: 300px) {
  899. display: none;
  900. }
  901. .step {
  902. display: flex;
  903. align-items: center;
  904. justify-content: center;
  905. border-radius: 100%;
  906. border: 1px solid var(--dark-grey);
  907. min-width: 50px;
  908. min-height: 50px;
  909. background-color: var(--white);
  910. font-size: 30px;
  911. cursor: pointer;
  912. &.selected {
  913. background-color: var(--primary-color);
  914. color: var(--white) !important;
  915. border: 0;
  916. }
  917. }
  918. .divider {
  919. display: flex;
  920. justify-content: center;
  921. width: 180px;
  922. height: 1px;
  923. background-color: var(--dark-grey);
  924. }
  925. }
  926. .content-box {
  927. margin-top: 90px;
  928. border-radius: 3px;
  929. background-color: var(--white);
  930. border: 1px solid var(--dark-grey);
  931. max-width: 580px;
  932. padding: 40px;
  933. @media screen and (max-width: 300px) {
  934. margin-top: 30px;
  935. padding: 30px 20px;
  936. }
  937. }
  938. .content-box-optional-helper {
  939. margin-top: 15px;
  940. color: var(--primary-color);
  941. text-decoration: underline;
  942. font-size: 16px;
  943. a {
  944. color: var(--primary-color);
  945. }
  946. }
  947. .content-box-title {
  948. font-size: 25px;
  949. color: var(--black);
  950. }
  951. .content-box-description {
  952. font-size: 14px;
  953. color: var(--dark-grey);
  954. }
  955. .content-box-inputs {
  956. margin-top: 35px;
  957. .input-with-button {
  958. .button {
  959. width: 105px;
  960. }
  961. @media screen and (max-width: 450px) {
  962. flex-direction: column;
  963. }
  964. }
  965. label {
  966. font-size: 11px;
  967. }
  968. #change-password-button {
  969. margin-top: 36px;
  970. width: 175px;
  971. }
  972. }
  973. #password-visibility-container {
  974. display: flex;
  975. align-items: center;
  976. a {
  977. width: 0;
  978. margin-left: -30px;
  979. z-index: 0;
  980. top: 2px;
  981. position: relative;
  982. color: var(--light-grey-1);
  983. }
  984. }
  985. .news-item {
  986. font-family: "Karla";
  987. border-radius: 5px;
  988. padding: 20px;
  989. border: unset !important;
  990. box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);
  991. * {
  992. font-family: Karla, Arial, sans-serif;
  993. font-size: 16px;
  994. }
  995. h1 {
  996. font-size: 40px;
  997. &:first-of-type {
  998. margin-top: 0;
  999. }
  1000. }
  1001. h2 {
  1002. font-size: 30px;
  1003. }
  1004. h3 {
  1005. font-size: 25px;
  1006. }
  1007. h4,
  1008. h5,
  1009. h6 {
  1010. font-size: 20px;
  1011. }
  1012. h1,
  1013. h2,
  1014. h3,
  1015. h4,
  1016. h5,
  1017. h6 {
  1018. margin: 10px 0;
  1019. }
  1020. ul {
  1021. list-style: unset;
  1022. }
  1023. li {
  1024. margin-left: 30px;
  1025. }
  1026. blockquote {
  1027. padding: 0px 15px;
  1028. color: #6a737d;
  1029. border-left: 0.25em solid #dfe2e5;
  1030. }
  1031. code {
  1032. font-style: italic;
  1033. }
  1034. }
  1035. .checkbox-control {
  1036. display: flex;
  1037. flex-direction: row;
  1038. align-items: center;
  1039. p {
  1040. margin-left: 10px;
  1041. }
  1042. .switch {
  1043. position: relative;
  1044. display: inline-block;
  1045. flex-shrink: 0;
  1046. width: 40px;
  1047. height: 24px;
  1048. }
  1049. .switch input {
  1050. opacity: 0;
  1051. width: 0;
  1052. height: 0;
  1053. }
  1054. .slider {
  1055. position: absolute;
  1056. cursor: pointer;
  1057. top: 0;
  1058. left: 0;
  1059. right: 0;
  1060. bottom: 0;
  1061. background-color: #ccc;
  1062. transition: 0.2s;
  1063. border-radius: 34px;
  1064. }
  1065. .slider:before {
  1066. position: absolute;
  1067. content: "";
  1068. height: 16px;
  1069. width: 16px;
  1070. left: 4px;
  1071. bottom: 4px;
  1072. background-color: white;
  1073. transition: 0.2s;
  1074. border-radius: 50%;
  1075. }
  1076. input:checked + .slider {
  1077. background-color: var(--primary-color);
  1078. }
  1079. input:focus + .slider {
  1080. box-shadow: 0 0 1px var(--primary-color);
  1081. }
  1082. input:checked + .slider:before {
  1083. transform: translateX(16px);
  1084. }
  1085. }
  1086. </style>