Skip to content

Commit

Permalink
Add message on certain pages about mobile not being supported (#2914)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nateowami authored Dec 18, 2024
1 parent a13bb94 commit 1897259
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<app-mobile-not-supported></app-mobile-not-supported>
<h1>Serval Administration</h1>

<app-serval-projects></app-serval-projects>
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Component } from '@angular/core';
import { MobileNotSupportedComponent } from '../shared/mobile-not-supported/mobile-not-supported.component';
import { ServalProjectsComponent } from './serval-projects.component';

@Component({
selector: 'app-serval-administration',
templateUrl: './serval-administration.component.html',
styleUrls: ['./serval-administration.component.scss'],
standalone: true,
imports: [ServalProjectsComponent]
imports: [ServalProjectsComponent, MobileNotSupportedComponent]
})
export class ServalAdministrationComponent {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<app-mobile-not-supported></app-mobile-not-supported>

@if (showProjectTitle) {
<h1>{{ projectName }}</h1>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { filterNullish } from 'xforge-common/util/rxjs-util';
import { ParatextService } from '../core/paratext.service';
import { SFProjectService } from '../core/sf-project.service';
import { BuildDto } from '../machine-api/build-dto';
import { MobileNotSupportedComponent } from '../shared/mobile-not-supported/mobile-not-supported.component';
import { NoticeComponent } from '../shared/notice/notice.component';
import { SharedModule } from '../shared/shared.module';
import { projectLabel } from '../shared/utils';
Expand All @@ -38,7 +39,14 @@ function projectType(project: TranslateSource | SFProjectProfile): string {
selector: 'app-serval-project',
templateUrl: './serval-project.component.html',
styleUrls: ['./serval-project.component.scss'],
imports: [CommonModule, NoticeComponent, SharedModule, UICommonModule, DraftInformationComponent],
imports: [
CommonModule,
NoticeComponent,
SharedModule,
UICommonModule,
DraftInformationComponent,
MobileNotSupportedComponent
],
standalone: true
})
export class ServalProjectComponent extends DataLoadingComponent implements OnInit {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<app-notice class="hide-gt-md" type="warning" icon="warning" mode="fill-dark">
This page is not supported on mobile and may be broken.
</app-notice>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';
import { NoticeComponent } from '../notice/notice.component';

@Component({
selector: 'app-mobile-not-supported',
standalone: true,
imports: [NoticeComponent],
templateUrl: './mobile-not-supported.component.html'
})
export class MobileNotSupportedComponent {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<app-mobile-not-supported></app-mobile-not-supported>
<div class="body-content">
<h1>System Administration</h1>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { TRANSLOCO_CONFIG, TRANSLOCO_LOADER, TranslocoModule } from '@ngneat/tra
import { ngfModule } from 'angular-file';
import { OwnerComponent } from 'xforge-common/owner/owner.component';
import { ProjectSelectComponent } from '../app/project-select/project-select.component';
import { MobileNotSupportedComponent } from '../app/shared/mobile-not-supported/mobile-not-supported.component';
import { PageNotFoundComponent } from '../app/shared/page-not-found/page-not-found.component';
import { SyncProgressComponent } from '../app/sync/sync-progress/sync-progress.component';
import { AuthHttpInterceptor } from './auth-http-interceptor';
Expand Down Expand Up @@ -38,7 +39,16 @@ const componentExports = [
];

@NgModule({
imports: [CommonModule, ngfModule, RouterModule, UICommonModule, TranslocoModule, MatDialogModule, AvatarComponent],
imports: [
CommonModule,
ngfModule,
RouterModule,
UICommonModule,
TranslocoModule,
MatDialogModule,
AvatarComponent,
MobileNotSupportedComponent
],
declarations: componentExports,
exports: componentExports,
providers: [
Expand Down

0 comments on commit 1897259

Please sign in to comment.