Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
4d6d491f
Commit
4d6d491f
authored
1 month ago
by
David Bühler
Committed by
Remi Lazarini
4 weeks ago
Browse files
Options
Downloads
Patches
Plain Diff
[Ivette] Help modal uses version and codename from the getConfig request.
parent
1d5cad7d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ivette/src/frama-c/help.tsx
+23
-7
23 additions, 7 deletions
ivette/src/frama-c/help.tsx
ivette/src/frama-c/menu.ts
+2
-2
2 additions, 2 deletions
ivette/src/frama-c/menu.ts
with
25 additions
and
9 deletions
ivette/src/frama-c/help.tsx
+
23
−
7
View file @
4d6d491f
...
@@ -26,11 +26,12 @@ import { Hbox } from 'dome/layout/boxes';
...
@@ -26,11 +26,12 @@ import { Hbox } from 'dome/layout/boxes';
import
{
shell
}
from
'
electron
'
;
import
{
shell
}
from
'
electron
'
;
import
{
Button
}
from
'
dome/controls/buttons
'
;
import
{
Button
}
from
'
dome/controls/buttons
'
;
import
*
as
Server
from
'
frama-c/server
'
;
import
*
as
Dialogs
from
'
dome/dialogs
'
;
import
{
getConfig
}
from
'
frama-c/kernel/api/services
'
;
import
'
./style.css
'
;
import
'
./style.css
'
;
import
framacImage
from
'
./frama-c.png
'
;
import
framacImage
from
'
./frama-c.png
'
;
import
vNumber
from
'
../../../VERSION?raw
'
;
import
vCodename
from
'
../../../VERSION_CODENAME?raw
'
;
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* --- Frama-C infos --- */
/* --- Frama-C infos --- */
...
@@ -38,7 +39,6 @@ import vCodename from '../../../VERSION_CODENAME?raw';
...
@@ -38,7 +39,6 @@ import vCodename from '../../../VERSION_CODENAME?raw';
const
synopsis
=
'
Frama-C is a suite of tools dedicated to the analysis of the
\
const
synopsis
=
'
Frama-C is a suite of tools dedicated to the analysis of the
\
source code of software written in C.
'
;
source code of software written in C.
'
;
const
version
=
`
${
vNumber
}
(
${
vCodename
}
)`
.
replace
(
/
[\r\n]
/g
,
''
);
const
description
=
'
\
const
description
=
'
\
Frama-C gathers several analysis techniques in a single collaborative
\
Frama-C gathers several analysis techniques in a single collaborative
\
framework, based on analyzers (called "plug-ins") that can build upon the
\
framework, based on analyzers (called "plug-ins") that can build upon the
\
...
@@ -136,13 +136,17 @@ function FramaCLogo(): JSX.Element {
...
@@ -136,13 +136,17 @@ function FramaCLogo(): JSX.Element {
);
);
}
}
export
function
getAbout
():
JSX
.
Element
{
interface
AboutProps
{
version
:
string
;
}
function
AboutModal
(
props
:
AboutProps
):
JSX
.
Element
{
return
(
return
(
<
Modal
className
=
'modal-framac-infos'
label
=
'About Frama-C'
>
<
Modal
className
=
'modal-framac-infos'
label
=
'About Frama-C'
>
<>
<>
<
FramaCLogo
/>
<
FramaCLogo
/>
<
Hbox
className
=
'modal-framac-about'
>
<
Hbox
className
=
'modal-framac-about'
>
<
pre
>
version:
{
version
}
</
pre
>
<
pre
>
version:
{
props
.
version
}
</
pre
>
<
pre
>
{
synopsis
}
</
pre
>
<
pre
>
{
synopsis
}
</
pre
>
<
Hbox
>
<
Hbox
>
<
Button
<
Button
...
@@ -167,7 +171,14 @@ export function getAbout(): JSX.Element {
...
@@ -167,7 +171,14 @@ export function getAbout(): JSX.Element {
);
);
}
}
export
function
getCredits
():
JSX
.
Element
{
export
async
function
showAboutModal
():
Promise
<
void
>
{
const
config
=
await
Server
.
send
(
getConfig
,
{});
const
version
=
config
.
version_codename
;
const
modal
=
<
AboutModal
version
=
{
version
}
/>;
Dialogs
.
showModal
(
modal
);
}
function
CreditsModal
():
JSX
.
Element
{
return
(
return
(
<
Modal
className
=
'modal-framac-infos'
label
=
'Credits'
>
<
Modal
className
=
'modal-framac-infos'
label
=
'Credits'
>
<>
<>
...
@@ -176,9 +187,14 @@ export function getCredits(): JSX.Element {
...
@@ -176,9 +187,14 @@ export function getCredits(): JSX.Element {
<
pre
style
=
{
{
fontSize
:
'
1.2em
'
}
}
>
Created by:
</
pre
>
<
pre
style
=
{
{
fontSize
:
'
1.2em
'
}
}
>
Created by:
</
pre
>
</
Hbox
>
</
Hbox
>
<
div
className
=
'modal-framac-credits'
>
<
div
className
=
'modal-framac-credits'
>
{
authors
.
map
((
author
,
i
)
=>
<
div
key
=
{
i
}
>
{
author
}
</
div
>)
}
{
authors
.
map
((
author
,
i
)
=>
<
div
key
=
{
i
}
>
{
author
}
</
div
>)
}
</
div
>
</
div
>
</>
</>
</
Modal
>
</
Modal
>
);
);
}
}
export
function
showCreditsModal
():
void
{
const
modal
=
<
CreditsModal
/>;
Dialogs
.
showModal
(
modal
);
}
This diff is collapsed.
Click to expand it.
ivette/src/frama-c/menu.ts
+
2
−
2
View file @
4d6d491f
...
@@ -160,14 +160,14 @@ export function init(): void {
...
@@ -160,14 +160,14 @@ export function init(): void {
menu
:
'
Help
'
,
menu
:
'
Help
'
,
label
:
'
About
'
,
label
:
'
About
'
,
id
:
'
help_about
'
,
id
:
'
help_about
'
,
onClick
:
()
=>
Dialogs
.
showModal
(
HelpMenu
.
get
About
())
,
onClick
:
HelpMenu
.
show
About
Modal
,
kind
:
'
normal
'
,
kind
:
'
normal
'
,
});
});
Dome
.
addMenuItem
({
Dome
.
addMenuItem
({
menu
:
'
Help
'
,
menu
:
'
Help
'
,
label
:
'
Credits
'
,
label
:
'
Credits
'
,
id
:
'
help_credits
'
,
id
:
'
help_credits
'
,
onClick
:
()
=>
Dialogs
.
showModal
(
HelpMenu
.
get
Credits
())
,
onClick
:
HelpMenu
.
show
Credits
Modal
,
kind
:
'
normal
'
,
kind
:
'
normal
'
,
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment