diff --git a/README.md b/README.md
index 4106b5d4..289fb9e5 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,13 @@
# Drift
-
-Drift is a self-hostable Gist clone. It's also a major work-in-progress, but is (almost, no database yet) completely functional.
+Drift is a self-hostable Gist clone. It's also a major work-in-progress, but is (almost, no database yet) completely functional.
You can try a demo at https://drift.maxleiter.com. The demo is built on master but has no database, so files and accounts can be wiped at any time.
-If you want to contribute, need support, or want to stay updated, you can join the IRC channel at #drift on irc.libera.chat or [reach me on twitter](https://twitter.com/Max_Leiter). If you don't have an IRC client yet, you can use a webclient [here](https://demo.thelounge.chat/#/connect?join=%23drift&nick=drift-user&realname=Drift%20User).
+If you want to contribute, need support, or want to stay updated, you can join the IRC channel at #drift on irc.libera.chat or [reach me on twitter](https://twitter.com/Max_Leiter). If you don't have an IRC client yet, you can use a webclient [here](https://demo.thelounge.chat/#/connect?join=%23drift&nick=drift-user&realname=Drift%20User).
## Current status
+
Drit is a major work in progress. Below is a (rough) list of completed and envisioned features. If you want to help address any of them, please let me know regardless of your experience and I'll be happy to assist.
- [x] creating and sharing private, public, unlisted posts
@@ -17,7 +17,7 @@ Drit is a major work in progress. Below is a (rough) list of completed and envis
- [x] responsive UI
- [x] user auth
- [ ] SSO via HTTP header (Issue: [#11](https://github.com/MaxLeiter/Drift/issues/11))
-- [ ] downloading files (individually and entire posts)
+- [x] downloading files (individually and entire posts)
- [ ] password protected posts
- [ ] sqlite database (should be very easy to set-up; the ORM is just currently set to memory for ease of development)
- [ ] non-node backend
diff --git a/client/components/Link.tsx b/client/components/Link.tsx
index 5bc8772f..97a285ec 100644
--- a/client/components/Link.tsx
+++ b/client/components/Link.tsx
@@ -3,9 +3,8 @@ import { useRouter } from "next/router";
const Link = (props: LinkProps) => {
const { basePath } = useRouter();
- const propHrefWithoutLeadingSlash = props.href && props.href.startsWith("/") ? props.href.substr(1) : props.href;
+ const propHrefWithoutLeadingSlash = props.href && props.href.startsWith("/") ? props.href.substring(1) : props.href;
const href = basePath ? `${basePath}/${propHrefWithoutLeadingSlash}` : props.href;
- (href)
return
}
diff --git a/client/components/auth/index.tsx b/client/components/auth/index.tsx
index 9040c56b..d56f991b 100644
--- a/client/components/auth/index.tsx
+++ b/client/components/auth/index.tsx
@@ -35,7 +35,7 @@ const Auth = ({ page }: { page: "signup" | "signin" }) => {
e.preventDefault()
if (signingIn) {
try {
- const resp = await fetch('/api/auth/signin', reqOpts)
+ const resp = await fetch('/server-api/auth/signin', reqOpts)
const json = await resp.json()
handleJson(json)
} catch (err: any) {
@@ -43,7 +43,7 @@ const Auth = ({ page }: { page: "signup" | "signin" }) => {
}
} else {
try {
- const resp = await fetch('/api/auth/signup', reqOpts)
+ const resp = await fetch('/server-api/auth/signup', reqOpts)
const json = await resp.json()
handleJson(json)
} catch (err: any) {
diff --git a/client/components/document/document.module.css b/client/components/document/document.module.css
index 60f6e539..a062e667 100644
--- a/client/components/document/document.module.css
+++ b/client/components/document/document.module.css
@@ -29,3 +29,13 @@
.textarea {
height: 100%;
}
+
+.actionWrapper {
+ position: relative;
+ z-index: 1;
+}
+
+.actionWrapper .actions {
+ position: absolute;
+ right: 0;
+}
diff --git a/client/components/formatting-icons/index.tsx b/client/components/document/formatting-icons/index.tsx
similarity index 97%
rename from client/components/formatting-icons/index.tsx
rename to client/components/document/formatting-icons/index.tsx
index a7c91787..d5e15fe1 100644
--- a/client/components/formatting-icons/index.tsx
+++ b/client/components/document/formatting-icons/index.tsx
@@ -1,6 +1,7 @@
import { ButtonGroup, Button } from "@geist-ui/core"
import { Bold, Italic, Link, Image as ImageIcon } from '@geist-ui/icons'
import { RefObject, useCallback, useMemo } from "react"
+import styles from '../document.module.css'
// TODO: clean up
@@ -122,11 +123,8 @@ const FormattingIcons = ({ textareaRef, setText }: { textareaRef?: RefObject
-
+