diff --git a/package-lock.json b/package-lock.json index 555f0c8..ff9c819 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", + "ngx-clipboard": "^15.1.0", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" @@ -7916,6 +7917,34 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "node_modules/ngx-clipboard": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/ngx-clipboard/-/ngx-clipboard-15.1.0.tgz", + "integrity": "sha512-dUJl1cNtdkCqL953oAhP7wmUPFrqW2aDg5OPhwPU9R3cLEdQgU2NbsHEUz4zaPyEopTXu8SR37onVm1Ep8qOHg==", + "dependencies": { + "ngx-window-token": ">=6.0.0", + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@angular/common": ">=13.0.0", + "@angular/core": ">=13.0.0" + } + }, + "node_modules/ngx-window-token": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ngx-window-token/-/ngx-window-token-6.0.0.tgz", + "integrity": "sha512-IeLKO1jzfzSvZ6vlAt4QSY/B5XcHEhdOwTjqvWEPt6/esWV9T3mA2ln10kj6SCc9pUSx4NybxE10gcyyYroImg==", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=12.20.x" + }, + "peerDependencies": { + "@angular/common": ">=13.0.0", + "@angular/core": ">=13.0.0" + } + }, "node_modules/nice-napi": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", @@ -17497,6 +17526,23 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "ngx-clipboard": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/ngx-clipboard/-/ngx-clipboard-15.1.0.tgz", + "integrity": "sha512-dUJl1cNtdkCqL953oAhP7wmUPFrqW2aDg5OPhwPU9R3cLEdQgU2NbsHEUz4zaPyEopTXu8SR37onVm1Ep8qOHg==", + "requires": { + "ngx-window-token": ">=6.0.0", + "tslib": "^2.0.0" + } + }, + "ngx-window-token": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ngx-window-token/-/ngx-window-token-6.0.0.tgz", + "integrity": "sha512-IeLKO1jzfzSvZ6vlAt4QSY/B5XcHEhdOwTjqvWEPt6/esWV9T3mA2ln10kj6SCc9pUSx4NybxE10gcyyYroImg==", + "requires": { + "tslib": "^2.0.0" + } + }, "nice-napi": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", diff --git a/package.json b/package.json index 32fffda..0f5a9ec 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", + "ngx-clipboard": "^15.1.0", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/src/app/app.module.ts b/src/app/app.module.ts index aee0c8a..bc39299 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -7,7 +7,8 @@ import { AppComponent } from './app.component'; import { DecryptComponent } from './pages/decrypt/decrypt.component'; import { EncryptComponent } from './pages/encrypt/encrypt.component'; import { HttpClient } from "@angular/common/http"; -import {FormsModule} from "@angular/forms"; +import { FormsModule } from "@angular/forms"; +import {ClipboardModule} from "ngx-clipboard"; @NgModule({ declarations: [ @@ -19,7 +20,8 @@ import {FormsModule} from "@angular/forms"; BrowserModule, AppRoutingModule, HttpClientModule, - FormsModule + FormsModule, + ClipboardModule ], providers: [HttpClient], bootstrap: [AppComponent] diff --git a/src/app/globals/api.ts b/src/app/globals/api.ts new file mode 100644 index 0000000..01f0684 --- /dev/null +++ b/src/app/globals/api.ts @@ -0,0 +1,3 @@ +export const xVault_Token = 'vdk2ch'; +export const xVault_TTL = '25h'; +export const api_endpoint = 'http://vault.vdk2ch.ru:8200/v1/sys/wrapping'; diff --git a/src/app/models/ResponseData.ts b/src/app/models/ResponseUnwrap.ts similarity index 64% rename from src/app/models/ResponseData.ts rename to src/app/models/ResponseUnwrap.ts index ab8fd94..cdfc6dc 100644 --- a/src/app/models/ResponseData.ts +++ b/src/app/models/ResponseUnwrap.ts @@ -1,11 +1,11 @@ -export interface IResponseData { +export interface IUnwrapped { "request_id": string, "lease_id": string, "lease_duration": number, "renewable": boolean, "data": { - "body": { - "token": string + "dataToWrap": { + First_string: string } }, "warnings": null diff --git a/src/app/models/ResponseToken.ts b/src/app/models/ResponseWrap.ts similarity index 92% rename from src/app/models/ResponseToken.ts rename to src/app/models/ResponseWrap.ts index 657c398..4db80e7 100644 --- a/src/app/models/ResponseToken.ts +++ b/src/app/models/ResponseWrap.ts @@ -1,4 +1,4 @@ -export interface IWrap +export interface IWrapped { "request_id": string, "lease_id": string, diff --git a/src/app/pages/decrypt/decrypt.component.html b/src/app/pages/decrypt/decrypt.component.html index 71af895..7f15e06 100644 --- a/src/app/pages/decrypt/decrypt.component.html +++ b/src/app/pages/decrypt/decrypt.component.html @@ -5,5 +5,5 @@
-
- +
- +
-