Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.

Commit c0a4aa8

Browse files
Release version changed to 1.2.0 (#48)
* Release verion changed to 1.2.0 * Removed margins for Close button * Go back on downloaded models page * Fixed config manager not initialized
1 parent 8199923 commit c0a4aa8

File tree

5 files changed

+35
-10
lines changed

5 files changed

+35
-10
lines changed

src/app/base/components/sidebar-pm/sidebar-pm.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
</div>
194194
<div class="flex-shrink-0 flex py-6 justify-center">
195195
<label data-tip="Version overview" for="version-overview" (click)="requestVersionOverview()"
196-
class="z-50 tooltip tooltip-right cursor-pointer select-none text-white flex items-center">v1.1.1
196+
class="z-50 tooltip tooltip-right cursor-pointer select-none text-white flex items-center">v1.2.0
197197
<svg *ngIf="hasUpdates" xmlns="http://www.w3.org/2000/svg" data-tip="Newer version available"
198198
class="icon icon-tabler icon-tabler-alert-circle inline-block text-yellow-700 tooltip tooltip-right align-top ml-1 mt-px" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
199199
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
@@ -297,7 +297,7 @@
297297
<label (click)="howToUpdate()" *ngIf="!isManaged"
298298
class="mr-2 bg-green-100 text-green-700 border border-green-400 text-xs font-semibold px-4 py-2 rounded-md cursor-pointer hover:bg-green-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">How to update</label>
299299
<label for="version-overview"
300-
class="bg-white text-gray-700 text-xs font-semibold mr-4 px-4 py-2 rounded border border-gray-300 cursor-pointer hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 inline-block">Close</label>
300+
class="bg-white text-gray-700 text-xs font-semibold px-4 py-2 rounded border border-gray-300 cursor-pointer hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 inline-block">Close</label>
301301
</div>
302302
</div>
303303
</div>
@@ -399,7 +399,7 @@
399399
<label (click)="back()"
400400
class="bg-white text-gray-700 text-xs font-semibold mr-2 px-4 py-2 rounded border border-gray-300 cursor-pointer hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 inline-block">Go back</label>
401401
<label for="steps-update"
402-
class="bg-white text-gray-700 text-xs font-semibold mr-4 px-4 py-2 rounded border border-gray-300 cursor-pointer hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 inline-block">Close</label>
402+
class="bg-white text-gray-700 text-xs font-semibold px-4 py-2 rounded border border-gray-300 cursor-pointer hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 inline-block">Close</label>
403403
</div>
404404
</div>
405405
</div>

src/app/model-download/components/model-download-component/model-download-component.component.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<div *ngIf="project$ | async as project" class="p-4 bg-gray-100 h-full overflow-y-auto flex-1 flex flex-col">
2-
<div>
2+
<div class="flex flex-row items-center">
3+
<div class="mr-3">
4+
<button (click)="goBack()" class="text-green-800 text-sm font-medium">
5+
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 inline-block" fill="none"
6+
viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
7+
<path stroke-linecap="round" stroke-linejoin="round" d="M7 16l-4-4m0 0l4-4m-4 4h18" />
8+
</svg>
9+
<span class="leading-5">Go back</span>
10+
</button>
11+
</div>
312
<div class="text-lg leading-6 text-gray-900 font-medium inline-block">
413
Downloaded models
514
</div>

src/app/model-download/components/model-download-component/model-download-component.component.ts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, OnInit } from '@angular/core';
22
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
3-
import { ActivatedRoute } from '@angular/router';
3+
import { ActivatedRoute, Router } from '@angular/router';
44
import { combineLatest, Subscription, timer } from 'rxjs';
55
import { first } from 'rxjs/operators';
66
import { ConfigManager } from 'src/app/base/services/config-service';
@@ -24,29 +24,32 @@ export class ModelDownloadComponentComponent implements OnInit {
2424
projectId: string;
2525
form: FormGroup;
2626
models: any[] = [];
27-
isManaged: boolean = false;
27+
isManaged: boolean = true;
2828
currentModelHandle: any;
2929
downloadedModels: any[];
3030
subscriptions$: Subscription[] = [];
3131
currentModel: any;
3232
indexSeparator: number;
33+
lastPage: string;
3334

3435
constructor(
3536
private activatedRoute: ActivatedRoute,
3637
private projectApolloService: ProjectApolloService,
3738
private routeService: RouteService,
3839
private informationSourceApolloService: WeakSourceApolloService,
39-
private formBuilder: FormBuilder
40+
private formBuilder: FormBuilder,
41+
private router: Router
4042
) { }
4143

4244
ngOnInit(): void {
4345
this.initForm();
4446
this.routeService.updateActivatedRoute(this.activatedRoute);
4547
this.projectId = this.activatedRoute.parent.snapshot.paramMap.get('projectId');
48+
this.lastPage = this.activatedRoute.snapshot.queryParamMap.get('lastPage');
49+
4650
[this.projectQuery$, this.project$] = this.projectApolloService.getProjectByIdQuery(this.projectId);
4751
[this.downloadedModelsQuery$, this.downloadedModelsList$] = this.informationSourceApolloService.getModelProviderInfo();
4852
this.prepareModels();
49-
this.isManaged = ConfigManager.getIsManaged();
5053

5154
this.subscriptions$.push(
5255
this.downloadedModelsList$.subscribe((downloadedModels) => {
@@ -56,6 +59,8 @@ export class ModelDownloadComponentComponent implements OnInit {
5659
model.parseDate = this.parseUTC(model.date);
5760
})
5861
}));
62+
63+
this.checkIfManagedVersion();
5964

6065
NotificationService.subscribeToNotification(this, {
6166
whitelist: ['model_provider_download'],
@@ -165,4 +170,15 @@ export class ModelDownloadComponentComponent implements OnInit {
165170
return findModel !== undefined ? true : false;
166171
}
167172

173+
goBack() {
174+
this.router.navigate(["../"+this.lastPage], { relativeTo: this.activatedRoute });
175+
}
176+
177+
checkIfManagedVersion() {
178+
if (!ConfigManager.isInit()) {
179+
timer(250).subscribe(() => this.checkIfManagedVersion());
180+
return;
181+
}
182+
this.isManaged = ConfigManager.getIsManaged();
183+
}
168184
}

src/app/projects/components/project-settings/project-settings.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
<div class="text-lg leading-6 text-gray-900 font-medium inline-block w-full">
276276
<label>Embeddings</label>
277277
<button class="ml-3 text-green-700 hover:text-green-500 text-base font-medium"
278-
[routerLink]="['../model-download']"
278+
[routerLink]="['../model-download']" [queryParams]="{lastPage: 'settings'}"
279279
[disabled]="!isManaged"
280280
[ngClass]="!isManaged ? 'tooltip tooltip-right cursor-not-allowed' : 'opacity-100 cursor-pointer'"
281281
[attr.data-tip]="!isManaged ? 'Check out our hosted version to use this function' : ''">

src/app/zero-shot-details/component/zero-shot-details.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
<div *ngIf="!isModelDownloading" class="font-normal" style="height: 24px;">
104104
Model
105105
<button class="ml-3 text-green-700 hover:text-green-500 text-sm font-medium cursor-pointer"
106-
[routerLink]="['../../model-download']"
106+
[routerLink]="['../../model-download']" [queryParams]="{lastPage: 'zero-shot/'+informationSource.id}"
107107
[disabled]="!isManaged"
108108
[ngClass]="!isManaged ? 'tooltip tooltip-right cursor-not-allowed' : 'opacity-100 cursor-pointer'"
109109
[attr.data-tip]="!isManaged ? 'Check out our hosted version to use this function' : ''">

0 commit comments

Comments
 (0)