11import React from 'react'
22import { Button , Accordion , AccordionSummary } from '@mui/material'
3- import { AboutOutline , PrivacyPolicy , ExpandMoreIcon , License } from '../lib/icons.component'
3+
44import { version } from '../../package.json'
5+ import { Themes , License , AboutOutline , PrivacyPolicy , Expand } from '../lib/icons.component'
56
67const About = ( { properties } : any ) => {
8+ const setTheme = ( url : string | Boolean ) => {
9+ const background = document . getElementById ( 'backdrop-image' )
10+ if ( url )
11+ import ( `../../src/img/${ url } ` )
12+ . then ( image => {
13+ if ( background ) background . style . background = `url(${ image . default } )`
14+ // localStorage.setItem('theme-session', )
15+ } )
16+ . catch ( ( ) => console . log ( 'Error in Rendering Image' ) )
17+ else background ?. removeAttribute ( 'style' )
18+ }
19+
720 return (
821 < div className = "m-10" id = "version" >
922 < div className = "flex w-50 card p-15" >
@@ -16,12 +29,27 @@ const About = ({ properties }: any) => {
1629 </ div >
1730 < Button variant = "outlined" onClick = { ( ) => navigator . clipboard . writeText ( `Version: ${ version } ` ) } > Copy</ Button >
1831 </ div >
32+
1933 < Accordion className = "w-50 card mt-10" >
20- < AccordionSummary expandIcon = { < ExpandMoreIcon /> } >
21- < div className = "flex w-80" >
22- < PrivacyPolicy />
23- < p className = "ml-10" > Privacy Policy</ p >
34+ < AccordionSummary expandIcon = { < Expand /> } >
35+ < div className = "flex w-80" >
36+ < Themes />
37+ < p className = "ml-10" > Themes</ p >
38+ </ div >
39+ </ AccordionSummary >
40+ < div className = "p-10" >
41+ < Button onClick = { ( ) => setTheme ( false ) } > Default</ Button >
42+ < Button onClick = { ( ) => setTheme ( 'a9d4d30d6b483ee638a0dddab5bb047e.webp' ) } > Nature</ Button >
43+ < Button onClick = { ( ) => setTheme ( 'd14c82db65be85a729c042492447dc5d.webp' ) } > Sunset</ Button >
2444 </ div >
45+ </ Accordion >
46+
47+ < Accordion className = "w-50 card mt-10" >
48+ < AccordionSummary expandIcon = { < Expand /> } >
49+ < div className = "flex w-80" >
50+ < PrivacyPolicy />
51+ < p className = "ml-10" > Privacy Policy</ p >
52+ </ div >
2553 </ AccordionSummary >
2654 < div className = "p-10" >
2755 < p > < i > Personal Information Collection</ i > </ p >
@@ -30,8 +58,9 @@ const About = ({ properties }: any) => {
3058 < p > LoFi Player does not collect, store, share or publish any non-personal information.</ p >
3159 </ div >
3260 </ Accordion >
61+
3362 < Accordion className = "w-50 card mt-10" >
34- < AccordionSummary expandIcon = { < ExpandMoreIcon /> } >
63+ < AccordionSummary expandIcon = { < Expand /> } >
3564 < div className = "flex w-80" >
3665 < License />
3766 < p className = "ml-10" > License</ p >
0 commit comments