25 Commits
1.0 ... master

Author SHA1 Message Date
deepsource-io[bot]
d52971e8ad ci: add .deepsource.toml 2024-06-10 16:26:28 +00:00
7ab144ba10 Fix API request URL in Auth component 2024-02-22 23:30:37 -03:00
be19f65d12 🚀 Deploy test 2024-02-22 23:23:54 -03:00
a1470398a1 Update requestUrl in Auth component 2024-02-22 23:15:29 -03:00
ed6037eab4 implementing new backend url 2022-12-18 20:33:22 -03:00
Francisco Pessano
fcd7495418 why the hell this work 2022-12-18 20:22:19 -03:00
a4fbed16bb setting enviroments 2022-12-18 19:48:11 -03:00
29bfa05ffb setting enviroments 2022-12-18 19:41:40 -03:00
91951f50e8 setting enviroments 2022-12-18 19:38:08 -03:00
dc7b40e4f5 setting enviroments 2022-12-18 19:36:13 -03:00
1bd079e958 setting enviroments 2022-12-18 19:28:43 -03:00
333170a056 setting enviroments 2022-12-18 19:18:02 -03:00
700aeec340 why is not working aaaaah 2022-12-18 19:04:16 -03:00
9408d2efb7 adding Dockerfile 2, electric boogaloo 2022-12-18 18:32:37 -03:00
19586b1575 adding Dockerfile 2022-12-15 20:44:44 -03:00
80d2114b9a changes in auth page 2022-12-15 20:36:41 -03:00
9bb1ab9480 changes in index 2022-12-15 20:36:41 -03:00
Francisco Pessano
3abd2ee132 Update README.md 2022-08-31 12:54:26 -03:00
Francisco Pessano
d549973a62 Update README.md 2022-08-31 12:51:53 -03:00
Francisco Pessano
b13d2618f5 Migrated from Heroku to Railway.app 2022-08-26 19:55:50 -03:00
Francisco Pessano
9a1e78d5fd Update README.md 2022-05-03 15:37:16 -03:00
e8268c80e1 Readme.MD redacted 2022-04-26 17:34:29 -03:00
61c3c2c797 Merge branch 'master' of github.com:FranP-code/Telegram-to-Notion-Website 2022-04-25 20:43:11 -03:00
aad518617a Auth secret code handling bugfix 2022-04-25 20:42:31 -03:00
Francisco Pessano
d5cc4d662e Auth critical bugfix 2022-04-25 20:33:25 -03:00
21 changed files with 119 additions and 49 deletions

7
.deepsource.toml Normal file
View File

@@ -0,0 +1,7 @@
version = 1
[[analyzers]]
name = "javascript"
[analyzers.meta]
plugins = ["react"]

4
.dockerignore Normal file
View File

@@ -0,0 +1,4 @@
.git
.DS_Store
.env
node_modules

1
.gitignore vendored
View File

@@ -3,6 +3,7 @@
node_modules node_modules
package-lock.json package-lock.json
yarn.lock
.env .env

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM alpine:latest as build
ARG REACT_APP_ENV_MODE
RUN apk add --update nodejs npm
RUN npm install --global yarn
COPY [".", "/usr/src"]
WORKDIR "/usr/src"
RUN yarn
RUN yarn build REACT_APP_ENV_MODE=${REACT_APP_ENV_MODE}
FROM nginx:1.23.1-alpine
EXPOSE 80
COPY ./docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /usr/src/build /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]

13
README.md Normal file
View File

@@ -0,0 +1,13 @@
# Open Telegram to Notion Bot Website
<p align="center">
<img src="https://i.ibb.co/0CtRtBk/index.png" alt="index" border="0">
</p>
<p align="center">
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/FranP-Code/telegram-to-notion-website?style=flat-square">
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/FranP-code/telegram-to-notion-website?style=flat-square">
</p>
## What is this?
This is a complementary tool for the [Open Telegram to Notion Bot](https://github.com/FranP-code/Open-Telegram-to-Notion-Bot), also open source and available on GitHub.

9
docker-compose.yml Normal file
View File

@@ -0,0 +1,9 @@
version: "3.8"
services:
website:
build: .
ports:
- "80:80"
environment:
- REACT_APP_ENV_MODE: ${REACT_APP_ENV_MODE}

View File

@@ -0,0 +1,9 @@
server {
listen 80;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}

View File

@@ -11,6 +11,7 @@
"react": "^18.0.0", "react": "^18.0.0",
"react-dom": "^18.0.0", "react-dom": "^18.0.0",
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"react-wavify": "^1.6.3",
"styled-components": "^5.3.5", "styled-components": "^5.3.5",
"web-vitals": "^2.1.4", "web-vitals": "^2.1.4",
"wouter": "^2.8.0-alpha.2" "wouter": "^2.8.0-alpha.2"

View File

@@ -7,7 +7,7 @@
<meta name="theme-color" content="#000000" /> <meta name="theme-color" content="#000000" />
<meta <meta
name="description" name="description"
content="Web site created using create-react-app" content="Open Telegram to Notion Bot website"
/> />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!-- <!--
@@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL. work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`. Learn how to configure a non-root public URL by running `npm run build`.
--> -->
<title>Telegram to Notion Bot</title> <title>Open Telegram to Notion Bot</title>
</head> </head>
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>

View File

@@ -27,9 +27,9 @@ function Auth() {
let requestUrl let requestUrl
if (process.env.REACT_APP_ENV_MODE === "production") { if (process.env.REACT_APP_ENV_MODE === "production") {
requestUrl = "http://localhost:5050/api/v1/auth" requestUrl = "https://open-telegram-to-notion-backend.up.railway.app/api/v1/auth"
} else { } else {
requestUrl = "https://telegram-to-notion-backend.herokuapp.com/api/v1/auth" requestUrl = "http://localhost:5050/api/v1/auth"
} }
axios({ axios({
@@ -39,11 +39,10 @@ function Auth() {
data: {code: temporalCode} data: {code: temporalCode}
}) })
.then(res => { .then(res => {
console.log(res) setPermanentCode(res ? res.data.access_token : null)
setPermanentCode(res ? res.data : null)
}) })
.catch(err => { .catch(err => {
console.log(err.response) console.log(err)
setPermanentCode(false) setPermanentCode(false)
}) })
.finally(() => { .finally(() => {
@@ -71,8 +70,9 @@ function Auth() {
<code <code
className="code-selection" className="code-selection"
onClick={() => { onClick={() => {
navigator.clipboard.writeText(permanentCode) navigator.clipboard.writeText(permanentCode).then(() => {
setNotification("Text copied to clipboard!") setNotification("Text copied to clipboard!")
})
}} }}
> >
{permanentCode} {permanentCode}
@@ -100,4 +100,4 @@ function Auth() {
) )
} }
export default Auth export default Auth

View File

@@ -11,6 +11,7 @@
padding: 5vh 2vw; padding: 5vh 2vw;
margin-top: 5vh; margin-top: 5vh;
border-radius: 20px; border-radius: 20px;
box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.075);
} }
.auth .success img { .auth .success img {
width: 75px; width: 75px;

View File

@@ -1 +1 @@
{"version":3,"sources":["auth-style.scss","auth-style.css"],"names":[],"mappings":"AAAA;EACI,gBAAA;ACCJ;ADCI;EACI,eAAA;ACCR;ADEI;EAEI,aAAA;EACA,mBAAA;EAEA,yBAAA;EAEA,gBAAA;EAEA,eAAA;EAEA,mBAAA;ACLR;ADOQ;EACI,WAAA;EACA,YAAA;EAEA,iBAAA;ACNZ;ADSQ;EACI,wBAAA;KAAA,qBAAA;UAAA,gBAAA;EACA,uBAAA;EAEA,sBAAA;EACA,gBAAA;ACRZ","file":"auth-style.css"} {"version":3,"sources":["auth-style.scss","auth-style.css"],"names":[],"mappings":"AAAA;EACI,gBAAA;ACCJ;ADCI;EACI,eAAA;ACCR;ADEI;EAEI,aAAA;EACA,mBAAA;EAEA,yBAAA;EAEA,gBAAA;EAEA,eAAA;EAEA,mBAAA;EAEA,6CAAA;ACNR;ADQQ;EACI,WAAA;EACA,YAAA;EAEA,iBAAA;ACPZ;ADUQ;EACI,wBAAA;KAAA,qBAAA;UAAA,gBAAA;EACA,uBAAA;EAEA,sBAAA;EACA,gBAAA;ACTZ","file":"auth-style.css"}

View File

@@ -18,6 +18,8 @@
border-radius: 20px; border-radius: 20px;
box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.075);
img { img {
width: 75px; width: 75px;
height: 75px; height: 75px;
@@ -31,7 +33,6 @@
color: rgb(73, 70, 50); color: rgb(73, 70, 50);
font-size: 1.2em; font-size: 1.2em;
} }
} }
} }

View File

@@ -1,5 +1,6 @@
import background from './background.svg' import background from './background.svg'
import styled from "styled-components" import styled from "styled-components"
import Wave from 'react-wavify'
function Index() { function Index() {
@@ -13,7 +14,6 @@ function Index() {
aspect-ratio: 960/300; aspect-ratio: 960/300;
background-image: url(${background});
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
background-size: cover; background-size: cover;
@@ -92,19 +92,30 @@ function Index() {
] ]
return ( return (
<IndexStyles className="index"> <>
<ul className="title-list"> <IndexStyles className="index">
{ <ul className="title-list">
listData.map((obj, index) => ( {
<li key={index}> listData.map((obj, index) => (
{obj.link ? <a href={obj.link} target="_blank" children={<h2> {obj.text}</h2>} rel="noreferrer"/> : <h2> {obj.text}</h2>} <li key={index}>
{obj.secondaryText ? <span>&nbsp;{obj.secondaryText}</span> : null} {obj.link ? <a href={obj.link} target="_blank" children={<h2> {obj.text}</h2>} rel="noreferrer"/> : <h2> {obj.text}</h2>}
</li> {obj.secondaryText ? <span>&nbsp;{obj.secondaryText}</span> : null}
)) </li>
} ))
</ul> }
<a className="link-to-bot" href="https://t.me/TelegrmToNotionBot" target="_blank" children="Check it out" rel="noreferrer"/> </ul>
</IndexStyles> <a className="link-to-bot" href="https://t.me/OpenTelegramToNotionBot" target="_blank" children="Check it out" rel="noreferrer"/>
</IndexStyles>
<Wave fill='#4797ff'
paused={false}
options={{
height: 20,
amplitude: 40,
speed: 0.15,
points: 3
}}
/>
</>
) )
} }

View File

@@ -5,14 +5,11 @@ import { Link } from 'wouter'
function Header() { function Header() {
const HeaderStyles = styled.header` const HeaderStyles = styled.header`
height: 15vh;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0px 2vw; padding: 3vh 2vw;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
@@ -67,7 +64,7 @@ function Header() {
<Link href='/'> <Link href='/'>
<div className='logotype'> <div className='logotype'>
<img src={icon} alt="Page icon"></img> <img src={icon} alt="Page icon"></img>
<h1>Telegram to Notion Bot</h1> <h1>Open Telegram to Notion Bot</h1>
</div> </div>
</Link> </Link>
<div className="links"> <div className="links">

View File

@@ -1,8 +1,8 @@
.notification { .notification {
width: 15vw; width: 15vw;
min-width: 300px; min-width: 300px;
background-color: rgba(71, 151, 255, 0.1647058824); background-color: #ffef13;
box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.541); box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.26);
position: absolute; position: absolute;
top: 80%; top: 80%;
left: 50%; left: 50%;
@@ -13,5 +13,5 @@
.notification p { .notification p {
overflow-wrap: anywhere; overflow-wrap: anywhere;
text-align: center; text-align: center;
font-weight: bold; font-weight: 560;
}/*# sourceMappingURL=notification-style.css.map */ }/*# sourceMappingURL=notification-style.css.map */

View File

@@ -1 +1 @@
{"version":3,"sources":["notification-style.scss","notification-style.css"],"names":[],"mappings":"AAAA;EAEI,WAAA;EACA,gBAAA;EAEA,kDAAA;EACA,6CAAA;EAEA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,6BAAA;EAEA,gBAAA;EAEA,mBAAA;ACJJ;ADMI;EACI,uBAAA;EACA,kBAAA;EACA,iBAAA;ACJR","file":"notification-style.css"} {"version":3,"sources":["notification-style.scss","notification-style.css"],"names":[],"mappings":"AAAA;EAEI,WAAA;EACA,gBAAA;EAEA,yBAAA;EACA,4CAAA;EAEA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,6BAAA;EAEA,gBAAA;EAEA,mBAAA;ACJJ;ADMI;EACI,uBAAA;EACA,kBAAA;EACA,gBAAA;ACJR","file":"notification-style.css"}

View File

@@ -3,8 +3,8 @@
width: 15vw; width: 15vw;
min-width: 300px; min-width: 300px;
background-color: #4797ff2a; background-color: #ffef13;
box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.541); box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.26);
position: absolute; position: absolute;
top: 80%; top: 80%;
@@ -18,8 +18,6 @@
p { p {
overflow-wrap: anywhere; overflow-wrap: anywhere;
text-align: center; text-align: center;
font-weight: bold; font-weight: 560;
} }
} }

View File

@@ -33,8 +33,8 @@ img {
} }
.fade-in { .fade-in {
-webkit-animation: fade-in 0.5s cubic-bezier(0.39, 0.575, 0.565, 1) both; -webkit-animation: fade-in 0.3s cubic-bezier(0.39, 0.575, 0.565, 1) both;
animation: fade-in 0.5s cubic-bezier(0.39, 0.575, 0.565, 1) both; animation: fade-in 0.3s cubic-bezier(0.39, 0.575, 0.565, 1) both;
} }
/* ---------------------------------------------- /* ----------------------------------------------
@@ -65,8 +65,8 @@ img {
} }
} }
.fade-out { .fade-out {
-webkit-animation: fade-out 1s ease-out both; -webkit-animation: fade-out 0.3s ease-out both;
animation: fade-out 1s ease-out both; animation: fade-out 0.3s ease-out both;
} }
/* ---------------------------------------------- /* ----------------------------------------------

View File

@@ -1 +1 @@
{"version":3,"sources":["styles.scss","styles.css"],"names":[],"mappings":"AAAA;EACI,SAAA;EACA,UAAA;ACCJ;;ADEA;EACY,+FAAA;EACR,gCAAA;ACCJ;;ADEA;EACI,YAAA;ACCJ;;ADEA;EACI,aAAA;EACA,sBAAA;ACCJ;;ADEA;EACI,YAAA;ACCJ;;ADEA;EACI,SAAA;ACCJ;;ADEA;EACI,yBAAA;KAAA,sBAAA;MAAA,qBAAA;UAAA,iBAAA;ACCJ;;ADIA;EACC,wEAAA;EACG,gEAAA;ACDJ;;ADIA;;;;;mDAAA;AAOA;;;;EAAA;AAKC;EACG;IACE,UAAA;ECFJ;EDIE;IACE,UAAA;ECFJ;AACF;ADIA;EACI;IACI,UAAA;ECFN;EDIE;IACI,UAAA;ECFN;AACF;ADKA;EACC,4CAAA;EACG,oCAAA;ACHJ;;ADKA;;;;;mDAAA;AAOA;;;;EAAA;AAKC;EACG;IACI,UAAA;ECHN;EDKE;IACI,UAAA;ECHN;AACF;ADKI;EACA;IACI,UAAA;ECHN;EDKE;IACI,UAAA;ECHN;AACF","file":"styles.css"} {"version":3,"sources":["styles.scss","styles.css"],"names":[],"mappings":"AAAA;EACI,SAAA;EACA,UAAA;ACCJ;;ADEA;EACY,+FAAA;EACR,gCAAA;ACCJ;;ADEA;EACI,YAAA;ACCJ;;ADEA;EACI,aAAA;EACA,sBAAA;ACCJ;;ADEA;EACI,YAAA;ACCJ;;ADEA;EACI,SAAA;ACCJ;;ADEA;EACI,yBAAA;KAAA,sBAAA;MAAA,qBAAA;UAAA,iBAAA;ACCJ;;ADIA;EACC,wEAAA;EACG,gEAAA;ACDJ;;ADIA;;;;;mDAAA;AAOA;;;;EAAA;AAKC;EACG;IACE,UAAA;ECFJ;EDIE;IACE,UAAA;ECFJ;AACF;ADIA;EACI;IACI,UAAA;ECFN;EDIE;IACI,UAAA;ECFN;AACF;ADKA;EACC,8CAAA;EACG,sCAAA;ACHJ;;ADKA;;;;;mDAAA;AAOA;;;;EAAA;AAKC;EACG;IACI,UAAA;ECHN;EDKE;IACI,UAAA;ECHN;AACF;ADKI;EACA;IACI,UAAA;ECHN;EDKE;IACI,UAAA;ECHN;AACF","file":"styles.css"}

View File

@@ -32,8 +32,8 @@ img {
//Animations //Animations
.fade-in { .fade-in {
-webkit-animation: fade-in 0.5s cubic-bezier(0.390, 0.575, 0.565, 1.000) both; -webkit-animation: fade-in 0.3s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
animation: fade-in 0.5s cubic-bezier(0.390, 0.575, 0.565, 1.000) both; animation: fade-in 0.3s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
} }
/* ---------------------------------------------- /* ----------------------------------------------
@@ -66,8 +66,8 @@ img {
} }
.fade-out { .fade-out {
-webkit-animation: fade-out 1s ease-out both; -webkit-animation: fade-out 0.3s ease-out both;
animation: fade-out 1s ease-out both; animation: fade-out 0.3s ease-out both;
} }
/* ---------------------------------------------- /* ----------------------------------------------
* Generated by Animista on 2022-4-25 17:27:42 * Generated by Animista on 2022-4-25 17:27:42