-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from CapSoftware/s3-config
feat: Cap Apps + Custom S3 Config functionality
- Loading branch information
Showing
44 changed files
with
1,672 additions
and
361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
apps/desktop/src/routes/(window-chrome)/settings/apps/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import { Button } from "@cap/ui-solid"; | ||
import { useNavigate } from "@solidjs/router"; | ||
import { For, createResource } from "solid-js"; | ||
import { commands } from "~/utils/tauri"; | ||
|
||
export default function AppsTab() { | ||
const navigate = useNavigate(); | ||
const [isUpgraded] = createResource(() => commands.checkUpgradedAndUpdate()); | ||
|
||
const apps = [ | ||
{ | ||
name: "S3 Config", | ||
description: | ||
"Connect your own S3 bucket. All new shareable link uploads will be uploaded here. Maintain complete ownership over your data.", | ||
icon: IconLucideDatabase, | ||
url: "/settings/apps/s3-config", | ||
pro: true, | ||
}, | ||
]; | ||
|
||
const handleAppClick = async (app: (typeof apps)[number]) => { | ||
if (app.pro && !isUpgraded()) { | ||
await commands.showWindow("Upgrade"); | ||
return; | ||
} | ||
navigate(app.url); | ||
}; | ||
|
||
return ( | ||
<div class="p-4"> | ||
<For each={apps}> | ||
{(app) => ( | ||
<div class="p-1.5 bg-white rounded-lg border border-gray-200"> | ||
<div class="flex justify-between items-center border-b border-gray-200 pb-2"> | ||
<div class="flex items-center gap-3"> | ||
<div class="p-2 rounded-lg bg-gray-100"> | ||
<app.icon class="w-4 h-4 text-gray-500" /> | ||
</div> | ||
<div class="flex flex-col gap-1"> | ||
<span class="text-sm font-medium text-gray-900"> | ||
{app.name} | ||
</span> | ||
</div> | ||
</div> | ||
<Button | ||
variant={app.pro && !isUpgraded() ? "primary" : "secondary"} | ||
onClick={() => handleAppClick(app)} | ||
> | ||
{app.pro && !isUpgraded() ? "Upgrade to Pro" : "Configure"} | ||
</Button> | ||
</div> | ||
<div class="p-2"> | ||
<p class="text-xs text-gray-400">{app.description}</p> | ||
</div> | ||
</div> | ||
)} | ||
</For> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.
11079ae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
cap-web – ./
cap-web-git-main-mc-ilroy.vercel.app
cap-web-nu.vercel.app
cap-web-mc-ilroy.vercel.app
cap.so
www.cap.so