Skip to content

Commit

Permalink
Loccus enhancements (#532)
Browse files Browse the repository at this point in the history
* Tools Refactoring (#519)

* Synthetic image detection UX improvements

* refactoring + updated offline translations

* wip

* Refactored footer types and Footer, Navbar, DrawerItem, AllTools. Highlight the tool used in the side menu

* Added missing package, fixed scroll bars and enhanced general layout

* Improved naming to have TopMenu, MainContentMenu, and SideMenu, fixed some variables, code cleanup

* Improved alignment

* Fixed RTL padding

* Fixed RTL chevron

* Improved naming

* Fixed lint warning

* Added jsdoc

* Cleanup

* Fixed error

* add v0.81 manifest

* Added chartJs, added chart with detection percentage over time

* Removed console.log

* Added chart gradient based on detection score

* Updated packages

* Moved variables

* Fixed lint warnings

* Bumped version, added missing keyword, added rtl support

---------

Co-authored-by: Bertrand Goupil <[email protected]>
  • Loading branch information
Sallaa and AFPMedialab authored Jun 12, 2024
1 parent 6f390fe commit 9a6f85c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weverify-plugin",
"version": "0.80",
"version": "0.81",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
7 changes: 6 additions & 1 deletion src/components/NavItems/tools/Loccus/loccusResults.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ const LoccusResults = (props) => {

const keyword = i18nLoadNamespace("components/NavItems/tools/Loccus");

const currentLang = useSelector((state) => state.language);
const isCurrentLanguageLeftToRight = currentLang !== "ar";

const role = useSelector((state) => state.userSession.user.roles);

const result = props.result;
Expand Down Expand Up @@ -100,7 +103,7 @@ const LoccusResults = (props) => {
},
title: {
display: true,
text: "Detection percentage over time",
text: keyword("loccus_chart_title"),
},
tooltip: {
callbacks: {
Expand All @@ -126,6 +129,7 @@ const LoccusResults = (props) => {
return printDurationInMinutesWithoutModulo(val);
},
},
reverse: isCurrentLanguageLeftToRight ? false : true,
},
y: {
beginAtZero: true,
Expand All @@ -136,6 +140,7 @@ const LoccusResults = (props) => {
return value + "%";
},
},
position: isCurrentLanguageLeftToRight ? "left" : "right",
},
},
};
Expand Down

0 comments on commit 9a6f85c

Please sign in to comment.