Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
Release Ver.
Browse files Browse the repository at this point in the history
  • Loading branch information
ayberktandogan committed Sep 20, 2019
1 parent c0f3467 commit 8b48cbe
Show file tree
Hide file tree
Showing 19 changed files with 2,114 additions and 1,541 deletions.
5 changes: 5 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/puzzlefront.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3,495 changes: 1,994 additions & 1,501 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@
"lodash": "^4.17.15",
"lodash-es": "^4.17.15",
"node-sass": "^4.12.0",
"notistack": "^0.8.6",
"react": "^16.8.6",
"notistack": "^0.9.0",
"react": "^16.9.0",
"react-adsense": "^0.1.0",
"react-async-hook": "^3.1.0",
"react-dom": "^16.8.6",
"react-dom": "^16.9.0",
"react-dotdotdot": "^1.3.0",
"react-ga": "^2.6.0",
"react-helmet": "^5.2.1",
"react-infinite-scroll-component": "^4.5.2",
"react-lazyload": "^2.6.2",
"react-parallax": "^2.2.0",
"react-router-dom": "^5.0.1",
"react-scripts": "3.0.1",
"react-slick": "^0.24.0",
"react-scripts": "3.1.1",
"react-slick": "^0.25.2",
"react-table": "^6.10.0",
"react-toastify": "^5.3.2",
"reactn": "^2.1.4",
Expand Down
10 changes: 5 additions & 5 deletions src/components/ara/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function AnimeContainer(props) {
<ContentPremieredText variant="h6">{d.premiered ? d.premiered : "Bilgi bulunamadı"}</ContentPremieredText>
</ContentPremieredContainer>
<ContentInPlacer>
<ContentCover bgimage={d.cover_art} />
<ContentCover bgimage={d.cover_art} title={d.name + " Cover Art"} />
<ContentTextInfo>
<Dotdotdot clamp={2}>
<ContentTitle variant="h5">{d.name}</ContentTitle>
Expand Down Expand Up @@ -167,8 +167,8 @@ function AnimeContainerPlaceholder(props) {

return (
<ContentPlacer item xs={12} md={6} lg={4} xl={3}>
<ContentContainer {...defaultBoxProps} mb={0} height="383px">
</ContentContainer>
<div height="225px">
</div>
</ContentPlacer>
)
}
Expand All @@ -181,7 +181,7 @@ function MangaContainer(props) {
<Link to={mangaPage(d.slug)}>
<ContentContainer {...defaultBoxProps} mb={0}>
<ContentInPlacer>
<ContentCover bgimage={d.cover_art} />
<ContentCover bgimage={d.cover_art} title={d.name + " Cover Art"} />
<ContentTextInfo>
<Dotdotdot clamp={2}>
<ContentTitle variant="h5">{d.name}</ContentTitle>
Expand Down Expand Up @@ -214,7 +214,7 @@ function MangaContainer(props) {
function MangaContainerPlaceholder(props) {
return (
<ContentPlacer item xs={12} md={6} lg={4} xl={3}>
<ContentContainer {...defaultBoxProps} mb={0} height="383px">
<ContentContainer {...defaultBoxProps} mb={0} height="187px">

</ContentContainer>
</ContentPlacer>
Expand Down
18 changes: 9 additions & 9 deletions src/components/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ const useStyles = makeStyles(theme => ({
logo: {
height: "40px"
},
active: {
backgroundColor: theme.palette.background.level2
},
ListItemText: {
fontSize: ".8rem!important"
},
Expand Down Expand Up @@ -172,7 +169,7 @@ export default function MiniDrawer() {
<List>
{menuItems.map((item, index) => item.show ?
(
<NavLink exact to={item.link} onClick={handleDrawerClose} activeClassName={classes.active} key={item.text}>
<NavLink exact to={item.link} onClick={handleDrawerClose} activeStyle={{ backgroundColor: theme.palette.background.level2 }} key={item.text}>
<ListItem button style={{ backgroundColor: "inherit" }}>
<ListItemIcon style={{ color: theme.palette.text.primary }}>{item.icon}</ListItemIcon>
<ListItemText className={classes.ListItemText}><Typography variant="body2">{item.text}</Typography></ListItemText>
Expand Down Expand Up @@ -217,7 +214,7 @@ export default function MiniDrawer() {
<MenuIcon />
</IconButton>
<Link to={indexPage} className={classes.logoContainer}>
<img className={classes.logo} src={usertheme === "dark" ? fullLogo : fullLogoDark} alt="Site Logo" />
<img title="Site logo" loading="lazy" className={classes.logo} src={usertheme === "dark" ? fullLogo : fullLogoDark} alt="Site Logo" />
</Link>
<div>
{userInfo.success ?
Expand All @@ -228,7 +225,10 @@ export default function MiniDrawer() {
onClick={handleMenu}
color="default"
>
<img src={userInfo.avatar} style={{ height: "25px" }} alt={`${userInfo.username} avatar`} aria-labelledby={`${userInfo.username} avatar`} />
{userInfo.avatar ?
<img title={`${userInfo.username} avatar`} loading="lazy" src={userInfo.avatar} style={{ height: "25px" }} alt={`${userInfo.username} avatar`} aria-labelledby={`${userInfo.username} avatar`} />
:
<AccountCircle title={`${userInfo.username} avatar`} alt={`${userInfo.username} avatar`} aria-labelledby={`${userInfo.username} avatar`} />}
</IconButton>
:
<IconButton
Expand Down Expand Up @@ -271,16 +271,16 @@ export default function MiniDrawer() {
:
<>
<MenuItem onClick={() => handleLoginRegisterButtons("login")}>Giriş yap</MenuItem>
<MenuItem onClick={() => handleLoginRegisterButtons("register")}>Kayıt ol</MenuItem>
{/*<MenuItem onClick={() => handleLoginRegisterButtons("register")}>Kayıt ol</MenuItem>*/}
</>
}
<Divider />
{
usertheme === "dark"
?
<MenuItem onClick={() => setUserTheme("light")}><span role="img" aria-labelledby="güneş">🌞</span> Gündüz Modu</MenuItem>
<MenuItem onClick={() => setUserTheme("light")}><span role="img" title="güneş" aria-labelledby="güneş">🌞</span> Gündüz Modu</MenuItem>
:
<MenuItem onClick={() => setUserTheme("dark")}><span role="img" aria-labelledby="ay">🌙</span> Gece Modu</MenuItem>
<MenuItem onClick={() => setUserTheme("dark")}><span role="img" title="ay" aria-labelledby="ay">🌙</span> Gece Modu</MenuItem>
}
</div>
</Menu>
Expand Down
2 changes: 1 addition & 1 deletion src/components/hoc/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function (props) {
<>
<Header />
<Login />
<Register />
{/*<Register />*/}
<PaddingDiv>
{props.children}
<Footer />
Expand Down
7 changes: 4 additions & 3 deletions src/components/user/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import styled from 'styled-components'
import ToastNotification from '../toastify/toast'

import axios from '../../config/axios/axios'
import { loginRoute } from '../../config/api-routes';

const ModalContainer = styled(Box)`
position: absolute;
Expand Down Expand Up @@ -72,7 +73,7 @@ export default function LoginModal() {
password: userInfo.password
}

axios.post('/user/login', userData)
axios.post(loginRoute, userData)
.then(res => {
setUser(res.data)
setShowModal("")
Expand All @@ -82,7 +83,7 @@ export default function LoginModal() {
.catch(err => {
const errors = err.response ? err.response.data : ""
const payload = {
container: "register-error",
container: "login-error",
type: "error",
message: ""
}
Expand Down Expand Up @@ -137,7 +138,7 @@ export default function LoginModal() {
fullWidth />
<ButtonContainer mt={2}>
<FormButton variant="outlined" type="submit">Giriş yap</FormButton>
<FormButton variant="outlined" onClick={() => setShowModal("register")}>Hesabın yok mu?</FormButton>
{/*<FormButton variant="outlined" onClick={() => setShowModal("register")}>Hesabın yok mu?</FormButton>*/}
</ButtonContainer>
</FormContainer>
</ModalContainer>
Expand Down
3 changes: 2 additions & 1 deletion src/components/user/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import styled from 'styled-components'
import ToastNotification from '../toastify/toast'

import axios from '../../config/axios/axios'
import { registerRoute } from '../../config/api-routes';

const ModalContainer = styled(Box)`
position: absolute;
Expand Down Expand Up @@ -75,7 +76,7 @@ export default function RegisterModal() {
email: userInfo.email
}

axios.post('/user/register', userData)
axios.post(registerRoute, userData)
.then(res => {
const payload = {
container: "register-success",
Expand Down
15 changes: 10 additions & 5 deletions src/config/api-routes.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
//API uzantısına gerek yok, default axios importunda zaten ekleniyor
const indexURL = "/"
const isAdmin = "/user/adminpage"
const isAdmin = "/kullanici/adminpage"
const getIndexEpisodes = "/latest-works"
const getIndexFeaturedAnime = "/featured-anime"
const getIndexBatchEpisodes = "/latest-batch-episodes"
const getAnimeIndex = (slug) => `/anime/${slug}`
const getMangaIndex = (slug) => `/manga/${slug}`
const getEpisodeDownloadLinks = (animeslug) => `/episode/download-links/${animeslug}`
const getEpisodeDownloadLinks = (animeslug) => `/bolum/download-links/${animeslug}`
const getSearchIndex = (type, page) => `${type}/arama-liste/${page}`
const getGenresList = "/genre-list"
const getFullSearchList = (type) => `/${type}/liste`
const getEpisodePageInfo = (slug) => `/episode/${slug}/watch`
const getEpisodeInfo = "/episode/izleme-linkleri"
const getEpisodePageInfo = (slug) => `/bolum/${slug}/watch`
const getEpisodeInfo = "/bolum/izleme-linkleri"

const contentHeader = (type, slug) => `/api/images/${type}/${slug}-header.jpeg`
const loginRoute = "/kullanici/giris"
const registerRoute = "/kullanici/kayit"

const contentHeader = (type, slug) => `/api/resimler/${type}/${slug}-header.jpeg`

export {
indexURL,
Expand All @@ -29,5 +32,7 @@ export {
getFullSearchList,
getEpisodePageInfo,
getEpisodeInfo,
loginRoute,
registerRoute,
contentHeader
}
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ setGlobal({
settings,
showModal: "",
isAdmin: false,
theme: settings.theme ? settings.theme : "light",
theme: settings.theme ? settings.theme : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light",
mobile: false
})

Expand Down Expand Up @@ -150,7 +150,7 @@ addReducer('setTheme', (global, dispatch, type) => {

//If there's any changes for existing localstorage, update it here
if (!settings.theme) {
settings.theme = "light"
settings.theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"
}

localStorage.setItem("app-settings", JSON.stringify(settings))
Expand Down
10 changes: 8 additions & 2 deletions src/pages/ara/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ export default function SearchPage(props) {

setData(newData)
setOffset(page)

if (fullList.length / 24 < page) {
console.log("Data bitti")
return setHasData(false)
}
}

function handleTypeChange(newType) {
Expand Down Expand Up @@ -202,7 +207,7 @@ export default function SearchPage(props) {
if (data.length !== 0 && type === "anime") {
mappedData = data.map(d =>
<LazyLoad
height={383}
height={225}
key={d.slug + "anime"}
placeholder={
<AnimeContainerPlaceholder genresbg={theme.palette.secondary.main} />
Expand All @@ -215,7 +220,7 @@ export default function SearchPage(props) {
else if (data.length !== 0 && type === "manga") {
mappedData = data.map(d =>
<LazyLoad
height={383}
height={187}
key={d.slug + d.name + "manga"}
placeholder={
<MangaContainerPlaceholder genresbg={theme.palette.secondary.main} />
Expand Down Expand Up @@ -358,6 +363,7 @@ export default function SearchPage(props) {
next={handleGetMore}
hasMore={hasData}
scrollThreshold={1}
endMessage={<Typography variant="h6" style={{ padding: "8px", textAlign: "center" }}>Liste sonu.</Typography>}
loader={<ContentContainer
mt={1}
p={1}
Expand Down
8 changes: 6 additions & 2 deletions src/pages/ceviriler/anime/desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export default function AnimeIndexDesktop(props) {
>
<Background>
<img
title={anime.name + " headerimage"}
loading="lazy"
alt={anime.name + " headerimage"}
src={contentHeader("anime", anime.slug)}
onError={() => {
Expand All @@ -58,7 +60,9 @@ export default function AnimeIndexDesktop(props) {
<ContentLeft item>
<ContentImage
component="img"
alt={anime.name + " coverart"}
title={anime.name + " Cover Art"}
loading="lazy"
alt={anime.name + " Cover Art"}
boxShadow={2}
spacingvalue={theme.spacing(2)}
src={anime.cover_art}
Expand Down Expand Up @@ -123,7 +127,7 @@ export default function AnimeIndexDesktop(props) {
{anime.version === "bd"
?
<ContentTitleBadge>
<img src={bluray} alt="bd-logo" style={{ height: "2rem" }} />
<img title="bd-logo" loading="lazy" src={bluray} alt="bd-logo" style={{ height: "2rem" }} />
</ContentTitleBadge>
:
null}
Expand Down
6 changes: 4 additions & 2 deletions src/pages/ceviriler/anime/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function AnimeIndexMobile(props) {
{anime.version === "bd"
?
<ContentTitleBadge>
<img src={bluray} alt="bd-logo" style={{ height: "2rem" }} />
<img title="bd-logo" loading="lazy" src={bluray} alt="bd-logo" style={{ height: "2rem" }} />
</ContentTitleBadge>
:
null}
Expand All @@ -72,8 +72,10 @@ export default function AnimeIndexMobile(props) {
justifyContent="center"
>
<ContentImage
loading="lazy"
title={anime.name + " Cover Art"}
component="img"
alt={anime.name + " coverart"}
alt={anime.name + " Cover Art"}
boxShadow={2}
spacingvalue={theme.spacing(2)}
src={anime.cover_art}
Expand Down
Loading

0 comments on commit 8b48cbe

Please sign in to comment.