From bf4a0a8ca161161fac029374a7937a4a233fc1de Mon Sep 17 00:00:00 2001 From: smart-techno Date: Wed, 27 Sep 2023 15:57:18 +0200 Subject: [PATCH 1/7] QMAPS add telemetry --- language/message/de.po | 3 +++ language/message/en.po | 5 ++++- language/message/es.po | 3 +++ language/message/fr.po | 5 ++++- language/message/it.po | 5 ++++- public/images/remix/cookie.svg | 1 + src/components/ui/icons.ts | 1 + src/panel/menu/AppMenu.jsx | 10 +++++++++- tag.html | 23 +++++++++++++++++++++++ views/index.ejs | 12 ++++++++++++ 10 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 public/images/remix/cookie.svg create mode 100644 tag.html diff --git a/language/message/de.po b/language/message/de.po index e19a5c24f..a5a47db92 100644 --- a/language/message/de.po +++ b/language/message/de.po @@ -1844,3 +1844,6 @@ msgstr "Mehr erfahren" msgid "Zero waste source poi details" msgstr "Eine Verkaufsart, die Abfall und Verpackungsabfall begrenzt." + +msgid "cookies_management" +msgstr "Verwaltung von Cookies" \ No newline at end of file diff --git a/language/message/en.po b/language/message/en.po index 99edd01e2..bba827d1a 100644 --- a/language/message/en.po +++ b/language/message/en.po @@ -1737,4 +1737,7 @@ msgid "Zero waste source poi see more" msgstr "Learn more" msgid "Zero waste source poi details" -msgstr "Selling without packaging limits wastage and packaging waste." \ No newline at end of file +msgstr "Selling without packaging limits wastage and packaging waste." + +msgid "cookies_management" +msgstr "Cookie management" \ No newline at end of file diff --git a/language/message/es.po b/language/message/es.po index 7385d8a9e..4f8fee155 100644 --- a/language/message/es.po +++ b/language/message/es.po @@ -1834,3 +1834,6 @@ msgstr "Más información" msgid "Zero waste source poi details" msgstr "Un modo de venta que limita el desperdicio y el desperdicio de empaques." + +msgid "cookies_management" +msgstr "Gestión de las cookies" \ No newline at end of file diff --git a/language/message/fr.po b/language/message/fr.po index 9801e1060..00b872de2 100644 --- a/language/message/fr.po +++ b/language/message/fr.po @@ -1893,4 +1893,7 @@ msgid "zero_waste" msgstr "Vente en vrac" msgid "ecotable" -msgstr "Écotable" \ No newline at end of file +msgstr "Écotable" + +msgid "cookies_management" +msgstr "Gestion des cookies" \ No newline at end of file diff --git a/language/message/it.po b/language/message/it.po index 0eaac2571..cc264184d 100644 --- a/language/message/it.po +++ b/language/message/it.po @@ -1840,4 +1840,7 @@ msgid "Zero waste source poi see more" msgstr "Ulteriori informazioni" msgid "Zero waste source poi details" -msgstr "Una modalità di vendita che limita i rifiuti e i rifiuti di imballaggio." \ No newline at end of file +msgstr "Una modalità di vendita che limita i rifiuti e i rifiuti di imballaggio." + +msgid "cookies_management" +msgstr "Gestione dei cookie" \ No newline at end of file diff --git a/public/images/remix/cookie.svg b/public/images/remix/cookie.svg new file mode 100644 index 000000000..b2e585215 --- /dev/null +++ b/public/images/remix/cookie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/ui/icons.ts b/src/components/ui/icons.ts index 94eb4ea3a..f60ccb78f 100644 --- a/src/components/ui/icons.ts +++ b/src/components/ui/icons.ts @@ -34,3 +34,4 @@ export { ReactComponent as IconDirectionsArrow } from '../../../public/images/di export { ReactComponent as IconAndroid } from '../../../public/images/mobile/android.svg'; export { ReactComponent as IconApple } from '../../../public/images/mobile/i-os.svg'; export { ReactComponent as QwantLogoBlue } from '../../../public/images/qwant-search-logo.svg'; +export { ReactComponent as IconCookie } from '../../../public/images/remix/cookie.svg'; diff --git a/src/panel/menu/AppMenu.jsx b/src/panel/menu/AppMenu.jsx index aeaaef018..2a85df4fe 100644 --- a/src/panel/menu/AppMenu.jsx +++ b/src/panel/menu/AppMenu.jsx @@ -3,12 +3,13 @@ import PropTypes from 'prop-types'; import MenuItem from './MenuItem'; import Telemetry from 'src/libs/telemetry'; import { Divider } from 'src/components/ui'; -import { IconHeart, IconHistory, IconEdit, IconBug } from 'src/components/ui/icons'; +import { IconHeart, IconHistory, IconEdit, IconBug, IconCookie } from 'src/components/ui/icons'; import { IconLight, IconApps } from '@qwant/qwant-ponents'; import { useConfig, useI18n } from 'src/hooks'; const AppMenu = ({ close, openProducts }) => { const { baseUrl } = useConfig('system'); + const { drawer } = useConfig('telemetry'); const { getLocalizedUrl, _ } = useI18n(); const searchHistoryConfig = useConfig('searchHistory'); @@ -67,6 +68,13 @@ const AppMenu = ({ close, openProducts }) => { > {_('Report a bug', 'menu')} + } + > + {_('cookies_management', 'menu')} + {openProducts && ( <> diff --git a/tag.html b/tag.html new file mode 100644 index 000000000..ac8f57720 --- /dev/null +++ b/tag.html @@ -0,0 +1,23 @@ + + + + + + Document + + + + + + + \ No newline at end of file diff --git a/views/index.ejs b/views/index.ejs index d881e9dbd..e8c351b12 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -29,6 +29,18 @@ <%- `window.__config = ${JSON.stringify(config, (k,v) => k==='server' ? undefined : v)};` %> + <% if(config.telemetry.enabled) { %> + + <% } %>
From 63eb8c2aa0199b47f81ddf3de60402e7f4d881bb Mon Sep 17 00:00:00 2001 From: smart-techno Date: Wed, 27 Sep 2023 18:46:14 +0200 Subject: [PATCH 2/7] remove file tag.html --- tag.html | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 tag.html diff --git a/tag.html b/tag.html deleted file mode 100644 index ac8f57720..000000000 --- a/tag.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - Document - - - - - - - \ No newline at end of file From a97872f48593bd12abecc1e37f135e5ce7926166 Mon Sep 17 00:00:00 2001 From: smart-techno Date: Thu, 28 Sep 2023 09:39:37 +0200 Subject: [PATCH 3/7] Add drawer condition in appMenu --- src/panel/menu/AppMenu.jsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/panel/menu/AppMenu.jsx b/src/panel/menu/AppMenu.jsx index 2a85df4fe..991c36406 100644 --- a/src/panel/menu/AppMenu.jsx +++ b/src/panel/menu/AppMenu.jsx @@ -68,13 +68,15 @@ const AppMenu = ({ close, openProducts }) => { > {_('Report a bug', 'menu')} - } - > - {_('cookies_management', 'menu')} - + {drawer && drawer.url && ( + } + > + {_('cookies_management', 'menu')} + + )} {openProducts && ( <> From ce1e988baf93e4fcca9758d1656dfc6dde025f15 Mon Sep 17 00:00:00 2001 From: smart-techno Date: Thu, 28 Sep 2023 09:40:20 +0200 Subject: [PATCH 4/7] changes to deploy branch in integration --- .github/workflows/docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c90b00a61..a42d01f89 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,6 +4,7 @@ on: push: branches: - 'master' + - 'QMAPS-telemetry' tags: - 'v*' From 34748ab3a7670b9f5714482274779311b63f48c0 Mon Sep 17 00:00:00 2001 From: smart-techno Date: Thu, 28 Sep 2023 11:01:26 +0200 Subject: [PATCH 5/7] remove outsideLink on cookie management button --- src/panel/menu/AppMenu.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/panel/menu/AppMenu.jsx b/src/panel/menu/AppMenu.jsx index 991c36406..d61175eac 100644 --- a/src/panel/menu/AppMenu.jsx +++ b/src/panel/menu/AppMenu.jsx @@ -69,11 +69,7 @@ const AppMenu = ({ close, openProducts }) => { {_('Report a bug', 'menu')} {drawer && drawer.url && ( - } - > + }> {_('cookies_management', 'menu')} )} From 710beee488d166a14e9dc862042e335cd3f25e2f Mon Sep 17 00:00:00 2001 From: smart-techno Date: Thu, 28 Sep 2023 15:47:47 +0200 Subject: [PATCH 6/7] add target _self in cookie management link --- src/panel/menu/AppMenu.jsx | 8 ++++++-- src/panel/menu/MenuItem.jsx | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/panel/menu/AppMenu.jsx b/src/panel/menu/AppMenu.jsx index d61175eac..04be94ca3 100644 --- a/src/panel/menu/AppMenu.jsx +++ b/src/panel/menu/AppMenu.jsx @@ -69,8 +69,12 @@ const AppMenu = ({ close, openProducts }) => { {_('Report a bug', 'menu')} {drawer && drawer.url && ( - }> - {_('cookies_management', 'menu')} + } + > + {_('cookies_management', 'menu')} hello world )} diff --git a/src/panel/menu/MenuItem.jsx b/src/panel/menu/MenuItem.jsx index db71bba97..34d821e3f 100644 --- a/src/panel/menu/MenuItem.jsx +++ b/src/panel/menu/MenuItem.jsx @@ -2,11 +2,12 @@ import React from 'react'; import { Flex, IconExternalLink } from '@qwant/qwant-ponents'; import { GREY_SEMI_DARKNESS } from 'src/libs/colors'; -const MenuItem = ({ icon, children, href, onClick, outsideLink }) => ( +const MenuItem = ({ icon, children, href, onClick, outsideLink, ...props }) => ( Date: Tue, 21 Nov 2023 11:01:18 +0100 Subject: [PATCH 7/7] remobe Image Docker --- .github/workflows/docker.yml | 1 - src/panel/menu/AppMenu.jsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a42d01f89..c90b00a61 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,7 +4,6 @@ on: push: branches: - 'master' - - 'QMAPS-telemetry' tags: - 'v*' diff --git a/src/panel/menu/AppMenu.jsx b/src/panel/menu/AppMenu.jsx index 04be94ca3..eb97cc771 100644 --- a/src/panel/menu/AppMenu.jsx +++ b/src/panel/menu/AppMenu.jsx @@ -74,7 +74,7 @@ const AppMenu = ({ close, openProducts }) => { target="_self" icon={} > - {_('cookies_management', 'menu')} hello world + {_('cookies_management', 'menu')} )}