diff --git a/frontend/.DS_Store b/frontend/.DS_Store index 2320fd7..9a9ce6d 100644 Binary files a/frontend/.DS_Store and b/frontend/.DS_Store differ diff --git a/frontend/src/.DS_Store b/frontend/src/.DS_Store new file mode 100644 index 0000000..da1fd53 Binary files /dev/null and b/frontend/src/.DS_Store differ diff --git a/frontend/src/assets/Angry.png b/frontend/src/assets/Angry.png deleted file mode 100644 index 6e4544d..0000000 Binary files a/frontend/src/assets/Angry.png and /dev/null differ diff --git a/frontend/src/assets/Biceps.png b/frontend/src/assets/Biceps.png deleted file mode 100644 index bcf9457..0000000 Binary files a/frontend/src/assets/Biceps.png and /dev/null differ diff --git a/frontend/src/assets/Chain.png b/frontend/src/assets/Chain.png deleted file mode 100644 index 9ffebd5..0000000 Binary files a/frontend/src/assets/Chain.png and /dev/null differ diff --git a/frontend/src/assets/Fire.png b/frontend/src/assets/Fire.png deleted file mode 100644 index dcdfb59..0000000 Binary files a/frontend/src/assets/Fire.png and /dev/null differ diff --git a/frontend/src/assets/Gift.png b/frontend/src/assets/Gift.png deleted file mode 100644 index 0ec7685..0000000 Binary files a/frontend/src/assets/Gift.png and /dev/null differ diff --git a/frontend/src/assets/Money.png b/frontend/src/assets/Money.png deleted file mode 100644 index 07dfb96..0000000 Binary files a/frontend/src/assets/Money.png and /dev/null differ diff --git a/frontend/src/assets/Monocle.png b/frontend/src/assets/Monocle.png deleted file mode 100644 index 0a260b6..0000000 Binary files a/frontend/src/assets/Monocle.png and /dev/null differ diff --git a/frontend/src/assets/Rocket.png b/frontend/src/assets/Rocket.png deleted file mode 100644 index bb83322..0000000 Binary files a/frontend/src/assets/Rocket.png and /dev/null differ diff --git a/frontend/src/assets/Volt.png b/frontend/src/assets/Volt.png deleted file mode 100644 index 69fc35e..0000000 Binary files a/frontend/src/assets/Volt.png and /dev/null differ diff --git a/frontend/src/assets/btnIcon.png b/frontend/src/assets/btnIcon.png deleted file mode 100644 index 39ba079..0000000 Binary files a/frontend/src/assets/btnIcon.png and /dev/null differ diff --git a/frontend/src/assets/coin.png b/frontend/src/assets/coin.png deleted file mode 100644 index 313110d..0000000 Binary files a/frontend/src/assets/coin.png and /dev/null differ diff --git a/frontend/src/assets/dev.png b/frontend/src/assets/dev.png deleted file mode 100644 index 81b049c..0000000 Binary files a/frontend/src/assets/dev.png and /dev/null differ diff --git a/frontend/src/assets/imgBtn1.png b/frontend/src/assets/imgBtn1.png deleted file mode 100644 index a9b0ac8..0000000 Binary files a/frontend/src/assets/imgBtn1.png and /dev/null differ diff --git a/frontend/src/assets/imgBtn2.png b/frontend/src/assets/imgBtn2.png deleted file mode 100644 index 3928677..0000000 Binary files a/frontend/src/assets/imgBtn2.png and /dev/null differ diff --git a/frontend/src/assets/style1.png b/frontend/src/assets/style1.png deleted file mode 100644 index 1bab592..0000000 Binary files a/frontend/src/assets/style1.png and /dev/null differ diff --git a/frontend/src/assets/style2.png b/frontend/src/assets/style2.png deleted file mode 100644 index 297517e..0000000 Binary files a/frontend/src/assets/style2.png and /dev/null differ diff --git a/frontend/src/assets/style3.png b/frontend/src/assets/style3.png deleted file mode 100644 index 99b0957..0000000 Binary files a/frontend/src/assets/style3.png and /dev/null differ diff --git a/frontend/src/assets/style4.png b/frontend/src/assets/style4.png deleted file mode 100644 index 8c344f1..0000000 Binary files a/frontend/src/assets/style4.png and /dev/null differ diff --git a/frontend/src/shared/Clicker/ClickerBtn/ClickerBtn.tsx b/frontend/src/shared/Clicker/ClickerBtn/ClickerBtn.tsx index d3a65ed..0d47501 100644 --- a/frontend/src/shared/Clicker/ClickerBtn/ClickerBtn.tsx +++ b/frontend/src/shared/Clicker/ClickerBtn/ClickerBtn.tsx @@ -42,11 +42,13 @@ export function ClickerBtn({ coins, setCoins, energy }: IClickerBtn) { }, [styleIndex]); const btnClick = () => { - if(!error) { + sendClick(); + /*if(!error) { + sendClick(); const newEnergy = initEnergy - 1; const newFill = (maxEnergy - newEnergy) / maxEnergy * 100; if (newFill <= 100) { - //sendClick(); + sendClick(); const newCoins = coins + 1; dispatch(updateCoinsRequestAsync(newCoins, newEnergy)) setCoins(newCoins); @@ -68,19 +70,46 @@ export function ClickerBtn({ coins, setCoins, energy }: IClickerBtn) { } } else { sendClick(); - } + }*/ }; const sendClick = () => { if(urlClick && token) { - axios.get(`${urlClick}/click`, { + axios.get(`${urlClick}/api/v1/click`, { headers: { - "Content-type": "application/json", + //"Content-type": "application/json", "Authorization": `TelegramToken ${token}` } }, ).then((resp) => { console.log(resp); + if(resp.data) { + const click = Number(resp.data.click.value); + // + const newEnergy = initEnergy - click; + const newFill = (maxEnergy - newEnergy) / maxEnergy * 100; + if (newFill <= 100) { + const newCoins = coins + click; + dispatch(updateCoinsRequestAsync(newCoins, newEnergy)) + setCoins(newCoins); + setEnergy(newEnergy) + setFill(newFill); + } else { + setFill(100); + } + + if (newFill < 100) { + setSize(220); + + const timer = setTimeout(() => { + setSize(240); + clearTimeout(timer); + }, 100); + } else { + setClose(false); + } + // + } if(error) { setError(false) } @@ -101,12 +130,12 @@ export function ClickerBtn({ coins, setCoins, energy }: IClickerBtn) { }, { title: 'Как продолжить кликать', - text: Чтобы охладиться, нужно перезагрузить систему, нажав по кнопке ниже., + text: Чтобы охладиться, нужно нужно закрыть приложение, нажав по кнопке ниже., img: 'assets/Monocle.png' }, { title: 'Что дальше', - text: Система перезагрузится и ты сможешь продолжить поддерживать свою большую концентрацию., + text: Затем ты сможешь открыть приложение заново и продолжить поддерживать свою большую концентрацию., img: 'assets/Rocket.png' }, ]; @@ -121,8 +150,8 @@ export function ClickerBtn({ coins, setCoins, energy }: IClickerBtn) { {gradient} - {!close && + {!close && } />} {!closeError && diff --git a/frontend/src/shared/Clicker/ClickerFooter/ClickerFooter.tsx b/frontend/src/shared/Clicker/ClickerFooter/ClickerFooter.tsx index 9da28d9..90dd690 100644 --- a/frontend/src/shared/Clicker/ClickerFooter/ClickerFooter.tsx +++ b/frontend/src/shared/Clicker/ClickerFooter/ClickerFooter.tsx @@ -10,7 +10,7 @@ export function ClickerFooter() { const navigate = useNavigate(); const [closeAnimOut, setCloseAnimOut] = useState(false); const [closeDev, setCloseDev] = useState(true); - const isDev = false; + const isDev = true; return (
diff --git a/frontend/src/shared/Clicker/ClickerPopup/ClickerPopup.tsx b/frontend/src/shared/Clicker/ClickerPopup/ClickerPopup.tsx index c9c134c..9b26171 100644 --- a/frontend/src/shared/Clicker/ClickerPopup/ClickerPopup.tsx +++ b/frontend/src/shared/Clicker/ClickerPopup/ClickerPopup.tsx @@ -3,6 +3,7 @@ import styles from './clickerpopup.module.css'; import { ETextStyles } from '../../texts'; import { PopupCard } from '../../Elements/PopupCard'; import { generateRandomString } from '../../../utils/generateRandom'; +import { Button } from '../../Button'; interface ICardInterface { title: string, @@ -14,10 +15,11 @@ interface IClickerPopup { title: string, cards: Array, setClose(a: boolean): void, - text ?: string + text ?: string, + isBtn?: boolean } -export function ClickerPopup({ title, cards, text }: IClickerPopup) { +export function ClickerPopup({ title, cards, text, isBtn=false }: IClickerPopup) { const blockCards = cards.map((item) => { return @@ -28,6 +30,13 @@ export function ClickerPopup({ title, cards, text }: IClickerPopup) {

{title}

{blockCards}
{text &&

{text}

} + {isBtn &&
); } diff --git a/frontend/src/shared/Clicker/SectionsBlock/SectionsBlock.tsx b/frontend/src/shared/Clicker/SectionsBlock/SectionsBlock.tsx index 7d39cf9..b542ffc 100644 --- a/frontend/src/shared/Clicker/SectionsBlock/SectionsBlock.tsx +++ b/frontend/src/shared/Clicker/SectionsBlock/SectionsBlock.tsx @@ -17,7 +17,7 @@ export function SectionsBlock() { const [closeAnimOut, setCloseAnimOut] = useState(false); const [closeDev, setCloseDev] = useState(true); - const isDev = false; + const isDev = true; const multipCards = [ { diff --git a/frontend/src/shared/Elements/StylesSwiper/StylesSwiper.tsx b/frontend/src/shared/Elements/StylesSwiper/StylesSwiper.tsx index 44499f7..e03d223 100644 --- a/frontend/src/shared/Elements/StylesSwiper/StylesSwiper.tsx +++ b/frontend/src/shared/Elements/StylesSwiper/StylesSwiper.tsx @@ -68,7 +68,7 @@ export const StylesSwiper: React.FC = memo(({ selectedStyle, setC return (
(slideRefs.current[index] = el as HTMLDivElement)} - className={`${styles.card} ${cardStyle} ${selectedStyle === index && styles.selected}`} + className={`${styles.card} ${cardStyle} ${selectedStyle === index && styles.selected} ${index > 0 && styles.disabled}`} style={{ transform: `rotate(${isActive ? 0 : deg}deg)`, filter: `blur(${isActive ? 0 : 3}px)` diff --git a/frontend/src/shared/Elements/StylesSwiper/stylesswiper.module.css b/frontend/src/shared/Elements/StylesSwiper/stylesswiper.module.css index 871e59b..1243414 100644 --- a/frontend/src/shared/Elements/StylesSwiper/stylesswiper.module.css +++ b/frontend/src/shared/Elements/StylesSwiper/stylesswiper.module.css @@ -52,3 +52,18 @@ background-image: url('assets/style4.png'); } +.disabled { + position: relative; + pointer-events: none; + filter: blur(3px) !important; +} + +.disabled::after { + content: ''; + position: absolute; + width: 100%; + height: 100%; + background-color: rgb(0, 0, 0, 0.3); + filter: blur(25px); + border-radius: 27px; +} \ No newline at end of file diff --git a/frontend/src/shared/Pages/RoutePage/RoutePage.tsx b/frontend/src/shared/Pages/RoutePage/RoutePage.tsx index f8aaddf..c9b7548 100644 --- a/frontend/src/shared/Pages/RoutePage/RoutePage.tsx +++ b/frontend/src/shared/Pages/RoutePage/RoutePage.tsx @@ -26,9 +26,11 @@ export function RoutePage({ page }: IRoutePage) { updateStyles(); }, [page]); + //{!verified ? : + //} + return (
- {!verified ? :
{page === 'main' && !loadingUser && !errorUser && dataUser.name && dataUser.avatar && } {page === 'rating' && !loadingUser && !errorUser && } @@ -37,7 +39,7 @@ export function RoutePage({ page }: IRoutePage) { {page === 'styles' && !loadingUser && !errorUser && } {(loadingUser) &&
} {errorUser && !loadingUser && } -
} +
); } diff --git a/frontend/src/shared/Pages/StylesPage/StylesPage.tsx b/frontend/src/shared/Pages/StylesPage/StylesPage.tsx index 8cb0842..6fa95a9 100644 --- a/frontend/src/shared/Pages/StylesPage/StylesPage.tsx +++ b/frontend/src/shared/Pages/StylesPage/StylesPage.tsx @@ -11,8 +11,10 @@ export function StylesPage() { const [selectedStyle, setSelectedStyle] = useState(selectedIndex ? selectedIndex : 0); const [currentSlide, setCurrentSlide] = useState(0); const [showNotif, setShow] = useState(false); + const isDev = true; - const stylesNames = ['Черно-синий', 'Grapefruit', 'Tropic mamba', 'Mamba & Grapefruit']; + //const stylesNames = ['Черно-синий', 'Grapefruit', 'Tropic mamba', 'Mamba & Grapefruit']; + const stylesNames = ['Черно-синий', 'Скоро будет доступен', 'Скоро будет доступен', 'Скоро будет доступен']; const colors = ['#7EB4DB', '#FE744B', '#F2D06B', '#EA9C55']; const gradients = ['linear-gradient(90deg, #90D7ED 13.05%, #6887C4 91.06%, #8085C0 172.24%)', 'linear-gradient(302deg, #FF5421 -59.57%, #FF7248 43.7%, #FF9576 163.26%)', 'linear-gradient(302deg, #6ACB54 -59.57%, #DCBB5A 43.7%, #E2883D 163.26%)', 'linear-gradient(302deg, #FF805A -1.15%, #DEAE53 83.89%)']; @@ -55,7 +57,7 @@ export function StylesPage() { Будь круче — будь на стиле!

{stylesNames[currentSlide]}

-