Skip to content

Commit

Permalink
fix(deploy-log-full): undefined package list
Browse files Browse the repository at this point in the history
  • Loading branch information
dr460nf1r3 committed Jun 26, 2024
1 parent e625b9e commit 095de3e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ <h1 class="text-center text-4xl font-extrabold text-maroon">Deployment log</h1>
id="toast-deployment"
role="alert"
>
<div class="text-sm font-normal"
>New deployment event! <a (click)="headToFullDeployments()" class="text-mauve">Check out.</a></div
>
<div class="text-sm font-normal">New deployment event!</div>
</div>
</div>
8 changes: 6 additions & 2 deletions frontend/src/app/deploy-log-full/deploy-log-full.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class DeployLogFullComponent implements AfterViewInit {
logAmount: number | undefined
requestedTooMany = false
currentType: DeploymentType = DeploymentType.ALL
firstLoad = true
protected readonly headToFullDeployments = headToFullDeployments

async ngAfterViewInit(): Promise<void> {
Expand All @@ -37,7 +38,7 @@ export class DeployLogFullComponent implements AfterViewInit {
async updateLogAmount(amount: number) {
const newDeployments = parseDeployments(await getDeployments(amount, this.currentType), this.currentType)

if (newDeployments[0].date !== this.latestDeployments[0].date) {
if (this.latestDeployments.length === 0 || newDeployments[0].name !== this.latestDeployments[0]?.name) {
this.latestDeployments = newDeployments

// Show if we requested too many deployments
Expand All @@ -46,12 +47,15 @@ export class DeployLogFullComponent implements AfterViewInit {

// Show a notification for a short time
const notification = document.getElementById("toast-deployment")
if (notification) {
if (notification && !this.firstLoad) {
notification.classList.remove("invisible")
setTimeout((): void => {
notification.classList.add("invisible")
}, 20000)
}
if (this.firstLoad) {
this.firstLoad = false
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions shared-lib/src/lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { MessageContent } from "./tdlib-types"

export const CAUR_BACKEND_URL = "https://builds.garudalinux.org/backend"
export const CAUR_BACKEND_URL = "http://localhost:8010/proxy"
export const CAUR_CACHED_METRICS_URL = `${CAUR_BACKEND_URL}/metrics/`
export const CAUR_API_URL = "https://builds.garudalinux.org/api/"
export const CAUR_API_URL = "http://localhost:8010/proxy/api"
export const CAUR_MAP_URL = "https://status.chaotic.cx/map"
export const CAUR_HOME_URL = "https://aur.chaotic.cx/"
export const CAUR_PRIMARY_KEY = "3056513887B78AEB"
Expand Down

0 comments on commit 095de3e

Please sign in to comment.