diff --git a/README.md b/README.md index 18260824..72a99a79 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ # Remède Open Source and free alternative to Antidote. -[Data credits](https://remede.camarm.fr/FR#données-remède) • [License](https://github.com/camarm-dev/remede/blob/main/LICENSE) • [Website](https://remede.camarm.fr) • **[Download](https://remede.camarm.fr)** +[Open application](https://remede-app.camarm.fr) + +[Data credits](https://remede.camarm.fr/FR#données-remède) • [License](https://github.com/camarm-dev/remede/blob/main/LICENSE) • [Website](https://remede.camarm.fr) • **[Download](https://remede.camarm.fr)** • **[Try online](https://remede-app.camarm.fr)** diff --git a/app/android/.idea/deploymentTargetDropDown.xml b/app/android/.idea/deploymentTargetDropDown.xml new file mode 100644 index 00000000..7a9975aa --- /dev/null +++ b/app/android/.idea/deploymentTargetDropDown.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/android/.idea/migrations.xml b/app/android/.idea/migrations.xml new file mode 100644 index 00000000..f8051a6f --- /dev/null +++ b/app/android/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/package.json b/app/package.json index fe7dcfe5..dc34d7da 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "remede", "private": true, - "version": "1.0.0-beta.1", + "version": "1.0.0-rc", "type": "module", "license": "Cecill V2.1", "scripts": { diff --git a/app/src/functions/offline.ts b/app/src/functions/offline.ts index 236efa07..b36fe4ba 100644 --- a/app/src/functions/offline.ts +++ b/app/src/functions/offline.ts @@ -1,6 +1,7 @@ import {InformationsResponse} from "@/functions/types/api_responses"; import {Directory, Filesystem} from '@capacitor/filesystem' import {Preferences} from '@capacitor/preferences' +import {Capacitor} from "@capacitor/core"; async function getOfflineDictionaryStatus() { const status = JSON.parse((await Preferences.get({ key: 'offlineDictionary' })).value || '{}') @@ -62,12 +63,12 @@ async function deleteDictionary() { async function getRawDictionary() { - const file = await Filesystem.readFile({ - path: 'remedeSQLite.db', - directory: Directory.Data - }) + const path = (await getOfflineDictionaryStatus()).path + const newSrc = Capacitor.convertFileSrc(`${path}`) + + const file = await fetch(newSrc).then(resp => resp.arrayBuffer()) - return await file.data.arrayBuffer().then(buf => new Uint8Array(buf)) + return new Uint8Array(file) } export { diff --git a/app/src/views/SettingsPage.vue b/app/src/views/SettingsPage.vue index 0178fd84..687a177e 100644 --- a/app/src/views/SettingsPage.vue +++ b/app/src/views/SettingsPage.vue @@ -37,7 +37,7 @@ Supprimer - + Mettre à jour vers "{{ latestDictionary }}" @@ -71,7 +71,7 @@ Il est conseillé de redémarrer l'application après le téléchargement. - Télécharger le dictionnaire prendra environ 205Mb de stockage ! + Télécharger le dictionnaire prendra environ 220Mb de stockage ! @@ -158,6 +158,14 @@ export default { this.loading = true try { await downloadDictionary() + const successMessage = await toastController.create({ + header: 'Téléchargement réussi', + message: `Le dictionnaire hors-ligne a été téléchargé`, + duration: 5000, + color: 'success' + }) + + await successMessage.present() } catch (e) { const message = await toastController.create({ header: 'Échec de téléchargement', diff --git a/builds/remede.apk b/builds/remede.apk index 22176e8a..841cb4bb 100644 Binary files a/builds/remede.apk and b/builds/remede.apk differ diff --git a/docs/EN.md b/docs/EN.md index 3ba96e62..7145bd38 100644 --- a/docs/EN.md +++ b/docs/EN.md @@ -29,6 +29,12 @@ npm i ```shell npm i -g @ionic/cli ``` +- Install Git LFS +1. Install extension [here](https://packagecloud.io/github/git-lfs/install) +2. Setup extension +```shell +git lfs install +``` ### Mobile application @@ -55,6 +61,10 @@ npm run dev ```shell pip install fastapi uvicorn starlette ``` +- Fetch database with Git LFS +```shell +git lfs pull +``` - Start the server ```shell python3 server.py diff --git a/docs/FR.md b/docs/FR.md index f2c4ef7c..bf41e738 100644 --- a/docs/FR.md +++ b/docs/FR.md @@ -29,6 +29,10 @@ npm i ```shell npm i -g @ionic/cli ``` +- Installer Git LFS +```shell +git lfs install +``` ### Application mobile @@ -55,6 +59,10 @@ npm run dev ```shell pip install fastapi uvicorn starlette ``` +- Récupérer la base de données avec Git LFS +```shell +git lfs pull +``` - Lancer le serveur ```shell python3 server.py diff --git a/docs/index.html b/docs/index.html index e5668576..6d1380a6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -55,6 +55,9 @@ + + + Télécharger @@ -92,7 +95,18 @@ - Documentation + + + + + Documentation + + + + + + Ouvrir l'app +