Skip to content

Commit

Permalink
Merge branch 'release/0.6.3' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
JeltevanBoheemen committed May 12, 2023
2 parents c06f711 + eb81935 commit adb5533
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ node_modules/

# mypy
.mypy_cache/

# docs
site/
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ All notable changes (beginning at version 0.2.0) to this project will be documen
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Next release
### Changed
- Split Angular frontend into core-, shared-, and feature- modules
## [0.6.3] - 2023-05-12

### Added
- User documentation

### Changed
- Split Angular frontend into core-, shared-, and feature- modules
- Extended anonymization codes and moved to a centrally located JSON file

## [0.6.2] - 2022-02-15
## [0.6.2] - 2022-03-15

### Changed
- Various frontend refactors
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/app/core/menu/menu.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ <h4 class="title is-4">SASTA</h4>
<div id="navbarBasicExample" class="navbar-menu" [ngClass]="{'is-active': burgerActive}"
[@slideInOut]="burgerShow">
<div class="navbar-start">
<a *ngIf="docsAvailable" class="navbar-item" (click)="navigateToDocs()">
<span class="icon-text">
<span class="icon">
<fa-icon [icon]="faExternalLink"></fa-icon>
</span>
<span>Documentation</span>
</span>
</a>
<a *ngIf="isAuthenticated()" [routerLink]="['/corpora']" routerLinkActive="is-active"
class="navbar-item">
<span class="icon-text">
Expand Down
20 changes: 18 additions & 2 deletions frontend/src/app/core/menu/menu.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, NgZone } from '@angular/core';
import { Component, NgZone, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import {
faExternalLinkAlt,
faFileUpload,
faFolder,
faListAlt,
Expand All @@ -10,14 +11,15 @@ import {
import { environment } from '@envs/environment';
import { animations, ShowState } from '@shared/animations';
import { AuthService } from '@services';
import { map } from 'rxjs/operators';

@Component({
animations,
selector: 'sas-menu',
templateUrl: './menu.component.html',
styleUrls: ['./menu.component.scss'],
})
export class MenuComponent {
export class MenuComponent implements OnInit {
burgerShow: ShowState;
burgerActive = false;

Expand All @@ -26,14 +28,24 @@ export class MenuComponent {
faListAlt = faListAlt;
faFileUpload = faFileUpload;
faUserShield = faUserShield;
faExternalLink = faExternalLinkAlt;

version = environment.appVersion;
docsAvailable: boolean;

constructor(
private ngZone: NgZone,
public authService: AuthService,
private router: Router
) {}

ngOnInit(): void {
this.authService.getDocumentation().subscribe(
(res) => (this.docsAvailable = res.status === 200),
(err) => (this.docsAvailable = err.status === 200)
);
}

isAuthenticated(): boolean {
return this.authService.isAuthenticated$.getValue();
}
Expand Down Expand Up @@ -65,4 +77,8 @@ export class MenuComponent {

this.burgerShow = this.burgerShow === 'show' ? 'hide' : 'show';
}

navigateToDocs(): void {
window.open(environment.docs, '_blank');
}
}
5 changes: 5 additions & 0 deletions frontend/src/app/core/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
import { map, switchMap, tap } from 'rxjs/operators';
import { User } from '@models';
import { environment } from '../../../environments/environment';

@Injectable({
providedIn: 'root',
Expand Down Expand Up @@ -92,4 +93,8 @@ export class AuthService {
{ key }
);
}

getDocumentation(): Observable<any> {
return this.httpClient.get(environment.docs, { observe: 'response' });
}
}
3 changes: 2 additions & 1 deletion frontend/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
import { version } from './version';
export const environment = {
appVersion: version,
production: true
production: true,
docs: 'https://UUDigitalHumanitieslab.github.io/sasta/',
};
3 changes: 2 additions & 1 deletion frontend/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import { version } from './version';
export const environment = {
appVersion: version,
production: false
production: false,
docs: 'https://UUDigitalHumanitieslab.github.io/sasta/',
};


Expand Down
2 changes: 1 addition & 1 deletion frontend/src/environments/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// TODO: Compile this from toplevel package.json
export const version = '0.6.2';
export const version = '0.6.3';
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sasta",
"version": "0.6.2",
"version": "0.6.3",
"description": "Annotate and analyze transcripts",
"author": "UU Digital Humanities Lab",
"license": "BSD-3-Clause",
Expand Down

0 comments on commit adb5533

Please sign in to comment.