This commit is contained in:
onsaliyo 2021-02-23 19:18:46 +01:00
parent 0b84c0987e
commit 638467e9c4
4 changed files with 56 additions and 36 deletions

View File

@ -13,12 +13,14 @@ import { PromptEventoPage} from './prompt-evento/prompt-evento.page'
import { GaleriamodalPageModule } from './galeriamodal/galeriamodal.module'; import { GaleriamodalPageModule } from './galeriamodal/galeriamodal.module';
import { MatMenuModule } from '@angular/material/menu'; import { MatMenuModule } from '@angular/material/menu';
import { LoginPage } from './login/login.page'; import { LoginPage } from './login/login.page';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations' import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MatIconModule } from '@angular/material/icon';
@NgModule({ @NgModule({
declarations: [AppComponent, PerfilDiscotecaPage, PromptEventoPage, LoginPage], declarations: [AppComponent, PerfilDiscotecaPage, PromptEventoPage, LoginPage],
entryComponents: [], entryComponents: [],
imports: [BrowserModule, HttpClientModule, IonicModule.forRoot(), AppRoutingModule, ReactiveFormsModule, GaleriamodalPageModule, MatMenuModule, BrowserAnimationsModule], imports: [BrowserModule, HttpClientModule, IonicModule.forRoot(), AppRoutingModule, ReactiveFormsModule, GaleriamodalPageModule, MatMenuModule, BrowserAnimationsModule, MatIconModule],
providers: [ providers: [
StatusBar, StatusBar,
SplashScreen, SplashScreen,

View File

@ -13,6 +13,38 @@
<ion-row> <ion-row>
<ion-img class="fotoPerfil" width="100%" height="100%" [src]='fotoSrc' alt='barraquinha'></ion-img> <ion-img class="fotoPerfil" width="100%" height="100%" [src]='fotoSrc' alt='barraquinha'></ion-img>
<div class="textoPie">{{nombre}}</div> <div class="textoPie">{{nombre}}</div>
<div class="menuBotones">
<button mat-icon-button [matMenuTriggerFor]="menu">
<ion-icon name="settings" class="settingsIcon"></ion-icon>
</button>
<mat-menu #menu="matMenu" xPositon="after" yPosition="above">
<button mat-menu-item>
<ion-icon name="image" slot="icon-only"></ion-icon>
<input type="file" (change)="loadImageFromDevice($event);cargarImagen()" id="file-input-perfil" accept="image/png, image/jpeg">
</button>
<button mat-menu-item (click)="enableEdit()" label="editar" [disabled]='editEnabled'>
<ion-icon name="create"></ion-icon>
</button>
<button mat-menu-item (click)="saveEdit()" label="guardar" [disabled]='editDisabled'>
<ion-icon name="save"></ion-icon>
</button>
<button mat-menu-item (click)="cancelEdit()" [disabled]='editDisabled'>
Cancelar
</button>
<button mat-menu-item (click)="addEvento()">
<ion-icon name="add-circle-outline">
</ion-icon>
Añadir evento
</button>
</mat-menu>
</div>
</ion-row> </ion-row>
@ -73,36 +105,7 @@
</ion-row> </ion-row>
<ion-row> <ion-row>
<button mat-icon-button [matMenuTriggerFor]="menu">
<ion-icon name="create"></ion-icon>
</button>
<mat-menu #menu="matMenu">
<button mat-menu-item [disabled]='editDisabled'>
<ion-icon name="image" slot="icon-only"></ion-icon>
<input type="file" (change)="loadImageFromDevice($event);cargarImagen()" id="file-input-perfil" accept="image/png, image/jpeg">
</button>
<button mat-menu-item (click)="enableEdit()" label="editar" [disabled]='editEnabled'>
<ion-icon name="create"></ion-icon>
</button>
<button mat-menu-item (click)="saveEdit()" label="guardar" [disabled]='editDisabled'>
<ion-icon name="save"></ion-icon>
</button>
<button mat-menu-item (click)="cancelEdit()" [disabled]='editDisabled'>
Cancelar
</button>
<button mat-menu-item (click)="addEvento()">
<ion-icon name="add-circle-outline">
</ion-icon>
Añadir evento
</button>
</mat-menu>
</ion-row> </ion-row>
</ion-grid> </ion-grid>
</div> </div>

View File

@ -44,7 +44,6 @@
.galeria{ .galeria{
display: block;
max-width: 300px; max-width: 300px;
max-height: auto; max-height: auto;
margin: auto; margin: auto;
@ -59,7 +58,7 @@
} }
.eventos{ .eventos{
display:block; float: left;
} }
.evento:hover{ .evento:hover{
@ -76,3 +75,21 @@
ion-slides { ion-slides {
height: 200px; height: 200px;
} }
button{
background-color: transparent;
}
.settingsIcon{
font-size: large;
background-color: white;
}
.menuBotones{
position: relative;
float: left;
bottom: 40px;
left: 20px;
}

View File

@ -5,7 +5,6 @@ import { AlertController } from '@ionic/angular';
import { ViewChild } from '@angular/core'; import { ViewChild } from '@angular/core';
import { Evento } from '../evento'; import { Evento } from '../evento';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
import { THIS_EXPR } from '@angular/compiler/src/output/output_ast'; import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';
import { GaleriamodalPage } from '../galeriamodal/galeriamodal.page'; import { GaleriamodalPage } from '../galeriamodal/galeriamodal.page';
import { stringify } from '@angular/compiler/src/util'; import { stringify } from '@angular/compiler/src/util';
@ -18,7 +17,6 @@ import { stringify } from '@angular/compiler/src/util';
export class PerfilDiscotecaPage implements OnInit { export class PerfilDiscotecaPage implements OnInit {
@ViewChild('IonSlides') slides: IonSlides; @ViewChild('IonSlides') slides: IonSlides;
@ViewChild('MatMenuTrigger') trigger: MatMenuTrigger;
nombre: string; nombre: string;
telefono: number; telefono: number;
localizacion: string; localizacion: string;