mirror of
https://github.com/FranP-code/Open-Telegram-to-Notion-Website.git
synced 2025-10-13 00:42:53 +00:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d52971e8ad | ||
| 7ab144ba10 | |||
| be19f65d12 | |||
| a1470398a1 | |||
| ed6037eab4 | |||
|
|
fcd7495418 | ||
| a4fbed16bb | |||
| 29bfa05ffb | |||
| 91951f50e8 | |||
| dc7b40e4f5 | |||
| 1bd079e958 | |||
| 333170a056 | |||
| 700aeec340 | |||
| 9408d2efb7 | |||
| 19586b1575 | |||
| 80d2114b9a | |||
| 9bb1ab9480 | |||
|
|
3abd2ee132 | ||
|
|
d549973a62 | ||
|
|
b13d2618f5 | ||
|
|
9a1e78d5fd | ||
| e8268c80e1 | |||
| 61c3c2c797 | |||
| aad518617a | |||
|
|
d5cc4d662e |
7
.deepsource.toml
Normal file
7
.deepsource.toml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
version = 1
|
||||||
|
|
||||||
|
[[analyzers]]
|
||||||
|
name = "javascript"
|
||||||
|
|
||||||
|
[analyzers.meta]
|
||||||
|
plugins = ["react"]
|
||||||
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
.git
|
||||||
|
.DS_Store
|
||||||
|
.env
|
||||||
|
node_modules
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,6 +3,7 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
|
|
||||||
.env
|
.env
|
||||||
|
|
||||||
|
|||||||
18
Dockerfile
Normal file
18
Dockerfile
Normal 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
13
README.md
Normal 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
9
docker-compose.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
website:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
environment:
|
||||||
|
- REACT_APP_ENV_MODE: ${REACT_APP_ENV_MODE}
|
||||||
9
docker/nginx/conf.d/default.conf
Normal file
9
docker/nginx/conf.d/default.conf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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"}
|
||||||
@@ -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;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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> {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> {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
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|||||||
@@ -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 */
|
||||||
@@ -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"}
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------
|
/* ----------------------------------------------
|
||||||
|
|||||||
@@ -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"}
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user