-
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.
feat: add copy button and animations when success and format
- Loading branch information
Showing
6 changed files
with
126 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
{ | ||
"name": "web-app", | ||
"version": "0.0.1", | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
"test": "vitest", | ||
"lint": "prettier --plugin-search-dir . --check . && eslint .", | ||
"format": "prettier --plugin-search-dir . --write ." | ||
}, | ||
"devDependencies": { | ||
"@fontsource/fira-mono": "^4.5.10", | ||
"@neoconfetti/svelte": "^1.0.0", | ||
"@sveltejs/adapter-auto": "^2.0.0", | ||
"@sveltejs/adapter-static": "^2.0.3", | ||
"@sveltejs/kit": "^1.20.4", | ||
"@types/cookie": "^0.5.1", | ||
"@typescript-eslint/eslint-plugin": "^6.0.0", | ||
"@typescript-eslint/parser": "^6.0.0", | ||
"eslint": "^8.28.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-svelte": "^2.30.0", | ||
"prettier": "^2.8.0", | ||
"prettier-plugin-svelte": "^2.10.1", | ||
"svelte": "^4.0.5", | ||
"svelte-check": "^3.4.3", | ||
"tslib": "^2.4.1", | ||
"typescript": "^5.0.0", | ||
"vite": "^4.4.2", | ||
"vitest": "^0.34.0" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"svelte-i18n": "^3.7.4" | ||
} | ||
"name": "web-app", | ||
"version": "0.0.1", | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
"test": "vitest", | ||
"lint": "prettier --plugin-search-dir . --check . && eslint .", | ||
"format": "prettier --plugin-search-dir . --write ." | ||
}, | ||
"devDependencies": { | ||
"@fontsource/fira-mono": "^4.5.10", | ||
"@neoconfetti/svelte": "^1.0.0", | ||
"@sveltejs/adapter-auto": "^2.0.0", | ||
"@sveltejs/adapter-static": "^2.0.3", | ||
"@sveltejs/kit": "^1.20.4", | ||
"@types/cookie": "^0.5.1", | ||
"@typescript-eslint/eslint-plugin": "^6.0.0", | ||
"@typescript-eslint/parser": "^6.0.0", | ||
"eslint": "^8.28.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-svelte": "^2.30.0", | ||
"prettier": "^2.8.0", | ||
"prettier-plugin-svelte": "^2.10.1", | ||
"svelte": "^4.0.5", | ||
"svelte-check": "^3.4.3", | ||
"tslib": "^2.4.1", | ||
"typescript": "^5.0.0", | ||
"vite": "^4.4.2", | ||
"vitest": "^0.34.0" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"svelte-i18n": "^3.7.4" | ||
} | ||
} |
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,20 @@ | ||
<script lang="ts"> | ||
export let originalText: string; | ||
export let otherText: string; | ||
let text1Element: HTMLSpanElement; | ||
let text2Element: HTMLSpanElement; | ||
export const animate = () => { | ||
text1Element.style.display = 'none'; | ||
text2Element.style.display = 'inline'; | ||
setTimeout(() => { | ||
text1Element.style.display = 'inline'; | ||
text2Element.style.display = 'none'; | ||
}, 2_000); | ||
}; | ||
</script> | ||
|
||
<span bind:this={text1Element}>{originalText}</span> | ||
<span bind:this={text2Element} style="display: none;">{otherText}</span> |
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 |
---|---|---|
|
@@ -20,5 +20,6 @@ | |
"id": "Team id" | ||
}, | ||
"urlGenerated": "Generated URL" | ||
} | ||
}, | ||
"copy": "Copy" | ||
} |
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