forked from cognetwork-dev/Metallic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ca016b
commit db9c828
Showing
18 changed files
with
174 additions
and
6 deletions.
There are no files selected for viewing
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
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,86 @@ | ||
[ | ||
{ | ||
"name": "Google", | ||
"author": "Alphabet Inc.", | ||
"description": "Search, browse, and discover information with ease.", | ||
"icon": "/apps/google.jpg", | ||
"url": "https://www.google.com" | ||
}, | ||
{ | ||
"name": "Youtube", | ||
"author": "Alphabet Inc.", | ||
"description": "Watch, share, and enjoy videos anytime, anywhere.", | ||
"icon": "/apps/youtube.png", | ||
"url": "https://www.youtube.com" | ||
}, | ||
{ | ||
"name": "Spotify", | ||
"author": "Spotify", | ||
"description": "Discover, stream, and enjoy endless music.", | ||
"icon": "/apps/spotify.png", | ||
"url": "https://open.spotify.com" | ||
}, | ||
{ | ||
"name": "X (Twitter)", | ||
"author": "X Corp.", | ||
"description": "Connect, follow, and share thoughts in real-time", | ||
"icon": "/apps/x.png", | ||
"url": "https://twitter.com/explore" | ||
}, | ||
{ | ||
"name": "Reddit", | ||
"author": "Advance Publications", | ||
"description": "Join communities, share stories, explore endless content", | ||
"icon": "/apps/reddit.png", | ||
"url": "https://reddit.com" | ||
}, | ||
{ | ||
"name": "Twitch", | ||
"author": "Amazon.com, Inc.", | ||
"description": "Connect, watch, chat, and stream live gaming content.", | ||
"icon": "/apps/twitch.jpg", | ||
"url": "https://twitch.tv" | ||
}, | ||
{ | ||
"name": "Discord", | ||
"author": "Discord Inc.", | ||
"description": "Voice, video, and text chats for communities worldwide", | ||
"icon": "/apps/discord.jpg", | ||
"url": "https://discord.com/app" | ||
}, | ||
{ | ||
"name": "TikTok", | ||
"author": "Bytedance", | ||
"description": "Short videos, music, and creative content showcase", | ||
"icon": "/apps/tiktok.jpg", | ||
"url": "https://www.tiktok.com" | ||
}, | ||
{ | ||
"name": "Bored Panda", | ||
"author": "Bored Panda", | ||
"description": "Explore creative, funny, and viral content daily.", | ||
"icon": "/apps/boredpanda.png", | ||
"url": "https://www.boredpanda.com" | ||
}, | ||
{ | ||
"name": "Zoom", | ||
"author": "Zoom Video Communications, Inc.", | ||
"description": "Video conferencing, meetings, and virtual hangouts made easy", | ||
"icon": "/apps/zoom.png", | ||
"url": "https://pwa.zoom.us/wc" | ||
}, | ||
{ | ||
"name": "Pintrest", | ||
"author": "Pinterest, Inc", | ||
"description": "Discover inspiration, DIY ideas, and beautiful visuals galore.", | ||
"icon": "/apps/pintrest.png", | ||
"url": "https://www.pinterest.com/today" | ||
}, | ||
{ | ||
"name": "ChatGPT", | ||
"author": "OpenAI", | ||
"description": "Engage in natural conversations with an AI assistant.", | ||
"icon": "/apps/chatgpt.svg", | ||
"url": "https://chat.openai.com" | ||
} | ||
] |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { Head } from "../components/head"; | ||
import { useTranslation } from "react-i18next"; | ||
import { useState } from "preact/hooks"; | ||
import { Web, setWeb } from "../components/web"; | ||
import { useGlobalState } from "@ekwoka/preact-global-state"; | ||
import { encodeURL } from "../util/searchURL"; | ||
import apps from "../assets/apps.json"; | ||
|
||
function Apps() { | ||
const { t } = useTranslation(); | ||
const [service] = useGlobalState<string>("service", localStorage.getItem("metallic/service") || "ultraviolet"); | ||
const [webOpen, setWebOpen] = useState(false); | ||
|
||
async function openApp(url: string) { | ||
setWeb(await encodeURL(url, service), webOpen, setWebOpen) | ||
} | ||
|
||
return ( | ||
<> | ||
<Head pageTitle={t("title.apps")} /> | ||
<Web open={webOpen} setOpen={setWebOpen} /> | ||
<div | ||
class="grid justify-evenly gap-8 grid-cols-1 sm:grid-cols-[repeat(auto-fill,minmax(auto,16rem))]" | ||
> | ||
{apps.map((app: any) => ( | ||
<button | ||
onClick={async() => await openApp(app.url)} | ||
class="rounded-3xl h-72 bg-secondary flex flex-col p-4 cursor-pointer w-full sm:w-64 text-left" | ||
> | ||
<div | ||
class="h-36 w-full bg-background rounded-xl flex items-center justify-center overflow-hidden select-none" | ||
> | ||
<img | ||
src={app.icon} | ||
draggable={false} | ||
loading="lazy" | ||
alt={app.name} | ||
class="h-full w-full object-cover" | ||
/> | ||
</div> | ||
<div class="overflow-hidden text-lg font-bold mt-3 text-ellipsis"> | ||
{app.name} | ||
</div> | ||
<div class="text-base overflow-hidden text-ellipsis"> | ||
{app.author} | ||
</div> | ||
<div | ||
class="mt-2 text-base overflow-hidden text-ellipsis" | ||
style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;" | ||
> | ||
{app.description} | ||
</div> | ||
</button> | ||
))} | ||
</div> | ||
|
||
</> | ||
) | ||
} | ||
|
||
export { Apps }; |
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