Skip to content

Commit

Permalink
fix UI
Browse files Browse the repository at this point in the history
  • Loading branch information
sbx0 committed Jan 4, 2024
1 parent aad23a7 commit 49f50f3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion todo-web/apis/apiPath.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const POST = "POST";
export const GET = "GET";
export const ApiPrefix = process.env.NODE_ENV === 'development' ? "http://192.168.50.2:3000" : "https://todo.sbx0.cn";
export const ApiPrefix = process.env.NODE_ENV === 'development' ? "http://127.0.0.1:3000" : "https://todo.sbx0.cn";
export const API = "/api";
export const GetToken = API + "/user/client/token";
export const TaskPaging = API + "/task/paging";
Expand Down
8 changes: 4 additions & 4 deletions todo-web/app/beta/page.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export default function Page() {
return <div>
<ul className="w-48 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-lg dark:bg-gray-700 dark:border-gray-600 dark:text-white">
<li className="w-full px-4 py-2 border-b border-gray-200 rounded-t-lg dark:border-gray-600">Profile</li>
<li className="w-full px-4 py-2 border-b border-gray-200 dark:border-gray-600">Settings</li>
<li className="w-full px-4 py-2 border-b border-gray-200 dark:border-gray-600">Messages</li>
<ul className="w-48 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-lg">
<li className="w-full px-4 py-2 border-b border-gray-200 rounded-t-lg">Profile</li>
<li className="w-full px-4 py-2 border-b border-gray-200">Settings</li>
<li className="w-full px-4 py-2 border-b border-gray-200">Messages</li>
<li className="w-full px-4 py-2 rounded-b-lg">Download</li>
</ul>
</div>
Expand Down
5 changes: 4 additions & 1 deletion todo-web/app/components/header/header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export default function Header() {

return <header className="bg-gray-800 text-white px-4 py-2">
<div className="container mx-auto flex items-center justify-between">
<h1 className="text-xl font-bold">Next Todo</h1>
<h1 className="text-xl font-bold cursor-pointer"
onClick={() => window.location.href = "/"}>
Next Todo
</h1>
<nav>
<ul className="flex space-x-4">
{/*<li><a href="#" className="text-white">Home</a></li>*/}
Expand Down
4 changes: 2 additions & 2 deletions todo-web/components/beta/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function Category({onClick, onDrop, one, current}) {
setHover(false);
event.preventDefault();
}}
className={`block w-full px-4 py-2 border-b border-gray-200 cursor-pointer dark:bg-gray-800 dark:border-gray-600 ${isCurrent ? "bg-blue-700 text-white" : ""}`}>
className={`block w-full px-4 py-2 border-b border-gray-200 cursor-pointer ${isCurrent ? "bg-blue-700 text-white" : ""}`}>
{`${one.categoryName}`}
</div>;
}
Expand Down Expand Up @@ -57,7 +57,7 @@ export default function NavBar({

return <div className="block w-full pt-2">
<div
className="block w-full font-medium text-gray-900 bg-white border-t border-l border-r border-gray-200 dark:bg-gray-700 dark:border-gray-600 dark:text-white">
className="block w-full font-medium text-gray-900 bg-white border-t border-l border-r border-gray-200">
{initCategories.map((one) =>
<Category
key={one.id}
Expand Down
4 changes: 2 additions & 2 deletions todo-web/components/beta/TaskList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export default function TaskList({
setNewTask(event.target.value);
}}
placeholder={"添加任务"}
className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"/>
className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"/>
</div>
<div className="border-t border-l border-r border-gray-200 dark:bg-gray-700 dark:border-gray-600">
<div className="border-t border-l border-r border-gray-200">
{tasks?.map((one) =>
<TaskItem draggable
onClick={() => clickTask(one)}
Expand Down

0 comments on commit 49f50f3

Please sign in to comment.