From 5875e111e3e0691a004730389fcf6f8b84250930 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Fri, 14 Jun 2024 14:30:00 +0530 Subject: [PATCH 01/15] disable merge/split for votr --- .../Organization/Video/components/SettingsButtonComponent.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/containers/Organization/Video/components/SettingsButtonComponent.jsx b/src/containers/Organization/Video/components/SettingsButtonComponent.jsx index a5409492..939dc497 100644 --- a/src/containers/Organization/Video/components/SettingsButtonComponent.jsx +++ b/src/containers/Organization/Video/components/SettingsButtonComponent.jsx @@ -182,6 +182,8 @@ const SettingsButtonComponent = ({ )} + {!taskData?.task_type?.includes("VOICEOVER") && ( + <> + ) + } Date: Fri, 14 Jun 2024 15:22:35 +0530 Subject: [PATCH 02/15] cluichange8 --- src/common/FindAndReplace.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/FindAndReplace.jsx b/src/common/FindAndReplace.jsx index f615691e..abeb52b8 100644 --- a/src/common/FindAndReplace.jsx +++ b/src/common/FindAndReplace.jsx @@ -133,14 +133,13 @@ const FindAndReplace = (props) => { if (success) { switch (apiType) { case "FIND_AND_REPLACE_FOR_FULL_PAYLOAD": - window.location.reload(); + setShowFindReplaceModel(false); } } } // eslint-disable-next-line }, [apiStatus]); - const SaveReplacedWords= ()=>{ const payloadObj = new UpdateAndReplaceWordsAPI( taskId, From 4ca484e34e7259b5eab73f9c84e046cc546d2dd1 Mon Sep 17 00:00:00 2001 From: Chetan-Gudagamanal Date: Sun, 23 Jun 2024 15:56:00 +0530 Subject: [PATCH 03/15] some bug fixes and reverted whole payload display in find replace --- src/common/FindAndReplace.jsx | 207 +++++++--------------------------- 1 file changed, 43 insertions(+), 164 deletions(-) diff --git a/src/common/FindAndReplace.jsx b/src/common/FindAndReplace.jsx index abeb52b8..ab82b5cb 100644 --- a/src/common/FindAndReplace.jsx +++ b/src/common/FindAndReplace.jsx @@ -1,7 +1,6 @@ -import React, { useEffect, useState,useCallback } from "react"; +import React, { useEffect, useState, useCallback } from "react"; import { IndicTransliterate } from "indic-transliterate"; import { useDispatch, useSelector } from "react-redux"; -import MenuItem from '@mui/material/MenuItem'; import { configs, endpoints } from "config"; import { FetchpreviewTaskAPI, setSnackBar, setSubtitles } from "redux/actions"; @@ -29,9 +28,6 @@ import ChevronLeft from "@mui/icons-material/ChevronLeft"; import FindReplaceIcon from "@mui/icons-material/FindReplace"; import C from "redux/constants"; import { APITransport } from "redux/actions"; -import Menu from '@mui/material/Menu'; -import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; -import { styled } from '@mui/material/styles'; import { useParams } from "react-router-dom"; import { useTheme, useMediaQuery } from '@mui/material'; @@ -56,12 +52,9 @@ const FindAndReplace = (props) => { const [foundIndices, setFoundIndices] = useState([]); const [currentFound, setCurrentFound] = useState(); const [replaceFullWord, setReplaceFullWord] = useState(true); - const [anchorEl, setAnchorEl] = useState(null); const [transliterate, setTransliterate] = useState(true); - const [loading, setLoading] = useState(false); const [reloading, resetLoading] = useState(false); - const [reallloading, reallsetLoading] = useState(false); const [findloading, findsetLoading] = useState(false); const {taskId} = useParams(); const onReplacementDone = (updatedSource) => { @@ -91,56 +84,28 @@ const FindAndReplace = (props) => { setShowFindReplaceModel(true); }; - const [previewdata, setPreviewdata] = useState([]); - - const fetchPreviewData = useCallback(async () => { - if(taskType.includes("TRANSLATION_VOICEOVER")){ - setLoading(true); - setPreviewdata(sourceData); - setLoading(false); - }else{ - setLoading(true); - const taskObj = new FetchpreviewTaskAPI(videoId, taskType, targetLanguage); - try { - const res = await fetch(taskObj.apiEndPoint(), { - method: "GET", - headers: taskObj.getHeaders().headers, - }); - - const response = await res.json(); - setPreviewdata(response.data.payload); - setLoading(false) - } catch (error) { - setLoading(false) - dispatch( - setSnackBar({ - open: true, - message: "Something went wrong!!", - variant: "error", - }) - ); - }}}, [ dispatch,videoId, taskType, targetLanguage, sourceData]); - - useEffect(() => { - if (showFindReplaceModel) { - fetchPreviewData(); - } - }, [fetchPreviewData, showFindReplaceModel]); - useEffect(() => { const { progress, success, apiType, data } = apiStatus; if (!progress) { if (success) { switch (apiType) { case "FIND_AND_REPLACE_FOR_FULL_PAYLOAD": + resetLoading(false); setShowFindReplaceModel(false); } } + else { + switch (apiType) { + case "FIND_AND_REPLACE_FOR_FULL_PAYLOAD": + resetLoading(false); + } + } } // eslint-disable-next-line }, [apiStatus]); - const SaveReplacedWords= ()=>{ + + const replaceTextForAllPagesCall= ()=>{ const payloadObj = new UpdateAndReplaceWordsAPI( taskId, transliterationLang.task_type, @@ -150,10 +115,6 @@ const FindAndReplace = (props) => { transliterationLang.src_language ) dispatch(APITransport(payloadObj)) - // do a full page reload - // setTimeout(()=>{ - // window.location.reload(); - // },4000) } @@ -161,7 +122,7 @@ const FindAndReplace = (props) => { findsetLoading(true); const textToFind = findValue.toLowerCase().trim(); const indexListInDataOfTextOccurence = []; - previewdata?.forEach((item, index) => { + subtitlesData?.forEach((item, index) => { if (item[subtitleDataKey]?.toLowerCase()?.includes(textToFind)) { indexListInDataOfTextOccurence.push(index); } @@ -178,14 +139,6 @@ const FindAndReplace = (props) => { }, 500); }; - useEffect(() => { - if (foundIndices.length > 0 && currentFound === 0) { - const scrollableElement = document.getElementById("subtitle_scroll_view"); - scrollableElement - ?.querySelector(`#sub_${foundIndices[0]}`) - ?.scrollIntoView({ behavior: "smooth", block: "start" }); - } - }, [currentFound, foundIndices]); const previousOccurenceClick = () => { @@ -207,7 +160,7 @@ const FindAndReplace = (props) => { const onReplaceClick = () => { resetLoading(true); - const currentSubtitleSource = [...previewdata]; + const currentSubtitleSource = [...subtitlesData]; const updatedSubtitleData = []; currentSubtitleSource.forEach((ele, index) => { @@ -217,7 +170,7 @@ const FindAndReplace = (props) => { if (replaceFullWord) { if (transliterationLanguage === "en") { textToReplace = ele[subtitleDataKey].replace( - new RegExp(`\\b${findValue.trim()}\\b`, "gi"), + new RegExp(`\\b${findValue.trim()}\\b`, "g"), replaceValue.trim() ); } else { @@ -252,9 +205,9 @@ const FindAndReplace = (props) => { }; const onReplaceAllClick = () => { - reallsetLoading(true); + resetLoading(true); - const currentSubtitleSource = [...previewdata]; + const currentSubtitleSource = [...subtitlesData]; const updatedSubtitleData = []; currentSubtitleSource.forEach((ele, index) => { @@ -264,7 +217,7 @@ const FindAndReplace = (props) => { if (replaceFullWord) { if (transliterationLanguage === "en") { textToReplace = ele[subtitleDataKey].replace( - new RegExp(`\\b${findValue.trim()}\\b`, "gi"), + new RegExp(`\\b${findValue.trim()}\\b`, "g"), replaceValue.trim() ); } else { @@ -292,41 +245,14 @@ const FindAndReplace = (props) => { onReplacementDone(updatedSubtitleData); // handleCloseModel(); setTimeout(() => { - reallsetLoading(false); + resetLoading(false); // setShowLoading(false); }, 500); }; - const open = Boolean(anchorEl); - const StyledMenu = styled((props) => ( - - ))(({ theme }) => ({ - '& .MuiPaper-root': { - borderRadius: 6, - marginTop: theme.spacing(1), - minWidth: 100, - - - }, - })); - const handleClose = () => { - setAnchorEl(null); - }; - const handleClick = (event) => { - setAnchorEl(event.currentTarget); - }; const onReplaceInAllPages = () => { + resetLoading(true); + const currentSubtitleSource = [...subtitlesData]; const updatedSubtitleData = []; @@ -358,14 +284,10 @@ const FindAndReplace = (props) => { ele[subtitleDataKey] = textToReplace; updatedSubtitleData.push(ele); }); - SaveReplacedWords(); + replaceTextForAllPagesCall(); setSubtitlesData(updatedSubtitleData); onReplacementDone(updatedSubtitleData); }; - - // useEffect(()=>{ - // SaveReplacedWords() - // },[onReplaceInAllPages]) return ( <> @@ -512,12 +434,13 @@ const FindAndReplace = (props) => { - {/* + + - {/* */} - - - - Replace - - - Replace on this page - - - Replace on all pages - - @@ -599,26 +487,8 @@ const FindAndReplace = (props) => { id={"subtitle_scroll_view"} order={isSmallScreen ? 1 : 0} > - {(!subtitlesData) && ( -
- -
- )} {loading ? ( -
- -
- ) : ( - previewdata?.map((el, i) => ( + {subtitlesData?subtitlesData?.map((el, i) => { + return ( { > {el[subtitleDataKey]} - )) + ); + }): + (
+ +
)} From 9491ee95b207777a3af73ed5d427f5fc3b7c99f0 Mon Sep 17 00:00:00 2001 From: Chetan-Gudagamanal Date: Mon, 24 Jun 2024 15:49:42 +0530 Subject: [PATCH 04/15] replace input box enabled when find is clicked even word not found in current page --- src/common/FindAndReplace.jsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/common/FindAndReplace.jsx b/src/common/FindAndReplace.jsx index ab82b5cb..25944864 100644 --- a/src/common/FindAndReplace.jsx +++ b/src/common/FindAndReplace.jsx @@ -56,6 +56,8 @@ const FindAndReplace = (props) => { const [transliterate, setTransliterate] = useState(true); const [reloading, resetLoading] = useState(false); const [findloading, findsetLoading] = useState(false); + const [findClicked, setFindClicked] = useState(false) + const {taskId} = useParams(); const onReplacementDone = (updatedSource) => { dispatch(setSubtitles(updatedSource, C.SUBTITLES)) @@ -120,6 +122,7 @@ const FindAndReplace = (props) => { const onFindClick = () => { findsetLoading(true); + setFindClicked(true); const textToFind = findValue.toLowerCase().trim(); const indexListInDataOfTextOccurence = []; subtitlesData?.forEach((item, index) => { @@ -351,7 +354,10 @@ const FindAndReplace = (props) => { customApiURL={`${configs.BASE_URL_AUTO}${endpoints.transliteration}`} lang={transliterationLanguage} value={findValue} - onChangeText={(text) => setFindValue(text)} + onChangeText={(text) => { + setFindValue(text) + setFindClicked(false) + }} enabled={transliterate && transliterationLanguage !== "en"} className={classes.findReplaceTextbox} renderComponent={(props) => ( @@ -417,7 +423,7 @@ const FindAndReplace = (props) => { lang={transliterationLanguage} value={replaceValue} onChangeText={(text) => setReplaceValue(text)} - disabled={!(foundIndices?.length > 0)} + disabled={!findClicked} enabled={transliterate && transliterationLanguage !== "en"} className={classes.findReplaceTextbox} renderComponent={(props) => ( @@ -444,7 +450,7 @@ const FindAndReplace = (props) => { variant="contained" key={0} className={classes.findBtn} - disabled={!replaceValue} + disabled={!replaceValue || !(foundIndices?.length > 0)} onClick={onReplaceClick} style={{ width: "auto" }} > @@ -455,7 +461,7 @@ const FindAndReplace = (props) => { variant="contained" key={1} className={classes.findBtn} - disabled={!replaceValue} + disabled={!replaceValue || !(foundIndices?.length > 0)} onClick={onReplaceAllClick} style={{ width: "auto" }} > From 99320f24395c039d3be79ea18f94da5539343b32 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Tue, 25 Jun 2024 16:29:44 +0530 Subject: [PATCH 05/15] remove cl url for transliteration and use default npm package --- src/containers/Organization/Video/RightPanel.jsx | 3 +-- src/containers/Organization/Video/TranslationRightPanel.jsx | 3 +-- src/containers/Organization/Video/VoiceOverRightPanel1.jsx | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/containers/Organization/Video/RightPanel.jsx b/src/containers/Organization/Video/RightPanel.jsx index e891a622..d4de5c33 100644 --- a/src/containers/Organization/Video/RightPanel.jsx +++ b/src/containers/Organization/Video/RightPanel.jsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useState, useRef, memo } from "react"; -import { IndicTransliterate } from "indic-transliterate"; +import { IndicTransliterate } from "@ai4bharat/indic-transliterate"; import { useDispatch, useSelector } from "react-redux"; import { useNavigate, useParams } from "react-router-dom"; import subscript from "config/subscript"; @@ -719,7 +719,6 @@ const RightPanel = ({ currentIndex, currentSubs,setCurrentIndex, showTimeline, s > {taskData?.src_language !== "en" && enableTransliteration ? ( { diff --git a/src/containers/Organization/Video/TranslationRightPanel.jsx b/src/containers/Organization/Video/TranslationRightPanel.jsx index 4bcd15fc..bb43b691 100644 --- a/src/containers/Organization/Video/TranslationRightPanel.jsx +++ b/src/containers/Organization/Video/TranslationRightPanel.jsx @@ -35,7 +35,7 @@ import { MenuItem, useMediaQuery, } from "@mui/material"; -import { IndicTransliterate } from "indic-transliterate"; +import { IndicTransliterate } from "@ai4bharat/indic-transliterate"; import ButtonComponent from "./components/ButtonComponent"; import SettingsButtonComponent from "./components/SettingsButtonComponent"; import Pagination from "./components/Pagination"; @@ -801,7 +801,6 @@ const TranslationRightPanel = ({ currentIndex, currentSubs,setCurrentIndex, show {enableTransliteration ? ( { diff --git a/src/containers/Organization/Video/VoiceOverRightPanel1.jsx b/src/containers/Organization/Video/VoiceOverRightPanel1.jsx index e5addc62..0ad057bf 100644 --- a/src/containers/Organization/Video/VoiceOverRightPanel1.jsx +++ b/src/containers/Organization/Video/VoiceOverRightPanel1.jsx @@ -30,7 +30,7 @@ import TaskAltIcon from "@mui/icons-material/TaskAlt"; import { Box, CardContent, CircularProgress, Grid, IconButton, Menu, Tooltip, Typography } from "@mui/material"; import SettingsButtonComponent from "./components/SettingsButtonComponent"; import Pagination from "./components/Pagination"; -import { IndicTransliterate } from "indic-transliterate"; +import { IndicTransliterate } from "@ai4bharat/indic-transliterate"; import subscript from "config/subscript"; import superscriptMap from "config/superscript"; import { @@ -950,7 +950,6 @@ const VoiceOverRightPanel1 = ({ currentIndex, setCurrentIndex, showTimeline, seg {taskData?.target_language !== "en" && enableTransliteration ? ( { From 6491c59d6aefc06f77de36e04773f35c383e31f8 Mon Sep 17 00:00:00 2001 From: Chetan-Gudagamanal Date: Wed, 26 Jun 2024 16:55:30 +0530 Subject: [PATCH 06/15] minor updates in find replace feature --- src/common/FindAndReplace.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/common/FindAndReplace.jsx b/src/common/FindAndReplace.jsx index 25944864..7d4206bd 100644 --- a/src/common/FindAndReplace.jsx +++ b/src/common/FindAndReplace.jsx @@ -93,6 +93,8 @@ const FindAndReplace = (props) => { switch (apiType) { case "FIND_AND_REPLACE_FOR_FULL_PAYLOAD": resetLoading(false); + setFoundIndices([]) + setReplaceValue("") setShowFindReplaceModel(false); } } @@ -107,14 +109,14 @@ const FindAndReplace = (props) => { }, [apiStatus]); - const replaceTextForAllPagesCall= ()=>{ + const replaceTextForAllPagesCall= ()=>{ const payloadObj = new UpdateAndReplaceWordsAPI( taskId, transliterationLang.task_type, - findValue, - replaceValue, + findValue.trim(), + replaceValue.trim(), replaceFullWord, - transliterationLang.src_language + transliterationLanguage ) dispatch(APITransport(payloadObj)) } From 8cd0e0f9ee028178935bbfb4ca3fd413827d4e40 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Sat, 29 Jun 2024 10:14:44 +0530 Subject: [PATCH 07/15] revert transliteration module to use cl backend --- src/containers/Organization/Video/RightPanel.jsx | 3 ++- src/containers/Organization/Video/TranslationRightPanel.jsx | 3 ++- src/containers/Organization/Video/VoiceOverRightPanel1.jsx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/containers/Organization/Video/RightPanel.jsx b/src/containers/Organization/Video/RightPanel.jsx index d4de5c33..e891a622 100644 --- a/src/containers/Organization/Video/RightPanel.jsx +++ b/src/containers/Organization/Video/RightPanel.jsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useState, useRef, memo } from "react"; -import { IndicTransliterate } from "@ai4bharat/indic-transliterate"; +import { IndicTransliterate } from "indic-transliterate"; import { useDispatch, useSelector } from "react-redux"; import { useNavigate, useParams } from "react-router-dom"; import subscript from "config/subscript"; @@ -719,6 +719,7 @@ const RightPanel = ({ currentIndex, currentSubs,setCurrentIndex, showTimeline, s > {taskData?.src_language !== "en" && enableTransliteration ? ( { diff --git a/src/containers/Organization/Video/TranslationRightPanel.jsx b/src/containers/Organization/Video/TranslationRightPanel.jsx index bb43b691..4bcd15fc 100644 --- a/src/containers/Organization/Video/TranslationRightPanel.jsx +++ b/src/containers/Organization/Video/TranslationRightPanel.jsx @@ -35,7 +35,7 @@ import { MenuItem, useMediaQuery, } from "@mui/material"; -import { IndicTransliterate } from "@ai4bharat/indic-transliterate"; +import { IndicTransliterate } from "indic-transliterate"; import ButtonComponent from "./components/ButtonComponent"; import SettingsButtonComponent from "./components/SettingsButtonComponent"; import Pagination from "./components/Pagination"; @@ -801,6 +801,7 @@ const TranslationRightPanel = ({ currentIndex, currentSubs,setCurrentIndex, show {enableTransliteration ? ( { diff --git a/src/containers/Organization/Video/VoiceOverRightPanel1.jsx b/src/containers/Organization/Video/VoiceOverRightPanel1.jsx index 0ad057bf..e5addc62 100644 --- a/src/containers/Organization/Video/VoiceOverRightPanel1.jsx +++ b/src/containers/Organization/Video/VoiceOverRightPanel1.jsx @@ -30,7 +30,7 @@ import TaskAltIcon from "@mui/icons-material/TaskAlt"; import { Box, CardContent, CircularProgress, Grid, IconButton, Menu, Tooltip, Typography } from "@mui/material"; import SettingsButtonComponent from "./components/SettingsButtonComponent"; import Pagination from "./components/Pagination"; -import { IndicTransliterate } from "@ai4bharat/indic-transliterate"; +import { IndicTransliterate } from "indic-transliterate"; import subscript from "config/subscript"; import superscriptMap from "config/superscript"; import { @@ -950,6 +950,7 @@ const VoiceOverRightPanel1 = ({ currentIndex, setCurrentIndex, showTimeline, seg {taskData?.target_language !== "en" && enableTransliteration ? ( { From 7580c25eb708104c18ae762723a5f3bcc8a83ec7 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Tue, 2 Jul 2024 16:12:37 +0530 Subject: [PATCH 08/15] upgraded indictransliterate package for logging through custom-api-url --- package-lock.json | 14 +++++++------- package.json | 2 +- src/config/apiendpoint.js | 2 +- src/containers/Organization/Video/RightPanel.jsx | 2 +- .../Organization/Video/TranslationRightPanel.jsx | 2 +- .../Organization/Video/VoiceOverRightPanel.jsx | 2 +- .../Organization/Video/VoiceOverRightPanel1.jsx | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 26821425..5bddbcc9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "webapp", "version": "0.1.0", "dependencies": { - "@ai4bharat/indic-transliterate": "^1.3.2", + "@ai4bharat/indic-transliterate": "^1.3.3", "@emotion/react": "^11.10.4", "@emotion/styled": "^11.10.4", "@mui/icons-material": "^5.10.6", @@ -58,9 +58,9 @@ "integrity": "sha512-E09FiIft46CmH5Qnjb0wsW54/YQd69LsxeKUOWawmws1XWvyFGURnAChH0mlr7YPFR1ofwvUQfcL0J3lMxXqPA==" }, "node_modules/@ai4bharat/indic-transliterate": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@ai4bharat/indic-transliterate/-/indic-transliterate-1.3.2.tgz", - "integrity": "sha512-E5rY6bcrb+6PbUZPNvr37fLCccv+PtndqqVix9wMYnW1ocZieOjrMCY3SU6sAq5yBa4+vdK3Rnwtd0Tj0RcRcw==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@ai4bharat/indic-transliterate/-/indic-transliterate-1.3.3.tgz", + "integrity": "sha512-7WEAGT1h3ooroxuz2PMH1U1mUP5FNv7dctpbn4LbJuKy1J5W8lkkO8E60BHRWzKcJJAUb4cyXM8VYw1EKjKMVg==", "dependencies": { "textarea-caret": "^3.1.0" }, @@ -18846,9 +18846,9 @@ "integrity": "sha512-E09FiIft46CmH5Qnjb0wsW54/YQd69LsxeKUOWawmws1XWvyFGURnAChH0mlr7YPFR1ofwvUQfcL0J3lMxXqPA==" }, "@ai4bharat/indic-transliterate": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@ai4bharat/indic-transliterate/-/indic-transliterate-1.3.2.tgz", - "integrity": "sha512-E5rY6bcrb+6PbUZPNvr37fLCccv+PtndqqVix9wMYnW1ocZieOjrMCY3SU6sAq5yBa4+vdK3Rnwtd0Tj0RcRcw==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@ai4bharat/indic-transliterate/-/indic-transliterate-1.3.3.tgz", + "integrity": "sha512-7WEAGT1h3ooroxuz2PMH1U1mUP5FNv7dctpbn4LbJuKy1J5W8lkkO8E60BHRWzKcJJAUb4cyXM8VYw1EKjKMVg==", "requires": { "textarea-caret": "^3.1.0" } diff --git a/package.json b/package.json index 648215e0..b0f3c103 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "@ai4bharat/indic-transliterate": "^1.3.2", + "@ai4bharat/indic-transliterate": "^1.3.3", "@emotion/react": "^11.10.4", "@emotion/styled": "^11.10.4", "@mui/icons-material": "^5.10.6", diff --git a/src/config/apiendpoint.js b/src/config/apiendpoint.js index 36a95fa4..9e14edd3 100644 --- a/src/config/apiendpoint.js +++ b/src/config/apiendpoint.js @@ -39,7 +39,7 @@ const endpoints = { task: "/task/", //Transliteration - transliteration: "/api/generic/transliteration", + transliteration: "/api/generic/transliteration/", //Glossary glossary: "/glossary/", diff --git a/src/containers/Organization/Video/RightPanel.jsx b/src/containers/Organization/Video/RightPanel.jsx index e891a622..84ab84cc 100644 --- a/src/containers/Organization/Video/RightPanel.jsx +++ b/src/containers/Organization/Video/RightPanel.jsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useState, useRef, memo } from "react"; -import { IndicTransliterate } from "indic-transliterate"; +import { IndicTransliterate } from "@ai4bharat/indic-transliterate"; import { useDispatch, useSelector } from "react-redux"; import { useNavigate, useParams } from "react-router-dom"; import subscript from "config/subscript"; diff --git a/src/containers/Organization/Video/TranslationRightPanel.jsx b/src/containers/Organization/Video/TranslationRightPanel.jsx index 4bcd15fc..8d480c4d 100644 --- a/src/containers/Organization/Video/TranslationRightPanel.jsx +++ b/src/containers/Organization/Video/TranslationRightPanel.jsx @@ -35,7 +35,7 @@ import { MenuItem, useMediaQuery, } from "@mui/material"; -import { IndicTransliterate } from "indic-transliterate"; +import { IndicTransliterate } from "@ai4bharat/indic-transliterate"; import ButtonComponent from "./components/ButtonComponent"; import SettingsButtonComponent from "./components/SettingsButtonComponent"; import Pagination from "./components/Pagination"; diff --git a/src/containers/Organization/Video/VoiceOverRightPanel.jsx b/src/containers/Organization/Video/VoiceOverRightPanel.jsx index bf15f703..6648d015 100644 --- a/src/containers/Organization/Video/VoiceOverRightPanel.jsx +++ b/src/containers/Organization/Video/VoiceOverRightPanel.jsx @@ -22,7 +22,7 @@ import { Box, CardContent, Grid, Typography } from "@mui/material"; import SettingsButtonComponent from "./components/SettingsButtonComponent"; import ButtonComponent from "./components/ButtonComponent"; import Pagination from "./components/Pagination"; -import { IndicTransliterate } from "indic-transliterate"; +import { IndicTransliterate } from "@ai4bharat/indic-transliterate"; import subscript from "config/subscript"; import superscriptMap from "config/superscript"; import { diff --git a/src/containers/Organization/Video/VoiceOverRightPanel1.jsx b/src/containers/Organization/Video/VoiceOverRightPanel1.jsx index e5addc62..39cad252 100644 --- a/src/containers/Organization/Video/VoiceOverRightPanel1.jsx +++ b/src/containers/Organization/Video/VoiceOverRightPanel1.jsx @@ -30,7 +30,7 @@ import TaskAltIcon from "@mui/icons-material/TaskAlt"; import { Box, CardContent, CircularProgress, Grid, IconButton, Menu, Tooltip, Typography } from "@mui/material"; import SettingsButtonComponent from "./components/SettingsButtonComponent"; import Pagination from "./components/Pagination"; -import { IndicTransliterate } from "indic-transliterate"; +import { IndicTransliterate } from "@ai4bharat/indic-transliterate"; import subscript from "config/subscript"; import superscriptMap from "config/superscript"; import { From a1d457564658247a1187567cd58476393f9b9265 Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Mon, 22 Jul 2024 16:04:57 +0530 Subject: [PATCH 09/15] retain video list view columns --- .../Organization/Project/VideoList.jsx | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/containers/Organization/Project/VideoList.jsx b/src/containers/Organization/Project/VideoList.jsx index a737bc6b..7006279a 100644 --- a/src/containers/Organization/Project/VideoList.jsx +++ b/src/containers/Organization/Project/VideoList.jsx @@ -61,6 +61,7 @@ const VideoList = ({ data, removeVideo }) => { const [videoIdForDowload, setVideoIdForDowload] = useState(""); const [videoName, setVideoName] = useState(""); const [orgOwnerId, setOrgOwnerId] = useState(""); + const [viewListColumns, setViewListColumns] = useState([]); const userData = useSelector((state) => state.getLoggedInUserDetails.data); const apiStatus = useSelector((state) => state.apiStatus); @@ -111,6 +112,15 @@ const VideoList = ({ data, removeVideo }) => { // eslint-disable-next-line }, [apiStatus]); + useEffect(() => { + const data = localStorage.getItem("videoColDisplayFilter"); + if(data){ + setViewListColumns(JSON.parse(data)); + }else{ + setViewListColumns(videoListColumns); + } + }, []); + const handleVideoDialog = (item) => { setOpen(true); setCurrentVideoDetails([item]); @@ -280,6 +290,29 @@ const VideoList = ({ data, removeVideo }) => { ); }; + function toggleDisplayExclude(label) { + return viewListColumns.map(column => { + if (column.name === label) { + if (column.options && column.options.display === "exclude") { + const { display, ...restOptions } = column.options; + return { + ...column, + options: restOptions, + }; + } else { + return { + ...column, + options: { + ...column.options, + display: "exclude", + }, + }; + } + } + return column; + }); + } + const options = { textLabels: { body: { @@ -319,6 +352,9 @@ const VideoList = ({ data, removeVideo }) => { ); }, + onViewColumnsChange: (changedColumn) => { + localStorage.setItem("videoColDisplayFilter", JSON.stringify(toggleDisplayExclude(changedColumn))); + }, }; return ( @@ -326,7 +362,7 @@ const VideoList = ({ data, removeVideo }) => { From ad02e37c924adb4dd0a7b5f93cb903be2a5f4fcd Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Tue, 23 Jul 2024 16:04:00 +0530 Subject: [PATCH 10/15] updated transliteration module version to 1.3.5 --- package-lock.json | 14 +++++++------- package.json | 2 +- src/containers/Organization/Video/RightPanel.jsx | 1 - .../Organization/Video/TranslationRightPanel.jsx | 1 - .../Organization/Video/VoiceOverRightPanel.jsx | 1 - .../Organization/Video/VoiceOverRightPanel1.jsx | 1 - 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5bddbcc9..e728383a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "webapp", "version": "0.1.0", "dependencies": { - "@ai4bharat/indic-transliterate": "^1.3.3", + "@ai4bharat/indic-transliterate": "^1.3.5", "@emotion/react": "^11.10.4", "@emotion/styled": "^11.10.4", "@mui/icons-material": "^5.10.6", @@ -58,9 +58,9 @@ "integrity": "sha512-E09FiIft46CmH5Qnjb0wsW54/YQd69LsxeKUOWawmws1XWvyFGURnAChH0mlr7YPFR1ofwvUQfcL0J3lMxXqPA==" }, "node_modules/@ai4bharat/indic-transliterate": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@ai4bharat/indic-transliterate/-/indic-transliterate-1.3.3.tgz", - "integrity": "sha512-7WEAGT1h3ooroxuz2PMH1U1mUP5FNv7dctpbn4LbJuKy1J5W8lkkO8E60BHRWzKcJJAUb4cyXM8VYw1EKjKMVg==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@ai4bharat/indic-transliterate/-/indic-transliterate-1.3.5.tgz", + "integrity": "sha512-I2aYsM/VBNyevfF9uPDxBhslUz5gM2E/efTB/qbG4422OOOeYgdJoFeEbBXL/GC0nOKBqjPvr6S+63NrvC6KhQ==", "dependencies": { "textarea-caret": "^3.1.0" }, @@ -18846,9 +18846,9 @@ "integrity": "sha512-E09FiIft46CmH5Qnjb0wsW54/YQd69LsxeKUOWawmws1XWvyFGURnAChH0mlr7YPFR1ofwvUQfcL0J3lMxXqPA==" }, "@ai4bharat/indic-transliterate": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@ai4bharat/indic-transliterate/-/indic-transliterate-1.3.3.tgz", - "integrity": "sha512-7WEAGT1h3ooroxuz2PMH1U1mUP5FNv7dctpbn4LbJuKy1J5W8lkkO8E60BHRWzKcJJAUb4cyXM8VYw1EKjKMVg==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@ai4bharat/indic-transliterate/-/indic-transliterate-1.3.5.tgz", + "integrity": "sha512-I2aYsM/VBNyevfF9uPDxBhslUz5gM2E/efTB/qbG4422OOOeYgdJoFeEbBXL/GC0nOKBqjPvr6S+63NrvC6KhQ==", "requires": { "textarea-caret": "^3.1.0" } diff --git a/package.json b/package.json index b0f3c103..3732dee3 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "@ai4bharat/indic-transliterate": "^1.3.3", + "@ai4bharat/indic-transliterate": "^1.3.5", "@emotion/react": "^11.10.4", "@emotion/styled": "^11.10.4", "@mui/icons-material": "^5.10.6", diff --git a/src/containers/Organization/Video/RightPanel.jsx b/src/containers/Organization/Video/RightPanel.jsx index 84ab84cc..d4de5c33 100644 --- a/src/containers/Organization/Video/RightPanel.jsx +++ b/src/containers/Organization/Video/RightPanel.jsx @@ -719,7 +719,6 @@ const RightPanel = ({ currentIndex, currentSubs,setCurrentIndex, showTimeline, s > {taskData?.src_language !== "en" && enableTransliteration ? ( { diff --git a/src/containers/Organization/Video/TranslationRightPanel.jsx b/src/containers/Organization/Video/TranslationRightPanel.jsx index 8d480c4d..bb43b691 100644 --- a/src/containers/Organization/Video/TranslationRightPanel.jsx +++ b/src/containers/Organization/Video/TranslationRightPanel.jsx @@ -801,7 +801,6 @@ const TranslationRightPanel = ({ currentIndex, currentSubs,setCurrentIndex, show {enableTransliteration ? ( { diff --git a/src/containers/Organization/Video/VoiceOverRightPanel.jsx b/src/containers/Organization/Video/VoiceOverRightPanel.jsx index 6648d015..fcf2c5ef 100644 --- a/src/containers/Organization/Video/VoiceOverRightPanel.jsx +++ b/src/containers/Organization/Video/VoiceOverRightPanel.jsx @@ -621,7 +621,6 @@ const VoiceOverRightPanel = ({ setCurrentIndex }) => { {taskData?.target_language !== "en" && enableTransliteration ? ( { diff --git a/src/containers/Organization/Video/VoiceOverRightPanel1.jsx b/src/containers/Organization/Video/VoiceOverRightPanel1.jsx index 39cad252..0ad057bf 100644 --- a/src/containers/Organization/Video/VoiceOverRightPanel1.jsx +++ b/src/containers/Organization/Video/VoiceOverRightPanel1.jsx @@ -950,7 +950,6 @@ const VoiceOverRightPanel1 = ({ currentIndex, setCurrentIndex, showTimeline, seg {taskData?.target_language !== "en" && enableTransliteration ? ( { From 88785fa29d5908afc67a3cc401ab78b8d2b838eb Mon Sep 17 00:00:00 2001 From: kartikvirendrar Date: Wed, 24 Jul 2024 12:36:21 +0530 Subject: [PATCH 11/15] updated transliteration module to version 1.3.6 --- package-lock.json | 14 +++++++------- package.json | 2 +- src/containers/Organization/Video/RightPanel.jsx | 1 + .../Organization/Video/TranslationRightPanel.jsx | 1 + .../Organization/Video/VoiceOverRightPanel.jsx | 1 + .../Organization/Video/VoiceOverRightPanel1.jsx | 1 + 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index e728383a..ba7c5ebc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "webapp", "version": "0.1.0", "dependencies": { - "@ai4bharat/indic-transliterate": "^1.3.5", + "@ai4bharat/indic-transliterate": "^1.3.6", "@emotion/react": "^11.10.4", "@emotion/styled": "^11.10.4", "@mui/icons-material": "^5.10.6", @@ -58,9 +58,9 @@ "integrity": "sha512-E09FiIft46CmH5Qnjb0wsW54/YQd69LsxeKUOWawmws1XWvyFGURnAChH0mlr7YPFR1ofwvUQfcL0J3lMxXqPA==" }, "node_modules/@ai4bharat/indic-transliterate": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@ai4bharat/indic-transliterate/-/indic-transliterate-1.3.5.tgz", - "integrity": "sha512-I2aYsM/VBNyevfF9uPDxBhslUz5gM2E/efTB/qbG4422OOOeYgdJoFeEbBXL/GC0nOKBqjPvr6S+63NrvC6KhQ==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/@ai4bharat/indic-transliterate/-/indic-transliterate-1.3.6.tgz", + "integrity": "sha512-NiPLgkwJ/2XTg7ocyWgd/UNUBsj0VzMvLe3jw9zrJQTG20ybegf108rtIDKdmYuYcwyM1aLsQVBNjsgnAMXAGg==", "dependencies": { "textarea-caret": "^3.1.0" }, @@ -18846,9 +18846,9 @@ "integrity": "sha512-E09FiIft46CmH5Qnjb0wsW54/YQd69LsxeKUOWawmws1XWvyFGURnAChH0mlr7YPFR1ofwvUQfcL0J3lMxXqPA==" }, "@ai4bharat/indic-transliterate": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@ai4bharat/indic-transliterate/-/indic-transliterate-1.3.5.tgz", - "integrity": "sha512-I2aYsM/VBNyevfF9uPDxBhslUz5gM2E/efTB/qbG4422OOOeYgdJoFeEbBXL/GC0nOKBqjPvr6S+63NrvC6KhQ==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/@ai4bharat/indic-transliterate/-/indic-transliterate-1.3.6.tgz", + "integrity": "sha512-NiPLgkwJ/2XTg7ocyWgd/UNUBsj0VzMvLe3jw9zrJQTG20ybegf108rtIDKdmYuYcwyM1aLsQVBNjsgnAMXAGg==", "requires": { "textarea-caret": "^3.1.0" } diff --git a/package.json b/package.json index 3732dee3..ba6bbcaf 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "@ai4bharat/indic-transliterate": "^1.3.5", + "@ai4bharat/indic-transliterate": "^1.3.6", "@emotion/react": "^11.10.4", "@emotion/styled": "^11.10.4", "@mui/icons-material": "^5.10.6", diff --git a/src/containers/Organization/Video/RightPanel.jsx b/src/containers/Organization/Video/RightPanel.jsx index d4de5c33..84ab84cc 100644 --- a/src/containers/Organization/Video/RightPanel.jsx +++ b/src/containers/Organization/Video/RightPanel.jsx @@ -719,6 +719,7 @@ const RightPanel = ({ currentIndex, currentSubs,setCurrentIndex, showTimeline, s > {taskData?.src_language !== "en" && enableTransliteration ? ( { diff --git a/src/containers/Organization/Video/TranslationRightPanel.jsx b/src/containers/Organization/Video/TranslationRightPanel.jsx index bb43b691..8d480c4d 100644 --- a/src/containers/Organization/Video/TranslationRightPanel.jsx +++ b/src/containers/Organization/Video/TranslationRightPanel.jsx @@ -801,6 +801,7 @@ const TranslationRightPanel = ({ currentIndex, currentSubs,setCurrentIndex, show {enableTransliteration ? ( { diff --git a/src/containers/Organization/Video/VoiceOverRightPanel.jsx b/src/containers/Organization/Video/VoiceOverRightPanel.jsx index fcf2c5ef..6648d015 100644 --- a/src/containers/Organization/Video/VoiceOverRightPanel.jsx +++ b/src/containers/Organization/Video/VoiceOverRightPanel.jsx @@ -621,6 +621,7 @@ const VoiceOverRightPanel = ({ setCurrentIndex }) => { {taskData?.target_language !== "en" && enableTransliteration ? ( { diff --git a/src/containers/Organization/Video/VoiceOverRightPanel1.jsx b/src/containers/Organization/Video/VoiceOverRightPanel1.jsx index 0ad057bf..39cad252 100644 --- a/src/containers/Organization/Video/VoiceOverRightPanel1.jsx +++ b/src/containers/Organization/Video/VoiceOverRightPanel1.jsx @@ -950,6 +950,7 @@ const VoiceOverRightPanel1 = ({ currentIndex, setCurrentIndex, showTimeline, seg {taskData?.target_language !== "en" && enableTransliteration ? ( { From b405f9d3e808c7fc8ff1790fef8e9e2febab98a7 Mon Sep 17 00:00:00 2001 From: Ishvinder Sethi Date: Fri, 26 Jul 2024 12:00:06 +0530 Subject: [PATCH 12/15] Create deploy-prod-azure.yml --- .github/workflows/deploy-prod-azure.yml | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/deploy-prod-azure.yml diff --git a/.github/workflows/deploy-prod-azure.yml b/.github/workflows/deploy-prod-azure.yml new file mode 100644 index 00000000..cd084be0 --- /dev/null +++ b/.github/workflows/deploy-prod-azure.yml @@ -0,0 +1,55 @@ +name: Prod Environment - Build and Release React App + +on: + push: + branches: [master] + +env: + CI: false + NODE_OPTIONS: "--max_old_space_size=4096" + REACT_APP_APIGW_BASE_URL: ${{ vars.PROD__REACT_APP_APIGW_BASE_URL }} + AZURE_STORAGE_ACCOUNT_NAME: ${{ vars.PROD__AZURE_STORAGE_ACCOUNT_NAME }} + AZURE_STORAGEKEY: ${{ secrets.PROD__AZURE_STORAGEKEY }} + AZURE_CDN_PROFILE: ${{ vars.PROD__AZURE_CDN_PROFILE }} + AZURE_ENDPOINT_NAME: ${{ vars.PROD__AZURE_ENDPOINT_NAME }} + AZURE_RESOURCE_GROUP: ${{ vars.PROD__AZURE_RESOURCE_GROUP }} + +jobs: + cicd: + name: DEV__CICD + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Node.js + uses: actions/setup-node@v2 + + - name: Install NPM packages + run: npm install --legacy-peer-deps + + - name: Build project + run: npm run build + + - name: Azure login + uses: azure/login@v1 + with: + creds: ${{ secrets.PROD_AZURE_CREDS }} + + - name: Upload to blob storage + uses: azure/CLI@v1 + with: + inlineScript: | + az storage blob upload-batch --account-name ${{ env.AZURE_STORAGE_ACCOUNT_NAME }} --account-key ${{ env.AZURE_STORAGEKEY }} -d '$web' -s ./build --overwrite + + - name: Purge CDN endpoint + uses: azure/CLI@v1 + with: + inlineScript: | + az cdn endpoint purge --no-wait --content-paths "/*" --profile-name ${{ env.AZURE_CDN_PROFILE }} --name ${{ env.AZURE_ENDPOINT_NAME }} --resource-group ${{ env.AZURE_RESOURCE_GROUP }} + + - name: Azure logout + run: | + az logout + if: always() From 78ed09f45f1464a6b7d8c58b6b5b83ef6a4076ae Mon Sep 17 00:00:00 2001 From: Ishvinder Sethi Date: Fri, 26 Jul 2024 12:59:36 +0530 Subject: [PATCH 13/15] Update and rename deploy-prod-github.yml to deploy-dev-github.yml --- .../workflows/{deploy-prod-github.yml => deploy-dev-github.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{deploy-prod-github.yml => deploy-dev-github.yml} (97%) diff --git a/.github/workflows/deploy-prod-github.yml b/.github/workflows/deploy-dev-github.yml similarity index 97% rename from .github/workflows/deploy-prod-github.yml rename to .github/workflows/deploy-dev-github.yml index c4736fd4..f908e7f4 100644 --- a/.github/workflows/deploy-prod-github.yml +++ b/.github/workflows/deploy-dev-github.yml @@ -2,7 +2,7 @@ name: Build and Deploy on: push: branches: - - master + - develop2 jobs: build-and-deploy: concurrency: ci-${{ github.ref }} From b85d63f5f2a4d186e4fc816018fc4b3a24bd6c7c Mon Sep 17 00:00:00 2001 From: Ishvinder Sethi Date: Fri, 26 Jul 2024 13:01:01 +0530 Subject: [PATCH 14/15] Update deploy-dev-github.yml --- .github/workflows/deploy-dev-github.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-dev-github.yml b/.github/workflows/deploy-dev-github.yml index f908e7f4..023095a9 100644 --- a/.github/workflows/deploy-dev-github.yml +++ b/.github/workflows/deploy-dev-github.yml @@ -19,7 +19,7 @@ jobs: npm install --legacy-peer-deps npm run build env: - REACT_APP_APIGW_BASE_URL: ${{ vars.REACT_APP_APIGW_BASE_URL }} + REACT_APP_APIGW_BASE_URL: ${{ vars.DEV__REACT_APP_APIGW_BASE_URL }} CI: false - name: Deploy 🚀 From 26793c46b9d871a64027dfa769424451982f1550 Mon Sep 17 00:00:00 2001 From: Ishvinder Sethi Date: Fri, 26 Jul 2024 13:01:55 +0530 Subject: [PATCH 15/15] Delete .github/workflows/deploy-dev-azure.yaml --- .github/workflows/deploy-dev-azure.yaml | 55 ------------------------- 1 file changed, 55 deletions(-) delete mode 100644 .github/workflows/deploy-dev-azure.yaml diff --git a/.github/workflows/deploy-dev-azure.yaml b/.github/workflows/deploy-dev-azure.yaml deleted file mode 100644 index 2d245527..00000000 --- a/.github/workflows/deploy-dev-azure.yaml +++ /dev/null @@ -1,55 +0,0 @@ -name: Dev Environment - Build and Release React App - -on: - push: - branches: [develop2] - -env: - CI: false - NODE_OPTIONS: "--max_old_space_size=4096" - REACT_APP_APIGW_BASE_URL: ${{ vars.DEV__REACT_APP_APIGW_BASE_URL }} - AZURE_STORAGE_ACCOUNT_NAME: ${{ vars.DEV__AZURE_STORAGE_ACCOUNT_NAME }} - AZURE_STORAGEKEY: ${{ secrets.DEV__AZURE_STORAGEKEY }} - AZURE_CDN_PROFILE: ${{ vars.DEV__AZURE_CDN_PROFILE }} - AZURE_ENDPOINT_NAME: ${{ vars.DEV__AZURE_ENDPOINT_NAME }} - AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }} - -jobs: - cicd: - name: DEV__CICD - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install Node.js - uses: actions/setup-node@v2 - - - name: Install NPM packages - run: npm install --legacy-peer-deps - - - name: Build project - run: npm run build - - - name: Azure login - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDS }} - - - name: Upload to blob storage - uses: azure/CLI@v1 - with: - inlineScript: | - az storage blob upload-batch --account-name ${{ env.AZURE_STORAGE_ACCOUNT_NAME }} --account-key ${{ env.AZURE_STORAGEKEY }} -d '$web' -s ./build --overwrite - - - name: Purge CDN endpoint - uses: azure/CLI@v1 - with: - inlineScript: | - az cdn endpoint purge --no-wait --content-paths "/*" --profile-name ${{ env.AZURE_CDN_PROFILE }} --name ${{ env.AZURE_ENDPOINT_NAME }} --resource-group ${{ env.AZURE_RESOURCE_GROUP }} - - - name: Azure logout - run: | - az logout - if: always()