@@ -6,7 +6,7 @@ import React from "react";
6
6
import { Title } from "@mantine/core" ;
7
7
import { List , ListItem } from "@mantine/core" ;
8
8
import { WeeklyContributions } from "@/app/compatibility/weekly_contributions" ;
9
- import { getWeeklyContributions } from "@/app/downloads/github" ;
9
+ import { fetchReport , getWeeklyContributions } from "@/app/downloads/github" ;
10
10
11
11
export default async function Downloads ( ) {
12
12
const contributions = await getWeeklyContributions ( ) ;
@@ -16,6 +16,13 @@ export default async function Downloads() {
16
16
Commits : item . total ,
17
17
} ;
18
18
} ) ;
19
+ const report = await fetchReport ( ) ;
20
+ const summary = report ? report . summary : undefined ;
21
+ const maxPoints = summary ? summary . max_points : NaN ;
22
+ const implPoints = summary ? summary . impl_points : NaN ;
23
+ const stubPenalty = summary ? summary . stub_penalty : NaN ;
24
+ const done = Math . round ( ( implPoints - stubPenalty ) / maxPoints * 100 ) ;
25
+ const stubbed = Math . round ( stubPenalty / maxPoints * 100 ) ;
19
26
20
27
return (
21
28
< Container size = "xl" className = { classes . container } >
@@ -84,26 +91,28 @@ export default async function Downloads() {
84
91
</ Text >
85
92
</ AvmBlock >
86
93
87
- < AvmBlock
88
- name = "AVM 2: ActionScript 3"
89
- language = { { done : 75 } }
90
- api = { { done : 69 , stubbed : 7 } }
91
- info_link = "/compatibility/avm2"
92
- >
93
- < Text >
94
- AVM 2 was introduced with Flash Player 9 (June 2006), to replace
95
- the earlier AVM 1. After the release of Flash Professional CC
96
- (2013), authors are required to use ActionScript 3 - making any
97
- movie made after that date very likely to fall under this
98
- category.
99
- </ Text >
100
- < Text >
101
- Ruffle now has decent support for AVM 2, and it's our
102
- experience that most games will work well enough to be played.
103
- We're still rapidly improving in this area though, so bug
104
- reports about any broken content are always welcome!
105
- </ Text >
106
- </ AvmBlock >
94
+ { ! Number . isNaN ( done ) && ! Number . isNaN ( stubbed ) && (
95
+ < AvmBlock
96
+ name = "AVM 2: ActionScript 3"
97
+ language = { { done : 75 } }
98
+ api = { { done : done , stubbed : stubbed } }
99
+ info_link = "/compatibility/avm2"
100
+ >
101
+ < Text >
102
+ AVM 2 was introduced with Flash Player 9 (June 2006), to replace
103
+ the earlier AVM 1. After the release of Flash Professional CC
104
+ (2013), authors are required to use ActionScript 3 - making any
105
+ movie made after that date very likely to fall under this
106
+ category.
107
+ </ Text >
108
+ < Text >
109
+ Ruffle now has decent support for AVM 2, and it's our
110
+ experience that most games will work well enough to be played.
111
+ We're still rapidly improving in this area though, so bug
112
+ reports about any broken content are always welcome!
113
+ </ Text >
114
+ </ AvmBlock >
115
+ ) }
107
116
</ Flex >
108
117
109
118
< Stack w = "100%" align = "center" >
0 commit comments