Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

569 B
Raw Blame
import { Pipe, PipeTransform } from '@angular/core';
import { LayoutMode } from '../_models/layout-mode';

@Pipe({
  name: 'layoutModeIcon',
  standalone: true,
})
export class LayoutModeIconPipe implements PipeTransform {

  transform(layoutMode: LayoutMode): string {
    switch (layoutMode) {
      case LayoutMode.Single:
        return 'none';
      case LayoutMode.Double:
        return 'double';
      case LayoutMode.DoubleReversed:
        return 'double-reversed';
      case LayoutMode.DoubleNoCover:
        return 'double'; // TODO: Validate
    }
  }

}