Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
feat: some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yehezkieldio committed Feb 18, 2024
1 parent 0f162b3 commit 07fc2a5
Show file tree
Hide file tree
Showing 111 changed files with 1,443 additions and 136 deletions.
12 changes: 3 additions & 9 deletions apps/app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
Expand All @@ -10,30 +9,25 @@
android:theme="@style/AppTheme"
android:largeHeap="true"
android:usesCleartextTraffic="true">

<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:name=".MainActivity"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBarLaunch"
android:launchMode="singleTask"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>

<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"></meta-data>
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
</application>

Expand All @@ -43,4 +37,4 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-permission android:name="android.permission.INTERNET" />
</manifest>
</manifest>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/app/android/app/src/main/res/drawable-land-hdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/app/android/app/src/main/res/drawable-land-mdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/app/android/app/src/main/res/drawable-port-hdpi/splash.png
Binary file modified apps/app/android/app/src/main/res/drawable-port-mdpi/splash.png
Binary file modified apps/app/android/app/src/main/res/drawable-port-xhdpi/splash.png
Binary file modified apps/app/android/app/src/main/res/drawable/splash.png
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background>
<inset android:drawable="@mipmap/ic_launcher_background" android:inset="16.7%" />
</background>
<foreground>
<inset android:drawable="@mipmap/ic_launcher_foreground" android:inset="16.7%" />
</foreground>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background>
<inset android:drawable="@mipmap/ic_launcher_background" android:inset="16.7%" />
</background>
<foreground>
<inset android:drawable="@mipmap/ic_launcher_foreground" android:inset="16.7%" />
</foreground>
</adaptive-icon>
Binary file modified apps/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file modified apps/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file modified apps/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file modified apps/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file added apps/app/icons/icon-128.webp
Binary file not shown.
Binary file added apps/app/icons/icon-192.webp
Binary file not shown.
Binary file added apps/app/icons/icon-256.webp
Binary file not shown.
Binary file added apps/app/icons/icon-48.webp
Binary file not shown.
Binary file added apps/app/icons/icon-512.webp
Binary file not shown.
Binary file added apps/app/icons/icon-72.webp
Binary file not shown.
Binary file added apps/app/icons/icon-96.webp
Binary file not shown.
3 changes: 2 additions & 1 deletion apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"@capacitor/preferences": "../../node_modules/@capacitor/preferences",
"@capacitor/network": "../../node_modules/@capacitor/network",
"@capacitor/camera": "../../node_modules/@capacitor/camera",
"@capacitor/app": "../../node_modules/@capacitor/app"
"@capacitor/app": "../../node_modules/@capacitor/app",
"@capacitor/assets": "../../node_modules/@capacitor/assets"
}
}
3 changes: 3 additions & 0 deletions apps/app/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions apps/app/public/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"icons": [
{
"src": "../icons/icon-48.webp",
"type": "image/png",
"sizes": "48x48",
"purpose": "any maskable"
},
{
"src": "../icons/icon-72.webp",
"type": "image/png",
"sizes": "72x72",
"purpose": "any maskable"
},
{
"src": "../icons/icon-96.webp",
"type": "image/png",
"sizes": "96x96",
"purpose": "any maskable"
},
{
"src": "../icons/icon-128.webp",
"type": "image/png",
"sizes": "128x128",
"purpose": "any maskable"
},
{
"src": "../icons/icon-192.webp",
"type": "image/png",
"sizes": "192x192",
"purpose": "any maskable"
},
{
"src": "../icons/icon-256.webp",
"type": "image/png",
"sizes": "256x256",
"purpose": "any maskable"
},
{
"src": "../icons/icon-512.webp",
"type": "image/png",
"sizes": "512x512",
"purpose": "any maskable"
}
]
}
Binary file added apps/app/resources/icon-background.png
Binary file added apps/app/resources/icon-foreground.png
Binary file added apps/app/resources/icon-only.png
Binary file added apps/app/resources/splash-dark.png
Binary file added apps/app/resources/splash.png
2 changes: 1 addition & 1 deletion apps/app/src/components/complain-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const ComplainTabs: React.FC = () => {

<Route path="/complain/tabs" render={() => <Redirect to="/complain/tabs/dashboard" />} exact={true} />
</IonRouterOutlet>
<IonTabBar slot="bottom" mode="ios" translucent className="pb-4 pt-4 border-t border-t-slate-800">
<IonTabBar slot="bottom" mode="ios" translucent className="pb-4 pt-4 border-t border-t-slate-500">
<IonTabButton tab="dashboardTabsComplain" href="/complain/tabs/dashboard">
<Icons.dashboardLaporan strokeWidth={1} className="pt-2 w-[32px] h-[30px]" />
<IonLabel className="pt-2 pb-2">Dashboard</IonLabel>
Expand Down
3 changes: 1 addition & 2 deletions apps/app/src/components/operator-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ const OperatorTabs: React.FC = () => {
<Icons.dashboard strokeWidth={1} className="pt-2 w-[32px] h-[30px]" />
<IonLabel className="pt-2 pb-2">Dashboard</IonLabel>
</IonTabButton>
<IonTabButton tab="trashbinTab" href="/trash-bin/tabs/report-action">
{/* <IonTabButton tab="trashbinTab" href="/trash-bin/tabs/trashbin"> */}
<IonTabButton tab="trashbinTab" href="/trash-bin/tabs/trashbin">
<Icons.trash strokeWidth={1} className="pt-2 w-[32px] h-[30px]" />
<IonLabel className="pt-2 pb-2">Trashbin</IonLabel>
</IonTabButton>
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/components/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Tabs: React.FC = () => {
<Route path="/tabs/preferences" render={() => <Preferences />} exact={true} />
<Route path="/tabs" render={() => <Redirect to="/tabs/home" />} exact={true} />
</IonRouterOutlet>
<IonTabBar slot="bottom" mode="ios" translucent className="pb-4 pt-4 border-t border-t-slate-800">
<IonTabBar slot="bottom" mode="ios" translucent className="pb-4 pt-4 border-t border-t-slate-500">
<IonTabButton tab="homeTab" href="/tabs/home">
<Icons.home strokeWidth={1} className="pt-2 w-[32px] h-[30px]" />
<IonLabel className="pt-2 pb-2">{t("tabs.home")}</IonLabel>
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/components/trashbin-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const TrashbinTabs: React.FC = () => {
slot="bottom"
mode="ios"
translucent
className="pb-4 pt-4 shadow-xl border-t border-t-slate-800"
className="pb-4 pt-4 shadow-xl border-t border-t-slate-500"
>
<IonTabButton tab="backTabs" href="/operator">
<Icons.back strokeWidth={1} className="pt-2 w-[32px] h-[30px]" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ export function DeleteConfirmationDialog({
This action is irreversible.
</AlertDialogDescription>
<AlertDialogFooter>
<Button
onClick={() => {
mutateAsync();
}}
disabled={isPending}
variant="destructive"
className="my-4"
>
{isPending ? "Deleting..." : "Delete"}
</Button>
<AlertDialogCancel>
<div className="flex flex-row gap-2">
<Button
onClick={() => {
mutateAsync();
}}
disabled={isPending}
variant="destructive"
className="w-full"
>
{isPending ? "Deleting..." : "Delete"}
</Button>
<Button
className="w-full"
onClick={() => {
Expand All @@ -80,7 +80,7 @@ export function DeleteConfirmationDialog({
>
Cancel
</Button>
</AlertDialogCancel>
</div>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
Expand Down Expand Up @@ -124,7 +124,7 @@ export function FeedbackPage() {
<Button
className="w-full"
variant="secondary"
onClick={() => history.replace(`/trash-bin/tabs/feedback/${report_id}`)}
onClick={() => history.replace(`/trash-bin/tabs/report-action/detail/${report_id}`)}
>
Back
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ export function DeleteConfirmationDialog({
This action is irreversible.
</AlertDialogDescription>
<AlertDialogFooter>
<Button
onClick={() => {
mutateAsync();
}}
disabled={isPending}
variant="destructive"
className="my-4"
>
{isPending ? "Deleting..." : "Delete"}
</Button>
<AlertDialogCancel>
<div className="flex flex-row gap-2">
<Button
onClick={() => {
mutateAsync();
}}
disabled={isPending}
variant="destructive"
className="w-full"
>
{isPending ? "Deleting..." : "Delete"}
</Button>
<Button
className="w-full"
onClick={() => {
Expand All @@ -81,7 +81,7 @@ export function DeleteConfirmationDialog({
>
Cancel
</Button>
</AlertDialogCancel>
</div>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
Expand Down Expand Up @@ -154,12 +154,6 @@ export function DetailedTrashPage() {
</Label>
<Textarea readOnly id="description" value={trashbin?.description} />
</div>
<div>
<Label htmlFor="openCount" className="text-xs">
Open Count
</Label>
<Input readOnly type="number" id="openCount" value={trashbin?.openCount} />
</div>
<div>
<Label htmlFor="latlang" className="text-xs">
Location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ export function DeleteConfirmationDialog({
This action is irreversible.
</AlertDialogDescription>
<AlertDialogFooter>
<Button
onClick={() => {
mutateAsync();
}}
disabled={isPending}
variant="destructive"
className="my-4"
>
{isPending ? "Deleting..." : "Delete"}
</Button>
<AlertDialogCancel>
<div className="flex flex-row gap-2">
<Button
onClick={() => {
mutateAsync();
}}
disabled={isPending}
variant="destructive"
className="w-full"
>
{isPending ? "Deleting..." : "Delete"}
</Button>
<Button
className="w-full"
onClick={() => {
Expand All @@ -80,7 +80,7 @@ export function DeleteConfirmationDialog({
>
Cancel
</Button>
</AlertDialogCancel>
</div>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,6 @@ export function TrashPage() {
</div>
<div className="flex flex-col pt-8 gap-2">
<div className="flex flex-col gap-2">
<Button
variant="secondary"
className="w-full"
onClick={() => history.push(`/trash-bin/tabs/trashbin/subtrashbin/${trashbin_id}`)}
>
Back
</Button>
<div className="flex flex-row gap-2">
<Button variant="secondary" className="w-full" onClick={() => handleFilterClick("latest")}>
Filter by Latest
Expand All @@ -95,6 +88,13 @@ export function TrashPage() {
Filter by Oldest
</Button>
</div>
<Button
variant="secondary"
className="w-full"
onClick={() => history.push(`/trash-bin/tabs/trashbin/subtrashbin/${trashbin_id}`)}
>
Back
</Button>
</div>
<Separator className="my-4" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ export function SubTrashbinPage() {
<div className="flex flex-col pt-8 gap-2">
<div className="flex flex-col gap-2">
<Button
variant="secondary"
className="w-full"
onClick={() => history.push(`/trash-bin/tabs/trashbin`)}
onClick={() => history.push(`/trash-bin/tabs/trashbin/subtrashbin/${trashbin_id}/create`)}
>
Back
Create a new subtrashbin
</Button>
<Button
variant="secondary"
className="w-full"
onClick={() => history.push(`/trash-bin/tabs/trashbin/subtrashbin/${trashbin_id}/create`)}
onClick={() => history.push(`/trash-bin/tabs/trashbin`)}
>
Create a new subtrashbin
Back
</Button>
</div>
<Separator className="my-4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@ export function TrashPage() {
</div>
<div className="flex flex-col pt-8 gap-2">
<div className="flex flex-col gap-2">
<Button
variant="secondary"
className="w-full"
onClick={() => history.push(`/trash-bin/tabs/trashbin/subtrashbin/${trashbin_id}`)}
>
Back
</Button>
<div className="flex flex-row gap-2">
<Button variant="secondary" className="w-full" onClick={() => handleFilterClick("latest")}>
Filter by Latest
Expand All @@ -93,6 +86,13 @@ export function TrashPage() {
Filter by Oldest
</Button>
</div>
<Button
variant="secondary"
className="w-full"
onClick={() => history.push(`/trash-bin/tabs/trashbin/subtrashbin/${trashbin_id}`)}
>
Back
</Button>
</div>
<Separator className="my-4" />

Expand Down
Binary file added icons/icon-128.webp
Binary file not shown.
Binary file added icons/icon-192.webp
Binary file not shown.
Binary file added icons/icon-256.webp
Binary file not shown.
Binary file added icons/icon-48.webp
Binary file not shown.
Binary file added icons/icon-512.webp
Binary file not shown.
Binary file added icons/icon-72.webp
Binary file not shown.
Binary file added icons/icon-96.webp
Binary file not shown.
Loading

0 comments on commit 07fc2a5

Please sign in to comment.