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
0fe55cab
Commit
0fe55cab
authored
11 months ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Ivette] Fixes icon of notifications, that have always the proper kind.
parent
43ef71a9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ivette/src/ivette/display.tsx
+7
-6
7 additions, 6 deletions
ivette/src/ivette/display.tsx
ivette/src/ivette/laboratory.tsx
+1
-1
1 addition, 1 deletion
ivette/src/ivette/laboratory.tsx
with
8 additions
and
7 deletions
ivette/src/ivette/display.tsx
+
7
−
6
View file @
0fe55cab
...
...
@@ -124,14 +124,15 @@ export function useComponentStatus(
return
Laboratory
.
getComponentStatus
(
state
,
id
??
''
);
}
export
type
ShortMessage
=
undefined
|
null
|
string
;
export
type
Message
=
ShortMessage
|
Laboratory
.
Notification
;
export
type
Warning
=
ShortMessage
|
{
label
:
string
,
title
:
string
};
export
type
Message
=
string
|
{
label
:
string
,
title
:
string
};
/** Message notification */
export
function
showMessage
(
msg
:
Message
):
void
{
if
(
!
msg
)
return
;
Laboratory
.
showMessage
(
typeof
msg
===
'
string
'
?
{
label
:
msg
}
:
msg
);
const
short
=
typeof
msg
===
'
string
'
;
const
label
=
short
?
msg
:
msg
.
label
;
const
title
=
short
?
msg
:
msg
.
title
;
Laboratory
.
showMessage
({
kind
:
"
message
"
,
label
,
title
});
}
/** Warning notification. */
...
...
@@ -139,7 +140,7 @@ export function showWarning(msg: Message): void {
if
(
!
msg
)
return
;
const
short
=
typeof
msg
===
'
string
'
;
const
label
=
short
?
msg
:
msg
.
label
;
const
title
=
short
?
msg
:
undefined
;
const
title
=
short
?
msg
:
msg
.
title
;
Laboratory
.
showMessage
({
kind
:
'
warning
'
,
label
,
title
});
}
...
...
@@ -148,7 +149,7 @@ export function showError(msg: Message): void {
if
(
!
msg
)
return
;
const
short
=
typeof
msg
===
'
string
'
;
const
label
=
short
?
msg
:
msg
.
label
;
const
title
=
short
?
msg
:
undefined
;
const
title
=
short
?
msg
:
msg
.
title
;
Laboratory
.
showMessage
({
kind
:
'
error
'
,
label
,
title
});
}
...
...
This diff is collapsed.
Click to expand it.
ivette/src/ivette/laboratory.tsx
+
1
−
1
View file @
0fe55cab
...
...
@@ -913,7 +913,7 @@ function LayoutMenu(): JSX.Element | null {
type
NotificationKind
=
'
message
'
|
'
warning
'
|
'
error
'
;
export
interface
Notification
{
kind
?
:
NotificationKind
;
kind
:
NotificationKind
;
label
:
string
;
title
?:
string
;
}
...
...
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