Compare commits

...

4 Commits

7 changed files with 11 additions and 67 deletions

View File

@ -1,5 +0,0 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/.nx/cache
.angular

View File

@ -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"
}

View File

@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="author" content="Nicolas Cantu, Sosthene, Omar, Titouan">
<title>4NK Application</title>
<link rel="stylesheet" href="/src/assets/styles/style.css" />
</head>

View File

@ -2,7 +2,7 @@
"name": "sdk_client",
"version": "1.0.0",
"type": "module",
"description": "",
"description": "Client SDK 4NK - Web5 Platform",
"main": "dist/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
@ -10,42 +10,26 @@
"start": "vite --host 0.0.0.0",
"build": "tsc && vite build",
"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"
},
"keywords": [],
"author": "",
"author": "Nicolas Cantu",
"contributors": [
"Sosthene",
"Omar",
"Titouan"
],
"license": "ISC",
"devDependencies": {
"@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",
"ts-loader": "^9.5.1",
"typescript": "^5.3.3",
"vite": "^5.4.11",
"vite-plugin-static-copy": "^1.0.6",
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.2"
"vite-plugin-static-copy": "^1.0.6"
},
"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",
"html5-qrcode": "^2.3.8",
"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"
}
}

View File

@ -6,7 +6,7 @@ export class CryptoService {
public hexToBlob(hexString: string): Blob {
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 {

View File

@ -1,17 +1,6 @@
import Services from '../services/service';
import { getCorrectDOM } from './html.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
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() {
try {
// Generate CreateBtn

View File

@ -7,6 +7,7 @@ export default defineConfig({
server: {
port: 3003,
host: '0.0.0.0', // Permet l'accès depuis l'extérieur (Docker/Réseau)
allowedHosts: ['dev2.4nkweb.com'],
proxy: {
// Proxy pour le stockage
'/storage': {