Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support publish database on web #5748

Merged
merged 35 commits into from
Jul 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
fe810d3
fix: view name
qinluhe Jul 9, 2024
1f611c1
fix: hidden login on web
qinluhe Jul 10, 2024
12f706f
fix: database update bugs
qinluhe Jul 10, 2024
53a2b1f
feat: support render database on web
qinluhe Jul 11, 2024
1747918
fix: loading
qinluhe Jul 11, 2024
5aac9e5
fix: calendar width on mobile
qinluhe Jul 11, 2024
ac604e4
fix: calendar boder color
qinluhe Jul 11, 2024
4fbf5fd
fix: replace some icons
qinluhe Jul 11, 2024
2a498f6
fix: deal with visible view ids
qinluhe Jul 12, 2024
4acab68
fix: filter error child
qinluhe Jul 12, 2024
bff925a
fix: hide filters and sorts
qinluhe Jul 12, 2024
3b43814
fix: the style of relation
qinluhe Jul 12, 2024
94b8c62
fix: throw error when apply fail
qinluhe Jul 16, 2024
fd3214b
fix: upgrade yjs
qinluhe Jul 16, 2024
bb0648e
fix: eslint errors
qinluhe Jul 16, 2024
8370ab2
fix: support group by checkbox
qinluhe Jul 16, 2024
568dcf3
fix: add shortcut to clear data
qinluhe Jul 16, 2024
b05c202
fix: relation
qinluhe Jul 16, 2024
df27c46
fix: relation
qinluhe Jul 16, 2024
5da38bf
fix: relation
qinluhe Jul 16, 2024
6c42ea7
fix: relation
qinluhe Jul 16, 2024
3f94b10
fix: view meta
qinluhe Jul 16, 2024
2738984
fix: view meta
qinluhe Jul 16, 2024
e05150a
fix: view meta
qinluhe Jul 16, 2024
7ac9341
fix: empty database block
qinluhe Jul 16, 2024
8c65109
fix: 0716 bugs
qinluhe Jul 16, 2024
78e5196
fix: add button to url cell
qinluhe Jul 16, 2024
0bff39b
fix: jest test
qinluhe Jul 17, 2024
fad0686
fix: unit tests
qinluhe Jul 17, 2024
eb945af
fix: lint
qinluhe Jul 17, 2024
7b1bf08
fix: reduce database space
qinluhe Jul 17, 2024
3fab5b8
fix: add after payment page
qinluhe Jul 17, 2024
c31c869
fix: add spacing
qinluhe Jul 17, 2024
2bfb25f
Merge branch 'main' into feat/support-publish-database-on-web
LucasXu0 Jul 22, 2024
b638768
Merge branch 'main' into feat/support-publish-database-on-web
LucasXu0 Jul 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: add after payment page
  • Loading branch information
qinluhe committed Jul 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 3fab5b8cc94bcfe98d1510b28c5c8c456f91c877
14 changes: 14 additions & 0 deletions frontend/appflowy_web_app/deploy/server.ts
Original file line number Diff line number Diff line change
@@ -68,6 +68,20 @@ const createServer = async (req: Request) => {

logger.info(`Request URL: ${hostname}${reqUrl.pathname}`);

if (reqUrl.pathname === '/after-payment') {
timer();
const htmlData = fs.readFileSync(indexPath, 'utf8');
const $ = load(htmlData);

$('title').text('Payment Success | AppFlowy');
$('link[rel="icon"]').attr('href', '/appflowy.svg');
setOrUpdateMetaTag($, 'meta[name="description"]', 'name', 'Payment success on AppFlowy');

return new Response($.html(), {
headers: { 'Content-Type': 'text/html' },
});
}

const [namespace, publishName] = reqUrl.pathname.slice(1).split('/');

logger.info(`Namespace: ${namespace}, Publish Name: ${publishName}`);
2 changes: 2 additions & 0 deletions frontend/appflowy_web_app/src/components/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AUTH_CALLBACK_PATH } from '@/application/session/sign_in';
import NotFound from '@/components/error/NotFound';
import LoginAuth from '@/components/login/LoginAuth';
import AfterPaymentPage from '@/pages/AfterPaymentPage';
import LoginPage from '@/pages/LoginPage';
import PublishPage from '@/pages/PublishPage';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
@@ -14,6 +15,7 @@ const AppMain = withAppWrapper(() => {
<Route path={'/login'} element={<LoginPage />} />
<Route path={AUTH_CALLBACK_PATH} element={<LoginAuth />} />
<Route path='/404' element={<NotFound />} />
<Route path='/after-payment' element={<AfterPaymentPage />} />
<Route path='*' element={<NotFound />} />
</Routes>
);
41 changes: 41 additions & 0 deletions frontend/appflowy_web_app/src/pages/AfterPaymentPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { openOrDownload } from '@/components/publish/header/utils';
import { Button, Typography } from '@mui/material';
import React from 'react';
import { ReactComponent as Logo } from '@/assets/logo.svg';
import { ReactComponent as AppflowyLogo } from '@/assets/appflowy.svg';

function AfterPaymentPage() {
return (
<div className={'m-0 flex h-screen w-screen items-center justify-center bg-bg-body p-0'}>
<div className={'flex max-w-[560px] flex-col items-center gap-1 text-center'}>
<Typography variant='h3' className={'mb-[27px] flex items-center gap-4 text-text-title'} gutterBottom>
<>
<Logo className={'w-9'} />
<AppflowyLogo className={'w-32'} />
</>
</Typography>
<div className={'mb-[16px] text-[52px] font-semibold leading-[128%] text-text-title'}>
Explore features in your new plan
</div>
<div className={'flex flex-col items-center justify-center text-[20px] leading-[152%]'}>
<div>
Congratulations! You just unlocked more workspace members and <span className={''}>unlimited</span> AI
responses. 🎉
</div>
</div>
<Button
onClick={openOrDownload}
variant='contained'
color='primary'
className={
'mt-[32px] mb-[48px] h-[68px] rounded-[20px] px-[44px] py-[18px] text-[20px] font-medium leading-[120%] text-content-on-fill'
}
>
Back to AppFlowy
</Button>
</div>
</div>
);
}

export default AfterPaymentPage;
Loading