feat: display a warning on mobile phones
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
<h1>Matrix View for Followings</h1>
|
<h1>Matrix View for Followings</h1>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<nb-badge text="experimental" position="top right" status="success"></nb-badge>
|
<nb-badge text="experimental" position="top right" status="success"></nb-badge>
|
||||||
|
<app-not-optimized-for-mobile-devices></app-not-optimized-for-mobile-devices>
|
||||||
<app-filters></app-filters>
|
<app-filters></app-filters>
|
||||||
</nb-card-header>
|
</nb-card-header>
|
||||||
<nb-card-body>
|
<nb-card-body>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<nb-card-header style="position: relative;">
|
<nb-card-header style="position: relative;">
|
||||||
<h1>Table View for Followings</h1>
|
<h1>Table View for Followings</h1>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
|
<app-not-optimized-for-mobile-devices></app-not-optimized-for-mobile-devices>
|
||||||
<app-filters></app-filters>
|
<app-filters></app-filters>
|
||||||
</nb-card-header>
|
</nb-card-header>
|
||||||
<nb-card-body>
|
<nb-card-body>
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<div class="only-visible-on-mobile">
|
||||||
|
<p>This view is not optimized for mobile devices</p>
|
||||||
|
<p>For a better experience on mobile visit the <a [routerLink]="['/followings', 'list']">list view</a></p>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
.only-visible-on-mobile {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 573px) {
|
||||||
|
.only-visible-on-mobile {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { NotOptimizedForMobileDevicesComponent } from './not-optimized-for-mobile-devices.component';
|
||||||
|
|
||||||
|
describe('NotOptimizedForMobilesComponent', () => {
|
||||||
|
let component: NotOptimizedForMobileDevicesComponent;
|
||||||
|
let fixture: ComponentFixture<NotOptimizedForMobileDevicesComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ NotOptimizedForMobileDevicesComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(NotOptimizedForMobileDevicesComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-not-optimized-for-mobile-devices',
|
||||||
|
templateUrl: './not-optimized-for-mobile-devices.component.html',
|
||||||
|
styleUrls: ['./not-optimized-for-mobile-devices.component.scss']
|
||||||
|
})
|
||||||
|
export class NotOptimizedForMobileDevicesComponent {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -14,12 +14,15 @@ import {
|
|||||||
} from "@nebular/theme";
|
} from "@nebular/theme";
|
||||||
import {FiltersComponent} from './components/filters/filters.component';
|
import {FiltersComponent} from './components/filters/filters.component';
|
||||||
import {ReactiveFormsModule} from "@angular/forms";
|
import {ReactiveFormsModule} from "@angular/forms";
|
||||||
|
import {NotOptimizedForMobileDevicesComponent} from './components/not-optimized-for-mobile-devices/not-optimized-for-mobile-devices.component';
|
||||||
|
import {RouterLink} from "@angular/router";
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AccountComponent,
|
AccountComponent,
|
||||||
FiltersComponent,
|
FiltersComponent,
|
||||||
|
NotOptimizedForMobileDevicesComponent,
|
||||||
],
|
],
|
||||||
providers: [],
|
providers: [],
|
||||||
imports: [
|
imports: [
|
||||||
@@ -38,6 +41,7 @@ import {ReactiveFormsModule} from "@angular/forms";
|
|||||||
NbIconModule,
|
NbIconModule,
|
||||||
NbButtonModule,
|
NbButtonModule,
|
||||||
NbInputModule,
|
NbInputModule,
|
||||||
|
RouterLink,
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
AccountComponent,
|
AccountComponent,
|
||||||
@@ -48,6 +52,7 @@ import {ReactiveFormsModule} from "@angular/forms";
|
|||||||
NbIconModule,
|
NbIconModule,
|
||||||
NbButtonModule,
|
NbButtonModule,
|
||||||
NbInputModule,
|
NbInputModule,
|
||||||
|
NotOptimizedForMobileDevicesComponent,
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class SharedModule {
|
export class SharedModule {
|
||||||
|
|||||||
Reference in New Issue
Block a user