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

Commit

Permalink
build date, fix cloak settings
Browse files Browse the repository at this point in the history
  • Loading branch information
IncognitoTGT committed Mar 31, 2024
1 parent 1af37d9 commit 3e39943
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 10 deletions.
Binary file removed public/ephemeral-sm.webp
Binary file not shown.
Binary file removed public/ephemeral.png
Binary file not shown.
1 change: 1 addition & 0 deletions public/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ const defaultConfig: Config = {
wispServer: "",
},
cloak: {
preset: "Google",
title: "Google",
favicon: "https://www.google.com/favicon.ico",
preset: "None",
title: "Ephemeral",
favicon: "/icon.svg",
},
search: {
url: "https://google.com/search?q=",
Expand Down
10 changes: 6 additions & 4 deletions src/main-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function MainLayout() {
/>
Ephemeral {packageJson.version}
</DialogTitle>
<DialogDescription className=" items-center justify-start text-foreground">
<DialogDescription className="items-center justify-start text-foreground">
Ephemeral is a powerful proxy with Ultraviolet and other
features, made by the z1g Project.
<br />
Expand All @@ -96,7 +96,7 @@ export default function MainLayout() {
<a
href={project.url}
key={key}
className="w-auto font-medium text-primary underline-offset-4 hover:underline"
className="inline font-medium text-primary underline-offset-4 hover:underline"
>
<li>{project.name}</li>
</a>
Expand All @@ -109,7 +109,7 @@ export default function MainLayout() {
<a
href={`https://github.com/${developer}`}
key={key}
className="w-auto font-medium text-primary underline-offset-4 hover:underline"
className="inline font-medium text-primary underline-offset-4 hover:underline"
>
<li>{developer}</li>
</a>
Expand All @@ -124,7 +124,7 @@ export default function MainLayout() {
href={data?.html_url}
target="_blank"
rel="noreferrer"
className="w-auto font-medium text-primary underline-offset-4 hover:underline"
className="inline font-medium text-primary underline-offset-4 hover:underline"
>
{new Date(
data?.commit?.committer.date,
Expand All @@ -137,6 +137,8 @@ export default function MainLayout() {
) : (
"No commit information available."
)}
<br />
This version of Ephemeral was built on {__BUILD_DATE__}
</DialogDescription>
</DialogHeader>
</DialogContent>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/View.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export default function View() {
asChild: asChild ?? false,
}}
variant="ghost"
size="icon"
>
{children}
</Button>
Expand Down Expand Up @@ -322,6 +323,7 @@ export default function View() {
asChild: asChild ?? false,
}}
variant="ghost"
size="icon"
>
{children}
</Button>
Expand Down
13 changes: 12 additions & 1 deletion src/pages/settings/CloakSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default function CloakSettings() {
const cloakTitleRef = useRef<HTMLInputElement>(null);
const cloakFaviconRef = useRef<HTMLInputElement>(null);
const { toast } = useToast();

const [config, reset, loading] = useConfig("cloak");

useEffect(() => {
Expand All @@ -36,6 +37,11 @@ export default function CloakSettings() {
}, [config]);

const cloakValues = [
{
name: "None",
title: "Ephemeral",
favicon: "/icon.svg",
},
{
name: "Schoology",
title: "Home | Schoology",
Expand Down Expand Up @@ -114,7 +120,8 @@ export default function CloakSettings() {
<CardContent>
<Label htmlFor="presets">Presets</Label>
<Select
onValueChange={async (value) => {
value={config?.preset}
onValueChange={(value) => {
const cloak = cloakValues.find((cloak) => cloak.name === value);
if (cloak) {
config && (config.preset = cloak.name);
Expand All @@ -124,6 +131,10 @@ export default function CloakSettings() {
title: "Cloak Preset Changed",
description: `Cloak preset has been changed to "${value}"`,
});
setTimeout(
window.location.reload.bind(window.location),
1000,
);
}
}}
>
Expand Down
2 changes: 1 addition & 1 deletion src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const routes = createBrowserRouter([
loader: async () => {
return json(
await fetch(
"https://api.github.com/repos/z1g-project/web/commits/main",
"https://api.github.com/repos/z1g-project/ephemer/commits/main",
)
.then((res) => res.json())
.catch(() => ({})),
Expand Down
2 changes: 2 additions & 0 deletions src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/// <reference types="vite/client" />

declare const __BUILD_DATE__: string;
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ export default defineConfig({
},
},
define: {
"process.env.STATIC": process.env.STATIC,
__BUILD_DATE__: JSON.stringify(new Date().toLocaleString()),
},
});

0 comments on commit 3e39943

Please sign in to comment.