App.vue 23 KB

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