- {{'sendInformation' | i18n}}
+ {{'editSend' | i18n}}
-
+
- {{'name' | i18n}}
- {{send.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{'options' | i18n}}
+
+
+
+
+
+
+
+ {{'deletionDateDesc' | i18n}}
+
+
+
+
+ {{'expirationDateDesc' | i18n}}
+
+
+
+
+
+
+
+
+ {{'maxAccessCountDesc' | i18n}}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{'sendPasswordDesc' | i18n}}
+
+
+
+ {{'notes' | i18n}}
+
+
+
+
+
+ {{'sendNotesDesc' | i18n}}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/send/add-edit.component.ts b/src/app/send/add-edit.component.ts
index bbffa41ba4..e32ea32c44 100644
--- a/src/app/send/add-edit.component.ts
+++ b/src/app/send/add-edit.component.ts
@@ -1,11 +1,12 @@
import { DatePipe } from '@angular/common';
-import { Component } from '@angular/core';
+import { Component, Input } from '@angular/core';
import { EnvironmentService } from 'jslib/abstractions/environment.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { MessagingService } from 'jslib/abstractions/messaging.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
+import { PolicyService } from 'jslib/abstractions/policy.service';
import { SendService } from 'jslib/abstractions/send.service';
import { UserService } from 'jslib/abstractions/user.service';
@@ -19,8 +20,13 @@ export class AddEditComponent extends BaseAddEditComponent {
constructor(i18nService: I18nService, platformUtilsService: PlatformUtilsService,
environmentService: EnvironmentService, datePipe: DatePipe,
sendService: SendService, userService: UserService,
- messagingService: MessagingService) {
+ messagingService: MessagingService, policyService: PolicyService) {
super(i18nService, platformUtilsService, environmentService,
- datePipe, sendService, userService, messagingService);
+ datePipe, sendService, userService, messagingService, policyService);
+ }
+
+ async refresh() {
+ const send = await this.loadSend();
+ this.send = await send.decrypt();
}
}
diff --git a/src/app/send/send.component.html b/src/app/send/send.component.html
index 9315c4e6a4..2fd22a5628 100644
--- a/src/app/send/send.component.html
+++ b/src/app/send/send.component.html
@@ -41,7 +41,7 @@
+ {{'share' | i18n}}
+
+
+
+
+
-
+
diff --git a/src/app/send/send.component.ts b/src/app/send/send.component.ts
index 68889f9e0e..e12a070896 100644
--- a/src/app/send/send.component.ts
+++ b/src/app/send/send.component.ts
@@ -2,13 +2,16 @@ import {
Component,
NgZone,
OnInit,
+ ViewChild,
} from '@angular/core';
import { EnvironmentService } from 'jslib/abstractions/environment.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
+import { PolicyService } from 'jslib/abstractions/policy.service';
import { SearchService } from 'jslib/abstractions/search.service';
import { SendService } from 'jslib/abstractions/send.service';
+import { UserService } from 'jslib/abstractions/user.service';
import { SendComponent as BaseSendComponent } from 'jslib/angular/components/send/send.component';
@@ -16,6 +19,8 @@ import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
import { SendView } from 'jslib/models/view/sendView';
+import { AddEditComponent } from './add-edit.component';
+
enum Action {
None = '',
Add = 'add',
@@ -27,15 +32,24 @@ enum Action {
templateUrl: 'send.component.html',
})
export class SendComponent extends BaseSendComponent implements OnInit {
+ @ViewChild(AddEditComponent) addEditComponent: AddEditComponent;
+
sendId: string;
action: Action = Action.None;
constructor(sendService: SendService, i18nService: I18nService,
platformUtilsService: PlatformUtilsService, environmentService: EnvironmentService,
broadcasterService: BroadcasterService, ngZone: NgZone,
- searchService: SearchService) {
+ searchService: SearchService, policyService: PolicyService,
+ userService: UserService) {
super(sendService, i18nService, platformUtilsService,
- environmentService, broadcasterService, ngZone, searchService);
+ environmentService, broadcasterService, ngZone, searchService,
+ policyService, userService);
+ }
+
+ async ngOnInit() {
+ super.ngOnInit();
+ await this.load();
}
addSend() {
@@ -47,9 +61,14 @@ export class SendComponent extends BaseSendComponent implements OnInit {
return;
}
- selectSend(send: SendView) {
- this.sendId = send.id;
+ async selectSend(sendId: string) {
+ this.sendId = sendId;
this.action = Action.Edit;
+
+ if (this.addEditComponent != null) {
+ this.addEditComponent.sendId = this.sendId;
+ await this.addEditComponent.refresh();
+ }
}
get selectedSendType() {
diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json
index 862ea26f90..8e6068a2f8 100644
--- a/src/locales/en/messages.json
+++ b/src/locales/en/messages.json
@@ -1515,11 +1515,58 @@
"message": "Search Sends",
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
},
- "sendInformation": {
- "message": "Send Information",
+ "editSend": {
+ "message": "Edit Send",
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
},
"myVault": {
"message": "My Vault"
+ },
+ "text": {
+ "message": "Text"
+ },
+ "deletionDate": {
+ "message": "Deletion Date"
+ },
+ "deletionDateDesc": {
+ "message": "The Send will be permanently deleted on the specified date and time.",
+ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
+ },
+ "expirationDate": {
+ "message": "Expiration Date"
+ },
+ "expirationDateDesc": {
+ "message": "If set, access to this Send will expire on the specified date and time.",
+ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
+ },
+ "maxAccessCount": {
+ "message": "Maximum Access Count"
+ },
+ "maxAccessCountDesc": {
+ "message": "If set, users will no longer be able to access this Send once the maximum access count is reached.",
+ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
+ },
+ "currentAccessCount": {
+ "message": "Current Access Count"
+ },
+ "disableSend": {
+ "message": "Disable this Send so that no one can access it.",
+ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
+ },
+ "sendPasswordDesc": {
+ "message": "Optionally require a password for users to access this Send.",
+ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
+ },
+ "sendNotesDesc": {
+ "message": "Private notes about this Send.",
+ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
+ },
+ "sendLink": {
+ "message": "Send Link",
+ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
+ },
+ "textHiddenByDefault": {
+ "message": "When accessing the Send, hide the text by default",
+ "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
}
}
diff --git a/src/scss/box.scss b/src/scss/box.scss
index 01c1b11896..19d20b1d4d 100644
--- a/src/scss/box.scss
+++ b/src/scss/box.scss
@@ -102,6 +102,9 @@
&:hover, &:focus, &.active {
@include themify($themes) {
background-color: themed('boxBackgroundHoverColor');
+ > * {
+ background-color: themed('boxBackgroundHoverColor');
+ }
}
}
diff --git a/src/scss/misc.scss b/src/scss/misc.scss
index 7e780c0d1d..2ae5737ea3 100644
--- a/src/scss/misc.scss
+++ b/src/scss/misc.scss
@@ -4,6 +4,14 @@ small {
font-size: $font-size-small;
}
+.subtext {
+ font-size: $font-size-small;
+ @include themify($themes) {
+ color: themed('subtextColor') !important;
+ }
+ padding-top: 5px;
+}
+
.bg-primary {
@include themify($themes) {
background-color: themed('primaryColor') !important;
diff --git a/src/scss/variables.scss b/src/scss/variables.scss
index b5415db96c..98ab045672 100644
--- a/src/scss/variables.scss
+++ b/src/scss/variables.scss
@@ -88,6 +88,7 @@ $themes: (
passwordSpecialColor: #c40800,
calloutBorderColor: $border-color-dark,
calloutBackgroundColor: $background-color,
+ subtextColor: #6c757d,
),
dark: (
textColor: #ffffff,
@@ -138,6 +139,7 @@ $themes: (
passwordSpecialColor: #ff7c70,
calloutBorderColor: #2f2f2f,
calloutBackgroundColor: #363636,
+ subtextColor: #938a82,
),
nord: (
textColor: $nord5,
@@ -188,6 +190,7 @@ $themes: (
passwordSpecialColor: $nord12,
calloutBorderColor: $nord1,
calloutBackgroundColor: $nord2,
+ subtextColor: $nord4,
),
);