Skip to content

Commit

Permalink
feat: added activity loader and exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
deltork committed Dec 23, 2024
1 parent 23123e3 commit 7236501
Show file tree
Hide file tree
Showing 16 changed files with 222 additions and 91 deletions.
1 change: 1 addition & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"outputPath": "dist/transcription-playground-for-wsb",
"index": "src/index.html",
"browser": "src/main.ts",
"main": "src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": [
Expand Down
45 changes: 4 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@angular/compiler": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/forms": "^19.0.0",
"@angular/material": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@angular/router": "^19.0.0",
Expand Down
6 changes: 6 additions & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
<nav>
Transcription Playground
<a routerLink="/">Play</a>
<a routerLink="create">Create</a>
</nav>
<router-outlet />
<footer>Powered by EveryVoice</footer>
37 changes: 37 additions & 0 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,41 @@ footer {
font-size: 1em;
color: #aaa;
text-align: center;
position: fixed;
left: 0;
right: 0;
bottom: 0;
height: 1rem;
background: white;
}

nav {
margin: 0;
padding: 0;
border-bottom: 1px solid var(--md-sys-color-primary);
margin-bottom: 1.5em;
height: 50px;
font-size: 2em;
font-weight: 100;
color: var(--md-sys-color-tertiary);
padding: .125em .75em;
}

nav a {
float: right;
margin: .125em;
padding: .325em .75em;
color: var(--md-sys-color-primary);
font-weight: 100;
font-size: 0.8em;
font-decoration: none;
}

nav a:hover {
color: var(--md-sys-color-primary);
}

nav a:active {
color: var(--md-sys-color-primary);
font-weight: 300;
}
4 changes: 2 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { RouterOutlet, RouterLink } from '@angular/router';

@Component({
selector: 'app-root',
imports: [RouterOutlet],
imports: [RouterOutlet, RouterLink],
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
})
Expand Down
6 changes: 5 additions & 1 deletion src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { Routes } from '@angular/router';
import { TranscribingActivityConfigurationComponent } from './transcribing-activity-configuration/transcribing-activity-configuration.component';

import { TranscribingActivityLoaderComponent } from './transcribing-activity-loader/transcribing-activity-loader.component';
export const routes: Routes = [
{
path: '',
component: TranscribingActivityLoaderComponent,
},
{
path: 'create',
component: TranscribingActivityConfigurationComponent,
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h3>Create a transcription activity</h3>
id="step-config-tab"
aria-controls="step-config-panel"
[active]="configStep == 1"
(click)="configStep = 0"
(click)="configStep = 1"
>
Step 1: Setup activity parameters
</md-primary-tab>
Expand All @@ -24,11 +24,20 @@ <h3>Create a transcription activity</h3>
id="step-preview-tab"
aria-controls="step-preview-panel"
[active]="configStep == 3"
(click)="runActivity()"
(click)="previewActivity()"
[disabled]="data.length < 1 && api_is_reachable"
>
Step 3: Preview
</md-primary-tab>
<md-filled-button
mat-button
id="step-export-tab"
[active]="configStep == 4"
(click)="exportActivity()"
[disabled]="data.length < 2 || !api_is_reachable"
>
Step 4: Export
</md-filled-button>
</md-tabs>

<div id="step-config-panel" [hidden]="configStep != 1">
Expand Down Expand Up @@ -201,9 +210,8 @@ <h3>Create a transcription activity</h3>
</div>
<md-filled-button
mat-button
class="btn btn-xl btn-info"
id="save_config"
(click)="saveActivity()"
(click)="exportActivityConfiguration()"
[disabled]="this.activityConfigurationForm.value.title.length < 3"
>
Export Configuration
Expand Down Expand Up @@ -278,7 +286,7 @@ <h3>Create a transcription activity</h3>
<md-filled-tonal-button
mat-button
class="btn btn-xl btn-info"
(click)="saveWordList()"
(click)="exportActivityData()"
[disabled]="data.length < 1"
>
Export Word List
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ label {
margin-right: .75em;
}

#startActivity span.label {
padding: .175em;
}

@media screen and (min-width:765px) {

.select-group {
Expand Down
Loading

0 comments on commit 7236501

Please sign in to comment.