Fixed discrepancies between dev and prod build

This commit is contained in:
Geomitron
2021-01-30 21:50:22 -05:00
parent 9103d2c708
commit dab0ef9587
4 changed files with 7 additions and 5 deletions

View File

@@ -19,7 +19,7 @@
<div class="ui divider"></div>
<div class="ui horizontal list">
<div *ngFor="let difficulty of difficultiesList" class="item">
<img class="ui avatar image" src="/assets/images/instruments/{{difficulty.instrument}}">
<img class="ui avatar image" src="assets/images/instruments/{{difficulty.instrument}}">
<div class="content">
<div class="header">Diff: {{difficulty.diffNumber}}</div>
{{difficulty.chartedDifficulties}}

View File

@@ -3,7 +3,7 @@
<!-- TODO: add advanced search -->
<div class="ui icon input" [class.loading]="isLoading()">
<input #searchBox type="text" placeholder=" Search..." (keyup.enter)="onSearch(searchBox.value)">
<i id="searchIcon" class="link icon" [ngClass]="isError ? 'red exclamation triangle' : 'search'"
<i #searchIcon id="searchIcon" class="link icon" [ngClass]="isError ? 'red exclamation triangle' : 'search'"
data-content="Failed to connect to the Bridge database" data-position="bottom right"></i>
</div>
</div>

View File

@@ -1,4 +1,4 @@
import { Component, AfterViewInit } from '@angular/core'
import { Component, AfterViewInit, ViewChild, ElementRef } from '@angular/core'
import { SearchService } from 'src/app/core/services/search.service'
@Component({
@@ -8,13 +8,15 @@ import { SearchService } from 'src/app/core/services/search.service'
})
export class SearchBarComponent implements AfterViewInit {
@ViewChild('searchIcon', { static: true }) searchIcon: ElementRef
isError = false
constructor(public searchService: SearchService) { }
ngAfterViewInit() {
$('.ui.dropdown').dropdown()
$('#searchIcon').popup({
$(this.searchIcon.nativeElement).popup({
onShow: () => this.isError // Only show the popup if there is an error
})
this.searchService.onSearchErrorStateUpdate((isError) => {

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>Bridge</title>
<base href="/">
<base href="./">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>