|
@@ -3,7 +3,7 @@
|
|
|
<form (ngSubmit)="publishPost()" #postForm="ngForm">
|
|
|
|
|
|
<div class="input-container">
|
|
|
- <ion-item>
|
|
|
+ <ion-item lines="none">
|
|
|
<div class="upload-container">
|
|
|
<!-- 上传文件盒子 -->
|
|
|
<div *ngIf="selectedFiles.length === 0" class="upload-box" (click)="fileInput.click()">
|
|
@@ -12,22 +12,23 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 显示已上传的文件 -->
|
|
|
- <div *ngIf="selectedFiles.length > 0">
|
|
|
- <div *ngFor="let file of selectedFiles" class="file-preview">
|
|
|
- <ng-container *ngIf="file.isImage; else videoTemplate">
|
|
|
- <img [src]="file.src" class="file-image" />
|
|
|
- </ng-container>
|
|
|
- <ng-template #videoTemplate>
|
|
|
- <video [src]="file.src" class="file-image" controls></video>
|
|
|
- </ng-template>
|
|
|
- <ion-button (click)="removeFile(file)" fill="clear" class="remove-button">
|
|
|
- <ion-icon name="trash"></ion-icon>
|
|
|
- </ion-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </ion-item>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <ion-item *ngIf="selectedFiles.length > 0" lines="none">
|
|
|
+ <div *ngFor="let file of selectedFiles" style="position: relative; width: 100%; overflow: hidden; height: 100px; margin-bottom: 10px;">
|
|
|
+ <ng-container *ngIf="file.isImage; else videoTemplate">
|
|
|
+ <img [src]="file.src" style="width: auto; height: 100%; border-radius: 10px;" >
|
|
|
+ </ng-container>
|
|
|
+ <ng-template #videoTemplate>
|
|
|
+ <video [src]="file.src" style="width: auto; height: 100%; border-radius: 10px;" controls></video>
|
|
|
+ </ng-template>
|
|
|
+ <ion-button (click)="removeFile(file)" fill="clear" style="position: absolute; top: 5px; right: 5px;">
|
|
|
+ <ion-icon name="close"></ion-icon>
|
|
|
+ </ion-button>
|
|
|
+ </div>
|
|
|
+ </ion-item>
|
|
|
+ </div>
|
|
|
+</ion-item>
|
|
|
+</div>
|
|
|
|
|
|
<div class="input-container">
|
|
|
<input type="text" id="input-title" [(ngModel)]="postTitle" name="title" required>
|
|
@@ -40,6 +41,32 @@
|
|
|
<label for="input-content" class="label">正文</label>
|
|
|
<div class="underline"></div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <ion-item>
|
|
|
+ <ion-label position="stacked">标记地点</ion-label>
|
|
|
+ <ion-select interface="popover" [(ngModel)]="location" name="location">
|
|
|
+ </ion-select>
|
|
|
+ </ion-item>
|
|
|
+
|
|
|
+ <!-- 公开可见开关 -->
|
|
|
+ <div class="input-container">
|
|
|
+ <ion-item class="custom-select">
|
|
|
+ <ion-label>可见性</ion-label>
|
|
|
+ <ion-select [(ngModel)]="visibility" name="publicVisibility">
|
|
|
+ <ion-select-option value="none">全部可见</ion-select-option>
|
|
|
+ <ion-select-option value="onlyTo">仅给谁看</ion-select-option>
|
|
|
+ <ion-select-option value="mutualFriends">仅互关好友可见</ion-select-option>
|
|
|
+ <ion-select-option value="onlyMe">仅自己可见</ion-select-option>
|
|
|
+ </ion-select>
|
|
|
+ </ion-item>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 高级选项 -->
|
|
|
+ <ion-item>
|
|
|
+ <ion-label>高级选项</ion-label>
|
|
|
+ <ion-checkbox [(ngModel)]="saveToAlbum" name="saveToAlbum">保存到相册</ion-checkbox>
|
|
|
+ </ion-item>
|
|
|
+
|
|
|
</form>
|
|
|
</ion-content>
|
|
|
|