Skip to content

Commit

Permalink
Merge pull request #269 from avored/improvements
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
indpurvesh authored Jan 24, 2025
2 parents 017b1ad + c432353 commit 5cf33be
Show file tree
Hide file tree
Showing 211 changed files with 6,832 additions and 2,788 deletions.
435 changes: 163 additions & 272 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,26 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axum = { version = "0.7.9", features = ["multipart"] }
serde = { version = "1.0.216", features = ["derive"] }
tokio = { version = "1.42.0", features = ["full"] }
axum = { version = "0.8.1", features = ["multipart"] }
serde = { version = "1.0.217", features = ["derive"] }
tokio = { version = "1.43.0", features = ["full"] }
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
tower-http = { version = "0.6.2", features = ["fs", "cors"] }
dotenvy = "0.15.7"
axum-extra = { version = "0.9.6", features = ["cookie", "cookie-signed"] }
axum-extra = { version = "0.10.0", features = ["cookie", "cookie-signed"] }
argon2 = "0.5.3"
rand = "0.8.5"
urlencoding = "2.1.3"
serde_json = "1.0.134"
serde_json = "1.0.135"
surrealdb = { version = "2.1.4", features = ["kv-rocksdb", "kv-mem"] }
jsonwebtoken = "9.3.0"
chrono = { version = "0.4.39", features = [] }
email_address = "0.2.9"
rust-i18n = "3.1.2"
lettre = { version = "0.11.11", features = ["tokio1-native-tls"] }
handlebars = "6.2.0"
utoipa = "5.3.0"
juniper = "0.16.1"
juniper_axum = { version = "0.1.1", features = ["subscriptions"] }
handlebars = "6.3.0"
utoipa = "5.3.1"

[dev-dependencies]
tower = { version = "0.5.2", features = ["util"] }
16 changes: 14 additions & 2 deletions react-admin/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@ import AvoRedApiTesting from "./pages/setting/AvoRedApiTesting";
import SettingPage from "./pages/setting/SettingPage";
import NotFoundPage from "./pages/NotFoundPage";
import ChangePassword from './pages/admin-user/ChangePassword';
import { ModelTablePage } from "./pages/models/ModelTablePage";
import {ModelCreatePage} from "./pages/models/ModelCreatePage";
import { ModelEditPage } from "./pages/models/ModelEditPage";
import {ComponentTablePage} from "./pages/component/ComponentTablePage";
import {CollectionTable} from "./pages/collection/CollectionTable";
import {CollectionEdit} from "./pages/collection/CollectionEdit";
import {CollectionCreate} from "./pages/collection/CollectionCreate";
import {ContentTable} from "./pages/content/ContentTable";
import {ContentCreate} from "./pages/content/ContentCreate";
import {ContentEdit} from "./pages/content/ContentEdit";

function App() {
return (
Expand All @@ -51,9 +56,16 @@ function App() {
<Route path="/admin/role" element={<RoleTable />} />
<Route path="/admin/role-create" element={<RoleCreate />} />
<Route path="/admin/role-edit/:role_id" element={<RoleEdit />} />
<Route path="/admin/model" element={<ModelTablePage />} />

<Route path="/admin/content" element={<ContentTable />} />
<Route path="/admin/content-create" element={<ContentCreate />} />
<Route path="/admin/content-edit/:content_id" element={<ContentEdit />} />

<Route path="/admin/model-create" element={<ModelCreatePage />} />
<Route path="/admin/model-edit/:model_id" element={<ModelEditPage />} />
<Route path="/admin/collections" element={<CollectionTable />} />
<Route path="/admin/collection-create" element={<CollectionCreate />} />
<Route path="/admin/collection-edit/:collection_id" element={<CollectionEdit />} />
<Route path="/admin/page" element={<PageTable />} />
<Route path="/admin/page-create" element={<PageCreate />} />
<Route path="/admin/page-edit/:page_id" element={<PageEdit />} />
Expand Down
50 changes: 33 additions & 17 deletions react-admin/src/layouts/partials/AppSidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import {Link, Outlet} from "react-router-dom";
import {Menu} from "@headlessui/react";
import {Menu, MenuButton, MenuItem, MenuItems} from "@headlessui/react";
import {useTranslation} from "react-i18next";
import {ChevronDownIcon, FilmIcon, RocketLaunchIcon, CpuChipIcon, DeviceTabletIcon} from "@heroicons/react/24/solid";
import {
ChevronDownIcon,
FilmIcon,
RocketLaunchIcon,
CpuChipIcon,
DeviceTabletIcon,
CircleStackIcon
} from "@heroicons/react/24/solid";
import {useContext} from "react";
import {ThemeContext} from "../../context/ThemeContext";

Expand Down Expand Up @@ -41,6 +48,15 @@ function AppSidebar() {
</div>
<div className="ml-2">{t("sidebar.page")}</div>
</Link>
<Link
className="flex items-center w-full py-1 px-2 mt-3 rounded relative hover:text-white hover:bg-gray-700"
to={`/admin/collections`}
>
<div className="pr-2">
<CircleStackIcon className="h-6 w-6"/>
</div>
<div className="ml-2">{t("collections")}</div>
</Link>

<Link
to={`admin/component`}
Expand All @@ -63,12 +79,12 @@ function AppSidebar() {

<Link
className="flex items-center w-full py-1 px-2 mt-3 rounded relative hover:text-white hover:bg-gray-700"
to={`/admin/model`}
to={`/admin/content`}
>
<div className="pr-2">
<DeviceTabletIcon className="h-6 w-6"/>
</div>
<div className="ml-2">{t("model")}</div>
<div className="ml-2">{t("content")}</div>
</Link>

</li>
Expand All @@ -79,7 +95,7 @@ function AppSidebar() {
</div>

<Menu as="li" className="text-sm text-gray-500">
<Menu.Button
<MenuButton
className="flex items-center w-full py-1 px-2 mt-3 rounded relative hover:text-white hover:bg-gray-700">
<div className="pr-2">
<RocketLaunchIcon className="h-6 w-6"/>
Expand All @@ -88,40 +104,40 @@ function AppSidebar() {
<div className="absolute right-1.5 transition-transform duration-300">
<ChevronDownIcon className="h-6 w-6"/>
</div>
</Menu.Button>
</MenuButton>

<Menu.Items className="flex flex-col mt-2 pl-2 ml-3 border-l border-gray-700 space-y-1">
<Menu.Item as="li">
{({active}) => (
<MenuItems as="ul" className="flex flex-col mt-2 pl-2 ml-3 border-l border-gray-700 space-y-1">
<MenuItem as="li">
{() => (
<Link
to={`/admin/admin-user`}
className={`flex items-center w-full py-1 px-2 rounded relative hover:text-white hover:bg-gray-700`}
>
<div>{t("sidebar.admin_user")}</div>
</Link>
)}
</Menu.Item>
<Menu.Item as="li">
{({active}) => (
</MenuItem>
<MenuItem as="li">
{() => (
<Link
to={`/admin/role`}
className={`flex items-center w-full py-1 px-2 rounded relative hover:text-white hover:bg-gray-700`}
>
<div>{t("sidebar.role")}</div>
</Link>
)}
</Menu.Item>
<Menu.Item>
{({active}) => (
</MenuItem>
<MenuItem>
{() => (
<Link
to={`/admin/setting`}
className={`flex items-center w-full py-1 px-2 rounded relative hover:text-white hover:bg-gray-700`}
>
{t("sidebar.setting")}
</Link>
)}
</Menu.Item>
</Menu.Items>
</MenuItem>
</MenuItems>
</Menu>
</ul>
</nav>
Expand Down
5 changes: 4 additions & 1 deletion react-admin/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"table": "Table",
"permissions": "Permissions",
"page": "Page",
"collections": "Collections",
"role": "Role",
"general": "General",
"is_super_admin": "Is super admin",
Expand All @@ -90,8 +91,10 @@
"loading": "Loading...",
"component_information": "Component information",
"page_information": "Page Information",
"model": "Model",
"content": "Content",
"content_field": "content field",
"model_information": "Model Information",
"collection_information": "Collection Information",
"components": "Components",
"field_type": "Field type",
"upload_asset": "Upload asset",
Expand Down
Loading

0 comments on commit 5cf33be

Please sign in to comment.