/
githubmirror
/
oppia
Обзор
Документация
Войти
/
githubmirror
/
oppia
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
core/templates/pages/admin-page/admin-page.component.ts
70 строк
2 KB
Aditya Lakhotia
Fix part of #25941: Clean up legacy embedded <style> tags from HTML templates removing inconsistency of next 20 files (part-3) (#26868)
25 июл 2026, 12:41
Не верифицирован
25 июл 2026, 12:41
37873fc
Код
Авторство
О чём код?
// Copyright 2014 The Oppia Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS-IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /** * @fileoverview Data and component for the Oppia admin page. */ import {ChangeDetectorRef, Component, EventEmitter} from '@angular/core'; import {AppConstants} from 'app.constants'; import {WindowRef} from 'services/contextual/window-ref.service'; import {AdminRouterService} from './services/admin-router.service'; import './admin-page.component.css'; @Component({ selector: 'oppia-admin-page', templateUrl: './admin-page.component.html', styleUrls: ['./admin-page.component.css'], }) export class AdminPageComponent { statusMessage = ''; inDevMode = AppConstants.DEV_MODE; adminPageTabChange: EventEmitter<string> = new EventEmitter(); constructor( private adminRouterService: AdminRouterService, private changeDetectorRef: ChangeDetectorRef, private windowRef: WindowRef ) {} ngOnInit(): void { this.adminRouterService.showTab(this.windowRef.nativeWindow.location.hash); this.windowRef.nativeWindow.onhashchange = () => { this.adminRouterService.showTab( this.windowRef.nativeWindow.location.hash ); }; } isActivitiesTabOpen(): boolean { return this.adminRouterService.isActivitiesTabOpen(); } isPlatformParamsTabOpen(): boolean { return this.adminRouterService.isPlatformParamsTabOpen(); } isRolesTabOpen(): boolean { return this.adminRouterService.isRolesTabOpen(); } isMiscTabOpen(): boolean { return this.adminRouterService.isMiscTabOpen(); } setStatusMessage(statusMessage: string): void { this.statusMessage = statusMessage; this.changeDetectorRef.detectChanges(); } }