Replace i18next with next-intl for translations and dynamic imports. Refactor System API calls to use os.platform() for accurate platform detection. Simplify and clean up dependencies in package.json.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import axios, {AxiosResponse} from "axios";
|
||||
import {configs} from "@/lib/configs";
|
||||
import * as electron from "electron";
|
||||
import * as os from "node:os";
|
||||
|
||||
export default class System{
|
||||
static verifyInput(input: string): boolean {
|
||||
@@ -34,7 +36,7 @@ export default class System{
|
||||
},
|
||||
params: {
|
||||
lang: lang,
|
||||
plateforme: 'web',
|
||||
plateforme: os.platform(),
|
||||
...params
|
||||
},
|
||||
url: configs.apiUrl + url,
|
||||
@@ -75,7 +77,7 @@ export default class System{
|
||||
},
|
||||
params: {
|
||||
lang: lang,
|
||||
plateforme: 'web',
|
||||
plateforme: os.platform(),
|
||||
},
|
||||
url: configs.apiUrl + url,
|
||||
data: data
|
||||
@@ -103,7 +105,7 @@ export default class System{
|
||||
},
|
||||
params: {
|
||||
lang: lang,
|
||||
plateforme: 'web',
|
||||
plateforme: os.platform(),
|
||||
},
|
||||
url: configs.apiUrl + url,
|
||||
data: data
|
||||
@@ -131,7 +133,7 @@ export default class System{
|
||||
url: configs.apiUrl + url,
|
||||
params: {
|
||||
lang: lang,
|
||||
plateforme: 'web',
|
||||
plateforme: os.platform(),
|
||||
},
|
||||
data: data
|
||||
})
|
||||
@@ -159,7 +161,7 @@ export default class System{
|
||||
url: configs.apiUrl + url,
|
||||
params: {
|
||||
lang: lang,
|
||||
plateforme: 'web',
|
||||
plateforme: os.platform(),
|
||||
},
|
||||
data: data
|
||||
})
|
||||
@@ -218,7 +220,7 @@ export default class System{
|
||||
url: configs.apiUrl + url,
|
||||
params: {
|
||||
lang: lang,
|
||||
plateforme: 'web',
|
||||
plateforme: os.platform(),
|
||||
},
|
||||
data: data
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user