fixed bugs found creating demo video

This commit is contained in:
addison 2021-02-16 13:11:14 -05:00
parent 1290ff2c40
commit 73bc46ae4a
5 changed files with 22 additions and 11 deletions

View File

@ -67,7 +67,7 @@
</select>
<div class="subtext">{{'deletionDateDesc' | i18n}}</div>
</div>
<div class="box-content-row" *ngIf="deletionDateSelect === 0">
<div class="box-content-row" *ngIf="deletionDateSelect === 0 && !editMode">
<input id="deletionDateCustom" type="datetime-local" name="deletionDate"
[(ngModel)]="deletionDate" required placeholder="MM/DD/YYYY HH:MM AM/PM" [readOnly]="disableSend">
</div>
@ -80,7 +80,7 @@
</select>
<div class="subtext">{{'expirationDateDesc' | i18n}}</div>
</div>
<div class="box-content-row" *ngIf="expirationDateSelect === 0">
<div class="box-content-row" *ngIf="expirationDateSelect === 0 && !editMode">
<input id="expirationDateCustom" type="datetime-local" name="expirationDate"
[(ngModel)]="expirationDate" required placeholder="MM/DD/YYYY HH:MM AM/PM" [readOnly]="disableSend">
</div>

View File

@ -26,11 +26,10 @@ export class AddEditComponent extends BaseAddEditComponent {
}
async refresh() {
this.password = null;
const send = await this.loadSend();
this.send = await send.decrypt();
this.hasPassword = this.send.password != null && this.send.password.trim() !== '';
this.deletionDate = this.dateToString(this.send.deletionDate);
this.expirationDate = this.dateToString(this.send.expirationDate);
}

View File

@ -43,7 +43,7 @@
[infiniteScrollContainer]="'#items .content'" [fromRoot]="true" (scrolled)="loadMore()">
<a *ngFor="let s of filteredSends" appStopClick (click)="selectSend(s.id)"
href="#" title="{{'viewItem' | i18n}}"
[ngClass]="{'active': s.id === activeSendId}">
[ngClass]="{'active': s.id === sendId}">
<div class="icon" aria-hidden="true">
<i class="fa fa-fw fa-lg" [ngClass]="s.type == 0 ? 'fa-file-o' : 'fa-file-text-o'"></i>
</div>
@ -68,7 +68,7 @@
</div>
</div>
<app-send-add-edit id="addEdit" class="details" *ngIf="action == 'add' || action == 'edit'" [sendId]="sendId" [type]="selectedSendType"
(onSavedSend)="refresh()" (onCancelled)="cancel()"></app-send-add-edit>
(onSavedSend)="savedSend($event)" (onCancelled)="cancel($event)" (onDeletedSend)="deletedSend($event)"></app-send-add-edit>
<div class="logo" *ngIf="!action">
<div class="content">
<div class="inner-content">

View File

@ -91,8 +91,20 @@ export class SendComponent extends BaseSendComponent implements OnInit, OnDestro
this.sendId = null;
}
async deletedSend(s: SendView) {
await this.refresh();
this.action = Action.None;
this.sendId = null;
}
async savedSend(s: SendView) {
console.log(s);
await this.refresh();
this.selectSend(s.id);
}
async selectSend(sendId: string) {
if (sendId === this.sendId) {
if (sendId === this.sendId && this.action === Action.Edit) {
return;
}
this.action = Action.Edit;

View File

@ -102,7 +102,7 @@
&:hover, &:focus, &.active {
@include themify($themes) {
background-color: themed('boxBackgroundHoverColor');
textarea {
> * {
background-color: themed('boxBackgroundHoverColor');
}
}
@ -169,7 +169,7 @@
&.box-content-row-multi {
width: 100%;
input:not([type="checkbox"]):not([type="checkbox"]) {
input:not([type="checkbox"]):not([type="radio"]) {
width: 100%;
}
@ -251,8 +251,8 @@
}
&.box-content-row-radio {
display: grid;
grid-template-columns: 1fr;
display: flex;
flex-direction: column;
.item {
display: flex;
flex: 1;