mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 16:39:05 +00:00
154 files changed
+2243
-1336
No files matched your search
@@ -0,0 +1,32 @@
|
||||
name: Studio Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- studio
|
||||
paths:
|
||||
- 'studio/**'
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- name: Install deps
|
||||
run: npm i
|
||||
working-directory: ./studio
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
working-directory: ./studio
|
||||
@@ -186,7 +186,7 @@
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2021 Supabase
|
||||
Copyright 2022 Supabase
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
@@ -11,11 +11,11 @@ export default function AuthProviders() {
|
||||
<Card>
|
||||
<div className="flex justify-between gap-10">
|
||||
<p>{x.name}</p>
|
||||
<p className="text-tiny flex items-center font-normal uppercase text-white">
|
||||
<p className="flex items-center text-xs font-normal uppercase text-white">
|
||||
{x.official ? (
|
||||
<span className="rounded bg-green-600 py-1 px-2">Official</span>
|
||||
<span className="bg-brand-800 rounded py-1 px-2">Official</span>
|
||||
) : (
|
||||
<span className="rounded bg-gray-500 p-1">Unofficial</span>
|
||||
<span className="bg-scale-500 rounded p-1">Unofficial</span>
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@ const Footer = () => {
|
||||
|
||||
return (
|
||||
<footer
|
||||
className="border-t border-gray-100 bg-white p-10 dark:border-gray-600 dark:bg-gray-800"
|
||||
className="border-scale-400 dark:bg-scale-200 border-t bg-white p-10"
|
||||
aria-labelledby="footerHeading"
|
||||
>
|
||||
<h2 id="footerHeading" className="sr-only">
|
||||
@@ -20,20 +20,20 @@ const Footer = () => {
|
||||
<a>
|
||||
<img
|
||||
className="w-40"
|
||||
src={isDarkMode ? `/docs/supabase-dark.svg` : `/docs/supabase-light.svg`}
|
||||
src={isDarkMode ? `/supabase-dark.svg` : `/supabase-light.svg`}
|
||||
alt="Supabase"
|
||||
/>
|
||||
</a>
|
||||
</Link>
|
||||
<div className="flex space-x-5">
|
||||
<a href="https://twitter.com/supabase" className="text-gray-300 hover:text-gray-400">
|
||||
<a href="https://twitter.com/supabase" className="text-scale-900 hover:text-scale-1100">
|
||||
<span className="sr-only">Twitter</span>
|
||||
<svg className="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" />
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/supabase" className="text-gray-300 hover:text-gray-400">
|
||||
<a href="https://github.com/supabase" className="text-scale-900 hover:text-scale-1100">
|
||||
<span className="sr-only">GitHub</span>
|
||||
<svg className="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path
|
||||
@@ -44,7 +44,10 @@ const Footer = () => {
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<a href="https://discord.supabase.com/" className="text-gray-300 hover:text-gray-400">
|
||||
<a
|
||||
href="https://discord.supabase.com/"
|
||||
className="text-scale-900 hover:text-scale-1100"
|
||||
>
|
||||
<span className="sr-only">Discord</span>
|
||||
<svg className="h-6 w-6" fill="currentColor" viewBox="0 0 71 55" aria-hidden="true">
|
||||
<path
|
||||
@@ -55,7 +58,10 @@ const Footer = () => {
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<a href="https://youtube.com/c/supabase" className="text-gray-300 hover:text-gray-400">
|
||||
<a
|
||||
href="https://youtube.com/c/supabase"
|
||||
className="text-scale-900 hover:text-scale-1100"
|
||||
>
|
||||
<span className="sr-only">Youtube</span>
|
||||
<svg className="h-6 w-6" fill="currentColor" viewBox="0 0 576 512" aria-hidden="true">
|
||||
<path d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z" />
|
||||
@@ -68,7 +74,7 @@ const Footer = () => {
|
||||
{footer.map((segment: any) => {
|
||||
return (
|
||||
<div key={`footer_${segment.title}`}>
|
||||
<h3 className="text-sm text-gray-600 dark:text-gray-200">{segment.title}</h3>
|
||||
<h3 className="text-scale-900 dark:text-scale-800 text-sm">{segment.title}</h3>
|
||||
<ul className="mt-4 space-y-2">
|
||||
{segment.links.map((link: any, idx: number) => (
|
||||
<li key={`${segment.title}_link_${idx}`}>
|
||||
@@ -76,9 +82,9 @@ const Footer = () => {
|
||||
href={link.url}
|
||||
className={`text-sm ${
|
||||
link.url
|
||||
? 'text-gray-400 dark:text-gray-400'
|
||||
: 'text-gray-300 dark:text-gray-300'
|
||||
} hover:text-gray-900 dark:hover:text-gray-300`}
|
||||
? 'text-scale-1000 dark:text-scale-1000'
|
||||
: 'text-scale-300 dark:text-scale-300'
|
||||
} hover:text-scale-900 dark:hover:text-scale-500`}
|
||||
>
|
||||
{link.text}
|
||||
{!link.url && (
|
||||
@@ -96,8 +102,8 @@ const Footer = () => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="dark:border-dark mt-32 flex justify-between border-t pt-8">
|
||||
<p className="dark:text-dark-400 mb-0 self-center text-base text-gray-400">
|
||||
<div className="dark:border-scale-400 mt-32 flex justify-between border-t pt-8">
|
||||
<p className="dark:text-dark-400 text-scale-800 mb-0 self-center text-sm">
|
||||
© {new Date().getFullYear()} Supabase.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@ export default function LinkCard({
|
||||
icon: ReactElement
|
||||
}) {
|
||||
return (
|
||||
<div className="hover:border-brand-600 m-4 w-full cursor-pointer rounded-md border border-black px-4 shadow-sm hover:border-2 hover:shadow-2xl dark:bg-gray-900 lg:w-2/5">
|
||||
<div className="border-scale-200 hover:border-brand-900 dark:bg-scale-400 m-4 w-full cursor-pointer rounded-md border px-4 shadow-sm hover:shadow-2xl lg:w-2/5">
|
||||
{description ? (
|
||||
<>
|
||||
<h4 className="my-0 p-0">{title}</h4>
|
||||
|
||||
@@ -43,10 +43,10 @@ const DocsLayout = ({
|
||||
<div className="flex flex-row">
|
||||
<SideBar menuItems={menuItems} />
|
||||
<div className="mx-auto grid w-full max-w-7xl grid-cols-12">
|
||||
<article className="prose dark:prose-dark col-span-8 max-w-none p-8">
|
||||
<article className="prose dark:prose-dark dark:bg-scale-200 col-span-8 max-w-none p-8">
|
||||
{children}
|
||||
</article>
|
||||
<div className="prose dark:prose-dark col-span-4 max-w-none p-8">
|
||||
<div className="prose dark:bg-scale-200 col-span-4 max-w-none p-8">
|
||||
<h5>On this page</h5>
|
||||
{toc
|
||||
? toc.json.map((item: any) => {
|
||||
|
||||
@@ -33,7 +33,7 @@ const NavBar = ({ currentPage }: { currentPage: string }) => {
|
||||
|
||||
return (
|
||||
<nav
|
||||
className={`dark:border-dark sticky top-0 z-10 flex h-[72px] justify-between border-b bg-white p-4 backdrop-blur backdrop-filter dark:bg-gray-800`}
|
||||
className={`dark:border-scale-400 dark:bg-scale-200 sticky top-0 z-10 flex h-[72px] justify-between border-b bg-white p-4 backdrop-blur backdrop-filter`}
|
||||
>
|
||||
<div className="flex items-center">
|
||||
<button className="mr-2 block lg:hidden">
|
||||
@@ -44,7 +44,7 @@ const NavBar = ({ currentPage }: { currentPage: string }) => {
|
||||
<a>
|
||||
<Image
|
||||
className="cursor-pointer"
|
||||
src={isDarkMode ? `/docs/supabase-dark.svg` : `/docs/supabase-light.svg`}
|
||||
src={isDarkMode ? `/supabase-dark.svg` : `/supabase-light.svg`}
|
||||
width={200}
|
||||
height={32}
|
||||
alt="Supabase Logo"
|
||||
@@ -57,9 +57,7 @@ const NavBar = ({ currentPage }: { currentPage: string }) => {
|
||||
{pageLinks.map((p) => (
|
||||
<li key={`${p.text}-${p.link}`}>
|
||||
<Link href={p.link}>
|
||||
<a
|
||||
className={`${p.active ? 'text-gray-800 dark:text-gray-200' : 'text-brand-600'}`}
|
||||
>
|
||||
<a className={`text-sm ${p.active ? 'text-brand-900' : 'text-scale-1100'}`}>
|
||||
{p.text}
|
||||
</a>
|
||||
</Link>
|
||||
@@ -67,7 +65,7 @@ const NavBar = ({ currentPage }: { currentPage: string }) => {
|
||||
))}
|
||||
<li>
|
||||
<Link href="https://app.supabase.io">
|
||||
<a className={`text-brand-600`}>Login</a>
|
||||
<a className={`text-scale-1100 text-sm`}>Login</a>
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -75,12 +73,12 @@ const NavBar = ({ currentPage }: { currentPage: string }) => {
|
||||
<div className={`${styles.navRight} flex items-center`}>
|
||||
<Link href="https://github.com/supabase/supabase">
|
||||
<a>
|
||||
<IconGitHub className="text-brand-600" />
|
||||
<IconGitHub className="text-scale-1100" />
|
||||
</a>
|
||||
</Link>
|
||||
<Link href="https://twitter.com/supabase">
|
||||
<a>
|
||||
<IconTwitter className="text-brand-600" />
|
||||
<IconTwitter className="text-scale-1100" />
|
||||
</a>
|
||||
</Link>
|
||||
<Input
|
||||
|
||||
@@ -7,7 +7,9 @@ import ThemeToggle from '../ThemeToggle'
|
||||
const SideBar = ({ menuItems }: { menuItems: any }) => {
|
||||
const { asPath } = useRouter()
|
||||
return (
|
||||
<div className={`${styles.sidebar} dark:border-dark fixed relative h-full border-r py-4`}>
|
||||
<div
|
||||
className={`${styles.sidebar} dark:bg-scale-200 dark:border-scale-400 relative h-full border-r py-4`}
|
||||
>
|
||||
<Menu>
|
||||
<div>
|
||||
{Object.keys(menuItems).map((key) => {
|
||||
|
||||
@@ -11,22 +11,22 @@ We have a [set of examples](https://github.com/supabase/supabase/tree/master/exa
|
||||
|
||||
Build a basic Todo List with Supabase and your favorite frontend framework:
|
||||
|
||||
- [Expo Todo List.](https://github.com/supabase/supabase/tree/master/examples/expo-todo-list)
|
||||
- [Next.js Todo List.](https://github.com/supabase/supabase/tree/master/examples/nextjs-todo-list)
|
||||
- [React Todo List.](https://github.com/supabase/supabase/tree/master/examples/react-todo-list)
|
||||
- [Svelte Todo List.](https://github.com/supabase/supabase/tree/master/examples/sveltejs-todo-list)
|
||||
- [Vue 3 Todo List (Typescript).](https://github.com/supabase/supabase/tree/master/examples/vue3-ts-todo-list)
|
||||
- [Expo Todo List.](https://github.com/supabase/supabase/tree/master/examples/todo-list/expo-todo-list)
|
||||
- [Next.js Todo List.](https://github.com/supabase/supabase/tree/master/examples/todo-list/nextjs-todo-list)
|
||||
- [React Todo List.](https://github.com/supabase/supabase/tree/master/examples/todo-list/react-todo-list)
|
||||
- [Svelte Todo List.](https://github.com/supabase/supabase/tree/master/examples/todo-list/sveltejs-todo-list)
|
||||
- [Vue 3 Todo List (Typescript).](https://github.com/supabase/supabase/tree/master/examples/todo-list/vue3-ts-todo-list)
|
||||
- [Angular Todo List.](https://github.com/supabase/supabase/tree/master/examples/angular-todo-list)
|
||||
|
||||
## Auth examples#
|
||||
|
||||
- [Supabase Auth with vanilla Javascript..](https://github.com/supabase/supabase/tree/master/examples/javascript-auth) Use Supabase without any frontend frameworks.
|
||||
- [Supabase Auth with vanilla Javascript..](https://github.com/supabase/supabase/tree/master/examples/auth/javascript-auth) Use Supabase without any frontend frameworks.
|
||||
- [Supabase Auth with Next.js SSR.](https://github.com/supabase/supabase/tree/master/examples/nextjs-with-supabase-auth) Uses cookies to persist auth between the server and the client.
|
||||
- [Supabase Auth with RedwoodJS.](https://redwood-playground-auth.netlify.app/supabase) Try out Supabase authentication in the [RedwoodJS](https://redwoodjs.com/) Authentication Playground complete with OAuth support and code samples.
|
||||
|
||||
## Collaborative
|
||||
|
||||
- [Next.js Slack Clone.](https://github.com/supabase/supabase/tree/master/examples/nextjs-slack-clone)
|
||||
- [Next.js Slack Clone.](https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone)
|
||||
|
||||
## Community
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"@mdx-js/loader": "^1.6.22",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@next/mdx": "^12.0.4",
|
||||
"@supabase/ui": "^0.36.2",
|
||||
"@supabase/ui": "v0.37.0-alpha.50",
|
||||
"@tailwindcss/typography": "^0.4.1",
|
||||
"common": "*",
|
||||
"gray-matter": "^4.0.3",
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
body {
|
||||
@apply bg-white dark:bg-[#1c1c1c] !important;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background-color: #6ee7b7;
|
||||
color: #333 !important;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ Check out the new [Remix Auth example](https://github.com/supabase/supabase/tree
|
||||
### Expo Todo List
|
||||
|
||||
Our React Native example has been correctly updated to be an Expo example.
|
||||
[Check it out here](https://github.com/supabase/supabase/tree/master/examples/expo-todo-list).
|
||||
[Check it out here](https://github.com/supabase/supabase/tree/master/examples/todo-list/expo-todo-list).
|
||||
|
||||
## Video: API requests with Function Hooks
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ const Hero = () => {
|
||||
<div>
|
||||
<h1
|
||||
className="
|
||||
text-scale-1200
|
||||
text-xl sm:leading-none lg:text-4xl
|
||||
text-scale-1200
|
||||
text-2xl sm:text-3xl sm:leading-none lg:text-4xl
|
||||
xl:text-5xl
|
||||
"
|
||||
>
|
||||
@@ -31,7 +31,7 @@ const Hero = () => {
|
||||
<span className="text-brand-900 block md:ml-0">Scale to millions.</span>
|
||||
</h1>
|
||||
<div>
|
||||
<p className="p text-base sm:mt-5 lg:text-lg ">
|
||||
<p className="p mt-1.5 text-sm sm:mt-5 sm:text-base lg:text-lg ">
|
||||
Supabase is an open source Firebase alternative. Start your project with a
|
||||
Postgres Database, Authentication, instant APIs, Realtime subscriptions
|
||||
and Storage.
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
"author_url": "https://github.com/supabase",
|
||||
"author_img": "https://avatars.githubusercontent.com/u/54469796",
|
||||
"repo_name": "javascript-auth",
|
||||
"repo_url": "https://github.com/supabase/supabase/tree/master/examples/javascript-auth",
|
||||
"repo_url": "https://github.com/supabase/supabase/tree/master/examples/auth/javascript-auth",
|
||||
"vercel_deploy_url": "",
|
||||
"demo_url": "https://auth-vanilla-js.vercel.app/"
|
||||
},
|
||||
@@ -99,7 +99,7 @@
|
||||
"author_url": "https://github.com/supabase",
|
||||
"author_img": "https://avatars.githubusercontent.com/u/54469796",
|
||||
"repo_name": "expo-todo-list",
|
||||
"repo_url": "https://github.com/supabase/supabase/tree/master/examples/expo-todo-list",
|
||||
"repo_url": "https://github.com/supabase/supabase/tree/master/examples/todo-list/expo-todo-list",
|
||||
"vercel_deploy_url": "",
|
||||
"demo_url": ""
|
||||
},
|
||||
@@ -112,7 +112,7 @@
|
||||
"author_url": "https://github.com/supabase",
|
||||
"author_img": "https://avatars.githubusercontent.com/u/54469796",
|
||||
"repo_name": "nextjs-todo-list",
|
||||
"repo_url": "https://github.com/supabase/supabase/tree/master/examples/nextjs-todo-list",
|
||||
"repo_url": "https://github.com/supabase/supabase/tree/master/examples/todo-list/nextjs-todo-list",
|
||||
"vercel_deploy_url": "",
|
||||
"demo_url": "https://supabase-nextjs-todo-list.vercel.app/"
|
||||
},
|
||||
@@ -125,7 +125,7 @@
|
||||
"author_url": "https://github.com/supabase",
|
||||
"author_img": "https://avatars.githubusercontent.com/u/54469796",
|
||||
"repo_name": "react-todo-list",
|
||||
"repo_url": "https://github.com/supabase/supabase/tree/master/examples/react-todo-list",
|
||||
"repo_url": "https://github.com/supabase/supabase/tree/master/examples/todo-list/react-todo-list",
|
||||
"vercel_deploy_url": "",
|
||||
"demo_url": ""
|
||||
},
|
||||
@@ -138,7 +138,7 @@
|
||||
"author_url": "https://github.com/supabase",
|
||||
"author_img": "https://avatars.githubusercontent.com/u/54469796",
|
||||
"repo_name": "sveltejs-todo-list",
|
||||
"repo_url": "https://github.com/supabase/supabase/tree/master/examples/sveltejs-todo-list",
|
||||
"repo_url": "https://github.com/supabase/supabase/tree/master/examples/todo-list/sveltejs-todo-list",
|
||||
"vercel_deploy_url": "",
|
||||
"demo_url": ""
|
||||
},
|
||||
@@ -151,7 +151,7 @@
|
||||
"author_url": "https://github.com/supabase",
|
||||
"author_img": "https://avatars.githubusercontent.com/u/54469796",
|
||||
"repo_name": "vue3-ts-todo-list",
|
||||
"repo_url": "https://github.com/supabase/supabase/tree/master/examples/vue3-ts-todo-list",
|
||||
"repo_url": "https://github.com/supabase/supabase/tree/master/examples/todo-list/vue3-ts-todo-list",
|
||||
"vercel_deploy_url": "",
|
||||
"demo_url": ""
|
||||
},
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
},
|
||||
{
|
||||
"text": "API Reference",
|
||||
"url": "/docs/client/supabase-client"
|
||||
"url": "/docs/guides/api"
|
||||
},
|
||||
{
|
||||
"text": "Guides",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{
|
||||
"imgUrl": "images/slack-clone.jpg",
|
||||
"title": "Chat app with Next.js",
|
||||
"url": "https://github.com/supabase/supabase/tree/master/examples/nextjs-slack-clone",
|
||||
"url": "https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone",
|
||||
"description": "Build a full-stack Slack clone using Next.js and Supabase.",
|
||||
"icons": [
|
||||
{
|
||||
@@ -40,7 +40,7 @@
|
||||
{
|
||||
"imgUrl": "images/to-do-app.jpg",
|
||||
"title": "Todo list with Vue.js",
|
||||
"url": "https://github.com/supabase/supabase/tree/master/examples/vue3-ts-todo-list",
|
||||
"url": "https://github.com/supabase/supabase/tree/master/examples/todo-list/vue3-ts-todo-list",
|
||||
"description": "Build a simple todo list with Vue and Supabase.",
|
||||
"icons": [
|
||||
{
|
||||
|
||||
@@ -155,10 +155,10 @@ function StoragePage() {
|
||||
author_img={'https://avatars.githubusercontent.com/u/54469796'}
|
||||
repo_name={'nextjs-ts-user-management'}
|
||||
repo_url={
|
||||
'https://github.com/supabase/supabase/tree/master/examples/nextjs-ts-user-management'
|
||||
'https://github.com/supabase/supabase/tree/master/examples/user-management/nextjs-ts-user-management'
|
||||
}
|
||||
vercel_deploy_url={
|
||||
'https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fsupabase%2Fsupabase%2Ftree%2Fmaster%2Fexamples%2Fnextjs-ts-user-management&project-name=supabase-user-management&repository-name=supabase-user-management&demo-title=Supabase%20User%20Management&demo-description=An%20example%20web%20app%20using%20Supabase%20and%20Next.js&demo-url=https%3A%2F%2Fsupabase-nextjs-ts-user-management.vercel.app&demo-image=https%3A%2F%2Fi.imgur.com%2FZ3HkQqe.png&integration-ids=oac_jUduyjQgOyzev1fjrW83NYOv&external-id=nextjs-user-management'
|
||||
'https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fsupabase%2Fsupabase%2Ftree%2Fmaster%2Fexamples%2Fuser-mangement%2Fnextjs-ts-user-management&project-name=supabase-user-management&repository-name=supabase-user-management&demo-title=Supabase%20User%20Management&demo-description=An%20example%20web%20app%20using%20Supabase%20and%20Next.js&demo-url=https%3A%2F%2Fsupabase-nextjs-ts-user-management.vercel.app&demo-image=https%3A%2F%2Fi.imgur.com%2FZ3HkQqe.png&integration-ids=oac_jUduyjQgOyzev1fjrW83NYOv&external-id=nextjs-user-management'
|
||||
}
|
||||
demo_url={''}
|
||||
/>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 174 KiB |
@@ -13,7 +13,7 @@
|
||||
<h1>Supabase Auth Example</h1>
|
||||
</div>
|
||||
<div class='section'>
|
||||
<a href="https://github.com/supabase/supabase/tree/master/examples/javascript-auth">View the code on GitHub</a>
|
||||
<a href="https://github.com/supabase/supabase/tree/master/examples/auth/javascript-auth">View the code on GitHub</a>
|
||||
</div>
|
||||
<div class='section'>
|
||||
<form id='sign-up'>
|
||||
|
||||
@@ -10,6 +10,8 @@ The function examples are located in [`./supabase/functions`](./supabase/functio
|
||||
|
||||
- [`browser-with-cors`](./supabase/functions/browser-with-cors/index.ts): Handle CORS headers for function invocations from browser environments.
|
||||
- [`select-from-table-with-auth-rls`](./supabase/functions/select-from-table-with-auth-rls/index.ts): Retrieve data from an authenticated user via RLS.
|
||||
- [`send-email-smtp`](./supabase/functions/send-email-smtp/index.ts): Send an email using SMTP credentials.
|
||||
- [`telegram-bot`](./supabase/functions/telegram-bot/index.ts): Webhook handler for Telegram bots using [grammY](https://grammy.dev/).
|
||||
|
||||
## Develop locally
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export const functionsList = [
|
||||
'local: Whatever function is currently served by the CLI',
|
||||
'browser-with-cors',
|
||||
'select-from-table-with-auth-rls',
|
||||
'select-from-table-with-auth-rls',
|
||||
'send-email-smtp',
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
# send-email-smtp
|
||||
SMTP_HOSTNAME="your.hostname.com"
|
||||
SMTP_PORT="2587"
|
||||
SMTP_USERNAME="your_username"
|
||||
SMTP_PASSWORD="your_password"
|
||||
SMTP_FROM="no-reply@example.com"
|
||||
|
||||
# telegram-bot
|
||||
TELEGRAM_BOT_TOKEN="get it from https://t.me/BotFather"
|
||||
FUNCTION_SECRET="random secret"
|
||||
@@ -0,0 +1,16 @@
|
||||
# send-email-smtp
|
||||
|
||||
## Deploy
|
||||
|
||||
```
|
||||
supabase link --project-ref your-project-ref
|
||||
supabase secrets set SMTP_HOSTNAME="your.hostname.com" SMTP_PORT="2587" SMTP_USERNAME="your_username" SMTP_PASSWORD="your_password" SMTP_FROM="no-reply@example.com"
|
||||
supabase functions deploy send-email-smtp
|
||||
```
|
||||
|
||||
Note: `SMTP_PORT` must be a port other than `25`, `465`, and `587` as Deno Deploy does not support outgoing connections to ports. AWS SES (port 2587) is recommended.
|
||||
|
||||
## Test locally
|
||||
|
||||
- `cp ./supabase/.env.local.example ./supabase/.env.local`
|
||||
- `supabase functions serve send-email-smtp --env-file ./supabase/.env.local`
|
||||
@@ -0,0 +1,47 @@
|
||||
// Follow this setup guide to integrate the Deno language server with your editor:
|
||||
// https://deno.land/manual/getting_started/setup_your_environment
|
||||
// This enables autocomplete, go to definition, etc.
|
||||
|
||||
import { serve } from 'https://deno.land/std@0.131.0/http/server.ts'
|
||||
import { SmtpClient } from 'https://deno.land/x/denomailer@0.12.0/mod.ts'
|
||||
|
||||
const smtp = new SmtpClient()
|
||||
|
||||
console.log(`Function "send-email-smtp" up and running!`)
|
||||
|
||||
serve(async (req) => {
|
||||
await smtp.connect({
|
||||
hostname: Deno.env.get('SMTP_HOSTNAME')!,
|
||||
port: Number(Deno.env.get('SMTP_PORT')!),
|
||||
username: Deno.env.get('SMTP_USERNAME')!,
|
||||
password: Deno.env.get('SMTP_PASSWORD')!,
|
||||
})
|
||||
|
||||
try {
|
||||
await smtp.send({
|
||||
from: Deno.env.get('SMTP_FROM')!,
|
||||
to: 'testr@test.de',
|
||||
subject: `Hello from Supabase Edge Functions`,
|
||||
content: `Hello Functions \o/`,
|
||||
})
|
||||
} catch (error: any) {
|
||||
return new Response(error.message, { status: 500 })
|
||||
}
|
||||
|
||||
await smtp.close()
|
||||
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
done: true,
|
||||
}),
|
||||
{
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
// To invoke:
|
||||
// curl -i --location --request POST 'http://localhost:54321/functions/v1/' \
|
||||
// --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs' \
|
||||
// --header 'Content-Type: application/json' \
|
||||
// --data '{"name":"Functions"}'
|
||||
@@ -0,0 +1,13 @@
|
||||
# telegram-bot
|
||||
|
||||
Try it out: https://t.me/supabase_example_bot
|
||||
|
||||

|
||||
|
||||
## Deploy
|
||||
|
||||
1. Run `supabase functions deploy --no-verify-jwt telegram-bot`
|
||||
2. Get your Telegram token from https://t.me/BotFather
|
||||
3. Run `supabase secrets set TELEGRAM_BOT_TOKEN=your_token FUNCTION_SECRET=random_secret`
|
||||
4. Set your bot's webhook url to `https://<PROJECT_NAME>.functions.supabase.co/telegram-bot` (Replacing `<...>` with respective values). In order to do that, run this url (in your browser, for example): `https://api.telegram.org/bot<TELEGRAM_BOT_TOKEN>/setWebhook?url=https://<PROJECT_NAME>.functions.supabase.co/telegram-bot?secret=<FUNCTION_SECRET>`
|
||||
5. That's it, go ahead and chat with your bot 🤖💬
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.9 MiB |
@@ -0,0 +1,35 @@
|
||||
// Follow this setup guide to integrate the Deno language server with your editor:
|
||||
// https://deno.land/manual/getting_started/setup_your_environment
|
||||
// This enables autocomplete, go to definition, etc.
|
||||
|
||||
import { serve } from "https://deno.land/std@0.131.0/http/server.ts"
|
||||
|
||||
console.log(`Function "telegram-bot" up and running!`)
|
||||
|
||||
import { Bot, webhookCallback } from "https://deno.land/x/grammy@v1.8.3/mod.ts";
|
||||
|
||||
const bot = new Bot(Deno.env.get('TELEGRAM_BOT_TOKEN') || '');
|
||||
|
||||
bot.command("start", (ctx) => ctx.reply("Welcome! Up and running."));
|
||||
|
||||
bot.command('ping', (ctx) => ctx.reply(`Pong! ${new Date()} ${Date.now()}`))
|
||||
|
||||
const handleUpdate = webhookCallback(bot, "std/http");
|
||||
|
||||
serve(async (req) => {
|
||||
try {
|
||||
const url = new URL(req.url);
|
||||
if (url.searchParams.get('secret') !== Deno.env.get('FUNCTION_SECRET'))
|
||||
return new Response('not allowed', { status: 405 })
|
||||
|
||||
return await handleUpdate(req);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
})
|
||||
|
||||
// To invoke:
|
||||
// curl -i --location --request POST 'http://localhost:54321/functions/v1/' \
|
||||
// --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs' \
|
||||
// --header 'Content-Type: application/json' \
|
||||
// --data '{"name":"Functions"}'
|
||||
@@ -138,7 +138,7 @@ Full schema here with role-based access control:
|
||||
|
||||
```sql
|
||||
--
|
||||
-- For use with https://github.com/supabase/supabase/tree/master/examples/nextjs-slack-clone
|
||||
-- For use with https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone
|
||||
--
|
||||
|
||||
-- Custom types
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--
|
||||
-- For use with https://github.com/supabase/supabase/tree/master/examples/nextjs-slack-clone
|
||||
-- For use with https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone
|
||||
--
|
||||
|
||||
-- Custom types
|
||||
|
||||
+29
-29
@@ -9,7 +9,7 @@
|
||||
"version": "0.1.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@supabase/supabase-js": "^1.34.1",
|
||||
"@supabase/supabase-js": "^1.35.3",
|
||||
"next": "latest",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
@@ -304,9 +304,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@supabase/gotrue-js": {
|
||||
"version": "1.22.12",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-1.22.12.tgz",
|
||||
"integrity": "sha512-/baPkNiumE2B+OLSpvZquDsTqnOTAsG/07GBq5rXU8/e0rSyjljAFf8gnawGPezjlDGTFr2fjRYs0BYMz4LD/A==",
|
||||
"version": "1.22.15",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-1.22.15.tgz",
|
||||
"integrity": "sha512-7/mwnd1hR/bpkCmbDvjnwPfWyRcE2B1ZnfxthqgVaZ5oJHS/CQibyuLBL8DA75fxmgY9nIfednDZSydSm6zK0w==",
|
||||
"dependencies": {
|
||||
"cross-fetch": "^3.0.6"
|
||||
}
|
||||
@@ -320,9 +320,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@supabase/realtime-js": {
|
||||
"version": "1.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-1.7.1.tgz",
|
||||
"integrity": "sha512-ovp9UXzi3ibA/AOyL4CXW7hjbrR+ZQoxbJZ8rfZTSMpqYhT8Jl8/sLUozMobIzSV6gsZYuHR3QnzJmemzvBQhg==",
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-1.7.2.tgz",
|
||||
"integrity": "sha512-DMUaFIKj7KszGtWTTQbhMmUzZf7UnwYqySsmY+G8HgYxvY3ZaVa+DZD0I6ofgr4OLNr0po/ODM2a4lf5m5GNBg==",
|
||||
"dependencies": {
|
||||
"@types/phoenix": "^1.5.4",
|
||||
"websocket": "^1.0.34"
|
||||
@@ -337,14 +337,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@supabase/supabase-js": {
|
||||
"version": "1.34.1",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-1.34.1.tgz",
|
||||
"integrity": "sha512-0K9iJXvGcg+iBrUXf9vBlCObPVXn7B77tdCUcaw2/0XgJJBNFg90t43zNnY51KdjT1AZCm/1Kpwx2zd7FdCzKQ==",
|
||||
"version": "1.35.3",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-1.35.3.tgz",
|
||||
"integrity": "sha512-uwO8OVdMFsGZNZ1xQhFz22+PSW0EWYZ5xVq+jQeGz8nhabEu+Q9Uyep/bcNzOpyPJRzbGfxSPRzgAdAxfJgFhw==",
|
||||
"dependencies": {
|
||||
"@supabase/functions-js": "^1.3.3",
|
||||
"@supabase/gotrue-js": "^1.22.12",
|
||||
"@supabase/gotrue-js": "^1.22.14",
|
||||
"@supabase/postgrest-js": "^0.37.2",
|
||||
"@supabase/realtime-js": "^1.7.1",
|
||||
"@supabase/realtime-js": "^1.7.2",
|
||||
"@supabase/storage-js": "^1.7.0"
|
||||
}
|
||||
},
|
||||
@@ -723,9 +723,9 @@
|
||||
"integrity": "sha512-/s3+fwhKf1YK4k7btOImOzCQLpUjS6MaPf0ODTNuT4eTM1Bg4itBpLkydhOzJmpmH6Z9eXFyuuK5czsmzRzwtw=="
|
||||
},
|
||||
"node_modules/es5-ext": {
|
||||
"version": "0.10.60",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.60.tgz",
|
||||
"integrity": "sha512-jpKNXIt60htYG59/9FGf2PYT3pwMpnEbNKysU+k/4FGwyGtMotOvcZOuW+EmXXYASRqYSXQfGL5cVIthOTgbkg==",
|
||||
"version": "0.10.61",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz",
|
||||
"integrity": "sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"es6-iterator": "^2.0.3",
|
||||
@@ -1973,9 +1973,9 @@
|
||||
}
|
||||
},
|
||||
"@supabase/gotrue-js": {
|
||||
"version": "1.22.12",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-1.22.12.tgz",
|
||||
"integrity": "sha512-/baPkNiumE2B+OLSpvZquDsTqnOTAsG/07GBq5rXU8/e0rSyjljAFf8gnawGPezjlDGTFr2fjRYs0BYMz4LD/A==",
|
||||
"version": "1.22.15",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-1.22.15.tgz",
|
||||
"integrity": "sha512-7/mwnd1hR/bpkCmbDvjnwPfWyRcE2B1ZnfxthqgVaZ5oJHS/CQibyuLBL8DA75fxmgY9nIfednDZSydSm6zK0w==",
|
||||
"requires": {
|
||||
"cross-fetch": "^3.0.6"
|
||||
}
|
||||
@@ -1989,9 +1989,9 @@
|
||||
}
|
||||
},
|
||||
"@supabase/realtime-js": {
|
||||
"version": "1.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-1.7.1.tgz",
|
||||
"integrity": "sha512-ovp9UXzi3ibA/AOyL4CXW7hjbrR+ZQoxbJZ8rfZTSMpqYhT8Jl8/sLUozMobIzSV6gsZYuHR3QnzJmemzvBQhg==",
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-1.7.2.tgz",
|
||||
"integrity": "sha512-DMUaFIKj7KszGtWTTQbhMmUzZf7UnwYqySsmY+G8HgYxvY3ZaVa+DZD0I6ofgr4OLNr0po/ODM2a4lf5m5GNBg==",
|
||||
"requires": {
|
||||
"@types/phoenix": "^1.5.4",
|
||||
"websocket": "^1.0.34"
|
||||
@@ -2006,14 +2006,14 @@
|
||||
}
|
||||
},
|
||||
"@supabase/supabase-js": {
|
||||
"version": "1.34.1",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-1.34.1.tgz",
|
||||
"integrity": "sha512-0K9iJXvGcg+iBrUXf9vBlCObPVXn7B77tdCUcaw2/0XgJJBNFg90t43zNnY51KdjT1AZCm/1Kpwx2zd7FdCzKQ==",
|
||||
"version": "1.35.3",
|
||||
"resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-1.35.3.tgz",
|
||||
"integrity": "sha512-uwO8OVdMFsGZNZ1xQhFz22+PSW0EWYZ5xVq+jQeGz8nhabEu+Q9Uyep/bcNzOpyPJRzbGfxSPRzgAdAxfJgFhw==",
|
||||
"requires": {
|
||||
"@supabase/functions-js": "^1.3.3",
|
||||
"@supabase/gotrue-js": "^1.22.12",
|
||||
"@supabase/gotrue-js": "^1.22.14",
|
||||
"@supabase/postgrest-js": "^0.37.2",
|
||||
"@supabase/realtime-js": "^1.7.1",
|
||||
"@supabase/realtime-js": "^1.7.2",
|
||||
"@supabase/storage-js": "^1.7.0"
|
||||
}
|
||||
},
|
||||
@@ -2287,9 +2287,9 @@
|
||||
"integrity": "sha512-/s3+fwhKf1YK4k7btOImOzCQLpUjS6MaPf0ODTNuT4eTM1Bg4itBpLkydhOzJmpmH6Z9eXFyuuK5czsmzRzwtw=="
|
||||
},
|
||||
"es5-ext": {
|
||||
"version": "0.10.60",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.60.tgz",
|
||||
"integrity": "sha512-jpKNXIt60htYG59/9FGf2PYT3pwMpnEbNKysU+k/4FGwyGtMotOvcZOuW+EmXXYASRqYSXQfGL5cVIthOTgbkg==",
|
||||
"version": "0.10.61",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz",
|
||||
"integrity": "sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==",
|
||||
"requires": {
|
||||
"es6-iterator": "^2.0.3",
|
||||
"es6-symbol": "^3.1.3",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@supabase/supabase-js": "^1.34.1",
|
||||
"@supabase/supabase-js": "^1.35.3",
|
||||
"next": "latest",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
|
||||
@@ -28,7 +28,7 @@ The `anon` key is your client-side API key. It allows "anonymous access" to your
|
||||
|
||||
### 4. Deploy the Vue.js client
|
||||
|
||||
[](https://vercel.com/new/git/external?repository-url=https://github.com/supabase/supabase/tree/master/examples/vue3-ts-todo-list&env=VUE_APP_SUPABASE_URL,VUE_APP_SUPABASE_KEY&envDescription=Find%20the%20Supabase%20URL%20and%20key%20in%20the%20your%20auto-generated%20docs%20at%20app.supabase.io&project-name=supabase-todo-list&repo-name=supabase-todo-list)
|
||||
[](https://vercel.com/new/git/external?repository-url=https://github.com/supabase/supabase/tree/master/examples/todo-list/vue3-ts-todo-list&env=VUE_APP_SUPABASE_URL,VUE_APP_SUPABASE_KEY&envDescription=Find%20the%20Supabase%20URL%20and%20key%20in%20the%20your%20auto-generated%20docs%20at%20app.supabase.io&project-name=supabase-todo-list&repo-name=supabase-todo-list)
|
||||
|
||||
Here, we recommend forking this repo so you can deploy through Vercel by clicking the button above. When you click the button, replace the repo URL with your fork's URL.
|
||||
|
||||
|
||||
+5
-2
@@ -1,7 +1,8 @@
|
||||
<div style="direction: rtl;" dir="rtl">
|
||||
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -16,7 +17,9 @@
|
||||
- [x] واجهات برمجة التطبيقات التي يتم إنشاؤها تلقائيا.
|
||||
- [x] لوحة الإدارة.
|
||||
- [x] التخزين.
|
||||
- [ ] الدوال (مفردها دالّة).
|
||||
- [x] الدوال.
|
||||
|
||||

|
||||
|
||||
## الشرح
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] স্বয়ংক্রিয়ভাবে তৈরি APIs
|
||||
- [x] ড্যাশবোর্ড
|
||||
- [x] স্টোরেজ
|
||||
- [ ] ফাংশন (শীঘ্রই আসছে)
|
||||
- [x] ফাংশন
|
||||
|
||||

|
||||
|
||||
## ডকুমেন্টেশন
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] API autogenerada
|
||||
- [x] Panell de control
|
||||
- [x] Emmagatzematge
|
||||
- [ ] Funcions (pròximament)
|
||||
- [x] Funcions
|
||||
|
||||

|
||||
|
||||
## Documentació
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] Automatisk genererede APIer
|
||||
- [x] Instrumentbræt
|
||||
- [x] Opbevaring af data
|
||||
- [ ] Serverbaserede funktioner (på vej)
|
||||
- [x] Serverbaserede funktioner
|
||||
|
||||

|
||||
|
||||
## Dokumentation
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] Automatisch generierte APIs
|
||||
- [x] Dashboard
|
||||
- [x] Speicher
|
||||
- [ ] Funktionen (kommt demnächst)
|
||||
- [x] Funktionen
|
||||
|
||||

|
||||
|
||||
## Dokumentation
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] API autogenerada
|
||||
- [x] Panel de control
|
||||
- [x] Almacenamiento
|
||||
- [ ] Funciones (próximamente)
|
||||
- [x] Funciones
|
||||
|
||||

|
||||
|
||||
## Documentación
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-with-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] ساختن خودکار APIها
|
||||
- [x] پنل کاربری
|
||||
- [x] فضای ذخیرهسازی
|
||||
- [ ] توابع (به زودی)
|
||||
- [x] توابع
|
||||
|
||||

|
||||
|
||||
## مستندات
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] API générées automatiquement
|
||||
- [x] Tableau de bord
|
||||
- [x] Stockage
|
||||
- [ ] Fonctions (à venir)
|
||||
- [x] Fonctions
|
||||
|
||||

|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@ To [Supabase](https://supabase.com) είναι μια εναλλακτική λ
|
||||
- [x] Auto-generated APIs
|
||||
- [x] Dashboard
|
||||
- [x] Storage
|
||||
- [ ] Functions (coming soon)
|
||||
- [x] Functions
|
||||
|
||||

|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] સ્વત.-પેદા APIs
|
||||
- [x] ડેશબોર્ડ
|
||||
- [x] સ્ટોરેજ
|
||||
- [ ] ફંક્શન્સ (ટૂક સમયમાં આવી રહ્યું છે)
|
||||
- [x] ફંક્શન્સ
|
||||
|
||||

|
||||
|
||||
## દસ્તાવેજીકરણ
|
||||
|
||||
|
||||
+5
-2
@@ -1,7 +1,8 @@
|
||||
<div style="direction: rtl;">
|
||||
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -16,7 +17,9 @@
|
||||
- [x] ממשקי API אוטומטיים
|
||||
- [x] דשבורד
|
||||
- [x] אחסון
|
||||
- [ ] פונקציות (בקרוב)
|
||||
- [x] פונקציות
|
||||
|
||||

|
||||
|
||||
## תיעוד
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] स्वतः जनरेट किए गए API
|
||||
- [x] डैशबोर्ड
|
||||
- [x] भंडारण
|
||||
- [ ] कार्यों (जल्द आ रहा है)
|
||||
- [x] कार्यों
|
||||
|
||||

|
||||
|
||||
## प्रलेखन
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@ A [Supabase](https://supabase.com) egy nyílt forráskódú Firebase alternatív
|
||||
- [x] Automatikusan generált API-ok
|
||||
- [x] Kezelőfelület
|
||||
- [x] Tárhely
|
||||
- [ ] Funkciók (hamarosan)
|
||||
- [x] Funkciók
|
||||
|
||||

|
||||
|
||||
## Dokumentáció
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] API-API yang dibuat otomatis
|
||||
- [x] Dasbor
|
||||
- [x] Penyimpanan
|
||||
- [ ] Fungsi-fungsi (akan datang)
|
||||
- [x] Fungsi-fungsi
|
||||
|
||||

|
||||
|
||||
## Dokumentasi
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] API generate automaticamente
|
||||
- [x] Cruscotto
|
||||
- [x] Archiviazione
|
||||
- [ ] Funzioni (in arrivo)
|
||||
- [x] Funzioni
|
||||
|
||||

|
||||
|
||||
## Documentazione
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] API を自動生成
|
||||
- [x] ダッシュボード
|
||||
- [x] ストレージ
|
||||
- [ ] 関数 (近日公開)
|
||||
- [x] 関数
|
||||
|
||||

|
||||
|
||||
## ドキュメンテーション
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] 자동 생성 API
|
||||
- [x] 대시 보드
|
||||
- [x] 스토리지
|
||||
- [ ] 함수 (출시 예정)
|
||||
- [x] 함수
|
||||
|
||||

|
||||
|
||||
## 문서
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] API dihasilkan secara automatik
|
||||
- [x] Papan Pemuka
|
||||
- [x] Storan
|
||||
- [ ] Fungsi-fungsi (akan datang)
|
||||
- [x] Fungsi-fungsi
|
||||
|
||||

|
||||
|
||||
## Dokumentasi
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] Autogenererte APIer
|
||||
- [x] Dashboard
|
||||
- [x] Lagring
|
||||
- [ ] Funksjoner (kommer snart)
|
||||
- [x] Funksjoner
|
||||
|
||||

|
||||
|
||||
## Dokumentasjon
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] स्वतः गर्न सकिने API हरु
|
||||
- [x] ड्यासबोर्ड
|
||||
- [x] भण्डारण
|
||||
- [ ] प्रकार्यहरू (चाँडै आउँदैछ)
|
||||
- [x] प्रकार्यहरू
|
||||
|
||||

|
||||
|
||||
## कागजात
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] Automatisch gegenereerde APIs
|
||||
- [x] Dashboard
|
||||
- [x] Opslag
|
||||
- [ ] Functions (nog niet beschikbaar)
|
||||
- [x] Functions
|
||||
|
||||

|
||||
|
||||
## Documentatie
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] Automatycznie generowany interfejs API
|
||||
- [x] Panel zarządzania
|
||||
- [x] Przechowywanie danych
|
||||
- [ ] Funkcje (dostępne w krótce)
|
||||
- [x] Funkcje
|
||||
|
||||

|
||||
|
||||
## Dokumentacja
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] APIs geradas automaticamente
|
||||
- [x] Painel de controle
|
||||
- [x] Armazenamento
|
||||
- [ ] Funções (em breve)
|
||||
- [x] Funções
|
||||
|
||||

|
||||
|
||||
## Documentação
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] APIs geradas automaticamente
|
||||
- [x] Painel/Dashboard
|
||||
- [x] Armazenamento
|
||||
- [ ] Funções (em breve)
|
||||
- [x] Funções
|
||||
|
||||

|
||||
|
||||
## Documentação
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] API-uri generate automat
|
||||
- [x] Panou de control
|
||||
- [x] Depozitare
|
||||
- [ ] Funcții (în curând)
|
||||
- [x] Funcții
|
||||
|
||||

|
||||
|
||||
## Documentație
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] Автоматически генерируемые API
|
||||
- [x] Панель управления
|
||||
- [x] Хранилище
|
||||
- [ ] Функции (скоро)
|
||||
- [x] Функции
|
||||
|
||||

|
||||
|
||||
## Документация
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] Auto-generated APIs
|
||||
- [x] Dashboard
|
||||
- [x] Storage
|
||||
- [ ] Functions (coming soon)
|
||||
- [x] Functions
|
||||
|
||||

|
||||
|
||||
## ප්රලේඛනය
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] API të gjeneruara automatikisht
|
||||
- [x] Pult
|
||||
- [x] Magazin / Hapsirë
|
||||
- [ ] Funksionet (së shpejti)
|
||||
- [x] Funksionet
|
||||
|
||||

|
||||
|
||||
## Dokumentimi
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] Auto-genererade APIer
|
||||
- [x] Kontrollpanel
|
||||
- [x] Lagring
|
||||
- [ ] Funktioner (kommer snart)
|
||||
- [x] Funktioner
|
||||
|
||||

|
||||
|
||||
## Dokumentation
|
||||
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] การสร้าง API แบบอัตโนมัติ
|
||||
- [x] หน้าสรุปข้อมูลแดชบอร์ด (Dashboard)
|
||||
- [x] ที่เก็บข้อมูล (Storage)
|
||||
- [ ] ฟังก์ชัน (กำลังจะมาในอนาคต)
|
||||
- [x] ฟังก์ชัน
|
||||
|
||||

|
||||
|
||||
## เอกสารข้อมูล
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] Otomatik oluşturulan API'ler
|
||||
- [x] Gösterge Paneli
|
||||
- [x] Depolama
|
||||
- [ ] Fonksiyonlar (Çok yakında)
|
||||
- [x] Fonksiyonlar
|
||||
|
||||

|
||||
|
||||
## Dokümantasyon
|
||||
|
||||
|
||||
+5
-2
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] Автоматично згенероване API
|
||||
- [x] Панель керування
|
||||
- [x] Сховище
|
||||
- [ ] Функції (незабаром)
|
||||
- [x] Функції
|
||||
|
||||

|
||||
|
||||
## Документація
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -20,6 +21,8 @@
|
||||
- [x] 文件存储。[文档](https://supabase.com/docs/guides/storage)
|
||||
- [x] 仪表盘。
|
||||
|
||||

|
||||
|
||||
## 文档
|
||||
|
||||
完整的文档,请访问 [supabase.com/docs](https://supabase.com/docs)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<p align="center">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/web/static/supabase-light-rounded-corner-background.svg"/>
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--light.svg?sanitize=true#gh-light-mode-only">
|
||||
<img width="300" src="https://raw.githubusercontent.com/supabase/supabase/master/apps/www/public/images/supabase-logo-wordmark--dark.svg?sanitize=true#gh-dark-mode-only">
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -14,7 +15,9 @@
|
||||
- [x] 自動產生的 API
|
||||
- [x] 儀表版
|
||||
- [x] Storage
|
||||
- [ ] Functions(即將推出)
|
||||
- [x] Functions
|
||||
|
||||

|
||||
|
||||
## 說明文件
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { FC } from 'react'
|
||||
import { PostgresTable, PostgresPolicy } from '@supabase/postgres-meta'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
import { useStore } from 'hooks'
|
||||
|
||||
import PolicyTableRowHeader from './PolicyTableRowHeader'
|
||||
import PolicyRow from './PolicyRow'
|
||||
@@ -13,40 +15,44 @@ interface Props {
|
||||
onSelectDeletePolicy: (policy: PostgresPolicy) => void
|
||||
}
|
||||
|
||||
const PolicyTableRow: FC<Props> = ({
|
||||
table,
|
||||
onSelectToggleRLS = () => {},
|
||||
onSelectCreatePolicy = () => {},
|
||||
onSelectEditPolicy = () => {},
|
||||
onSelectDeletePolicy = () => {},
|
||||
}) => {
|
||||
return (
|
||||
<Panel
|
||||
title={
|
||||
<PolicyTableRowHeader
|
||||
table={table}
|
||||
onSelectToggleRLS={onSelectToggleRLS}
|
||||
onSelectCreatePolicy={onSelectCreatePolicy}
|
||||
/>
|
||||
}
|
||||
>
|
||||
{table.policies.length === 0 && (
|
||||
<div className="p-4 px-6">
|
||||
<p className="text-scale-900 text-sm">No policies created yet</p>
|
||||
</div>
|
||||
)}
|
||||
const PolicyTableRow: FC<Props> = observer(
|
||||
({
|
||||
table,
|
||||
onSelectToggleRLS = () => {},
|
||||
onSelectCreatePolicy = () => {},
|
||||
onSelectEditPolicy = () => {},
|
||||
onSelectDeletePolicy = () => {},
|
||||
}) => {
|
||||
const { meta } = useStore()
|
||||
const policies = meta.policies.list((x: PostgresPolicy) => x.table === table.name)
|
||||
return (
|
||||
<Panel
|
||||
title={
|
||||
<PolicyTableRowHeader
|
||||
table={table}
|
||||
onSelectToggleRLS={onSelectToggleRLS}
|
||||
onSelectCreatePolicy={onSelectCreatePolicy}
|
||||
/>
|
||||
}
|
||||
>
|
||||
{policies.length === 0 && (
|
||||
<div className="p-4 px-6">
|
||||
<p className="text-scale-900 text-sm">No policies created yet</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* @ts-ignore */}
|
||||
{table.policies.map((policy) => (
|
||||
<PolicyRow
|
||||
key={policy.id}
|
||||
policy={policy}
|
||||
onSelectEditPolicy={onSelectEditPolicy}
|
||||
onSelectDeletePolicy={onSelectDeletePolicy}
|
||||
/>
|
||||
))}
|
||||
</Panel>
|
||||
)
|
||||
}
|
||||
{/* @ts-ignore */}
|
||||
{policies.map((policy) => (
|
||||
<PolicyRow
|
||||
key={policy.id}
|
||||
policy={policy}
|
||||
onSelectEditPolicy={onSelectEditPolicy}
|
||||
onSelectDeletePolicy={onSelectDeletePolicy}
|
||||
/>
|
||||
))}
|
||||
</Panel>
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
export default PolicyTableRow
|
||||
@@ -19,5 +19,5 @@ import dayjs from 'dayjs'
|
||||
* Instead of using the default parsing. We should use CustomParseFormat.
|
||||
*/
|
||||
export const getDateFromIsoString = (dateString?: string): dayjs.Dayjs | undefined => {
|
||||
return dateString ? dayjs(dateString, 'YYYY-MM-DD HH:mm:ss.SSSSSSZZ') : undefined
|
||||
return dateString ? dayjs(dateString, 'YYYY-MM-DD HH:mm:ss.SSSZZ') : undefined
|
||||
}
|
||||
@@ -7,15 +7,19 @@ import { ChargeableProduct, PaygStats, ProductFeature } from './PAYGUsage.types'
|
||||
import { deriveProductCost } from './PAYGUsage.utils'
|
||||
import { chargeableProducts } from './PAYGUsage.constants'
|
||||
import { DATE_FORMAT } from 'lib/constants'
|
||||
import { Dictionary } from '@supabase/grid'
|
||||
|
||||
interface Props {
|
||||
paygStats: PaygStats
|
||||
paygStats: PaygStats,
|
||||
dateRange: {
|
||||
period_start: {date: string, time_period: string}
|
||||
period_end: {date: string, time_period: string}
|
||||
interval: string
|
||||
}
|
||||
}
|
||||
|
||||
const PAYGUsage: FC<Props> = ({ paygStats }) => {
|
||||
const startDate = dayjs().utc().startOf('month').format(DATE_FORMAT)
|
||||
const endDate = dayjs().utc().endOf('month').format(DATE_FORMAT)
|
||||
const PAYGUsage: FC<Props> = ({ paygStats, dateRange }) => {
|
||||
const startDate = dateRange.period_start.date ?? dayjs().utc().startOf('month').format(DATE_FORMAT)
|
||||
const endDate = dateRange.period_end.date ?? dayjs().utc().endOf('month').format(DATE_FORMAT)
|
||||
|
||||
return (
|
||||
<div className="flex flex-col">
|
||||
|
||||
@@ -2,7 +2,7 @@ import dayjs from 'dayjs'
|
||||
import { FC, useState } from 'react'
|
||||
import { useRouter } from 'next/router'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
import { Badge, Button, Typography, IconDownload } from '@supabase/ui'
|
||||
import { Badge, Button, IconDownload } from '@supabase/ui'
|
||||
|
||||
import { useStore } from 'hooks'
|
||||
import { API_URL } from 'lib/constants'
|
||||
@@ -79,19 +79,15 @@ const BackupItem: FC<Props> = ({ projectRef, backup, index }) => {
|
||||
const generateSideButtons = (backup: any) => {
|
||||
if (backup.status === 'COMPLETED')
|
||||
return (
|
||||
<div className="space-x-1 flex">
|
||||
<div className="flex space-x-4">
|
||||
{backup.data.canRestore && (
|
||||
<Button
|
||||
type="secondary"
|
||||
disabled={isRestoring || isDownloading}
|
||||
onClick={onRestoreClick}
|
||||
>
|
||||
<Button type="default" disabled={isRestoring || isDownloading} onClick={onRestoreClick}>
|
||||
Restore
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<Button
|
||||
type="secondary"
|
||||
type="default"
|
||||
disabled={isRestoring || isDownloading}
|
||||
onClick={() => download(backup)}
|
||||
loading={isDownloading}
|
||||
@@ -106,11 +102,15 @@ const BackupItem: FC<Props> = ({ projectRef, backup, index }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={`flex justify-between px-6 h-12 ${index ? 'border-t dark:border-dark' : ''}`}>
|
||||
<Typography.Text className="self-center">
|
||||
<div
|
||||
className={`flex h-12 items-center justify-between px-6 ${
|
||||
index ? 'dark:border-dark border-t' : ''
|
||||
}`}
|
||||
>
|
||||
<p className="text-scale-1200 text-sm ">
|
||||
{dayjs(backup.inserted_at).format('DD MMM YYYY HH:mm:ss')}
|
||||
</Typography.Text>
|
||||
<div className="self-center">{generateSideButtons(backup)}</div>
|
||||
</p>
|
||||
<div className="">{generateSideButtons(backup)}</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
import { FC, useState, useEffect } from 'react'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
import { Input, Typography } from '@supabase/ui'
|
||||
|
||||
import { useStore } from 'hooks'
|
||||
import { pluckObjectFields } from 'lib/helpers'
|
||||
import Loading from 'components/ui/Loading'
|
||||
import Panel from 'components/to-be-cleaned/Panel'
|
||||
import PgBouncerConfig from './PgBouncerConfig'
|
||||
import DownloadCertificate from './DownloadCertificate'
|
||||
|
||||
import Divider from 'components/ui/Divider'
|
||||
|
||||
interface Props {}
|
||||
|
||||
const BouncerSettings: FC<Props> = ({}) => {
|
||||
const { ui, app } = useStore()
|
||||
const projectRef = ui.selectedProject?.ref ?? 'default'
|
||||
|
||||
const [isLoading, setIsLoading] = useState<boolean>(true)
|
||||
const [poolingConfiguration, setPoolingConfiguration] = useState<any>()
|
||||
|
||||
useEffect(() => {
|
||||
fetchPoolingConfiguration()
|
||||
}, [])
|
||||
|
||||
const fetchPoolingConfiguration = async () => {
|
||||
setIsLoading(true)
|
||||
const response = await app.database.getPoolingConfiguration(projectRef)
|
||||
setPoolingConfiguration(response)
|
||||
setIsLoading(false)
|
||||
}
|
||||
|
||||
if (isLoading) return <Loading />
|
||||
if (poolingConfiguration.error) {
|
||||
return (
|
||||
<div className="p-4">
|
||||
<Typography.Text type="secondary">Error loading pooling configuration</Typography.Text>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const { project } = poolingConfiguration
|
||||
|
||||
// for older projects
|
||||
if (!project.pgbouncer_enabled && project.pool_mode == null)
|
||||
return (
|
||||
<div className="h-full flex flex-col items-center justify-center p-6 sm:w-full md:w-3/4 mx-auto text-center">
|
||||
<Typography.Title level={3}>
|
||||
Connection Pooling is not available for this project
|
||||
</Typography.Title>
|
||||
<Typography.Text>Start a new project to enable this feature.</Typography.Text>
|
||||
</div>
|
||||
)
|
||||
const formModel = project
|
||||
const DB_FIELDS = ['db_host', 'db_name', 'db_port', 'db_user', 'inserted_at']
|
||||
const connectionInfo = pluckObjectFields(formModel, DB_FIELDS)
|
||||
const BOUNCER_FIELDS = [
|
||||
'default_pool_size',
|
||||
'ignore_startup_parameters',
|
||||
'pool_mode',
|
||||
'pgbouncer_enabled',
|
||||
]
|
||||
const bouncerInfo = pluckObjectFields(formModel, BOUNCER_FIELDS)
|
||||
return (
|
||||
<article className="p-4 max-w-4xl">
|
||||
<div className="mb-8">
|
||||
<PgBouncerConfig config={bouncerInfo} projectRef={projectRef} />
|
||||
</div>
|
||||
|
||||
<Panel
|
||||
title={[
|
||||
<Typography.Title key="panel-title" level={5} className="mb-0">
|
||||
Connection info
|
||||
</Typography.Title>,
|
||||
]}
|
||||
>
|
||||
<div className="">
|
||||
<Panel.Content>
|
||||
<Input
|
||||
label="Host"
|
||||
layout="horizontal"
|
||||
descriptionText="This is the url of your database"
|
||||
readOnly
|
||||
copy
|
||||
disabled
|
||||
value={connectionInfo.db_host}
|
||||
/>
|
||||
</Panel.Content>
|
||||
<Divider light />
|
||||
<Panel.Content>
|
||||
<Input
|
||||
label="Database name"
|
||||
style={{
|
||||
width: '50%',
|
||||
}}
|
||||
readOnly
|
||||
disabled
|
||||
value={connectionInfo.db_name}
|
||||
layout="horizontal"
|
||||
/>
|
||||
</Panel.Content>
|
||||
<Divider light />
|
||||
<Panel.Content>
|
||||
<Input
|
||||
label="Port"
|
||||
style={{
|
||||
width: '50%',
|
||||
}}
|
||||
readOnly
|
||||
disabled
|
||||
value={connectionInfo.db_port}
|
||||
layout="horizontal"
|
||||
/>
|
||||
</Panel.Content>
|
||||
<Divider light />
|
||||
<Panel.Content>
|
||||
<Input
|
||||
label="User"
|
||||
style={{
|
||||
width: '50%',
|
||||
}}
|
||||
readOnly
|
||||
disabled
|
||||
value={connectionInfo.db_user}
|
||||
layout="horizontal"
|
||||
/>
|
||||
</Panel.Content>
|
||||
<Divider light />
|
||||
<Panel.Content>
|
||||
<Input
|
||||
label="Password"
|
||||
disabled
|
||||
readOnly
|
||||
value={'[The password you provided when you created this project]'}
|
||||
layout="horizontal"
|
||||
/>
|
||||
</Panel.Content>
|
||||
<Divider light />
|
||||
<Panel.Content>
|
||||
<DownloadCertificate createdAt={connectionInfo.inserted_at} />
|
||||
</Panel.Content>
|
||||
</div>
|
||||
</Panel>
|
||||
|
||||
<section>
|
||||
<Panel
|
||||
title={[
|
||||
<Typography.Title key="panel-title" level={5} className="mb-0">
|
||||
Connection string
|
||||
</Typography.Title>,
|
||||
]}
|
||||
>
|
||||
<Panel.Content className="space-y-4">
|
||||
<Input
|
||||
copy
|
||||
readOnly
|
||||
disabled
|
||||
layout="vertical"
|
||||
value={
|
||||
`postgres://${connectionInfo.db_user}:[YOUR-PASSWORD]@` +
|
||||
`${connectionInfo.db_host}:${connectionInfo.db_port}` +
|
||||
`/${connectionInfo.db_name}`
|
||||
}
|
||||
/>
|
||||
|
||||
<div className="flex space-x-3">
|
||||
<p className="text-sm text-scale-1100">
|
||||
<p>
|
||||
Learn more about connection strings{' '}
|
||||
<Typography.Link href="https://supabase.com/docs/reference/postgres/connection-strings">
|
||||
with Supabase
|
||||
</Typography.Link>{' '}
|
||||
and{' '}
|
||||
<Typography.Link href="https://www.postgresql.org/docs/current/libpq-connect.html">
|
||||
read the official documentation
|
||||
</Typography.Link>
|
||||
.
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
</Panel.Content>
|
||||
</Panel>
|
||||
</section>
|
||||
</article>
|
||||
)
|
||||
}
|
||||
|
||||
export default observer(BouncerSettings)
|
||||
@@ -0,0 +1,218 @@
|
||||
import { FC, useState, useEffect } from 'react'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
import { Typography } from '@supabase/ui'
|
||||
import { useStore } from 'hooks'
|
||||
import { pluckObjectFields } from 'lib/helpers'
|
||||
import Loading from 'components/ui/Loading'
|
||||
import Panel from 'components/to-be-cleaned/Panel'
|
||||
import Divider from 'components/ui/Divider'
|
||||
import { AutoField } from 'uniforms-bootstrap4'
|
||||
import { API_URL } from 'lib/constants'
|
||||
import { patch } from 'lib/common/fetch'
|
||||
import ToggleField from 'components/to-be-cleaned/forms/ToggleField'
|
||||
import SchemaFormPanel from 'components/to-be-cleaned/forms/SchemaFormPanel'
|
||||
import { Input } from '@supabase/ui'
|
||||
|
||||
interface Props {}
|
||||
|
||||
const ConnectionPooling: FC<Props> = () => {
|
||||
const { ui, app } = useStore()
|
||||
const projectRef = ui.selectedProject?.ref ?? 'default'
|
||||
|
||||
const [isLoading, setIsLoading] = useState<boolean>(true)
|
||||
const [poolingConfiguration, setPoolingConfiguration] = useState<any>()
|
||||
|
||||
useEffect(() => {
|
||||
fetchPoolingConfiguration()
|
||||
}, [])
|
||||
|
||||
const fetchPoolingConfiguration = async () => {
|
||||
setIsLoading(true)
|
||||
const response = await app.database.getPoolingConfiguration(projectRef)
|
||||
setPoolingConfiguration(response)
|
||||
setIsLoading(false)
|
||||
}
|
||||
|
||||
if (isLoading) return <Loading />
|
||||
if (poolingConfiguration.error) {
|
||||
return (
|
||||
<div className="p-4">
|
||||
<Typography.Text type="secondary">Error loading pooling configuration</Typography.Text>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const { project } = poolingConfiguration
|
||||
|
||||
// for older projects
|
||||
if (!project.pgbouncer_enabled && project.pool_mode == null)
|
||||
return (
|
||||
<Panel
|
||||
title={
|
||||
<Typography.Title key="panel-title" level={5} className="mb-0">
|
||||
Connection Pooling is not available for this project
|
||||
</Typography.Title>
|
||||
}
|
||||
>
|
||||
<Panel.Content>
|
||||
<Typography.Text type="secondary">Please start a new project to enable this feature.</Typography.Text>
|
||||
</Panel.Content>
|
||||
</Panel>
|
||||
)
|
||||
const formModel = project
|
||||
const DB_FIELDS = ['db_host', 'db_name', 'db_port', 'db_user', 'inserted_at']
|
||||
const connectionInfo = pluckObjectFields(formModel, DB_FIELDS)
|
||||
const BOUNCER_FIELDS = [
|
||||
'default_pool_size',
|
||||
'ignore_startup_parameters',
|
||||
'pool_mode',
|
||||
'pgbouncer_enabled',
|
||||
]
|
||||
const bouncerInfo = pluckObjectFields(formModel, BOUNCER_FIELDS)
|
||||
|
||||
return (
|
||||
<PgbouncerConfig projectRef={projectRef} bouncerInfo={bouncerInfo} connectionInfo={connectionInfo} />
|
||||
)
|
||||
}
|
||||
|
||||
export default observer(ConnectionPooling)
|
||||
|
||||
interface ConfigProps {
|
||||
projectRef: string
|
||||
bouncerInfo: {default_pool_size: number, ignore_startup_parameters: 'string', pool_mode: string, pgbouncer_enabled: boolean},
|
||||
connectionInfo: {db_host: string, db_name: string, db_port: number, db_user: string, inserted_at: string}
|
||||
}
|
||||
|
||||
export const PgbouncerConfig: FC<ConfigProps> = observer(({ projectRef, bouncerInfo, connectionInfo }) => {
|
||||
|
||||
const { ui } = useStore()
|
||||
|
||||
const [updates, setUpdates] = useState<any>({
|
||||
pgbouncer_enabled: bouncerInfo.pgbouncer_enabled,
|
||||
pool_mode: bouncerInfo.pool_mode || 'transaction',
|
||||
default_pool_size: bouncerInfo.default_pool_size || '',
|
||||
ignore_startup_parameters: bouncerInfo.ignore_startup_parameters || '',
|
||||
})
|
||||
|
||||
const updateConfig = async (updatedConfig: any) => {
|
||||
try {
|
||||
const response = await patch(`${API_URL}/props/pooling/${projectRef}/config`, updatedConfig)
|
||||
if (response.error) {
|
||||
throw response.error
|
||||
} else {
|
||||
setUpdates({ ...response.project })
|
||||
ui.setNotification({ category: 'success', message: 'Successfully saved settings' })
|
||||
}
|
||||
} catch (error: any) {
|
||||
ui.setNotification({
|
||||
category: 'error',
|
||||
message: `Failed to update config: ${error.message}`,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const formSchema = {
|
||||
properties: {
|
||||
pgbouncer_enabled: {
|
||||
title: 'Enabled',
|
||||
type: 'boolean',
|
||||
help: 'Activates / deactivates Connection Pooling.',
|
||||
},
|
||||
pool_mode: {
|
||||
title: 'Pool Mode',
|
||||
type: 'string',
|
||||
options: [
|
||||
{
|
||||
label: 'Transaction',
|
||||
value: 'transaction',
|
||||
},
|
||||
{
|
||||
label: 'Session',
|
||||
value: 'session',
|
||||
},
|
||||
{
|
||||
label: 'Statement',
|
||||
value: 'statement',
|
||||
},
|
||||
],
|
||||
},
|
||||
ignore_startup_parameters: {
|
||||
title: 'Ignore Startup Parameters',
|
||||
type: 'string',
|
||||
readOnly: true,
|
||||
help: 'Defaults are either blank or "extra_float_digits"',
|
||||
},
|
||||
},
|
||||
required: ['pool_mode'],
|
||||
type: 'object',
|
||||
}
|
||||
|
||||
return (
|
||||
<SchemaFormPanel
|
||||
title="Connection Pooling"
|
||||
schema={formSchema}
|
||||
model={updates}
|
||||
submitLabel="Save"
|
||||
cancelLabel="Cancel"
|
||||
onChangeModel={(model: any) => setUpdates(model)}
|
||||
onSubmit={(model: any) => updateConfig(model)}
|
||||
onReset={() => setUpdates(bouncerInfo)}
|
||||
>
|
||||
<div className="space-y-6 py-4">
|
||||
<ToggleField name="pgbouncer_enabled" />
|
||||
|
||||
<Divider light />
|
||||
|
||||
{updates.pgbouncer_enabled && (
|
||||
<>
|
||||
<AutoField
|
||||
name="pool_mode"
|
||||
showInlineError
|
||||
errorMessage="You must select one of the three options"
|
||||
/>
|
||||
<div className="flex !mt-1" style={{ marginLeft: 'calc(33% + 0.5rem)' }}>
|
||||
<p className="text-sm text-scale-900">
|
||||
Specify when a connection can be returned to the pool. To find out the most
|
||||
suitable mode for your use case,{' '}
|
||||
<a
|
||||
className="text-green-900"
|
||||
target="_blank"
|
||||
href="https://supabase.com/docs/guides/database/connecting-to-postgres#connection-pool"
|
||||
>
|
||||
click here
|
||||
</a>
|
||||
.
|
||||
</p>
|
||||
</div>
|
||||
<Divider light />
|
||||
<AutoField name="ignore_startup_parameters" />
|
||||
</>
|
||||
)}
|
||||
<Divider light />
|
||||
<Input
|
||||
className="input-mono"
|
||||
layout="horizontal"
|
||||
readOnly
|
||||
copy
|
||||
disabled
|
||||
value={connectionInfo.db_port}
|
||||
label="Port"
|
||||
/>
|
||||
<Divider light />
|
||||
<Input
|
||||
className="input-mono"
|
||||
layout="vertical"
|
||||
readOnly
|
||||
copy
|
||||
disabled
|
||||
label="Connection string"
|
||||
value={
|
||||
`postgres://${connectionInfo.db_user}:[YOUR-PASSWORD]@` +
|
||||
`${connectionInfo.db_host}:${connectionInfo.db_port}` +
|
||||
`/${connectionInfo.db_name}`
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</SchemaFormPanel>
|
||||
)
|
||||
})
|
||||
@@ -1,34 +0,0 @@
|
||||
import { FC } from 'react'
|
||||
import { Button, IconDownload } from '@supabase/ui'
|
||||
|
||||
interface Props {
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
const DownloadCertificate: FC<Props> = ({ createdAt }) => {
|
||||
// instances before 3 : 08 pm sgt 29th April don't have certs installed
|
||||
if (new Date(createdAt) < new Date('2021-04-30')) return null
|
||||
const env = process.env.NEXT_PUBLIC_ENVIRONMENT === 'prod' ? 'prod' : 'staging'
|
||||
|
||||
return (
|
||||
<div className="w-full flex items-center justify-between">
|
||||
<div>
|
||||
<p className="block">SSL Connection</p>
|
||||
<div>
|
||||
<p className="text-sm text-scale-1100">
|
||||
Use this certificate to prevent snooping and man-in-the-middle attacks.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<Button type="default" icon={<IconDownload />}>
|
||||
<a
|
||||
href={`https://supabase-downloads.s3-ap-southeast-1.amazonaws.com/${env}/ssl/${env}-ca-2021.crt`}
|
||||
>
|
||||
Download Certificate
|
||||
</a>
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default DownloadCertificate
|
||||
@@ -1,134 +0,0 @@
|
||||
import { FC, useState } from 'react'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
import { Typography } from '@supabase/ui'
|
||||
import Divider from 'components/ui/Divider'
|
||||
import { AutoField } from 'uniforms-bootstrap4'
|
||||
|
||||
import { useStore } from 'hooks'
|
||||
import { API_URL } from 'lib/constants'
|
||||
import { patch } from 'lib/common/fetch'
|
||||
import ToggleField from 'components/to-be-cleaned/forms/ToggleField'
|
||||
import SchemaFormPanel from 'components/to-be-cleaned/forms/SchemaFormPanel'
|
||||
|
||||
interface Props {
|
||||
projectRef: string
|
||||
config: any
|
||||
}
|
||||
|
||||
const PgbouncerConfig: FC<Props> = ({ projectRef, config }) => {
|
||||
const { ui } = useStore()
|
||||
|
||||
const [updates, setUpdates] = useState<any>({
|
||||
// pgbouncer_status: config.pgbouncer_status,
|
||||
pgbouncer_enabled: config.pgbouncer_enabled,
|
||||
pool_mode: config.pool_mode || 'transaction',
|
||||
default_pool_size: config.default_pool_size || '',
|
||||
ignore_startup_parameters: config.ignore_startup_parameters || '',
|
||||
})
|
||||
|
||||
const updateConfig = async (updatedConfig: any) => {
|
||||
try {
|
||||
const response = await patch(`${API_URL}/props/pooling/${projectRef}/config`, updatedConfig)
|
||||
if (response.error) {
|
||||
throw response.error
|
||||
} else {
|
||||
setUpdates({ ...response.project })
|
||||
ui.setNotification({ category: 'success', message: 'Successfully saved settings' })
|
||||
}
|
||||
} catch (error: any) {
|
||||
ui.setNotification({
|
||||
category: 'error',
|
||||
message: `Failed to update config: ${error.message}`,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const formSchema = {
|
||||
properties: {
|
||||
pgbouncer_enabled: {
|
||||
title: 'Enabled',
|
||||
type: 'boolean',
|
||||
help: 'Activates/ deactivates Connection Pooling.',
|
||||
},
|
||||
pool_mode: {
|
||||
title: 'Pool Mode',
|
||||
type: 'string',
|
||||
options: [
|
||||
{
|
||||
label: 'Transaction',
|
||||
value: 'transaction',
|
||||
},
|
||||
{
|
||||
label: 'Session',
|
||||
value: 'session',
|
||||
},
|
||||
{
|
||||
label: 'Statement',
|
||||
value: 'statement',
|
||||
},
|
||||
],
|
||||
},
|
||||
ignore_startup_parameters: {
|
||||
title: 'Ignore Startup Parameters',
|
||||
type: 'string',
|
||||
readOnly: true,
|
||||
help: 'Defaults are either blank or "extra_float_digits"',
|
||||
},
|
||||
},
|
||||
required: ['pool_mode'],
|
||||
type: 'object',
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<SchemaFormPanel
|
||||
title="Configuration"
|
||||
schema={formSchema}
|
||||
model={updates}
|
||||
submitLabel="Save"
|
||||
cancelLabel="Cancel"
|
||||
onChangeModel={(model: any) => setUpdates(model)}
|
||||
onSubmit={(model: any) => updateConfig(model)}
|
||||
onReset={() => setUpdates(config)}
|
||||
>
|
||||
<div className="space-y-6 py-4">
|
||||
<ToggleField name="pgbouncer_enabled" />
|
||||
<Divider light />
|
||||
{/* <AutoField name="pgbouncer_status" disabled={true} /> */}
|
||||
{updates.pgbouncer_enabled && (
|
||||
<>
|
||||
<AutoField
|
||||
name="pool_mode"
|
||||
showInlineError
|
||||
errorMessage="You must select one of the three options"
|
||||
/>
|
||||
<div className="flex !mt-1" style={{ marginLeft: 'calc(33% + 0.5rem)' }}>
|
||||
<p className="text-sm text-scale-900">
|
||||
Specify when a connection can be returned to the pool. To find out the most
|
||||
suitable mode for your use case,{' '}
|
||||
<a
|
||||
className="text-green-900"
|
||||
target="_blank"
|
||||
href="https://supabase.com/docs/guides/database/connecting-to-postgres#connection-pool"
|
||||
>
|
||||
click here
|
||||
</a>
|
||||
.
|
||||
</p>
|
||||
</div>
|
||||
<Divider light />
|
||||
{/* <AutoField
|
||||
name="default_pool_size"
|
||||
showInlineError
|
||||
errorMessage="Value must be within 1 and 20"
|
||||
/> */}
|
||||
<AutoField name="ignore_startup_parameters" />
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</SchemaFormPanel>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default observer(PgbouncerConfig)
|
||||
@@ -11,7 +11,7 @@ import PublicationsTables from './Publications/PublicationsTables'
|
||||
|
||||
import BackupsList from './Backups/BackupsList'
|
||||
|
||||
import BouncerSettings from './Pooling/BouncerSettings'
|
||||
import ConnectionPooling from './Pooling/ConnectionPooling'
|
||||
|
||||
import CreateTrigger from './Triggers/CreateTrigger'
|
||||
import DeleteTrigger from './Triggers/DeleteTrigger'
|
||||
@@ -28,7 +28,7 @@ export {
|
||||
PublicationsList,
|
||||
PublicationsTables,
|
||||
BackupsList,
|
||||
BouncerSettings,
|
||||
ConnectionPooling,
|
||||
CreateTrigger,
|
||||
DeleteTrigger,
|
||||
CreateFunction,
|
||||
|
||||
@@ -415,8 +415,7 @@ insert into public.countries (name,iso2,iso3,local_name,continent) values
|
||||
description: 'Build a basic slack clone with Row Level Security.',
|
||||
sql: `
|
||||
--
|
||||
-- For use with https://github.com/supabase/supabase/tree/master/examples/nextjs-slack-clone
|
||||
--
|
||||
-- For use with https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone
|
||||
|
||||
-- Custom types
|
||||
create type public.app_permission as enum ('channels.delete', 'messages.delete');
|
||||
@@ -614,10 +613,10 @@ values
|
||||
sql: `
|
||||
--
|
||||
-- For use with:
|
||||
-- https://github.com/supabase/supabase/tree/master/examples/nextjs-todo-list or
|
||||
-- https://github.com/supabase/supabase/tree/master/examples/react-todo-list or
|
||||
-- https://github.com/supabase/supabase/tree/master/examples/sveltejs-todo-list or
|
||||
-- https://github.com/supabase/supabase/tree/master/examples/vue3-ts-todo-list
|
||||
-- https://github.com/supabase/supabase/tree/master/examples/todo-list/nextjs-todo-list or
|
||||
-- https://github.com/supabase/supabase/tree/master/examples/todo-list/react-todo-list or
|
||||
-- https://github.com/supabase/supabase/tree/master/examples/todo-list/sveltejs-todo-list or
|
||||
-- https://github.com/supabase/supabase/tree/master/examples/todo-list/vue3-ts-todo-list
|
||||
--
|
||||
|
||||
create table todos (
|
||||
|
||||
+1
@@ -55,6 +55,7 @@ const ColumnDefaultValue: FC<Props> = ({
|
||||
description="Can either be a literal or an expression (e.g uuid_generate_v4())"
|
||||
placeholder="NULL"
|
||||
value={columnFields?.defaultValue ?? ''}
|
||||
format={columnFields?.format}
|
||||
suggestionsHeader="Suggested expressions"
|
||||
suggestions={suggestions}
|
||||
onChange={(event: any) => onUpdateField({ defaultValue: event.target.value })}
|
||||
|
||||
+2
-3
@@ -54,7 +54,7 @@ const ColumnEditor: FC<Props> = ({
|
||||
}) => {
|
||||
const isNewRecord = isUndefined(column)
|
||||
const hasPrimaryKey = (selectedTable?.primary_keys ?? []).length > 0
|
||||
const foreignKey = column ? getColumnForeignKey(column, selectedTable) : undefined
|
||||
const originalForeignKey = column ? getColumnForeignKey(column, selectedTable) : undefined
|
||||
|
||||
const [errors, setErrors] = useState<Dictionary<any>>({})
|
||||
const [columnFields, setColumnFields] = useState<ColumnField>()
|
||||
@@ -184,7 +184,7 @@ const ColumnEditor: FC<Props> = ({
|
||||
)}
|
||||
<ColumnForeignKey
|
||||
column={columnFields}
|
||||
originalForeignKey={foreignKey}
|
||||
originalForeignKey={originalForeignKey}
|
||||
onSelectEditRelation={() => setIsEditingRelation(true)}
|
||||
onSelectRemoveRelation={() => onUpdateField({ foreignKey: undefined })}
|
||||
/>
|
||||
@@ -263,7 +263,6 @@ const ColumnEditor: FC<Props> = ({
|
||||
<ForeignKeySelector
|
||||
tables={tables}
|
||||
column={columnFields}
|
||||
foreignKey={foreignKey}
|
||||
visible={isEditingRelation}
|
||||
closePanel={() => setIsEditingRelation(false)}
|
||||
saveChanges={saveColumnForeignKey}
|
||||
|
||||
+17
-15
@@ -49,6 +49,7 @@ export const generateColumnFieldFromPostgresColumn = (
|
||||
table: PostgresTable
|
||||
): ColumnField => {
|
||||
const { primary_keys } = table
|
||||
// @ts-ignore
|
||||
const primaryKeyColumns = primary_keys.map((key) => key.name)
|
||||
const foreignKey = getColumnForeignKey(column, table)
|
||||
const isArray = column?.data_type === 'ARRAY'
|
||||
@@ -194,19 +195,20 @@ const formatArrayToPostgresArray = (arrayString: string) => {
|
||||
return arrayString.replaceAll('[', '{').replaceAll(']', '}')
|
||||
}
|
||||
|
||||
const unescapeLiteral = (value: string) => {
|
||||
export const unescapeLiteral = (value: string) => {
|
||||
if (!value) return value
|
||||
|
||||
const splits = value.split("'::")
|
||||
if (splits.length <= 1) return value
|
||||
|
||||
// Handle timezones differently
|
||||
if (value.includes('timezone')) {
|
||||
const timezoneSplits = splits[0].split('(')
|
||||
const timezone = timezoneSplits[1].slice(1)
|
||||
const expressionSplits = splits[1].split(',')
|
||||
const expression = expressionSplits[1].slice(0, expressionSplits[1].length - 1)
|
||||
return `(${expression} at time zone '${timezone}')`
|
||||
// Handle timezones
|
||||
if (value.toLowerCase().includes('time zone')) {
|
||||
return `${splits[0].toLowerCase()}')`
|
||||
}
|
||||
|
||||
// Handle json
|
||||
if (value.toLowerCase().includes('json')) {
|
||||
return splits[0].slice(1)
|
||||
}
|
||||
|
||||
let temp = splits[0].slice(1).replace("'{", '{')
|
||||
@@ -216,21 +218,21 @@ const unescapeLiteral = (value: string) => {
|
||||
value.endsWith('bigint[]') ||
|
||||
value.endsWith('smallint[]')
|
||||
) {
|
||||
temp = temp.replaceAll('{', '[')
|
||||
temp = temp.replaceAll('}', ']')
|
||||
temp = temp.replace(/{/g, '[')
|
||||
temp = temp.replace(/}/g, ']')
|
||||
return temp
|
||||
} else {
|
||||
const matches = temp.match(/\{([^{}]+)\}/g)
|
||||
if (matches) {
|
||||
const array = [...matches]
|
||||
array.forEach((x) => {
|
||||
let _x = x.replaceAll('{', '{"')
|
||||
_x = _x.replaceAll('}', '"}')
|
||||
_x = _x.replaceAll(',', '","')
|
||||
let _x = x.replace(/{/g, '{"')
|
||||
_x = _x.replace(/}/g, '"}')
|
||||
_x = _x.replace(/,/g, '","')
|
||||
temp = temp.replace(x, _x)
|
||||
})
|
||||
temp = temp.replaceAll('{', '[')
|
||||
temp = temp.replaceAll('}', ']')
|
||||
temp = temp.replace(/{/g, '[')
|
||||
temp = temp.replace(/}/g, ']')
|
||||
}
|
||||
return temp
|
||||
}
|
||||
|
||||
+8
-6
@@ -88,7 +88,7 @@ const ColumnForeignKeyInformation: FC<{
|
||||
block
|
||||
icon={<IconLink />}
|
||||
title={
|
||||
<div className="flex items-center justify-between text-scale-900">
|
||||
<div className="text-scale-900 flex items-center justify-between">
|
||||
<div className="space-y-2">
|
||||
<span>This column has the following foreign key relation:</span>
|
||||
<div className="flex items-center space-x-2">
|
||||
@@ -125,14 +125,16 @@ const ColumnForeignKeyAdded: FC<{
|
||||
block
|
||||
icon={<IconLink />}
|
||||
title={
|
||||
<div className="flex items-center justify-between text-scale-1100">
|
||||
<div className="text-scale-1100 flex items-center justify-between">
|
||||
<div className="space-y-2">
|
||||
<span>
|
||||
The following foreign key relation will be{' '}
|
||||
<span className="text-green-900">added</span>:
|
||||
<span className="text-brand-900">added</span>:
|
||||
</span>
|
||||
<div className="flex items-center space-x-2 text-scale-1200">
|
||||
<span className="text-code max-w-xs truncate">{columnName}</span>
|
||||
<div className="text-scale-1200 flex items-center space-x-2">
|
||||
<span className={`${columnName.length > 0 ? 'text-code' : ''} max-w-xs truncate`}>
|
||||
{columnName || 'This column'}
|
||||
</span>
|
||||
<IconArrowRight size={14} strokeWidth={2} />
|
||||
<span className="text-code max-w-xs truncate">
|
||||
{foreignKey?.target_table_schema}.{foreignKey?.target_table_name}.
|
||||
@@ -213,7 +215,7 @@ const ColumnForeignKeyUpdated: FC<{
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="space-y-2">
|
||||
<Typography.Text>
|
||||
The foreign key relation will be <span className="text-green-500">updated</span> as
|
||||
The foreign key relation will be <span className="text-brand-900">updated</span> as
|
||||
such:
|
||||
</Typography.Text>
|
||||
<div className="flex items-start space-x-2">
|
||||
|
||||
+39
-19
@@ -1,7 +1,7 @@
|
||||
import React, { FC } from 'react'
|
||||
import { IconCalendar, IconType, IconHash, Listbox, IconToggleRight } from '@supabase/ui'
|
||||
import { IconCalendar, IconType, IconHash, Listbox, IconToggleRight, Input } from '@supabase/ui'
|
||||
import { PostgresType } from '@supabase/postgres-meta'
|
||||
import { POSTGRES_DATA_TYPE_OPTIONS } from '../SidePanelEditor.constants'
|
||||
import { POSTGRES_DATA_TYPES, POSTGRES_DATA_TYPE_OPTIONS } from '../SidePanelEditor.constants'
|
||||
import { PostgresDataTypeOption } from '../SidePanelEditor.types'
|
||||
|
||||
interface Props {
|
||||
@@ -25,6 +25,27 @@ const ColumnType: FC<Props> = ({
|
||||
showLabel = true,
|
||||
onOptionSelect = () => {},
|
||||
}) => {
|
||||
// @ts-ignore
|
||||
const availableTypes = POSTGRES_DATA_TYPES.concat(enumTypes.map((type) => type.name))
|
||||
const isAvailableType = value ? availableTypes.includes(value) : true
|
||||
|
||||
if (!isAvailableType) {
|
||||
return (
|
||||
<Input
|
||||
readOnly
|
||||
disabled
|
||||
label={showLabel ? 'Type' : ''}
|
||||
layout="horizontal"
|
||||
value={value}
|
||||
descriptionText={
|
||||
showLabel
|
||||
? 'Custom non-native psql data types cannot currently be changed to a different data type via Supabase Studio'
|
||||
: ''
|
||||
}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
const inferIcon = (type: string) => {
|
||||
switch (type) {
|
||||
case 'number':
|
||||
@@ -62,18 +83,29 @@ const ColumnType: FC<Props> = ({
|
||||
---
|
||||
</Listbox.Option>
|
||||
|
||||
<Listbox.Option disabled key="header-1" value="header-1" label="header-1">
|
||||
User-defined Enumerated Types
|
||||
</Listbox.Option>
|
||||
{/*
|
||||
Weird issue with Listbox here
|
||||
1. Can't do render conditionally (&&) within Listbox hence why using Fragment
|
||||
2. Can't wrap these 2 components within a Fragment conditional (enumTypes.length)
|
||||
as selecting the enumType option will not render it in the Listbox component
|
||||
*/}
|
||||
{enumTypes.length > 0 ? (
|
||||
<Listbox.Option disabled key="header-1" value="header-1" label="header-1">
|
||||
User-defined Enumerated Types
|
||||
</Listbox.Option>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
|
||||
{enumTypes.length > 0 ? (
|
||||
// @ts-ignore
|
||||
enumTypes.map((enumType: PostgresType) => (
|
||||
<Listbox.Option
|
||||
key={enumType.name}
|
||||
value={enumType.name}
|
||||
label={enumType.name}
|
||||
addOnBefore={() => {
|
||||
return <div className="mx-1 w-2 h-2 rounded-full bg-scale-1200" />
|
||||
return <div className="bg-scale-1200 mx-1 h-2 w-2 rounded-full" />
|
||||
}}
|
||||
>
|
||||
<div className="flex items-center space-x-4">
|
||||
@@ -82,19 +114,7 @@ const ColumnType: FC<Props> = ({
|
||||
</Listbox.Option>
|
||||
))
|
||||
) : (
|
||||
<Listbox.Option
|
||||
disabled
|
||||
key="no-enums"
|
||||
value="no-enums"
|
||||
label="no-enums"
|
||||
addOnBefore={() => {
|
||||
return <div className="mx-1 w-2 h-2 rounded-full bg-gray-500" />
|
||||
}}
|
||||
>
|
||||
<div className="flex items-center space-x-4">
|
||||
<p>No enumerated types available</p>
|
||||
</div>
|
||||
</Listbox.Option>
|
||||
<></>
|
||||
)}
|
||||
|
||||
<Listbox.Option disabled value="header-2" label="header-2">
|
||||
|
||||
+4
-4
@@ -21,6 +21,7 @@ interface Props {
|
||||
disabled?: boolean
|
||||
className?: string
|
||||
value: string
|
||||
format?: string
|
||||
suggestionsHeader?: string
|
||||
suggestionsWidth?: number
|
||||
suggestions: Suggestion[]
|
||||
@@ -37,8 +38,7 @@ const InputWithSuggestions: FC<Props> = ({
|
||||
disabled = false,
|
||||
className = '',
|
||||
value = '',
|
||||
suggestionsHeader = 'Suggestions',
|
||||
suggestionsWidth,
|
||||
format,
|
||||
suggestions = [],
|
||||
onChange = () => {},
|
||||
onSelectSuggestion = () => {},
|
||||
@@ -75,7 +75,7 @@ const InputWithSuggestions: FC<Props> = ({
|
||||
size={size}
|
||||
layout={layout}
|
||||
disabled={disabled}
|
||||
className={className}
|
||||
className={`${className} ${format?.includes('json') ? 'input-mono' : ''}`}
|
||||
type="text"
|
||||
value={value}
|
||||
onChange={onInputChange}
|
||||
@@ -95,7 +95,7 @@ const InputWithSuggestions: FC<Props> = ({
|
||||
onClick={() => onSelectSuggestion(suggestion)}
|
||||
>
|
||||
<div className="text-sm">{suggestion.name}</div>
|
||||
<div className="text-xs text-scale-900">{suggestion.description}</div>
|
||||
<div className="text-scale-900 text-xs">{suggestion.description}</div>
|
||||
</Dropdown.Item>
|
||||
))}
|
||||
</>
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@ import React, { FC, useEffect, useState } from 'react'
|
||||
import { get, find, isEmpty, sortBy } from 'lodash'
|
||||
import { Dictionary } from '@supabase/grid'
|
||||
import { SidePanel, Typography, Listbox, IconHelpCircle } from '@supabase/ui'
|
||||
import { PostgresTable, PostgresColumn, PostgresRelationship } from '@supabase/postgres-meta'
|
||||
import { PostgresTable, PostgresColumn } from '@supabase/postgres-meta'
|
||||
|
||||
import ActionBar from '../ActionBar'
|
||||
import { ForeignKey } from './ForeignKeySelector.types'
|
||||
@@ -12,7 +12,6 @@ import InformationBox from 'components/ui/InformationBox'
|
||||
interface Props {
|
||||
tables: PostgresTable[]
|
||||
column: ColumnField
|
||||
foreignKey?: PostgresRelationship
|
||||
metadata?: any
|
||||
visible: boolean
|
||||
closePanel: () => void
|
||||
@@ -22,7 +21,6 @@ interface Props {
|
||||
const ForeignKeySelector: FC<Props> = ({
|
||||
tables = [] as PostgresTable[],
|
||||
column,
|
||||
foreignKey,
|
||||
visible = false,
|
||||
closePanel,
|
||||
saveChanges,
|
||||
@@ -30,6 +28,7 @@ const ForeignKeySelector: FC<Props> = ({
|
||||
const [errors, setErrors] = useState<any>({})
|
||||
const [selectedForeignKey, setSelectedForeignKey] = useState<ForeignKey>()
|
||||
|
||||
const foreignKey = column?.foreignKey
|
||||
const selectedTable: PostgresTable | undefined = find(tables, {
|
||||
name: selectedForeignKey?.table,
|
||||
schema: selectedForeignKey?.schema,
|
||||
@@ -146,6 +145,7 @@ const ForeignKeySelector: FC<Props> = ({
|
||||
<Listbox.Option key="empty" value="" label="---">
|
||||
---
|
||||
</Listbox.Option>
|
||||
{/* @ts-ignore */}
|
||||
{sortBy(tables, ['schema']).map((table: PostgresTable) => {
|
||||
return (
|
||||
<Listbox.Option key={table.id} value={table.id} label={table.name}>
|
||||
|
||||
@@ -112,6 +112,7 @@ const InputField: FC<Props> = ({
|
||||
actions={
|
||||
<Button
|
||||
type="default"
|
||||
htmlType="button"
|
||||
onClick={() => onEditJson({ column: field.name, jsonString: field.value })}
|
||||
icon={<IconLink />}
|
||||
>
|
||||
|
||||
+2
-2
@@ -64,7 +64,7 @@ const JsonEdit: FC<JsonEditProps> = ({ column, jsonString, visible, closePanel,
|
||||
onClickOption={onToggleClick}
|
||||
/>
|
||||
|
||||
<div className="flex-auto flex flex-col mt-4 space-y-2">
|
||||
<div className="mt-4 flex flex-auto flex-col space-y-2">
|
||||
{view === 'edit' ? (
|
||||
<Editor column={column} value={jsonStr} onChange={onInputChange} />
|
||||
) : (
|
||||
@@ -89,7 +89,7 @@ const Editor: FC<EditorProps> = ({ column, value, onChange }) => {
|
||||
<>
|
||||
<Typography.Title level={4}>Edit JSON Field: {column}</Typography.Title>
|
||||
|
||||
<div className="w-full h-96 flex-grow border dark:border-dark">
|
||||
<div className="dark:border-dark h-96 w-full flex-grow border">
|
||||
<JsonEditor onInputChange={onChange} defaultValue={value} />
|
||||
</div>
|
||||
</>
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
import { FC, useState, useEffect } from 'react'
|
||||
import { FC, useState } from 'react'
|
||||
import { find, isUndefined } from 'lodash'
|
||||
import { Query, Dictionary } from '@supabase/grid'
|
||||
import { PostgresRelationship, PostgresTable, PostgresColumn } from '@supabase/postgres-meta'
|
||||
import { Modal } from '@supabase/ui'
|
||||
import {
|
||||
PostgresRelationship,
|
||||
PostgresTable,
|
||||
PostgresColumn,
|
||||
PostgresType,
|
||||
} from '@supabase/postgres-meta'
|
||||
|
||||
import { useStore } from 'hooks'
|
||||
import { RowEditor, ColumnEditor, TableEditor } from '.'
|
||||
@@ -9,8 +15,6 @@ import { ImportContent } from './TableEditor/TableEditor.types'
|
||||
import { ColumnField, CreateColumnPayload, UpdateColumnPayload } from './SidePanelEditor.types'
|
||||
import ConfirmationModal from 'components/ui/ConfirmationModal'
|
||||
|
||||
import { Modal } from '@supabase/ui'
|
||||
|
||||
interface Props {
|
||||
selectedSchema: string
|
||||
selectedTable?: PostgresTable
|
||||
@@ -49,7 +53,9 @@ const SidePanelEditor: FC<Props> = ({
|
||||
const [isClosingPanel, setIsClosingPanel] = useState<boolean>(false)
|
||||
|
||||
const tables = meta.tables.list()
|
||||
const enumTypes = meta.types.list()
|
||||
const enumTypes = meta.types.list(
|
||||
(type: PostgresType) => !meta.excludedSchemas.includes(type.schema)
|
||||
)
|
||||
|
||||
const saveRow = async (
|
||||
payload: any,
|
||||
|
||||
+11
-12
@@ -142,8 +142,8 @@ const ColumnManagement: FC<Props> = ({
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="w-full table-editor-columns space-y-4">
|
||||
<div className="w-full flex items-center justify-between">
|
||||
<div className="table-editor-columns w-full space-y-4">
|
||||
<div className="flex w-full items-center justify-between">
|
||||
<Typography.Title level={5}>Columns</Typography.Title>
|
||||
{isNewRecord && (
|
||||
<>
|
||||
@@ -194,21 +194,21 @@ const ColumnManagement: FC<Props> = ({
|
||||
|
||||
<div className="space-y-2">
|
||||
{/* Headers */}
|
||||
<div className="w-full flex px-3">
|
||||
<div className="flex w-full px-3">
|
||||
{/* Drag handle */}
|
||||
{isNewRecord && <div className="w-[5%]" />}
|
||||
<div className="w-[25%]">
|
||||
<h5 className="text-xs text-scale-900">Name</h5>
|
||||
<h5 className="text-scale-900 text-xs">Name</h5>
|
||||
</div>
|
||||
<div className="w-[25%]">
|
||||
<h5 className="text-xs text-scale-900">Type</h5>
|
||||
<h5 className="text-scale-900 text-xs">Type</h5>
|
||||
</div>
|
||||
<div className={`${isNewRecord ? 'w-[25%]' : 'w-[30%]'} flex items-center space-x-2`}>
|
||||
<h5 className="text-xs text-scale-900">Default Value</h5>
|
||||
<h5 className="text-scale-900 text-xs">Default Value</h5>
|
||||
|
||||
<Tooltip.Root delayDuration={0}>
|
||||
<Tooltip.Trigger>
|
||||
<h5 className="text-xs text-scale-900">
|
||||
<h5 className="text-scale-900 text-xs">
|
||||
<IconHelpCircle size={15} strokeWidth={1.5} />
|
||||
</h5>
|
||||
</Tooltip.Trigger>
|
||||
@@ -216,8 +216,8 @@ const ColumnManagement: FC<Props> = ({
|
||||
<Tooltip.Arrow className="radix-tooltip-arrow" />
|
||||
<div
|
||||
className={[
|
||||
'bg-scale-100 shadow py-1 px-2 rounded leading-none', // background
|
||||
'border border-scale-200 ', //border
|
||||
'bg-scale-100 rounded py-1 px-2 leading-none shadow', // background
|
||||
'border-scale-200 border ', //border
|
||||
].join(' ')}
|
||||
>
|
||||
<span className="text-scale-1200 text-xs">
|
||||
@@ -228,7 +228,7 @@ const ColumnManagement: FC<Props> = ({
|
||||
</Tooltip.Root>
|
||||
</div>
|
||||
<div className="w-[10%]">
|
||||
<h5 className="text-xs text-scale-900">Primary</h5>
|
||||
<h5 className="text-scale-900 text-xs">Primary</h5>
|
||||
</div>
|
||||
{/* Empty space */}
|
||||
<div className={`${hasImportContent ? 'w-[10%]' : 'w-0'}`} />
|
||||
@@ -244,7 +244,7 @@ const ColumnManagement: FC<Props> = ({
|
||||
{(droppableProvided: DroppableProvided) => (
|
||||
<div
|
||||
ref={droppableProvided.innerRef}
|
||||
className={`space-y-2 bg-gray-400 rounded-md px-3 py-2 ${
|
||||
className={`space-y-2 rounded-md bg-gray-400 px-3 py-2 ${
|
||||
isNewRecord ? '' : '-mx-3'
|
||||
}`}
|
||||
>
|
||||
@@ -321,7 +321,6 @@ const ColumnManagement: FC<Props> = ({
|
||||
<ForeignKeySelector
|
||||
tables={tables}
|
||||
column={selectedColumnToEditRelation as ColumnField}
|
||||
foreignKey={selectedColumnToEditRelation?.foreignKey}
|
||||
visible={!isUndefined(selectedColumnToEditRelation)}
|
||||
closePanel={() => setSelectedColumnToEditRelation(undefined)}
|
||||
saveChanges={saveColumnForeignKey}
|
||||
|
||||
@@ -100,7 +100,7 @@ const AccountLayout = ({ children, title, breadcrumbs }: any) => {
|
||||
key: 'ext-guides',
|
||||
icon: '/img/book-open.svg',
|
||||
label: 'API Reference',
|
||||
href: 'https://supabase.com/docs/reference/javascript/supabase-client',
|
||||
href: 'https://supabase.com/docs/guides/api',
|
||||
external: true,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -2,7 +2,7 @@ import { FC, ReactNode, useState, useEffect } from 'react'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
import { useStore } from 'hooks'
|
||||
import { useStore, withAuth } from 'hooks'
|
||||
import BaseLayout from '../'
|
||||
import Error from 'components/ui/Error'
|
||||
import ProductMenu from 'components/ui/ProductMenu'
|
||||
@@ -25,6 +25,7 @@ const AuthLayout: FC<Props> = ({ title, children }) => {
|
||||
|
||||
useEffect(() => {
|
||||
if (ui.selectedProject) {
|
||||
meta.policies.load()
|
||||
meta.tables.load()
|
||||
meta.roles.load()
|
||||
}
|
||||
@@ -58,4 +59,4 @@ const AuthLayout: FC<Props> = ({ title, children }) => {
|
||||
)
|
||||
}
|
||||
|
||||
export default observer(AuthLayout)
|
||||
export default withAuth(observer(AuthLayout))
|
||||
@@ -15,7 +15,7 @@ export const generateAuthMenu = (ref: string): ProductMenuGroup[] => {
|
||||
? [
|
||||
{
|
||||
name: 'Logs',
|
||||
key: 'logs',
|
||||
key: 'auth-logs',
|
||||
url: `/project/${ref}/auth/auth-logs`,
|
||||
items: [],
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Link from 'next/link'
|
||||
import { FC, ReactNode } from 'react'
|
||||
import { useStore } from 'hooks'
|
||||
import { useStore, withAuth } from 'hooks'
|
||||
import { Button, IconX } from '@supabase/ui'
|
||||
|
||||
import { headWithTimeout } from 'lib/common/fetch'
|
||||
@@ -15,19 +15,19 @@ const BillingLayout: FC<Props> = ({ children }) => {
|
||||
|
||||
return (
|
||||
<BaseLayout hideHeader hideIconBar>
|
||||
<div className="flex flex-col h-full w-full">
|
||||
<div className="flex h-full w-full flex-col">
|
||||
{/* Header */}
|
||||
<div className="py-4 border-b dark:border-dark flex items-center space-x-3 px-5">
|
||||
<div className="dark:border-dark flex items-center space-x-3 border-b py-4 px-5">
|
||||
<Link href={`/project/${ui.selectedProject?.ref}/settings/billing`} passHref>
|
||||
<a className="transition-colors text-scale-900 hover:text-scale-1200">
|
||||
<a className="text-scale-900 hover:text-scale-1200 transition-colors">
|
||||
<IconX size={16} strokeWidth={1.5} />
|
||||
</a>
|
||||
</Link>
|
||||
<div className="flex items-center space-x-6">
|
||||
<h1 className="text-base text-scale-1200">Customize your plan</h1>
|
||||
<div className="h-6 w-px bg-scale-600"></div>
|
||||
<div className="flex space-x-3 items-center">
|
||||
<p className="text-sm text-scale-1100">{ui.selectedOrganization?.name}</p>
|
||||
<h1 className="text-scale-1200 text-base">Customize your plan</h1>
|
||||
<div className="bg-scale-600 h-6 w-px"></div>
|
||||
<div className="flex items-center space-x-3">
|
||||
<p className="text-scale-1100 text-sm">{ui.selectedOrganization?.name}</p>
|
||||
<span className="text-scale-800">
|
||||
<svg
|
||||
viewBox="0 0 24 24"
|
||||
@@ -43,7 +43,7 @@ const BillingLayout: FC<Props> = ({ children }) => {
|
||||
<path d="M16 3.549L7.12 20.600"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<p className="text-sm text-scale-1100">{ui.selectedProject?.name}</p>
|
||||
<p className="text-scale-1100 text-sm">{ui.selectedProject?.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,4 +55,4 @@ const BillingLayout: FC<Props> = ({ children }) => {
|
||||
)
|
||||
}
|
||||
|
||||
export default BillingLayout
|
||||
export default withAuth(BillingLayout)
|
||||
@@ -26,7 +26,12 @@ export const generateDatabaseMenu = (project?: Project): ProductMenuGroup[] => {
|
||||
url: `/project/${ref}/database/replication`,
|
||||
items: [],
|
||||
},
|
||||
|
||||
{
|
||||
name: 'Backups',
|
||||
key: 'backups',
|
||||
url: `/project/${ref}/database/backups`,
|
||||
items: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
...(IS_PLATFORM
|
||||
@@ -50,27 +55,6 @@ export const generateDatabaseMenu = (project?: Project): ProductMenuGroup[] => {
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(IS_PLATFORM
|
||||
? [
|
||||
{
|
||||
title: 'Settings',
|
||||
items: [
|
||||
{
|
||||
name: 'Backups',
|
||||
key: 'backups',
|
||||
url: `/project/${ref}/database/backups`,
|
||||
items: [],
|
||||
},
|
||||
{
|
||||
name: 'Connection Pooling',
|
||||
key: 'pooling',
|
||||
url: `/project/${ref}/database/pooling`,
|
||||
items: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(IS_PLATFORM
|
||||
? [
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ReactElement, useEffect } from 'react'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
import { useStore } from 'hooks'
|
||||
import { useStore, withAuth } from 'hooks'
|
||||
import Error from 'components/ui/Error'
|
||||
import ProductMenu from 'components/ui/ProductMenu'
|
||||
import ProjectLayout from 'components/layouts/ProjectLayout/ProjectLayout'
|
||||
@@ -54,4 +54,4 @@ function DocsLayout({ title, children }: { title: string; children: ReactElement
|
||||
)
|
||||
}
|
||||
|
||||
export default observer(DocsLayout)
|
||||
export default withAuth(observer(DocsLayout))
|
||||
@@ -72,7 +72,7 @@ export const generateDocsMenu = (
|
||||
{
|
||||
name: 'API Reference',
|
||||
key: 'api-reference',
|
||||
url: `https://supabase.com/docs/reference/javascript/supabase-client`,
|
||||
url: `https://supabase.com/docs/guides/api`,
|
||||
icon: <IconBookOpen size={14} strokeWidth={2} />,
|
||||
items: [],
|
||||
isExternal: true,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Link from 'next/link'
|
||||
import { FC, useEffect, useRef } from 'react'
|
||||
import { FC, useEffect, useRef, useState } from 'react'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
import { Badge, IconLoader, IconMonitor, IconServer } from '@supabase/ui'
|
||||
import { Badge, Button, IconLoader, IconMonitor, IconServer, Modal } from '@supabase/ui'
|
||||
|
||||
import { Project } from 'types'
|
||||
import { useStore } from 'hooks'
|
||||
@@ -16,6 +16,15 @@ const ProjectRestartingState: FC<Props> = ({ project }) => {
|
||||
const { app } = useStore()
|
||||
const checkProjectConnectionIntervalRef = useRef<number>()
|
||||
|
||||
const [showHelperButton, setShowHelperButton] = useState(false)
|
||||
const [showModal, setShowModal] = useState(false)
|
||||
|
||||
// Show helper button if still connecting after 30 seconds
|
||||
useEffect(() => {
|
||||
const timer = setTimeout(() => setShowHelperButton(true), 30000)
|
||||
return () => clearTimeout(timer)
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
if (!project.restUrl || !project.internalApiKey) return
|
||||
|
||||
@@ -38,39 +47,102 @@ const ProjectRestartingState: FC<Props> = ({ project }) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="max-w-7xl mx-auto w-full my-16 space-y-16">
|
||||
<div className="mx-6 space-y-16">
|
||||
<div className="flex flex-col space-y-4 lg:space-y-0 lg:flex-row lg:space-x-6 lg:items-center">
|
||||
<h1 className="text-3xl">{project.name}</h1>
|
||||
<div>
|
||||
<Badge color="brand">
|
||||
<div className="flex items-center gap-2">
|
||||
<IconLoader className="animate-spin" size={12} />
|
||||
<span>Connecting to project</span>
|
||||
<>
|
||||
<div className="mx-auto my-16 w-full max-w-7xl space-y-16">
|
||||
<div className="mx-6 space-y-16">
|
||||
<div className="flex flex-col space-y-4 lg:flex-row lg:items-center lg:space-y-0 lg:space-x-6">
|
||||
<h1 className="text-3xl">{project.name}</h1>
|
||||
<div>
|
||||
<Badge color="brand">
|
||||
<div className="flex items-center gap-2">
|
||||
<IconLoader className="animate-spin" size={12} />
|
||||
<span>Connecting to project</span>
|
||||
</div>
|
||||
</Badge>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-scale-300 border-scale-400 flex h-[500px] items-center justify-center rounded border p-8">
|
||||
<div className="w-[420px] space-y-4">
|
||||
<div className="mx-auto flex max-w-[300px] items-center justify-center space-x-4 lg:space-x-8">
|
||||
<IconMonitor className="text-scale-1100" size={50} strokeWidth={1.5} />
|
||||
<ShimmerLine active />
|
||||
<IconServer className="text-scale-1100" size={50} strokeWidth={1.5} />
|
||||
</div>
|
||||
|
||||
<div className="space-y-1">
|
||||
<p className="text-center">Connecting to {project.name}</p>
|
||||
<p
|
||||
className="text-scale-1100 cursor-pointer text-center text-sm opacity-60 transition hover:opacity-100"
|
||||
onClick={() => setShowModal(true)}
|
||||
>
|
||||
This may take a few minutes
|
||||
</p>
|
||||
</div>
|
||||
</Badge>
|
||||
</div>
|
||||
</div>
|
||||
<div className="rounded bg-scale-300 border border-scale-400 p-8 flex items-center justify-center h-[500px]">
|
||||
<div className="w-[420px] space-y-4">
|
||||
<div className="max-w-[300px] mx-auto flex items-center justify-center space-x-4 lg:space-x-8">
|
||||
<IconMonitor className="text-scale-1100" size={50} strokeWidth={1.5} />
|
||||
<ShimmerLine active />
|
||||
<IconServer className="text-scale-1100" size={50} strokeWidth={1.5} />
|
||||
|
||||
<div className="flex flex-col items-center">
|
||||
{showHelperButton && (
|
||||
<Button type="default" onClick={() => setShowModal(true)}>
|
||||
Still connecting?
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-center">Connecting to {project.name}</p>
|
||||
<p className="text-center text-scale-1100 text-sm">
|
||||
This may take a few minutes, but if your dashboard hasn't connected within 2 minutes,
|
||||
you can open a support ticket{' '}
|
||||
<span className="text-green-1000">
|
||||
<Link href={`/support/new?ref=${project.ref}`}>here</Link>
|
||||
</span>
|
||||
.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Modal
|
||||
visible={showModal}
|
||||
onCancel={() => setShowModal(false)}
|
||||
header={
|
||||
<div className="flex items-baseline gap-2">
|
||||
<h5 className="text-scale-1200 text-sm">Checking the health of your database</h5>
|
||||
</div>
|
||||
}
|
||||
size="medium"
|
||||
hideFooter
|
||||
closable
|
||||
>
|
||||
<div className="py-4">
|
||||
<Modal.Content>
|
||||
<div className="space-y-4">
|
||||
<p className="text-scale-1200 text-sm">
|
||||
Your project might be facing resource constraints and hence is having trouble
|
||||
connecting. You can verify this by checking your{' '}
|
||||
<span className="text-brand-1000">
|
||||
<Link href={`/project/${project.ref}/settings/database`}>
|
||||
<a>database's health</a>
|
||||
</Link>
|
||||
</span>{' '}
|
||||
or your remaining daily disk IO budget via a{' '}
|
||||
<span className="text-brand-1000">
|
||||
<Link href={`/project/${project.ref}/reports`}>
|
||||
<a>customizable project report</a>
|
||||
</Link>
|
||||
</span>
|
||||
.
|
||||
</p>
|
||||
<p className="text-scale-1200 text-sm">
|
||||
If your project is facing resource constraints, you can{' '}
|
||||
<span className="text-brand-1000">
|
||||
<Link href={`/project/${project.ref}/reports`}>
|
||||
<a>upgrade</a>
|
||||
</Link>
|
||||
</span>{' '}
|
||||
your project's subscription to a Pro for access to larger compute sizes.
|
||||
</p>
|
||||
<p className="text-scale-1200 text-sm">
|
||||
However, if your project still fails to connect thereafter, you can open a support
|
||||
ticket{' '}
|
||||
<span className="text-brand-1000">
|
||||
<Link href={`/support/new?ref=${project.ref}`}>here</Link>
|
||||
</span>
|
||||
.
|
||||
</p>
|
||||
</div>
|
||||
</Modal.Content>
|
||||
</div>
|
||||
</Modal>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +92,12 @@ const ContentWrapper: FC<ContentWrapperProps> = observer(({ isLoading, children
|
||||
const { ui } = useStore()
|
||||
const router = useRouter()
|
||||
const requiresDbConnection: boolean = router.pathname !== '/project/[ref]/settings/general'
|
||||
const requiresPostgrestConnection =
|
||||
[
|
||||
'/project/[ref]/settings/general',
|
||||
'/project/[ref]/reports',
|
||||
'/project/[ref]/settings/database',
|
||||
].includes(router.pathname) === false
|
||||
const isProjectBuilding = [PROJECT_STATUS.COMING_UP, PROJECT_STATUS.RESTORING].includes(
|
||||
ui.selectedProject?.status ?? ''
|
||||
)
|
||||
@@ -101,7 +107,7 @@ const ContentWrapper: FC<ContentWrapperProps> = observer(({ isLoading, children
|
||||
<>
|
||||
{isLoading || ui.selectedProject === undefined ? (
|
||||
<Connecting />
|
||||
) : requiresDbConnection && isProjectOffline ? (
|
||||
) : requiresPostgrestConnection && isProjectOffline ? (
|
||||
<ConnectingState project={ui.selectedProject} />
|
||||
) : requiresDbConnection && isProjectBuilding ? (
|
||||
<BuildingState project={ui.selectedProject} />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { FC, ReactNode } from 'react'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useStore } from 'hooks'
|
||||
import { useStore, withAuth } from 'hooks'
|
||||
import { generateSettingsMenu } from './SettingsMenu.utils'
|
||||
|
||||
import BaseLayout from '../'
|
||||
@@ -34,4 +34,4 @@ const SettingsLayout: FC<Props> = ({ title, children }) => {
|
||||
)
|
||||
}
|
||||
|
||||
export default observer(SettingsLayout)
|
||||
export default withAuth(observer(SettingsLayout))
|
||||
Loaded 100 of 154 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user