Skip to content

Commit 05f6475

Browse files
committed
Merge branch 'release/0.3.2'
2 parents 9923e07 + a923080 commit 05f6475

11 files changed

Lines changed: 78 additions & 38 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "droidground",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"type": "module",
55
"author": "Angelo Delicato",
66
"scripts": {

src/client/App.tsx

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,11 @@ const AppRoute = () => {
9292

9393
return (
9494
<WebSocketProvider>
95-
<div className="min-h-screen flex flex-col">
96-
<Header />
97-
<div className="container m-auto h-full py-4 flex items-start gap-8">
98-
<VideoRenderer />
99-
<Outlet />
100-
</div>
101-
</div>
95+
<Header />
96+
<main className="container m-auto h-full p-4 flex flex-col lg:flex-row items-start gap-8">
97+
<VideoRenderer />
98+
<Outlet />
99+
</main>
102100
</WebSocketProvider>
103101
);
104102
};
@@ -114,23 +112,23 @@ const DefaultRoute = () => {
114112

115113
const ErrorComponent = () => {
116114
return (
117-
<div className="min-h-screen flex flex-col">
115+
<>
118116
<Header />
119-
<div className="container m-auto h-full py-4 flex items-start gap-8">
117+
<main className="container m-auto h-full py-4 flex items-start gap-8">
120118
<Error />
121-
</div>
122-
</div>
119+
</main>
120+
</>
123121
);
124122
};
125123

126124
const NotFoundRoute = () => {
127125
return (
128-
<div className="min-h-screen flex flex-col">
126+
<>
129127
<Header />
130-
<div className="container m-auto h-full py-4 flex items-start gap-8">
128+
<main className="container m-auto h-full py-4 flex items-start gap-8">
131129
<Outlet />
132-
</div>
133-
</div>
130+
</main>
131+
</>
134132
);
135133
};
136134

src/client/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
canvas {
2020
@apply w-full h-auto;
2121
}
22+
23+
#app {
24+
@apply min-h-screen flex flex-col;
25+
}
2226
}
2327

2428
@layer utilities {

src/client/layout/Header.tsx

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { BsGithub } from "react-icons/bs";
1313
import { HiQueueList } from "react-icons/hi2";
1414
import { CiStopwatch } from "react-icons/ci";
1515
import { PiEmptyDuotone } from "react-icons/pi";
16+
import { LuMenu } from "react-icons/lu";
1617

1718
interface INavItem {
1819
label: string;
@@ -124,10 +125,44 @@ const Navbar: React.FC = () => {
124125
onConfirm={reset}
125126
/>
126127

127-
{/*************
128-
* Navbar *
129-
***************/}
130-
<nav className="flex px-2 py-1 h-12">
128+
{/********************
129+
* Mobile Navbar *
130+
**********************/}
131+
<div className="flex items-center gap-2 lg:hidden">
132+
<a
133+
href="https://github.com/SECFORCE/droidground"
134+
target="_blank"
135+
rel="noreferrer"
136+
className="btn btn-ghost btn-sm px-2"
137+
>
138+
<BsGithub size={22} className="text-white" />
139+
</a>
140+
141+
<div className="dropdown dropdown-end">
142+
<label tabIndex={0} className="btn btn-ghost btn-sm px-2" aria-label="Open menu">
143+
<LuMenu size={24} />
144+
</label>
145+
<ul
146+
tabIndex={0}
147+
className="menu dropdown-content mt-3 w-52 rounded-box bg-base-200 p-2 shadow border border-base-300"
148+
>
149+
{navItems
150+
.filter(i => i.routeEnabled)
151+
.map(item => (
152+
<li key={item.to}>
153+
<button className="justify-between" onClick={() => navigate(item)}>
154+
{item.label}
155+
</button>
156+
</li>
157+
))}
158+
</ul>
159+
</div>
160+
</div>
161+
162+
{/*********************
163+
* Desktop Navbar *
164+
**********************/}
165+
<nav className="hidden lg:flex px-2 py-1 h-12 items-center">
131166
<ul className="relative flex space-x-8 text-sm font-medium">
132167
{navItems
133168
.filter(i => i.routeEnabled)
@@ -155,7 +190,7 @@ const Navbar: React.FC = () => {
155190
{location.pathname === item.to && (
156191
<motion.div
157192
layoutId="underline"
158-
className="absolute bottom-[-20px] left-0 right-0 h-0.5 bg-info rounded z-20"
193+
className="absolute -bottom-4.5 left-0 right-0 h-0.5 bg-info rounded z-20"
159194
transition={{ type: "spring", stiffness: 500, damping: 30 }}
160195
/>
161196
)}
@@ -169,7 +204,7 @@ const Navbar: React.FC = () => {
169204
</button>
170205
)}
171206
<div className="flex h-full items-center justify-center">
172-
<div className="flex h-[1.5rem]">
207+
<div className="flex h-6">
173208
<div className="divider divider-horizontal" />
174209
</div>
175210
<div className="flex gap-4">
@@ -226,13 +261,15 @@ const Navbar: React.FC = () => {
226261

227262
export const Header: React.FC = () => {
228263
return (
229-
<header className="w-full bg-neutral h-18 select-none">
230-
<div className="container m-auto h-full flex items-center justify-between">
231-
<div className="flex items-center gap-2">
232-
<img src={Logo} className="h-10" />
233-
<h1 className="font-orbitron text-2xl select-none">DroidGround</h1>
264+
<header className="w-full bg-neutral select-none">
265+
<div className="container mx-auto h-18 px-4 sm:px-6 lg:px-8">
266+
<div className="h-full flex items-center justify-between gap-3">
267+
<div className="flex items-center gap-2 min-w-0">
268+
<img src={Logo} className="h-10" />
269+
<h1 className="font-orbitron text-xl sm:text-2xl truncate">DroidGround</h1>
270+
</div>
271+
<Navbar />
234272
</div>
235-
<Navbar />
236273
</div>
237274
</header>
238275
);

src/client/layout/Renderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export const VideoRenderer: React.FC = () => {
183183

184184
return (
185185
<div
186-
className={`w-1/4 min-w-1/4 rounded-2xl border-10 border-black shadow-2xl flex items-center justify-center relative overflow-hidden ${streamingPhase !== StreamingPhase.RENDER ? "aspect-[9/16] bg-gray-950" : "bg-transparent "}`}
186+
className={`m-auto w-3/4 min-w-3/4 sm:w-1/2 sm:min-w-1/2 lg:w-1/4 lg:min-w-1/4 rounded-2xl border-10 border-black shadow-2xl flex items-center justify-center relative overflow-hidden ${streamingPhase !== StreamingPhase.RENDER ? "aspect-9/16 bg-gray-950" : "bg-transparent "}`}
187187
>
188188
{/* Speaker + Camera Dot */}
189189
<div className="absolute top-2 w-full flex justify-center items-center z-10">

src/client/views/AppManager.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export const AppManager: React.FC = () => {
125125
</div>
126126
</div>
127127
<p className="mb-2">
128-
If you are worried that other teams may start your exploit app (via another app thorugh an explicit
128+
If you are worried that other teams may start your exploit app (via another app through an explicit
129129
intent) you may add the <code className="inline">android.permission.DUMP</code> permission to the launcher
130130
activity so that other apps won't be able to start it.
131131
</p>
@@ -147,7 +147,7 @@ export const AppManager: React.FC = () => {
147147
return (
148148
<tr className="hover:bg-base-200" key={key}>
149149
<th>
150-
<img src={p.icon} className="w-[3rem] h-[3rem]" />
150+
<img src={p.icon} className="w-12 h-12" />
151151
</th>
152152
<td>{p.label}</td>
153153
<td className="flex flex-col">

src/client/views/Error.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ export const Error: React.FC = () => {
66
<div className="hero-content text-center">
77
<div className="max-w-md">
88
<div className="flex items-center text-emerald-600">
9-
<h1 className="text-[12rem] leading-none select-none mr-[-2rem] tstroke">Err</h1>
9+
<h1 className="text-[12rem] leading-none select-none -mr-8 tstroke">Err</h1>
1010
<BsAndroid2
1111
size={140}
1212
className="text-shadow-black text-shadow-lg z-20 stroke-black stroke-[0.5]"
1313
stroke="#000"
1414
/>
15-
<h1 className="text-[12rem] leading-none select-none ml-[-2rem] tstroke">r</h1>
15+
<h1 className="text-[12rem] leading-none select-none -ml-8 tstroke">r</h1>
1616
</div>
1717
<h1 className="mb-5 font-bold opacity-20 text-2xl">
1818
A fatal exception has occurred in the main thread. Try to reboot the device

src/client/views/NotFound.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ export const NotFound: React.FC = () => {
66
<div className="hero-content text-center">
77
<div className="max-w-md">
88
<div className="flex items-center text-emerald-600">
9-
<h1 className="text-[16rem] leading-none select-none mr-[-2rem] tstroke">4</h1>
9+
<h1 className="text-[16rem] leading-none select-none -mr-8 tstroke">4</h1>
1010
<BsAndroid2
1111
size={180}
1212
className="text-shadow-black text-shadow-lg z-20 stroke-black stroke-[0.5]"
1313
stroke="#000"
1414
/>
15-
<h1 className="text-[16rem] leading-none select-none ml-[-2rem] tstroke">4</h1>
15+
<h1 className="text-[16rem] leading-none select-none -ml-8 tstroke">4</h1>
1616
</div>
1717
<h1 className="mb-5 font-bold opacity-20 text-5xl">Not Found</h1>
1818
<a className="btn btn-info " href="/">

src/client/views/Overview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ export const Overview: React.FC = () => {
305305
<div className="collapse collapse-arrow bg-base-300 border border-base-300">
306306
<input type="checkbox" name="readme-accordion" className="peer" />
307307
<div className="collapse-title text-lg font-semibold peer-hover:bg-gray-600 peer-checked:mb-4">README</div>
308-
<div className="collapse-content text-sm leading-[1.5]">
308+
<div className="collapse-content text-sm leading-normal">
309309
<h3 className="text-base font-semibold my-2">What is DroidGround?</h3>
310310
<p>
311311
In traditional Capture the Flag (CTF) challenges, it's common to hide flags in files on a system,

0 commit comments

Comments
 (0)