diff --git a/src/components/settings/index.tsx b/src/components/settings/index.tsx
index b800a45..cc9562f 100644
--- a/src/components/settings/index.tsx
+++ b/src/components/settings/index.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useRef, useState } from "react";
-import { AuthState, useAuthStore } from "../../store/auth";
+import { useAuthStore } from "../../store/auth";
import "./settings.scss";
import { DynamicIcon } from "lucide-react/dynamic";
@@ -33,26 +33,16 @@ function Settings() {
return (
General
-
+
-
Private Directory
-
- {/* TODO: create private dir panel */}
- <>>
-
+
Private Directory
+
);
}
-function SettingBox({ children }: { children: React.ReactNode }) {
- return (
-
- {children}
-
- );
-}
-
-function AccountSetting({ auth }: { auth: AuthState }) {
+function AccountSetting() {
+ const auth = useAuthStore();
const orRef = useRef(null);
const pwRef = useRef(null);
const ckRef = useRef(null);
@@ -64,74 +54,69 @@ function AccountSetting({ auth }: { auth: AuthState }) {
Account Setting
You can modify your account. This is a sensitive option. Please reconsider if you want to change your account information.
+ {/* TODO: split to component */}
Change Password
If you change your password, you will need to log in again.
-
+
+ {/* TODO: split to component */}
Delete Account
You can delete account. This action is irreversible. Please proceed with caution.
-
);
}
+function PrivateDirectory() {
+ const pathRef = useRef(null);
+ const [disabled, setDisabled] = useState(true);
+
+ return (
+
+ Directory Management
+
+
+
+ {/* TODO: split to component */}
+
+
+
Add Directory
+ You can add private directory here.
+
+
+
{
+ ev.preventDefault();
+ }}>
+ {
+ setDisabled(ev.target.value === "");
+ }} />
+ Add Directory
+
+
+
+ {/* */}
+
+ );
+}
+
function PasswordInput({ placeholder, ref }: { placeholder: string; ref: React.RefObject }) {
const [show, setShow] = useState(false);
@@ -171,4 +199,12 @@ function PasswordInput({ placeholder, ref }: { placeholder: string; ref: React.R
);
}
+function SettingBox({ children }: { children: React.ReactNode }) {
+ return (
+
+ {children}
+
+ );
+}
+
export default Settings;
diff --git a/src/components/settings/settings.scss b/src/components/settings/settings.scss
index a91f808..f1ebbba 100644
--- a/src/components/settings/settings.scss
+++ b/src/components/settings/settings.scss
@@ -15,6 +15,10 @@
color: var(--description-color);
}
+ button {
+ margin-top: 1rem;
+ }
+
.setting-box {
width: 100%;
display: flex;
@@ -77,10 +81,6 @@
border-radius: 25px 0 0 25px;
}
- button {
- margin-top: 1rem;
- }
-
.input-pass {
height: 40;
display: flex;