From 199ac3de4509658d44e220b675b2567815607d02 Mon Sep 17 00:00:00 2001
From: Jordan Aasen <166539328+jaasen-livefront@users.noreply.github.com>
Date: Thu, 15 Aug 2024 07:59:00 -0700
Subject: [PATCH] [PM-10045] - SendCreated page (#10331)
* WIP - send created component
* WIP - send created page
* finalize send created component and specs
* add extra padding
* undo browser extension refresh
* fix tests
* fix error
---
apps/browser/src/_locales/en/messages.json | 21 +++
apps/browser/src/popup/app-routing.module.ts | 7 +
.../send-created/send-created.component.html | 28 ++++
.../send-created.component.spec.ts | 140 ++++++++++++++++++
.../send-created/send-created.component.ts | 82 ++++++++++
apps/web/src/locales/en/messages.json | 3 +
.../tools/send/services/send.service.spec.ts | 10 +-
libs/tools/send/send-ui/src/icons/index.ts | 3 +-
.../send-ui/src/icons/send-created.icon.ts | 16 ++
...end-list-items-container.component.spec.ts | 8 +-
.../send-list-items-container.component.ts | 4 +-
11 files changed, 317 insertions(+), 5 deletions(-)
create mode 100644 apps/browser/src/tools/popup/send-v2/send-created/send-created.component.html
create mode 100644 apps/browser/src/tools/popup/send-v2/send-created/send-created.component.spec.ts
create mode 100644 apps/browser/src/tools/popup/send-v2/send-created/send-created.component.ts
create mode 100644 libs/tools/send/send-ui/src/icons/send-created.icon.ts
diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json
index c65535e2e5..f24d1db484 100644
--- a/apps/browser/src/_locales/en/messages.json
+++ b/apps/browser/src/_locales/en/messages.json
@@ -2298,6 +2298,24 @@
"message": "Send created",
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
},
+ "createdSendSuccessfully": {
+ "message": "Send created successfully!",
+ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
+ },
+ "sendAvailability": {
+ "message": "The Send will be available to anyone with the link for the next $DAYS$ days.",
+ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated.",
+ "placeholders": {
+ "days": {
+ "content": "$1",
+ "example": "5"
+ }
+ }
+ },
+ "sendLinkCopied": {
+ "message": "Send link copied",
+ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
+ },
"editedSend": {
"message": "Send saved",
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
@@ -3813,6 +3831,9 @@
"copySuccessful": {
"message": "Copy Successful"
},
+ "copyLink": {
+ "message": "Copy link"
+ },
"upload": {
"message": "Upload"
},
diff --git a/apps/browser/src/popup/app-routing.module.ts b/apps/browser/src/popup/app-routing.module.ts
index 5c4c01bfc1..af85057550 100644
--- a/apps/browser/src/popup/app-routing.module.ts
+++ b/apps/browser/src/popup/app-routing.module.ts
@@ -54,6 +54,7 @@ import { PasswordGeneratorHistoryComponent } from "../tools/popup/generator/pass
import { SendAddEditComponent } from "../tools/popup/send/send-add-edit.component";
import { SendGroupingsComponent } from "../tools/popup/send/send-groupings.component";
import { SendTypeComponent } from "../tools/popup/send/send-type.component";
+import { SendCreatedComponent } from "../tools/popup/send-v2/send-created/send-created.component";
import { SendV2Component } from "../tools/popup/send-v2/send-v2.component";
import { AboutPageV2Component } from "../tools/popup/settings/about-page/about-page-v2.component";
import { AboutPageComponent } from "../tools/popup/settings/about-page/about-page.component";
@@ -370,6 +371,12 @@ const routes: Routes = [
canActivate: [authGuard],
data: { state: "edit-send" },
},
+ {
+ path: "send-created",
+ component: SendCreatedComponent,
+ canActivate: [authGuard],
+ data: { state: "send" },
+ },
{
path: "update-temp-password",
component: UpdateTempPasswordComponent,
diff --git a/apps/browser/src/tools/popup/send-v2/send-created/send-created.component.html b/apps/browser/src/tools/popup/send-v2/send-created/send-created.component.html
new file mode 100644
index 0000000000..9b56fa74d9
--- /dev/null
+++ b/apps/browser/src/tools/popup/send-v2/send-created/send-created.component.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+