App.vue 23 KB

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