Compare commits
4 Commits
4aa4079ec8
...
90376e364a
| Author | SHA1 | Date | |
|---|---|---|---|
| 90376e364a | |||
| 0970d1b0da | |||
| 6f508b4b8b | |||
| 584735ca02 |
@ -1,5 +0,0 @@
|
|||||||
# Add files here to ignore them from prettier formatting
|
|
||||||
/dist
|
|
||||||
/coverage
|
|
||||||
/.nx/cache
|
|
||||||
.angular
|
|
||||||
14
.prettierrc
14
.prettierrc
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"printWidth": 300,
|
|
||||||
"tabWidth": 2,
|
|
||||||
"useTabs": false,
|
|
||||||
"semi": true,
|
|
||||||
"singleQuote": true,
|
|
||||||
"quoteProps": "as-needed",
|
|
||||||
"trailingComma": "all",
|
|
||||||
"bracketSpacing": true,
|
|
||||||
"arrowParens": "always",
|
|
||||||
"requirePragma": false,
|
|
||||||
"insertPragma": false,
|
|
||||||
"endOfLine": "crlf"
|
|
||||||
}
|
|
||||||
@ -3,6 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta name="author" content="Nicolas Cantu, Sosthene, Omar, Titouan">
|
||||||
<title>4NK Application</title>
|
<title>4NK Application</title>
|
||||||
<link rel="stylesheet" href="/src/assets/styles/style.css" />
|
<link rel="stylesheet" href="/src/assets/styles/style.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
32
package.json
32
package.json
@ -2,7 +2,7 @@
|
|||||||
"name": "sdk_client",
|
"name": "sdk_client",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "",
|
"description": "Client SDK 4NK - Web5 Platform",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
@ -10,42 +10,26 @@
|
|||||||
"start": "vite --host 0.0.0.0",
|
"start": "vite --host 0.0.0.0",
|
||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
"deploy": "sudo cp -r dist/* /var/www/html/",
|
"deploy": "sudo cp -r dist/* /var/www/html/",
|
||||||
"prettify": "prettier --config ./.prettierrc --write \"src/**/*{.ts,.html,.css,.js}\"",
|
|
||||||
"build:dist": "tsc -p tsconfig.build.json"
|
"build:dist": "tsc -p tsconfig.build.json"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "Nicolas Cantu",
|
||||||
|
"contributors": [
|
||||||
|
"Sosthene",
|
||||||
|
"Omar",
|
||||||
|
"Titouan"
|
||||||
|
],
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-typescript": "^12.1.1",
|
"@rollup/plugin-typescript": "^12.1.1",
|
||||||
"copy-webpack-plugin": "^12.0.2",
|
|
||||||
"html-webpack-plugin": "^5.6.0",
|
|
||||||
"prettier": "^3.3.3",
|
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^6.0.1",
|
||||||
"ts-loader": "^9.5.1",
|
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"vite": "^5.4.11",
|
"vite": "^5.4.11",
|
||||||
"vite-plugin-static-copy": "^1.0.6",
|
"vite-plugin-static-copy": "^1.0.6"
|
||||||
"webpack": "^5.90.3",
|
|
||||||
"webpack-cli": "^5.1.4",
|
|
||||||
"webpack-dev-server": "^5.0.2"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/elements": "^19.0.1",
|
|
||||||
"@types/jsonwebtoken": "^9.0.9",
|
|
||||||
"@types/qrcode": "^1.5.5",
|
|
||||||
"@vitejs/plugin-react": "^4.3.1",
|
|
||||||
"@vitejs/plugin-vue": "^5.0.5",
|
|
||||||
"axios": "^1.7.8",
|
"axios": "^1.7.8",
|
||||||
"html5-qrcode": "^2.3.8",
|
|
||||||
"jose": "^6.0.11",
|
"jose": "^6.0.11",
|
||||||
"jsonwebtoken": "^9.0.2",
|
|
||||||
"pdf-lib": "^1.17.1",
|
|
||||||
"qr-scanner": "^1.4.2",
|
|
||||||
"qrcode": "^1.5.3",
|
|
||||||
"sweetalert2": "^11.14.5",
|
|
||||||
"vite-plugin-copy": "^0.1.6",
|
|
||||||
"vite-plugin-html": "^3.2.2",
|
|
||||||
"vite-plugin-wasm": "^3.3.0"
|
"vite-plugin-wasm": "^3.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export class CryptoService {
|
|||||||
|
|
||||||
public hexToBlob(hexString: string): Blob {
|
public hexToBlob(hexString: string): Blob {
|
||||||
const uint8Array = this.hexToUInt8Array(hexString);
|
const uint8Array = this.hexToUInt8Array(hexString);
|
||||||
return new Blob([uint8Array], { type: 'application/octet-stream' });
|
return new Blob([uint8Array as any], { type: 'application/octet-stream' });
|
||||||
}
|
}
|
||||||
|
|
||||||
public hexToUInt8Array(hexString: string): Uint8Array {
|
public hexToUInt8Array(hexString: string): Uint8Array {
|
||||||
|
|||||||
@ -1,17 +1,6 @@
|
|||||||
import Services from '../services/service';
|
import Services from '../services/service';
|
||||||
import { getCorrectDOM } from './html.utils';
|
import { getCorrectDOM } from './html.utils';
|
||||||
import { addSubscription } from './subscription.utils';
|
import { addSubscription } from './subscription.utils';
|
||||||
import QRCode from 'qrcode';
|
|
||||||
|
|
||||||
//Copy Address
|
|
||||||
export async function copyToClipboard(fullAddress: string) {
|
|
||||||
try {
|
|
||||||
await navigator.clipboard.writeText(fullAddress);
|
|
||||||
alert('Adresse copiée dans le presse-papiers !');
|
|
||||||
} catch (err) {
|
|
||||||
console.error('Failed to copy the address: ', err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Generate emojis list
|
//Generate emojis list
|
||||||
export function generateEmojiList(): string[] {
|
export function generateEmojiList(): string[] {
|
||||||
@ -220,18 +209,6 @@ export async function prepareAndSendPairingTx(): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function generateQRCode(spAddress: string) {
|
|
||||||
try {
|
|
||||||
const container = getCorrectDOM('login-4nk-component') as HTMLElement;
|
|
||||||
const currentUrl = 'https://' + window.location.host;
|
|
||||||
const url = await QRCode.toDataURL(currentUrl + '?sp_address=' + spAddress);
|
|
||||||
const qrCode = container?.querySelector('.qr-code img');
|
|
||||||
qrCode?.setAttribute('src', url);
|
|
||||||
} catch (err) {
|
|
||||||
console.error(err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function generateCreateBtn() {
|
export async function generateCreateBtn() {
|
||||||
try {
|
try {
|
||||||
// Generate CreateBtn
|
// Generate CreateBtn
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export default defineConfig({
|
|||||||
server: {
|
server: {
|
||||||
port: 3003,
|
port: 3003,
|
||||||
host: '0.0.0.0', // Permet l'accès depuis l'extérieur (Docker/Réseau)
|
host: '0.0.0.0', // Permet l'accès depuis l'extérieur (Docker/Réseau)
|
||||||
|
allowedHosts: ['dev2.4nkweb.com'],
|
||||||
proxy: {
|
proxy: {
|
||||||
// Proxy pour le stockage
|
// Proxy pour le stockage
|
||||||
'/storage': {
|
'/storage': {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user