Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit34c140a

Browse files
committed
added features and fixes
1 parent7f058dc commit34c140a

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed
Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import{CommonModule}from'@angular/common';
12
import{Component,OnInit}from'@angular/core';
23
import{Router}from'@angular/router';
34

45
@Component({
56
selector:'app-dfsm-result',
67
standalone:true,
7-
imports:[],
8+
imports:[CommonModule],
89
templateUrl:'./dfsm-result.component.html',
910
styleUrl:'./dfsm-result.component.css'
1011
})
@@ -15,14 +16,21 @@ export class DfsmResultComponent implements OnInit{
1516
constructor(publicrouter:Router){}
1617

1718
ngOnInit():void{
18-
conststored=localStorage.getItem('dfa-result');
19-
if(!stored){
19+
if(typeofwindow!=='undefined'&&localStorage){
20+
conststored=localStorage.getItem('dfa-result');
21+
if(!stored){
22+
this.router.navigate(['/']);
23+
return;
24+
}
25+
26+
this.result=JSON.parse(stored);
27+
this.pdfUrl=`http://localhost:8000${this.result.pdf_path}`;
28+
}else{
29+
console.error('localStorage is not available.');
2030
this.router.navigate(['/']);
21-
return;
2231
}
23-
this.result=JSON.parse(stored);
24-
this.pdfUrl=`http://localhost:8000${this.result.pdf_path}`;// Adjust if you host backend elsewhere
2532
}
2633

34+
2735

2836
}

‎python_backend/requirements.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
fastapi
22
uvicorn
3-
dfa==4.7.1
3+
automata-lib
44
graphviz

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp