Skip to content

Commit

Permalink
[Updated - v0.2.1]
Browse files Browse the repository at this point in the history
- fixed ts-lint
- set Astro static build configuration instead of SSR
  • Loading branch information
buildingwatsize committed Dec 2, 2024
1 parent 2c9d659 commit 55f2780
Show file tree
Hide file tree
Showing 9 changed files with 520 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v0.2.1

- [Edited] fixed ts-lint
- [Edited] set Astro static build configuration instead of SSR

## v0.2.0

- [Edited] Re-structure into Astro ✨
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The AES encryption & decryption tools with interactive web-app.
![preview](docs/preview.jpg)

## Table of Contents

- [encrypt-tools](#encrypt-tools)
- [Table of Contents](#table-of-contents)
- [📦 Build with](#-build-with)
Expand Down
2 changes: 1 addition & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import react from "@astrojs/react";

// https://astro.build/config
export default defineConfig({
output: "server",
output: "static",
integrations: [
tailwind({
applyBaseStyles: false,
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "encrypt-tools",
"type": "module",
"version": "0.2.0",
"version": "0.2.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand All @@ -13,6 +13,7 @@
"format": "prettier --plugin=prettier-plugin-astro --plugin=prettier-plugin-tailwindcss --write ."
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/react": "^3.6.3",
"@astrojs/tailwind": "^5.1.2",
"@radix-ui/react-label": "^2.1.0",
Expand All @@ -39,4 +40,4 @@
"prettier-plugin-tailwindcss": "^0.6.9",
"vitest": "^2.1.6"
}
}
}
4 changes: 2 additions & 2 deletions src/components/common/Footer.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
const buyMeACoffeeLink = "https://www.buymeacoffee.com/watsize";
// const buyMeACoffeeLink = "https://www.buymeacoffee.com/watsize";
const githubLink = "https://github.com/owlsome-official/encrypt-tools";
---

<footer
class="xs:flex-row flex w-full flex-col items-center justify-between gap-4 pt-4"
class="flex w-full flex-col items-center justify-between gap-4 pt-4 xs:flex-row"
>
<div>
Made with ❤️ by <a
Expand Down
9 changes: 5 additions & 4 deletions src/components/form/textarea/ResultArea.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @ts-nocheck: `document.execCommand` is deprecated

import { Button } from "@/components/ui/button";
import { Skeleton } from "@/components/ui/skeleton";
import { resultAtom } from "@/lib/atoms";
Expand Down Expand Up @@ -29,17 +31,16 @@ const RenderCopyResultButton = () => {
const [copyText, setCopyText] = useState("Copy");
const result = useAtomValue(resultAtom);

const copyToClipboard = (e: React.MouseEvent<HTMLButtonElement>) => {
const copyToClipboard = (_e: React.MouseEvent<HTMLButtonElement>) => {
var textField = document.createElement("textarea");
textField.innerText = result;
document.body.appendChild(textField);
textField.select();
document.execCommand("copy");
textField.remove();

try {
document.execCommand("copy");
navigator.clipboard.writeText(result);
} catch {}
textField.remove();

setCopyText("Copied");
setTimeout(() => {
Expand Down
6 changes: 3 additions & 3 deletions src/components/ui/skeleton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cn } from "@/lib/utils"
import { cn } from "@/lib/utils";

function Skeleton({
className,
Expand All @@ -9,7 +9,7 @@ function Skeleton({
className={cn("animate-pulse rounded-md bg-primary/10", className)}
{...props}
/>
)
);
}

export { Skeleton }
export { Skeleton };
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"paths": {
"@/*": ["./src/*"]
}
}
},
"include": ["src/**/*"]
}
Loading

0 comments on commit 55f2780

Please sign in to comment.