-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
202896f
commit b221736
Showing
29 changed files
with
1,392 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
export default defineI18nConfig(() => ({ | ||
legacy: false, | ||
locale: 'en', | ||
messages: { | ||
en: { | ||
welcome: 'Welcome', | ||
}, | ||
fr: { | ||
welcome: 'Bienvenue', | ||
}, | ||
}, | ||
fallbackLocale: 'en', | ||
})); |
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
"type": "module", | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
|
||
"scripts": { | ||
"dev": "nuxt dev", | ||
"build": "nuxt build", | ||
|
@@ -19,12 +18,16 @@ | |
"typecheck": "tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"@corentinth/chisels": "^1.1.0", | ||
"@nuxt/fonts": "^0.10.2", | ||
"@nuxt/icon": "^1.5.6", | ||
"@nuxtjs/color-mode": "^3.5.2", | ||
"@nuxtjs/i18n": "^8.5.5", | ||
"@nuxtjs/seo": "2.0.0-rc.23", | ||
"@pinia/nuxt": "^0.5.5", | ||
"class-variance-authority": "^0.7.0", | ||
"clsx": "^2.1.1", | ||
"lodash-es": "^4.17.21", | ||
"lucide-vue-next": "^0.453.0", | ||
"nuxt": "^3.13.2", | ||
"radix-vue": "^1.9.7", | ||
|
@@ -37,6 +40,7 @@ | |
"devDependencies": { | ||
"@antfu/eslint-config": "^3.8.0", | ||
"@nuxtjs/tailwindcss": "^6.12.2", | ||
"@types/lodash-es": "^4.17.12", | ||
"@vueuse/core": "^11.1.0", | ||
"@vueuse/nuxt": "^11.1.0", | ||
"eslint": "^9.13.0", | ||
|
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,4 @@ | ||
/* TEAM */ | ||
Developer: Corentin Thomasset | ||
Site: https://corentin.tech | ||
Twitter: @cthmsst |
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
app: | ||
title: IT-Tools | ||
description: The open-source collection of handy online tools to help developers in their daily life. | ||
home: | ||
all-the-tools: All the tools | ||
search-tools: Search for a tool | ||
open-source: Open Source | ||
free: Free | ||
self-hostable: Self-hostable | ||
open-tool: Open tool | ||
footer: | ||
resources: | ||
title: Resources | ||
all-tools: All the tools | ||
github: GitHub repository | ||
support: Support IT-Tools | ||
license: License | ||
support: | ||
title: Support | ||
report-bug: Report a bug | ||
request-feature: Request a feature | ||
contribute: Contribute to the project | ||
contact: Contact me | ||
friends: | ||
title: Friends | ||
tools: | ||
token-generator: | ||
title: Token Generator | ||
description: >- | ||
Generate random string with the characters you want, uppercase, lowercase | ||
letters, numbers and/or symbols. |
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,29 @@ | ||
app: | ||
title: IT-Tools | ||
description: La collection open-source d'outils en ligne pour aider les devs dans leur vie quotidienne. | ||
home: | ||
all-the-tools: Tous les outils | ||
search-tools: Rechercher un outil | ||
open-source: Open Source | ||
free: Gratuit | ||
self-hostable: Self-hostable | ||
open-tool: Ouvrir l'outil | ||
footer: | ||
resources: | ||
title: Ressources | ||
all-tools: Tous les outils | ||
github: Dépôt GitHub | ||
support: Soutenir IT-Tools | ||
license: Licence | ||
support: | ||
title: Support | ||
report-bug: Signaler un bug | ||
request-feature: Demander une fonctionnalité | ||
contribute: Contribuer au projet | ||
contact: Me contacter | ||
friends: | ||
title: Ami·e·s | ||
tools: | ||
token-generator: | ||
title: Générateur de token | ||
description: Générer des chaines de caractères aléatoires, contrôlez les caractères que vous voulez, lettres majuscules, minuscules, chiffres et/ou symboles. |
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
21 changes: 21 additions & 0 deletions
21
packages/app/src/modules/shared/composables/useRefreshableState.test.ts
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,21 @@ | ||
// @vitest-environment nuxt | ||
import { describe, expect, test } from 'vitest'; | ||
import { useRefreshableState } from './useRefreshableState'; | ||
|
||
describe('useRefreshableState composables', () => { | ||
describe('useRefreshableState', () => { | ||
test('the tuple provided by useRefreshableState contain the state that is the result of the provided function and a refresh function', () => { | ||
let index = 0; | ||
|
||
const [state, refresh] = useRefreshableState('key', () => ++index); | ||
|
||
expect(state.value).to.equal(1); | ||
expect(index).to.equal(1); | ||
|
||
refresh(); | ||
|
||
expect(state.value).to.equal(2); | ||
expect(index).to.equal(2); | ||
}); | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
packages/app/src/modules/shared/composables/useRefreshableState.ts
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,12 @@ | ||
import { get } from '@vueuse/core'; | ||
|
||
export function useRefreshableState<T>(key: string, getState: () => T | Ref<T>) { | ||
const state = useState(key, getState); | ||
|
||
const refresh = () => { | ||
const value = getState(); | ||
state.value = get(value); | ||
}; | ||
|
||
return [state, refresh] as const; | ||
} |
Oops, something went wrong.