@translationstudio/translationstudio-strapi-extension 1.0.10 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ const SettingsPage = () => {
17
17
  const getLicense = async () => {
18
18
  setIsLoading(true);
19
19
  try {
20
- const response = await get("/translationstudio-strapi-extension/getLicense");
20
+ const response = await get("/translationstudio/getLicense");
21
21
  if (response.data.license) {
22
22
  setLicenseValue(response.data.license);
23
23
  } else {
@@ -35,7 +35,7 @@ const SettingsPage = () => {
35
35
  const fetchToken = async () => {
36
36
  setIsLoadingToken(true);
37
37
  try {
38
- const response = await get("/translationstudio-strapi-extension/getToken");
38
+ const response = await get("/translationstudio/getToken");
39
39
  if (response.data.token) {
40
40
  setTokenValue(response.data.token);
41
41
  } else {
@@ -54,7 +54,7 @@ const SettingsPage = () => {
54
54
  };
55
55
  const handleSaveLicense = async () => {
56
56
  try {
57
- const response = await post("/translationstudio-strapi-extension/setLicense", { license: licenseValue });
57
+ const response = await post("/translationstudio/setLicense", { license: licenseValue });
58
58
  if (response) {
59
59
  displayAlert("success");
60
60
  return;
@@ -76,7 +76,7 @@ const SettingsPage = () => {
76
76
  const handleGenerateToken = async () => {
77
77
  setIsLoadingToken(true);
78
78
  try {
79
- const response = await post("/translationstudio-strapi-extension/generateToken");
79
+ const response = await post("/translationstudio/generateToken");
80
80
  if (response.data?.token) {
81
81
  setTokenValue(response.data.token);
82
82
  }
@@ -230,7 +230,7 @@ const SettingsPage = () => {
230
230
  )
231
231
  }
232
232
  ),
233
- children: isLoadingToken ? "Generating..." : "Generate Access Key"
233
+ children: isLoadingToken ? "Generating..." : tokenValue ? "Generate new access key" : "Generate access key"
234
234
  }
235
235
  ) }),
236
236
  /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Typography, { variant: "delta", children: [
@@ -19,7 +19,7 @@ const SettingsPage = () => {
19
19
  const getLicense = async () => {
20
20
  setIsLoading(true);
21
21
  try {
22
- const response = await get("/translationstudio-strapi-extension/getLicense");
22
+ const response = await get("/translationstudio/getLicense");
23
23
  if (response.data.license) {
24
24
  setLicenseValue(response.data.license);
25
25
  } else {
@@ -37,7 +37,7 @@ const SettingsPage = () => {
37
37
  const fetchToken = async () => {
38
38
  setIsLoadingToken(true);
39
39
  try {
40
- const response = await get("/translationstudio-strapi-extension/getToken");
40
+ const response = await get("/translationstudio/getToken");
41
41
  if (response.data.token) {
42
42
  setTokenValue(response.data.token);
43
43
  } else {
@@ -56,7 +56,7 @@ const SettingsPage = () => {
56
56
  };
57
57
  const handleSaveLicense = async () => {
58
58
  try {
59
- const response = await post("/translationstudio-strapi-extension/setLicense", { license: licenseValue });
59
+ const response = await post("/translationstudio/setLicense", { license: licenseValue });
60
60
  if (response) {
61
61
  displayAlert("success");
62
62
  return;
@@ -78,7 +78,7 @@ const SettingsPage = () => {
78
78
  const handleGenerateToken = async () => {
79
79
  setIsLoadingToken(true);
80
80
  try {
81
- const response = await post("/translationstudio-strapi-extension/generateToken");
81
+ const response = await post("/translationstudio/generateToken");
82
82
  if (response.data?.token) {
83
83
  setTokenValue(response.data.token);
84
84
  }
@@ -232,7 +232,7 @@ const SettingsPage = () => {
232
232
  )
233
233
  }
234
234
  ),
235
- children: isLoadingToken ? "Generating..." : "Generate Access Key"
235
+ children: isLoadingToken ? "Generating..." : tokenValue ? "Generate new access key" : "Generate access key"
236
236
  }
237
237
  ) }),
238
238
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "delta", children: [
@@ -31,12 +31,20 @@ const Initializer = ({ setPlugin }) => {
31
31
  const logoSvg$1 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20447.49%20582.57'%3e%3cdefs%3e%3cstyle%3e.cls-1{fill:%23e94642;}.cls-2{fill:%23a51d78;}%3c/style%3e%3c/defs%3e%3cpath%20class='cls-2'%20d='M333.63,260.39c11.39,9.77,23.98,22.51,35.71,38.54,29.12,39.79,43.43,86.82,42.53,139.8-.42,24.59-5.02,44.98-13.68,60.58-.81,1.47-1.67,2.92-2.55,4.31-1.72,2.74-3.61,5.39-5.61,7.89-4.83,6.04-10.5,11.44-16.87,16.04-1.25,.9-2.54,1.78-3.84,2.63-2.59,1.68-5.33,3.26-8.14,4.7-4.19,2.15-8.65,4.05-13.26,5.65-3.06,1.06-6.24,2.01-9.46,2.81-9.67,2.42-19.9,3.64-30.38,3.64-28.34,0-54.1-9.14-72.52-25.72-21.07-18.97-31.75-46.53-31.75-81.93,0-44.1,17.26-79.22,46.16-93.95,22.18-11.3,43.5-23.09,60.57-42.86,10.64-12.33,18.32-26.29,23.09-42.13m-20.69-55.64c-4.76,0-8.97,2.99-8.97,8.16h0c1.43,61.87-32.34,81.5-70.16,100.77-38.88,19.82-65.58,64.35-65.58,125.65,0,98.01,69.45,143.23,139.85,143.23,13.2,0,26.35-1.54,39.01-4.7,4.22-1.05,8.38-2.29,12.47-3.7,6.14-2.13,12.11-4.66,17.87-7.62,3.84-1.97,7.58-4.13,11.21-6.48,1.82-1.17,3.6-2.4,5.36-3.66,8.78-6.35,16.81-13.89,23.83-22.67,2.81-3.51,5.45-7.22,7.91-11.13,1.23-1.96,2.42-3.96,3.56-6.02,11.41-20.57,17.61-46.2,18.14-77.24,2.4-140.84-91.02-211.84-129.3-233.29-1.46-.82-3.22-1.29-5.2-1.29h0Z'/%3e%3cpath%20class='cls-1'%20d='M139.41,35.58c28.34,0,54.1,9.14,72.52,25.72,21.07,18.97,31.75,46.53,31.75,81.93,0,44.1-17.26,79.22-46.16,93.95-22.18,11.3-43.5,23.09-60.57,42.86-10.64,12.33-18.32,26.29-23.09,42.13-11.39-9.77-23.98-22.51-35.71-38.54-29.12-39.79-43.43-86.82-42.53-139.8,.42-24.59,5.02-44.98,13.68-60.58,.81-1.46,1.67-2.91,2.55-4.31,1.72-2.74,3.61-5.4,5.61-7.89,4.83-6.04,10.5-11.44,16.87-16.04,1.25-.9,2.54-1.78,3.84-2.63,2.59-1.68,5.33-3.26,8.14-4.7,4.19-2.15,8.65-4.05,13.26-5.65,3.06-1.06,6.25-2.01,9.46-2.81,9.67-2.42,19.9-3.64,30.38-3.64m0-35.58c-13.2,0-26.35,1.54-39.01,4.7-4.22,1.05-8.38,2.29-12.47,3.7-6.14,2.13-12.11,4.66-17.87,7.62-3.84,1.97-7.58,4.13-11.21,6.48-1.82,1.17-3.6,2.4-5.36,3.66-8.78,6.35-16.81,13.89-23.83,22.67-2.81,3.51-5.45,7.22-7.91,11.13-1.23,1.96-2.42,3.96-3.56,6.02C6.78,86.56,.57,112.19,.05,143.23c-2.4,140.84,91.02,211.84,129.3,233.29,1.46,.82,3.22,1.29,5.2,1.29,4.76,0,8.97-2.99,8.97-8.16h0c-1.43-61.87,32.34-81.5,70.16-100.77,38.88-19.82,65.58-64.35,65.58-125.65C279.27,45.22,209.82,0,139.41,0h0Z'/%3e%3c/svg%3e";
32
32
  const PluginIcon = () => /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSvg$1, alt: "Translation Studio Logo", width: 20, height: 20 });
33
33
  const logoSvg = "data:image/svg+xml,%3csvg%20width='1444.47'%20height='635.72'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3ctitle%3eLayer%201%3c/title%3e%3cpath%20id='svg_1'%20fill='%23ffffff'%20d='m1151.68,294.37c34.28,0%2050.11,19.74%2050.11,59.01l0,56.4c0,6.94%20-3.91,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.84,-3.9%20-10.84,-10.85l0,-54.45c0,-27.12%20-10.41,-39.91%20-33.41,-39.91s-32.97,15.4%20-32.97,42.74l0,51.63c0,6.94%20-3.91,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.85,-3.9%20-10.85,-10.85l0,-102.39c0,-6.94%203.91,-10.85%2010.85,-10.85l2.6,0c6.94,0%2010.85,3.91%2010.85,10.85l0,12.34c5.64,-14.39%2019.73,-25.36%2040.56,-25.36l0,0l0,-0.01z'%20class='cls-2'/%3e%3cpath%20id='svg_2'%20fill='%23ffffff'%20d='m0,313.78l0,55.76c0,37.96%2014.53,51.2%2046.42,51.2l0,0c1.96,0%204.12,-0.03%206.29,-0.22c6.9,-0.65%209.8,-4.45%209.11,-11.07c-0.61,-5.88%20-4.99,-8.24%20-11.71,-8.24c-18.88,0%20-25.6,-8.9%20-25.6,-34.49l0,-52.94l25.81,0c6.94,0%2010.85,-3.47%2010.85,-9.54s-3.9,-9.33%20-10.85,-9.33l-25.81,0l0,-15.83c0,-7.59%20-4.34,-11.28%20-11.93,-9.55l-3.04,0.65c-6.29,1.3%20-9.54,5.21%20-9.54,11.71l0,31.89z'%20class='cls-2'/%3e%3cpath%20id='svg_3'%20fill='%23ffffff'%20d='m139.49,295.02c7.38,0%2011.06,4.77%2010.2,11.71l-0.22,1.74c-0.65,6.94%20-4.77,9.54%20-11.93,9.54c-20.39,0.43%20-30.16,15.19%20-30.16,41.22l0,50.55c0,6.94%20-3.9,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.85,-3.9%20-10.85,-10.85l0,-102.39c0,-6.94%203.9,-10.85%2010.85,-10.85l2.6,0c6.94,0%2010.85,3.69%2010.85,10.41l0,10.41c3.91,-11.07%2013.89,-22.34%2032.1,-22.34l0,0l0.01,0z'%20class='cls-2'/%3e%3cpath%20id='svg_4'%20fill='%23ffffff'%20d='m259.67,358.59c0,-27.12%20-15.84,-43.82%20-38.83,-43.82s-38.4,16.49%20-38.4,43.82s15.62,44.04%2038.83,44.04s38.4,-16.7%2038.4,-44.04m-101.53,0c0,-42.74%2026.03,-64.43%2056.84,-64.43c19.52,0%2036.88,9.54%2044.04,26.69l0,-13.45c0,-6.94%203.9,-10.85%2010.85,-10.85l2.6,0c6.94,0%2010.85,3.9%2010.85,10.85l0,102.18c0,6.94%20-3.9,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.85,-3.9%20-10.85,-10.85l0,-12.58c-6.94,16.7%20-24.51,26.47%20-43.82,26.47c-30.81,0%20-57.06,-21.91%20-57.06,-64.87'%20class='cls-2'/%3e%3cpath%20id='svg_5'%20fill='%23ffffff'%20d='m380.06,294.37c34.28,0%2050.11,19.74%2050.11,59.01l0,56.4c0,6.94%20-3.91,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.85,-3.9%20-10.85,-10.85l0,-54.45c0,-27.12%20-10.41,-39.91%20-33.41,-39.91s-32.98,15.4%20-32.98,42.74l0,51.63c0,6.94%20-3.9,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.85,-3.9%20-10.85,-10.85l0,-102.39c0,-6.94%203.91,-10.85%2010.85,-10.85l2.6,0c6.94,0%2010.85,3.91%2010.85,10.85l0,12.34c5.64,-14.39%2019.73,-25.36%2040.57,-25.36l0,0l0.01,-0.01z'%20class='cls-2'/%3e%3cpath%20id='svg_6'%20fill='%23ffffff'%20d='m508.94,422.81c-20.8,0%20-42.78,-8.33%20-53.19,-21.48c-4.44,-5.61%20-2.26,-11.49%204.99,-13.67l2.17,-0.65c4.75,-1.43%208.02,-1.28%2014.32,4.36c8.65,7.74%2020.41,10.61%2031.71,10.61c18.05,0%2028.81,-6.44%2028.81,-17.36c0,-28.63%20-80.45,-5.9%20-80.45,-54.24c0,-22.87%2023.1,-36.01%2049.75,-36.01c16.09,0%2036.22,6.5%2047,17.79c5.1,5.33%203.34,11.34%20-3.68,13.45l-2.17,0.65c-5.86,1.76%20-8.85,-0.39%20-14.53,-3.84c-8.11,-4.92%20-16.87,-8.09%20-26.22,-8.09c-15.64,0%20-26.27,5.18%20-26.27,14.91c0,27.74%2081.1,4.51%2081.1,54.72c0,23.06%20-22.28,38.83%20-53.32,38.83l0,0l-0.02,0.02z'%20class='cls-2'/%3e%3cpath%20id='svg_7'%20fill='%23ffffff'%20d='m585.05,409.79l0,-142.75c0,-6.94%203.9,-10.85%2010.85,-10.85l2.82,0c6.94,0%2010.85,3.9%2010.85,10.85l0,142.75c0,6.94%20-3.91,10.85%20-10.85,10.85l-2.82,0c-6.94,0%20-10.85,-3.91%20-10.85,-10.85'%20class='cls-2'/%3e%3cpath%20id='svg_8'%20fill='%23ffffff'%20d='m737.56,358.59c0,-27.12%20-15.84,-43.82%20-38.84,-43.82s-38.4,16.49%20-38.4,43.82s15.62,44.04%2038.83,44.04s38.4,-16.7%2038.4,-44.04m-101.53,0c0,-42.74%2026.03,-64.43%2056.84,-64.43c19.52,0%2036.88,9.54%2044.04,26.69l0,-13.45c0,-6.94%203.9,-10.85%2010.85,-10.85l2.6,0c6.94,0%2010.85,3.9%2010.85,10.85l0,102.18c0,6.94%20-3.9,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.85,-3.9%20-10.85,-10.85l0,-12.58c-6.94,16.7%20-24.51,26.47%20-43.82,26.47c-30.81,0%20-57.06,-21.91%20-57.06,-64.87'%20class='cls-2'/%3e%3cpath%20id='svg_9'%20fill='%23ffffff'%20d='m800.25,315.42l0,55.76c0,37.96%2014.53,51.2%2046.42,51.2l0,0c1.95,0%204.12,-0.03%206.29,-0.22c6.89,-0.65%209.8,-4.45%209.11,-11.07c-0.61,-5.88%20-4.99,-8.24%20-11.71,-8.24c-18.87,0%20-25.6,-8.9%20-25.6,-34.49l0,-52.94l25.81,0c6.94,0%2010.85,-3.47%2010.85,-9.55s-3.91,-9.33%20-10.85,-9.33l-25.81,0l0,-15.83c0,-7.59%20-4.34,-11.28%20-11.93,-9.54l-3.04,0.65c-6.29,1.3%20-9.55,5.21%20-9.55,11.71l0,31.89l0.01,0z'%20class='cls-2'/%3e%3cpath%20id='svg_10'%20fill='%23ffffff'%20d='m883.72,409.79l0,-102.4c0,-6.94%203.83,-10.85%2010.65,-10.85l2.77,0c6.82,0%2010.65,3.9%2010.65,10.85l0,102.4c0,6.94%20-3.83,10.85%20-10.65,10.85l-2.77,0c-6.81,0%20-10.65,-3.91%20-10.65,-10.85m-2.05,-142.96c0,-8.24%206.08,-13.02%2014.32,-13.02c7.59,0%2014.32,4.77%2014.32,13.02s-6.72,13.02%20-14.32,13.02c-8.24,0%20-14.32,-4.77%20-14.32,-13.02'%20class='cls-2'/%3e%3cpath%20id='svg_11'%20fill='%23ffffff'%20d='m1036.06,358.59c0,-27.12%20-15.62,-43.82%20-38.62,-43.82s-38.4,16.49%20-38.4,43.82s15.4,44.04%2038.61,44.04s38.4,-16.7%2038.4,-44.04m-101.31,0c0,-44.69%2031.02,-64.43%2062.69,-64.43s62.91,19.74%2062.91,64.43s-31.02,64.87%20-62.7,64.87s-62.91,-19.74%20-62.91,-64.87'%20class='cls-2'/%3e%3cpath%20id='svg_12'%20fill='%23ffffff'%20d='m555.77,635.72c-20.98,0%20-43.14,-8.4%20-53.65,-21.66c-4.48,-5.66%20-2.27,-11.59%205.03,-13.78l2.19,-0.66c4.79,-1.44%208.09,-1.29%2014.43,4.4c8.73,7.81%2020.59,10.69%2031.98,10.69c18.2,0%2029.05,-6.49%2029.05,-17.5c0,-28.88%20-81.14,-5.95%20-81.14,-54.7c0,-23.07%2023.3,-36.31%2050.17,-36.31c16.23,0%2036.53,6.55%2047.41,17.94c5.14,5.38%203.37,11.43%20-3.72,13.56l-2.19,0.66c-5.91,1.77%20-8.92,-0.39%20-14.66,-3.87c-8.18,-4.96%20-17.02,-8.16%20-26.45,-8.16c-15.78,0%20-26.5,5.22%20-26.5,15.04c0,27.98%2081.79,4.55%2081.79,55.18c0,23.26%20-22.47,39.16%20-53.78,39.16l0,0l0.04,0.01z'%20class='cls-2'/%3e%3cpath%20id='svg_13'%20fill='%23ffffff'%20d='m639.98,526.42l0,56.23c0,38.29%2014.66,51.63%2046.82,51.63l0,0c1.97,0%204.16,-0.03%206.34,-0.22c6.96,-0.66%209.89,-4.49%209.19,-11.16c-0.61,-5.93%20-5.03,-8.31%20-11.81,-8.31c-19.03,0%20-25.82,-8.97%20-25.82,-34.79l0,-53.38l26.03,0c7,0%2010.94,-3.5%2010.94,-9.63s-3.94,-9.41%20-10.94,-9.41l-26.03,0l0,-15.97c0,-7.66%20-4.38,-11.38%20-12.03,-9.63l-3.06,0.66c-6.34,1.31%20-9.63,5.25%20-9.63,11.81l0,32.16l0,0.01z'%20class='cls-2'/%3e%3cpath%20id='svg_14'%20fill='%23ffffff'%20d='m826.59,508.39c7,0%2010.94,3.94%2010.94,10.94l0,103.27c0,7%20-3.94,10.94%20-10.94,10.94l-2.62,0c-7,0%20-10.94,-3.94%20-10.94,-10.94l0,-12.45c-5.69,14.51%20-19.9,25.57%20-40.91,25.57c-34.57,0%20-50.54,-19.91%20-50.54,-59.51l0,-56.89c0,-7%203.94,-10.93%2010.94,-10.93l2.63,0c7,0%2010.94,3.93%2010.94,10.93l0,54.92c0,27.35%2010.5,40.26%2033.69,40.26s33.26,-15.53%2033.26,-43.1l0,-52.07c0,-7%203.94,-10.93%2010.94,-10.93l2.62,0l-0.01,-0.01z'%20class='cls-2'/%3e%3cpath%20id='svg_15'%20fill='%23ffffff'%20d='m967.71,570.31c0,-27.35%20-15.75,-44.19%20-39.16,-44.19s-38.72,16.63%20-38.72,44.19s15.75,44.41%2039.16,44.41s38.72,-16.85%2038.72,-44.41m-102.39,0c0,-43.1%2026.25,-64.98%2057.32,-64.98c19.69,0%2037.41,9.63%2044.41,26.91l0,-54.26c0,-7%203.94,-10.94%2010.94,-10.94l2.62,0c7,0%2010.94,3.94%2010.94,10.94l0,143.74c0,7%20-3.94,10.94%20-10.94,10.94l-2.62,0c-7,0%20-10.94,-3.94%20-10.94,-10.94l0,-12.69c-7,16.85%20-24.72,26.69%20-44.19,26.69c-31.07,0%20-57.54,-22.09%20-57.54,-65.41'%20class='cls-2'/%3e%3cpath%20id='svg_16'%20fill='%23ffffff'%20d='m1023.66,624.38l0,-103.27c0,-7%203.87,-10.94%2010.74,-10.94l2.79,0c6.87,0%2010.74,3.94%2010.74,10.94l0,103.27c0,7%20-3.87,10.94%20-10.74,10.94l-2.79,0c-6.87,0%20-10.74,-3.94%20-10.74,-10.94m-2.07,-144.18c0,-8.31%206.13,-13.13%2014.44,-13.13c7.66,0%2014.44,4.81%2014.44,13.13s-6.78,13.13%20-14.44,13.13c-8.31,0%20-14.44,-4.81%20-14.44,-13.13'%20class='cls-2'/%3e%3cpath%20id='svg_17'%20fill='%23ffffff'%20d='m1177.29,570.31c0,-27.35%20-15.75,-44.19%20-38.94,-44.19s-38.72,16.63%20-38.72,44.19s15.53,44.41%2038.94,44.41s38.72,-16.85%2038.72,-44.41m-102.17,0c0,-45.07%2031.29,-64.98%2063.23,-64.98s63.45,19.91%2063.45,64.98s-31.29,65.41%20-63.23,65.41s-63.45,-19.91%20-63.45,-65.41'%20class='cls-2'/%3e%3cpath%20id='svg_18'%20fill='%23a51d78'%20d='m1366.99,177.21c7.75,6.65%2016.32,15.32%2024.3,26.23c19.82,27.08%2029.56,59.09%2028.94,95.13c-0.29,16.74%20-3.42,30.61%20-9.31,41.23c-0.55,1%20-1.14,1.99%20-1.74,2.94c-1.17,1.86%20-2.46,3.67%20-3.82,5.37c-3.28,4.11%20-7.15,7.78%20-11.48,10.91c-0.85,0.61%20-1.73,1.21%20-2.61,1.79c-1.77,1.14%20-3.63,2.22%20-5.54,3.2c-2.85,1.46%20-5.89,2.76%20-9.03,3.84c-2.08,0.72%20-4.25,1.36%20-6.44,1.91c-6.58,1.65%20-13.54,2.48%20-20.67,2.48c-19.29,0%20-36.82,-6.22%20-49.35,-17.5c-14.34,-12.91%20-21.61,-31.67%20-21.61,-55.75c0,-30.01%2011.74,-53.91%2031.41,-63.94c15.09,-7.69%2029.61,-15.71%2041.22,-29.17c7.24,-8.39%2012.46,-17.89%2015.72,-28.67m-14.08,-37.87c-3.24,0%20-6.11,2.04%20-6.11,5.55l0,0c0.97,42.1%20-22.01,55.46%20-47.74,68.58c-26.46,13.49%20-44.63,43.79%20-44.63,85.51c0,66.7%2047.26,97.47%2095.17,97.47c8.98,0%2017.93,-1.05%2026.54,-3.2c2.87,-0.72%205.7,-1.56%208.49,-2.52c4.18,-1.45%208.24,-3.17%2012.16,-5.18c2.61,-1.34%205.16,-2.81%207.63,-4.41c1.24,-0.8%202.45,-1.63%203.65,-2.49c5.98,-4.32%2011.44,-9.45%2016.21,-15.43c1.91,-2.39%203.71,-4.92%205.39,-7.58c0.84,-1.33%201.65,-2.7%202.42,-4.1c7.76,-14%2011.99,-31.44%2012.35,-52.56c1.63,-95.85%20-61.94,-144.16%20-87.99,-158.76c-0.99,-0.56%20-2.19,-0.88%20-3.54,-0.88l0,0z'%20class='cls-3'/%3e%3cpath%20id='svg_19'%20fill='%23e94642'%20d='m1234.82,24.21c19.29,0%2036.82,6.22%2049.35,17.5c14.34,12.91%2021.61,31.67%2021.61,55.75c0,30.01%20-11.74,53.91%20-31.41,63.94c-15.09,7.69%20-29.61,15.71%20-41.22,29.17c-7.24,8.39%20-12.46,17.89%20-15.72,28.67c-7.75,-6.65%20-16.32,-15.32%20-24.3,-26.23c-19.82,-27.08%20-29.56,-59.09%20-28.94,-95.13c0.29,-16.74%203.42,-30.61%209.31,-41.23c0.55,-1%201.14,-1.98%201.74,-2.93c1.17,-1.86%202.46,-3.67%203.82,-5.37c3.28,-4.11%207.15,-7.78%2011.48,-10.91c0.85,-0.61%201.73,-1.21%202.61,-1.79c1.77,-1.14%203.63,-2.22%205.54,-3.2c2.85,-1.46%205.89,-2.76%209.03,-3.84c2.08,-0.72%204.25,-1.36%206.44,-1.91c6.58,-1.65%2013.54,-2.48%2020.67,-2.48m0,-24.21c-8.98,0%20-17.93,1.05%20-26.54,3.2c-2.87,0.72%20-5.7,1.56%20-8.49,2.52c-4.18,1.45%20-8.24,3.17%20-12.16,5.18c-2.61,1.34%20-5.16,2.81%20-7.63,4.41c-1.24,0.8%20-2.45,1.63%20-3.65,2.49c-5.98,4.32%20-11.44,9.45%20-16.21,15.43c-1.91,2.39%20-3.71,4.92%20-5.39,7.58c-0.84,1.33%20-1.65,2.7%20-2.42,4.1c-7.76,14%20-11.99,31.44%20-12.35,52.56c-1.63,95.85%2061.94,144.16%2087.99,158.76c0.99,0.56%202.19,0.88%203.54,0.88c3.24,0%206.11,-2.04%206.11,-5.55l0,0c-0.97,-42.1%2022.01,-55.46%2047.74,-68.58c26.46,-13.49%2044.63,-43.79%2044.63,-85.51c0,-66.7%20-47.26,-97.47%20-95.17,-97.47l0,0z'%20class='cls-1'/%3e%3c/g%3e%3c/svg%3e";
34
+ const getSubmitLabel = function(isUrgent, isMachineTranslation) {
35
+ if (isMachineTranslation)
36
+ return "Translate with ai";
37
+ else if (isUrgent)
38
+ return "Translate immediately";
39
+ else
40
+ return "Request translation";
41
+ };
34
42
  const TranslationMenu = () => {
35
43
  const [languages, setLanguages] = react.useState([]);
36
44
  const [selectedOption, setSelectedOption] = react.useState("");
37
45
  const [source, setSource] = react.useState("");
38
46
  const [email, setEmail] = react.useState("");
39
- const [isEmail, setIsEmail] = react.useState(false);
47
+ const [isEmail, setIsEmail] = react.useState(true);
40
48
  const [isUrgent, setIsUrgent] = react.useState(false);
41
49
  const [dueDate, setDueDate] = react.useState(0);
42
50
  const [showAlert, setShowAlert] = react.useState(false);
@@ -46,31 +54,34 @@ const TranslationMenu = () => {
46
54
  const context = admin.unstable_useContentManagerContext();
47
55
  const { id, contentType, model } = context || {};
48
56
  const isCollectionType = contentType?.kind === "collectionType";
57
+ const [licenseValid, setLicenseValid] = react.useState(null);
58
+ const [tsIsAvailable, setTsIsAvailable] = react.useState(true);
49
59
  const selectedLang = Array.isArray(languages) ? languages.find((lang) => lang.name === selectedOption) : void 0;
50
60
  const isMachineTranslation = selectedLang?.machine ?? false;
51
- async function fetchEmail() {
52
- try {
53
- const response = await get("/translationstudio-strapi-extension/email");
54
- setEmail(response.data.email ?? "");
55
- } catch (error) {
56
- console.error(error);
57
- }
58
- }
59
61
  react.useEffect(() => {
60
- fetchEmail();
61
- }, []);
62
- react.useEffect(() => {
63
- if (!model || !id && isCollectionType) return;
64
- const fetchLanguages = async () => {
65
- try {
66
- const response = await get("/translationstudio-strapi-extension/mappings");
67
- setLanguages(response.data);
68
- } catch (error) {
69
- console.error("Error fetching languages:", error);
70
- }
71
- };
72
- fetchLanguages();
73
- }, [id, model, isCollectionType]);
62
+ if (!model) return;
63
+ get("/translationstudio/getLicense").then((response) => {
64
+ if (typeof response.data.license !== "string")
65
+ return false;
66
+ return response.data.license !== "";
67
+ }).then((hasLicense) => {
68
+ setLicenseValid(hasLicense);
69
+ if (!hasLicense)
70
+ throw new Error("No license set");
71
+ setTsIsAvailable(true);
72
+ return get("/translationstudio/mappings");
73
+ }).then((langs) => {
74
+ if (langs.data && Array.isArray(langs.data) && langs.data.length > 0)
75
+ setLanguages(langs.data);
76
+ }).catch((err) => {
77
+ console.error(err);
78
+ setTsIsAvailable(false);
79
+ });
80
+ get("/translationstudio/email").then((response) => {
81
+ if (response.data.email)
82
+ setEmail(response.data.email ?? "");
83
+ }).catch(console.error);
84
+ }, [setLicenseValid, setTsIsAvailable, setEmail, setLanguages, id, model, isCollectionType]);
74
85
  const handleUrgentChange = () => {
75
86
  if (isUrgent) {
76
87
  setIsUrgent(false);
@@ -79,10 +90,7 @@ const TranslationMenu = () => {
79
90
  setIsUrgent(true);
80
91
  }
81
92
  };
82
- const handleEmailChange = () => {
83
- email ? setIsEmail(false) : setIsEmail(true);
84
- fetchEmail();
85
- };
93
+ const handleEmailChange = () => setIsEmail(!isEmail);
86
94
  const handleDueDateChange = (date) => {
87
95
  const timestamp = date.getTime();
88
96
  setDueDate(timestamp < Date.now() ? 0 : timestamp);
@@ -145,7 +153,7 @@ const TranslationMenu = () => {
145
153
  const handleTranslationRequest = async () => {
146
154
  const entryUid = isCollectionType ? `${model}#${id}` : model;
147
155
  try {
148
- const entryResponse = await post("/translationstudio-strapi-extension/entrydata", {
156
+ const entryResponse = await post("/translationstudio/entrydata", {
149
157
  uid: entryUid,
150
158
  locale: source
151
159
  });
@@ -171,7 +179,7 @@ const TranslationMenu = () => {
171
179
  name: determineEntryName(fetchedEntryData)
172
180
  }
173
181
  };
174
- const response = await post("/translationstudio-strapi-extension/translate", payload);
182
+ const response = await post("/translationstudio/translate", payload);
175
183
  displayAlert(
176
184
  response.data === true ? "success" : "danger",
177
185
  response.data === true ? "Translation request sent successfully" : "Error requesting translation"
@@ -181,48 +189,34 @@ const TranslationMenu = () => {
181
189
  return;
182
190
  }
183
191
  };
184
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
185
- showAlert && /* @__PURE__ */ jsxRuntime.jsx(
186
- designSystem.Box,
187
- {
188
- style: {
189
- position: "fixed",
190
- top: "10%",
191
- left: "50%",
192
- transform: "translate(-50%, -50%)",
193
- zIndex: 10,
194
- minWidth: "400px",
195
- maxWidth: "90%"
196
- },
197
- children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Alert, { closeLabel: "Close", variant: alertType, onClose: () => setShowAlert(false), children: alertMessage })
198
- }
199
- ),
200
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { padding: 4, style: { width: "100%", color: "white" }, children: [
201
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, textAlign: "right", style: { width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsx(
202
- "img",
203
- {
204
- src: logoSvg,
205
- alt: "",
206
- style: {
207
- maxWidth: "200px",
208
- height: "auto"
209
- }
210
- }
211
- ) }) }),
212
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, children: languages.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
192
+ const renderNotAvailable = function() {
193
+ if (!tsIsAvailable) {
194
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { style: { color: "white" }, children: "The pugin is not available." }) });
195
+ }
196
+ if (licenseValid === false) {
197
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { style: { color: "white" }, children: "Your translationstudio license is invalid. Please update your strapi configuration." }) });
198
+ }
199
+ if (languages.length === 0) {
200
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { style: { color: "white" }, children: "No translation settings available. translationstudio has not been configured yet. Please add translation settings first." }) });
201
+ }
202
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
203
+ };
204
+ const renderPlugin = function() {
205
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
206
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(
213
207
  designSystem.Radio.Group,
214
208
  {
215
209
  onValueChange: handleRadioSelection,
216
210
  name: "languages",
217
211
  "aria-label": "translationstudio settings",
218
212
  children: [
219
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", tag: "label", id: "Sprachauswahl", children: "translationstudio settings" }),
213
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", tag: "label", id: "Sprachauswahl", children: "Translation Settings" }),
220
214
  languages.map((lang) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Radio.Item, { value: lang.name, children: lang["name"] }, lang.id))
221
215
  ]
222
216
  }
223
217
  ) }),
224
218
  !isMachineTranslation && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
225
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, paddingTop: 4, style: { color: "white" }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", tag: "label", paddingBottom: 4, children: "Translation request" }) }),
219
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, paddingTop: 4, style: { color: "white" }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", tag: "label", paddingBottom: 4, children: "Additional Settings" }) }),
226
220
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, style: { color: "white" }, children: /* @__PURE__ */ jsxRuntime.jsx(
227
221
  designSystem.Checkbox,
228
222
  {
@@ -269,9 +263,43 @@ const TranslationMenu = () => {
269
263
  children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2,21L23,12L2,3V10L17,12L2,14V21Z", fill: "currentColor" })
270
264
  }
271
265
  ),
272
- children: isUrgent || isMachineTranslation ? "Translate" : "Request translation"
266
+ children: getSubmitLabel(isUrgent, isMachineTranslation)
273
267
  }
274
268
  )
269
+ ] });
270
+ };
271
+ const pluginIsAvailable = function() {
272
+ return licenseValid !== null && tsIsAvailable === true;
273
+ };
274
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
275
+ showAlert && /* @__PURE__ */ jsxRuntime.jsx(
276
+ designSystem.Box,
277
+ {
278
+ style: {
279
+ position: "fixed",
280
+ top: "10%",
281
+ left: "50%",
282
+ transform: "translate(-50%, -50%)",
283
+ zIndex: 10,
284
+ minWidth: "400px",
285
+ maxWidth: "90%"
286
+ },
287
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Alert, { closeLabel: "Close", variant: alertType, onClose: () => setShowAlert(false), children: alertMessage })
288
+ }
289
+ ),
290
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { padding: 4, style: { width: "100%", color: "white" }, children: [
291
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 4, textAlign: "right", style: { width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsx(
292
+ "img",
293
+ {
294
+ src: logoSvg,
295
+ alt: "",
296
+ style: {
297
+ maxWidth: "200px",
298
+ height: "auto"
299
+ }
300
+ }
301
+ ) }) }),
302
+ !pluginIsAvailable() ? renderNotAvailable() : renderPlugin()
275
303
  ] })
276
304
  ] });
277
305
  };
@@ -285,7 +313,7 @@ const index = {
285
313
  defaultMessage: PLUGIN_ID
286
314
  },
287
315
  Component: async () => {
288
- const { App } = await Promise.resolve().then(() => require("../_chunks/App-CUOeu4IU.js"));
316
+ const { App } = await Promise.resolve().then(() => require("../_chunks/App-rdXR_woe.js"));
289
317
  return App;
290
318
  }
291
319
  });
@@ -1,6 +1,6 @@
1
1
  import { useRef, useEffect, useState } from "react";
2
2
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
- import { Box, Alert, Flex, Radio, Typography, Checkbox, DatePicker, Button } from "@strapi/design-system";
3
+ import { Box, Alert, Flex, Typography, Radio, Checkbox, DatePicker, Button } from "@strapi/design-system";
4
4
  import { getFetchClient, unstable_useContentManagerContext } from "@strapi/strapi/admin";
5
5
  const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
6
6
  const v = glob[path];
@@ -30,12 +30,20 @@ const Initializer = ({ setPlugin }) => {
30
30
  const logoSvg$1 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20447.49%20582.57'%3e%3cdefs%3e%3cstyle%3e.cls-1{fill:%23e94642;}.cls-2{fill:%23a51d78;}%3c/style%3e%3c/defs%3e%3cpath%20class='cls-2'%20d='M333.63,260.39c11.39,9.77,23.98,22.51,35.71,38.54,29.12,39.79,43.43,86.82,42.53,139.8-.42,24.59-5.02,44.98-13.68,60.58-.81,1.47-1.67,2.92-2.55,4.31-1.72,2.74-3.61,5.39-5.61,7.89-4.83,6.04-10.5,11.44-16.87,16.04-1.25,.9-2.54,1.78-3.84,2.63-2.59,1.68-5.33,3.26-8.14,4.7-4.19,2.15-8.65,4.05-13.26,5.65-3.06,1.06-6.24,2.01-9.46,2.81-9.67,2.42-19.9,3.64-30.38,3.64-28.34,0-54.1-9.14-72.52-25.72-21.07-18.97-31.75-46.53-31.75-81.93,0-44.1,17.26-79.22,46.16-93.95,22.18-11.3,43.5-23.09,60.57-42.86,10.64-12.33,18.32-26.29,23.09-42.13m-20.69-55.64c-4.76,0-8.97,2.99-8.97,8.16h0c1.43,61.87-32.34,81.5-70.16,100.77-38.88,19.82-65.58,64.35-65.58,125.65,0,98.01,69.45,143.23,139.85,143.23,13.2,0,26.35-1.54,39.01-4.7,4.22-1.05,8.38-2.29,12.47-3.7,6.14-2.13,12.11-4.66,17.87-7.62,3.84-1.97,7.58-4.13,11.21-6.48,1.82-1.17,3.6-2.4,5.36-3.66,8.78-6.35,16.81-13.89,23.83-22.67,2.81-3.51,5.45-7.22,7.91-11.13,1.23-1.96,2.42-3.96,3.56-6.02,11.41-20.57,17.61-46.2,18.14-77.24,2.4-140.84-91.02-211.84-129.3-233.29-1.46-.82-3.22-1.29-5.2-1.29h0Z'/%3e%3cpath%20class='cls-1'%20d='M139.41,35.58c28.34,0,54.1,9.14,72.52,25.72,21.07,18.97,31.75,46.53,31.75,81.93,0,44.1-17.26,79.22-46.16,93.95-22.18,11.3-43.5,23.09-60.57,42.86-10.64,12.33-18.32,26.29-23.09,42.13-11.39-9.77-23.98-22.51-35.71-38.54-29.12-39.79-43.43-86.82-42.53-139.8,.42-24.59,5.02-44.98,13.68-60.58,.81-1.46,1.67-2.91,2.55-4.31,1.72-2.74,3.61-5.4,5.61-7.89,4.83-6.04,10.5-11.44,16.87-16.04,1.25-.9,2.54-1.78,3.84-2.63,2.59-1.68,5.33-3.26,8.14-4.7,4.19-2.15,8.65-4.05,13.26-5.65,3.06-1.06,6.25-2.01,9.46-2.81,9.67-2.42,19.9-3.64,30.38-3.64m0-35.58c-13.2,0-26.35,1.54-39.01,4.7-4.22,1.05-8.38,2.29-12.47,3.7-6.14,2.13-12.11,4.66-17.87,7.62-3.84,1.97-7.58,4.13-11.21,6.48-1.82,1.17-3.6,2.4-5.36,3.66-8.78,6.35-16.81,13.89-23.83,22.67-2.81,3.51-5.45,7.22-7.91,11.13-1.23,1.96-2.42,3.96-3.56,6.02C6.78,86.56,.57,112.19,.05,143.23c-2.4,140.84,91.02,211.84,129.3,233.29,1.46,.82,3.22,1.29,5.2,1.29,4.76,0,8.97-2.99,8.97-8.16h0c-1.43-61.87,32.34-81.5,70.16-100.77,38.88-19.82,65.58-64.35,65.58-125.65C279.27,45.22,209.82,0,139.41,0h0Z'/%3e%3c/svg%3e";
31
31
  const PluginIcon = () => /* @__PURE__ */ jsx("img", { src: logoSvg$1, alt: "Translation Studio Logo", width: 20, height: 20 });
32
32
  const logoSvg = "data:image/svg+xml,%3csvg%20width='1444.47'%20height='635.72'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3ctitle%3eLayer%201%3c/title%3e%3cpath%20id='svg_1'%20fill='%23ffffff'%20d='m1151.68,294.37c34.28,0%2050.11,19.74%2050.11,59.01l0,56.4c0,6.94%20-3.91,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.84,-3.9%20-10.84,-10.85l0,-54.45c0,-27.12%20-10.41,-39.91%20-33.41,-39.91s-32.97,15.4%20-32.97,42.74l0,51.63c0,6.94%20-3.91,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.85,-3.9%20-10.85,-10.85l0,-102.39c0,-6.94%203.91,-10.85%2010.85,-10.85l2.6,0c6.94,0%2010.85,3.91%2010.85,10.85l0,12.34c5.64,-14.39%2019.73,-25.36%2040.56,-25.36l0,0l0,-0.01z'%20class='cls-2'/%3e%3cpath%20id='svg_2'%20fill='%23ffffff'%20d='m0,313.78l0,55.76c0,37.96%2014.53,51.2%2046.42,51.2l0,0c1.96,0%204.12,-0.03%206.29,-0.22c6.9,-0.65%209.8,-4.45%209.11,-11.07c-0.61,-5.88%20-4.99,-8.24%20-11.71,-8.24c-18.88,0%20-25.6,-8.9%20-25.6,-34.49l0,-52.94l25.81,0c6.94,0%2010.85,-3.47%2010.85,-9.54s-3.9,-9.33%20-10.85,-9.33l-25.81,0l0,-15.83c0,-7.59%20-4.34,-11.28%20-11.93,-9.55l-3.04,0.65c-6.29,1.3%20-9.54,5.21%20-9.54,11.71l0,31.89z'%20class='cls-2'/%3e%3cpath%20id='svg_3'%20fill='%23ffffff'%20d='m139.49,295.02c7.38,0%2011.06,4.77%2010.2,11.71l-0.22,1.74c-0.65,6.94%20-4.77,9.54%20-11.93,9.54c-20.39,0.43%20-30.16,15.19%20-30.16,41.22l0,50.55c0,6.94%20-3.9,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.85,-3.9%20-10.85,-10.85l0,-102.39c0,-6.94%203.9,-10.85%2010.85,-10.85l2.6,0c6.94,0%2010.85,3.69%2010.85,10.41l0,10.41c3.91,-11.07%2013.89,-22.34%2032.1,-22.34l0,0l0.01,0z'%20class='cls-2'/%3e%3cpath%20id='svg_4'%20fill='%23ffffff'%20d='m259.67,358.59c0,-27.12%20-15.84,-43.82%20-38.83,-43.82s-38.4,16.49%20-38.4,43.82s15.62,44.04%2038.83,44.04s38.4,-16.7%2038.4,-44.04m-101.53,0c0,-42.74%2026.03,-64.43%2056.84,-64.43c19.52,0%2036.88,9.54%2044.04,26.69l0,-13.45c0,-6.94%203.9,-10.85%2010.85,-10.85l2.6,0c6.94,0%2010.85,3.9%2010.85,10.85l0,102.18c0,6.94%20-3.9,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.85,-3.9%20-10.85,-10.85l0,-12.58c-6.94,16.7%20-24.51,26.47%20-43.82,26.47c-30.81,0%20-57.06,-21.91%20-57.06,-64.87'%20class='cls-2'/%3e%3cpath%20id='svg_5'%20fill='%23ffffff'%20d='m380.06,294.37c34.28,0%2050.11,19.74%2050.11,59.01l0,56.4c0,6.94%20-3.91,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.85,-3.9%20-10.85,-10.85l0,-54.45c0,-27.12%20-10.41,-39.91%20-33.41,-39.91s-32.98,15.4%20-32.98,42.74l0,51.63c0,6.94%20-3.9,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.85,-3.9%20-10.85,-10.85l0,-102.39c0,-6.94%203.91,-10.85%2010.85,-10.85l2.6,0c6.94,0%2010.85,3.91%2010.85,10.85l0,12.34c5.64,-14.39%2019.73,-25.36%2040.57,-25.36l0,0l0.01,-0.01z'%20class='cls-2'/%3e%3cpath%20id='svg_6'%20fill='%23ffffff'%20d='m508.94,422.81c-20.8,0%20-42.78,-8.33%20-53.19,-21.48c-4.44,-5.61%20-2.26,-11.49%204.99,-13.67l2.17,-0.65c4.75,-1.43%208.02,-1.28%2014.32,4.36c8.65,7.74%2020.41,10.61%2031.71,10.61c18.05,0%2028.81,-6.44%2028.81,-17.36c0,-28.63%20-80.45,-5.9%20-80.45,-54.24c0,-22.87%2023.1,-36.01%2049.75,-36.01c16.09,0%2036.22,6.5%2047,17.79c5.1,5.33%203.34,11.34%20-3.68,13.45l-2.17,0.65c-5.86,1.76%20-8.85,-0.39%20-14.53,-3.84c-8.11,-4.92%20-16.87,-8.09%20-26.22,-8.09c-15.64,0%20-26.27,5.18%20-26.27,14.91c0,27.74%2081.1,4.51%2081.1,54.72c0,23.06%20-22.28,38.83%20-53.32,38.83l0,0l-0.02,0.02z'%20class='cls-2'/%3e%3cpath%20id='svg_7'%20fill='%23ffffff'%20d='m585.05,409.79l0,-142.75c0,-6.94%203.9,-10.85%2010.85,-10.85l2.82,0c6.94,0%2010.85,3.9%2010.85,10.85l0,142.75c0,6.94%20-3.91,10.85%20-10.85,10.85l-2.82,0c-6.94,0%20-10.85,-3.91%20-10.85,-10.85'%20class='cls-2'/%3e%3cpath%20id='svg_8'%20fill='%23ffffff'%20d='m737.56,358.59c0,-27.12%20-15.84,-43.82%20-38.84,-43.82s-38.4,16.49%20-38.4,43.82s15.62,44.04%2038.83,44.04s38.4,-16.7%2038.4,-44.04m-101.53,0c0,-42.74%2026.03,-64.43%2056.84,-64.43c19.52,0%2036.88,9.54%2044.04,26.69l0,-13.45c0,-6.94%203.9,-10.85%2010.85,-10.85l2.6,0c6.94,0%2010.85,3.9%2010.85,10.85l0,102.18c0,6.94%20-3.9,10.85%20-10.85,10.85l-2.6,0c-6.94,0%20-10.85,-3.9%20-10.85,-10.85l0,-12.58c-6.94,16.7%20-24.51,26.47%20-43.82,26.47c-30.81,0%20-57.06,-21.91%20-57.06,-64.87'%20class='cls-2'/%3e%3cpath%20id='svg_9'%20fill='%23ffffff'%20d='m800.25,315.42l0,55.76c0,37.96%2014.53,51.2%2046.42,51.2l0,0c1.95,0%204.12,-0.03%206.29,-0.22c6.89,-0.65%209.8,-4.45%209.11,-11.07c-0.61,-5.88%20-4.99,-8.24%20-11.71,-8.24c-18.87,0%20-25.6,-8.9%20-25.6,-34.49l0,-52.94l25.81,0c6.94,0%2010.85,-3.47%2010.85,-9.55s-3.91,-9.33%20-10.85,-9.33l-25.81,0l0,-15.83c0,-7.59%20-4.34,-11.28%20-11.93,-9.54l-3.04,0.65c-6.29,1.3%20-9.55,5.21%20-9.55,11.71l0,31.89l0.01,0z'%20class='cls-2'/%3e%3cpath%20id='svg_10'%20fill='%23ffffff'%20d='m883.72,409.79l0,-102.4c0,-6.94%203.83,-10.85%2010.65,-10.85l2.77,0c6.82,0%2010.65,3.9%2010.65,10.85l0,102.4c0,6.94%20-3.83,10.85%20-10.65,10.85l-2.77,0c-6.81,0%20-10.65,-3.91%20-10.65,-10.85m-2.05,-142.96c0,-8.24%206.08,-13.02%2014.32,-13.02c7.59,0%2014.32,4.77%2014.32,13.02s-6.72,13.02%20-14.32,13.02c-8.24,0%20-14.32,-4.77%20-14.32,-13.02'%20class='cls-2'/%3e%3cpath%20id='svg_11'%20fill='%23ffffff'%20d='m1036.06,358.59c0,-27.12%20-15.62,-43.82%20-38.62,-43.82s-38.4,16.49%20-38.4,43.82s15.4,44.04%2038.61,44.04s38.4,-16.7%2038.4,-44.04m-101.31,0c0,-44.69%2031.02,-64.43%2062.69,-64.43s62.91,19.74%2062.91,64.43s-31.02,64.87%20-62.7,64.87s-62.91,-19.74%20-62.91,-64.87'%20class='cls-2'/%3e%3cpath%20id='svg_12'%20fill='%23ffffff'%20d='m555.77,635.72c-20.98,0%20-43.14,-8.4%20-53.65,-21.66c-4.48,-5.66%20-2.27,-11.59%205.03,-13.78l2.19,-0.66c4.79,-1.44%208.09,-1.29%2014.43,4.4c8.73,7.81%2020.59,10.69%2031.98,10.69c18.2,0%2029.05,-6.49%2029.05,-17.5c0,-28.88%20-81.14,-5.95%20-81.14,-54.7c0,-23.07%2023.3,-36.31%2050.17,-36.31c16.23,0%2036.53,6.55%2047.41,17.94c5.14,5.38%203.37,11.43%20-3.72,13.56l-2.19,0.66c-5.91,1.77%20-8.92,-0.39%20-14.66,-3.87c-8.18,-4.96%20-17.02,-8.16%20-26.45,-8.16c-15.78,0%20-26.5,5.22%20-26.5,15.04c0,27.98%2081.79,4.55%2081.79,55.18c0,23.26%20-22.47,39.16%20-53.78,39.16l0,0l0.04,0.01z'%20class='cls-2'/%3e%3cpath%20id='svg_13'%20fill='%23ffffff'%20d='m639.98,526.42l0,56.23c0,38.29%2014.66,51.63%2046.82,51.63l0,0c1.97,0%204.16,-0.03%206.34,-0.22c6.96,-0.66%209.89,-4.49%209.19,-11.16c-0.61,-5.93%20-5.03,-8.31%20-11.81,-8.31c-19.03,0%20-25.82,-8.97%20-25.82,-34.79l0,-53.38l26.03,0c7,0%2010.94,-3.5%2010.94,-9.63s-3.94,-9.41%20-10.94,-9.41l-26.03,0l0,-15.97c0,-7.66%20-4.38,-11.38%20-12.03,-9.63l-3.06,0.66c-6.34,1.31%20-9.63,5.25%20-9.63,11.81l0,32.16l0,0.01z'%20class='cls-2'/%3e%3cpath%20id='svg_14'%20fill='%23ffffff'%20d='m826.59,508.39c7,0%2010.94,3.94%2010.94,10.94l0,103.27c0,7%20-3.94,10.94%20-10.94,10.94l-2.62,0c-7,0%20-10.94,-3.94%20-10.94,-10.94l0,-12.45c-5.69,14.51%20-19.9,25.57%20-40.91,25.57c-34.57,0%20-50.54,-19.91%20-50.54,-59.51l0,-56.89c0,-7%203.94,-10.93%2010.94,-10.93l2.63,0c7,0%2010.94,3.93%2010.94,10.93l0,54.92c0,27.35%2010.5,40.26%2033.69,40.26s33.26,-15.53%2033.26,-43.1l0,-52.07c0,-7%203.94,-10.93%2010.94,-10.93l2.62,0l-0.01,-0.01z'%20class='cls-2'/%3e%3cpath%20id='svg_15'%20fill='%23ffffff'%20d='m967.71,570.31c0,-27.35%20-15.75,-44.19%20-39.16,-44.19s-38.72,16.63%20-38.72,44.19s15.75,44.41%2039.16,44.41s38.72,-16.85%2038.72,-44.41m-102.39,0c0,-43.1%2026.25,-64.98%2057.32,-64.98c19.69,0%2037.41,9.63%2044.41,26.91l0,-54.26c0,-7%203.94,-10.94%2010.94,-10.94l2.62,0c7,0%2010.94,3.94%2010.94,10.94l0,143.74c0,7%20-3.94,10.94%20-10.94,10.94l-2.62,0c-7,0%20-10.94,-3.94%20-10.94,-10.94l0,-12.69c-7,16.85%20-24.72,26.69%20-44.19,26.69c-31.07,0%20-57.54,-22.09%20-57.54,-65.41'%20class='cls-2'/%3e%3cpath%20id='svg_16'%20fill='%23ffffff'%20d='m1023.66,624.38l0,-103.27c0,-7%203.87,-10.94%2010.74,-10.94l2.79,0c6.87,0%2010.74,3.94%2010.74,10.94l0,103.27c0,7%20-3.87,10.94%20-10.74,10.94l-2.79,0c-6.87,0%20-10.74,-3.94%20-10.74,-10.94m-2.07,-144.18c0,-8.31%206.13,-13.13%2014.44,-13.13c7.66,0%2014.44,4.81%2014.44,13.13s-6.78,13.13%20-14.44,13.13c-8.31,0%20-14.44,-4.81%20-14.44,-13.13'%20class='cls-2'/%3e%3cpath%20id='svg_17'%20fill='%23ffffff'%20d='m1177.29,570.31c0,-27.35%20-15.75,-44.19%20-38.94,-44.19s-38.72,16.63%20-38.72,44.19s15.53,44.41%2038.94,44.41s38.72,-16.85%2038.72,-44.41m-102.17,0c0,-45.07%2031.29,-64.98%2063.23,-64.98s63.45,19.91%2063.45,64.98s-31.29,65.41%20-63.23,65.41s-63.45,-19.91%20-63.45,-65.41'%20class='cls-2'/%3e%3cpath%20id='svg_18'%20fill='%23a51d78'%20d='m1366.99,177.21c7.75,6.65%2016.32,15.32%2024.3,26.23c19.82,27.08%2029.56,59.09%2028.94,95.13c-0.29,16.74%20-3.42,30.61%20-9.31,41.23c-0.55,1%20-1.14,1.99%20-1.74,2.94c-1.17,1.86%20-2.46,3.67%20-3.82,5.37c-3.28,4.11%20-7.15,7.78%20-11.48,10.91c-0.85,0.61%20-1.73,1.21%20-2.61,1.79c-1.77,1.14%20-3.63,2.22%20-5.54,3.2c-2.85,1.46%20-5.89,2.76%20-9.03,3.84c-2.08,0.72%20-4.25,1.36%20-6.44,1.91c-6.58,1.65%20-13.54,2.48%20-20.67,2.48c-19.29,0%20-36.82,-6.22%20-49.35,-17.5c-14.34,-12.91%20-21.61,-31.67%20-21.61,-55.75c0,-30.01%2011.74,-53.91%2031.41,-63.94c15.09,-7.69%2029.61,-15.71%2041.22,-29.17c7.24,-8.39%2012.46,-17.89%2015.72,-28.67m-14.08,-37.87c-3.24,0%20-6.11,2.04%20-6.11,5.55l0,0c0.97,42.1%20-22.01,55.46%20-47.74,68.58c-26.46,13.49%20-44.63,43.79%20-44.63,85.51c0,66.7%2047.26,97.47%2095.17,97.47c8.98,0%2017.93,-1.05%2026.54,-3.2c2.87,-0.72%205.7,-1.56%208.49,-2.52c4.18,-1.45%208.24,-3.17%2012.16,-5.18c2.61,-1.34%205.16,-2.81%207.63,-4.41c1.24,-0.8%202.45,-1.63%203.65,-2.49c5.98,-4.32%2011.44,-9.45%2016.21,-15.43c1.91,-2.39%203.71,-4.92%205.39,-7.58c0.84,-1.33%201.65,-2.7%202.42,-4.1c7.76,-14%2011.99,-31.44%2012.35,-52.56c1.63,-95.85%20-61.94,-144.16%20-87.99,-158.76c-0.99,-0.56%20-2.19,-0.88%20-3.54,-0.88l0,0z'%20class='cls-3'/%3e%3cpath%20id='svg_19'%20fill='%23e94642'%20d='m1234.82,24.21c19.29,0%2036.82,6.22%2049.35,17.5c14.34,12.91%2021.61,31.67%2021.61,55.75c0,30.01%20-11.74,53.91%20-31.41,63.94c-15.09,7.69%20-29.61,15.71%20-41.22,29.17c-7.24,8.39%20-12.46,17.89%20-15.72,28.67c-7.75,-6.65%20-16.32,-15.32%20-24.3,-26.23c-19.82,-27.08%20-29.56,-59.09%20-28.94,-95.13c0.29,-16.74%203.42,-30.61%209.31,-41.23c0.55,-1%201.14,-1.98%201.74,-2.93c1.17,-1.86%202.46,-3.67%203.82,-5.37c3.28,-4.11%207.15,-7.78%2011.48,-10.91c0.85,-0.61%201.73,-1.21%202.61,-1.79c1.77,-1.14%203.63,-2.22%205.54,-3.2c2.85,-1.46%205.89,-2.76%209.03,-3.84c2.08,-0.72%204.25,-1.36%206.44,-1.91c6.58,-1.65%2013.54,-2.48%2020.67,-2.48m0,-24.21c-8.98,0%20-17.93,1.05%20-26.54,3.2c-2.87,0.72%20-5.7,1.56%20-8.49,2.52c-4.18,1.45%20-8.24,3.17%20-12.16,5.18c-2.61,1.34%20-5.16,2.81%20-7.63,4.41c-1.24,0.8%20-2.45,1.63%20-3.65,2.49c-5.98,4.32%20-11.44,9.45%20-16.21,15.43c-1.91,2.39%20-3.71,4.92%20-5.39,7.58c-0.84,1.33%20-1.65,2.7%20-2.42,4.1c-7.76,14%20-11.99,31.44%20-12.35,52.56c-1.63,95.85%2061.94,144.16%2087.99,158.76c0.99,0.56%202.19,0.88%203.54,0.88c3.24,0%206.11,-2.04%206.11,-5.55l0,0c-0.97,-42.1%2022.01,-55.46%2047.74,-68.58c26.46,-13.49%2044.63,-43.79%2044.63,-85.51c0,-66.7%20-47.26,-97.47%20-95.17,-97.47l0,0z'%20class='cls-1'/%3e%3c/g%3e%3c/svg%3e";
33
+ const getSubmitLabel = function(isUrgent, isMachineTranslation) {
34
+ if (isMachineTranslation)
35
+ return "Translate with ai";
36
+ else if (isUrgent)
37
+ return "Translate immediately";
38
+ else
39
+ return "Request translation";
40
+ };
33
41
  const TranslationMenu = () => {
34
42
  const [languages, setLanguages] = useState([]);
35
43
  const [selectedOption, setSelectedOption] = useState("");
36
44
  const [source, setSource] = useState("");
37
45
  const [email, setEmail] = useState("");
38
- const [isEmail, setIsEmail] = useState(false);
46
+ const [isEmail, setIsEmail] = useState(true);
39
47
  const [isUrgent, setIsUrgent] = useState(false);
40
48
  const [dueDate, setDueDate] = useState(0);
41
49
  const [showAlert, setShowAlert] = useState(false);
@@ -45,31 +53,34 @@ const TranslationMenu = () => {
45
53
  const context = unstable_useContentManagerContext();
46
54
  const { id, contentType, model } = context || {};
47
55
  const isCollectionType = contentType?.kind === "collectionType";
56
+ const [licenseValid, setLicenseValid] = useState(null);
57
+ const [tsIsAvailable, setTsIsAvailable] = useState(true);
48
58
  const selectedLang = Array.isArray(languages) ? languages.find((lang) => lang.name === selectedOption) : void 0;
49
59
  const isMachineTranslation = selectedLang?.machine ?? false;
50
- async function fetchEmail() {
51
- try {
52
- const response = await get("/translationstudio-strapi-extension/email");
53
- setEmail(response.data.email ?? "");
54
- } catch (error) {
55
- console.error(error);
56
- }
57
- }
58
60
  useEffect(() => {
59
- fetchEmail();
60
- }, []);
61
- useEffect(() => {
62
- if (!model || !id && isCollectionType) return;
63
- const fetchLanguages = async () => {
64
- try {
65
- const response = await get("/translationstudio-strapi-extension/mappings");
66
- setLanguages(response.data);
67
- } catch (error) {
68
- console.error("Error fetching languages:", error);
69
- }
70
- };
71
- fetchLanguages();
72
- }, [id, model, isCollectionType]);
61
+ if (!model) return;
62
+ get("/translationstudio/getLicense").then((response) => {
63
+ if (typeof response.data.license !== "string")
64
+ return false;
65
+ return response.data.license !== "";
66
+ }).then((hasLicense) => {
67
+ setLicenseValid(hasLicense);
68
+ if (!hasLicense)
69
+ throw new Error("No license set");
70
+ setTsIsAvailable(true);
71
+ return get("/translationstudio/mappings");
72
+ }).then((langs) => {
73
+ if (langs.data && Array.isArray(langs.data) && langs.data.length > 0)
74
+ setLanguages(langs.data);
75
+ }).catch((err) => {
76
+ console.error(err);
77
+ setTsIsAvailable(false);
78
+ });
79
+ get("/translationstudio/email").then((response) => {
80
+ if (response.data.email)
81
+ setEmail(response.data.email ?? "");
82
+ }).catch(console.error);
83
+ }, [setLicenseValid, setTsIsAvailable, setEmail, setLanguages, id, model, isCollectionType]);
73
84
  const handleUrgentChange = () => {
74
85
  if (isUrgent) {
75
86
  setIsUrgent(false);
@@ -78,10 +89,7 @@ const TranslationMenu = () => {
78
89
  setIsUrgent(true);
79
90
  }
80
91
  };
81
- const handleEmailChange = () => {
82
- email ? setIsEmail(false) : setIsEmail(true);
83
- fetchEmail();
84
- };
92
+ const handleEmailChange = () => setIsEmail(!isEmail);
85
93
  const handleDueDateChange = (date) => {
86
94
  const timestamp = date.getTime();
87
95
  setDueDate(timestamp < Date.now() ? 0 : timestamp);
@@ -144,7 +152,7 @@ const TranslationMenu = () => {
144
152
  const handleTranslationRequest = async () => {
145
153
  const entryUid = isCollectionType ? `${model}#${id}` : model;
146
154
  try {
147
- const entryResponse = await post("/translationstudio-strapi-extension/entrydata", {
155
+ const entryResponse = await post("/translationstudio/entrydata", {
148
156
  uid: entryUid,
149
157
  locale: source
150
158
  });
@@ -170,7 +178,7 @@ const TranslationMenu = () => {
170
178
  name: determineEntryName(fetchedEntryData)
171
179
  }
172
180
  };
173
- const response = await post("/translationstudio-strapi-extension/translate", payload);
181
+ const response = await post("/translationstudio/translate", payload);
174
182
  displayAlert(
175
183
  response.data === true ? "success" : "danger",
176
184
  response.data === true ? "Translation request sent successfully" : "Error requesting translation"
@@ -180,48 +188,34 @@ const TranslationMenu = () => {
180
188
  return;
181
189
  }
182
190
  };
183
- return /* @__PURE__ */ jsxs(Fragment, { children: [
184
- showAlert && /* @__PURE__ */ jsx(
185
- Box,
186
- {
187
- style: {
188
- position: "fixed",
189
- top: "10%",
190
- left: "50%",
191
- transform: "translate(-50%, -50%)",
192
- zIndex: 10,
193
- minWidth: "400px",
194
- maxWidth: "90%"
195
- },
196
- children: /* @__PURE__ */ jsx(Alert, { closeLabel: "Close", variant: alertType, onClose: () => setShowAlert(false), children: alertMessage })
197
- }
198
- ),
199
- /* @__PURE__ */ jsxs(Box, { padding: 4, style: { width: "100%", color: "white" }, children: [
200
- /* @__PURE__ */ jsx(Box, { paddingBottom: 4, textAlign: "right", style: { width: "100%" }, children: /* @__PURE__ */ jsx(Flex, { justifyContent: "flex-end", children: /* @__PURE__ */ jsx(
201
- "img",
202
- {
203
- src: logoSvg,
204
- alt: "",
205
- style: {
206
- maxWidth: "200px",
207
- height: "auto"
208
- }
209
- }
210
- ) }) }),
211
- /* @__PURE__ */ jsx(Box, { paddingBottom: 4, children: languages.length > 0 && /* @__PURE__ */ jsxs(
191
+ const renderNotAvailable = function() {
192
+ if (!tsIsAvailable) {
193
+ return /* @__PURE__ */ jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsx(Typography, { style: { color: "white" }, children: "The pugin is not available." }) });
194
+ }
195
+ if (licenseValid === false) {
196
+ return /* @__PURE__ */ jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsx(Typography, { style: { color: "white" }, children: "Your translationstudio license is invalid. Please update your strapi configuration." }) });
197
+ }
198
+ if (languages.length === 0) {
199
+ return /* @__PURE__ */ jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsx(Typography, { style: { color: "white" }, children: "No translation settings available. translationstudio has not been configured yet. Please add translation settings first." }) });
200
+ }
201
+ return /* @__PURE__ */ jsx(Fragment, {});
202
+ };
203
+ const renderPlugin = function() {
204
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
205
+ /* @__PURE__ */ jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsxs(
212
206
  Radio.Group,
213
207
  {
214
208
  onValueChange: handleRadioSelection,
215
209
  name: "languages",
216
210
  "aria-label": "translationstudio settings",
217
211
  children: [
218
- /* @__PURE__ */ jsx(Typography, { variant: "beta", tag: "label", id: "Sprachauswahl", children: "translationstudio settings" }),
212
+ /* @__PURE__ */ jsx(Typography, { variant: "beta", tag: "label", id: "Sprachauswahl", children: "Translation Settings" }),
219
213
  languages.map((lang) => /* @__PURE__ */ jsx(Radio.Item, { value: lang.name, children: lang["name"] }, lang.id))
220
214
  ]
221
215
  }
222
216
  ) }),
223
217
  !isMachineTranslation && /* @__PURE__ */ jsxs(Fragment, { children: [
224
- /* @__PURE__ */ jsx(Box, { paddingBottom: 4, paddingTop: 4, style: { color: "white" }, children: /* @__PURE__ */ jsx(Typography, { variant: "beta", tag: "label", paddingBottom: 4, children: "Translation request" }) }),
218
+ /* @__PURE__ */ jsx(Box, { paddingBottom: 4, paddingTop: 4, style: { color: "white" }, children: /* @__PURE__ */ jsx(Typography, { variant: "beta", tag: "label", paddingBottom: 4, children: "Additional Settings" }) }),
225
219
  /* @__PURE__ */ jsx(Box, { paddingBottom: 4, style: { color: "white" }, children: /* @__PURE__ */ jsx(
226
220
  Checkbox,
227
221
  {
@@ -268,9 +262,43 @@ const TranslationMenu = () => {
268
262
  children: /* @__PURE__ */ jsx("path", { d: "M2,21L23,12L2,3V10L17,12L2,14V21Z", fill: "currentColor" })
269
263
  }
270
264
  ),
271
- children: isUrgent || isMachineTranslation ? "Translate" : "Request translation"
265
+ children: getSubmitLabel(isUrgent, isMachineTranslation)
272
266
  }
273
267
  )
268
+ ] });
269
+ };
270
+ const pluginIsAvailable = function() {
271
+ return licenseValid !== null && tsIsAvailable === true;
272
+ };
273
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
274
+ showAlert && /* @__PURE__ */ jsx(
275
+ Box,
276
+ {
277
+ style: {
278
+ position: "fixed",
279
+ top: "10%",
280
+ left: "50%",
281
+ transform: "translate(-50%, -50%)",
282
+ zIndex: 10,
283
+ minWidth: "400px",
284
+ maxWidth: "90%"
285
+ },
286
+ children: /* @__PURE__ */ jsx(Alert, { closeLabel: "Close", variant: alertType, onClose: () => setShowAlert(false), children: alertMessage })
287
+ }
288
+ ),
289
+ /* @__PURE__ */ jsxs(Box, { padding: 4, style: { width: "100%", color: "white" }, children: [
290
+ /* @__PURE__ */ jsx(Box, { paddingBottom: 4, textAlign: "right", style: { width: "100%" }, children: /* @__PURE__ */ jsx(Flex, { justifyContent: "flex-end", children: /* @__PURE__ */ jsx(
291
+ "img",
292
+ {
293
+ src: logoSvg,
294
+ alt: "",
295
+ style: {
296
+ maxWidth: "200px",
297
+ height: "auto"
298
+ }
299
+ }
300
+ ) }) }),
301
+ !pluginIsAvailable() ? renderNotAvailable() : renderPlugin()
274
302
  ] })
275
303
  ] });
276
304
  };
@@ -284,7 +312,7 @@ const index = {
284
312
  defaultMessage: PLUGIN_ID
285
313
  },
286
314
  Component: async () => {
287
- const { App } = await import("../_chunks/App-Bw7t0TMJ.mjs");
315
+ const { App } = await import("../_chunks/App-jiozoQyG.mjs");
288
316
  return App;
289
317
  }
290
318
  });
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "license": "GPL-2.0-only",
5
5
  "author": "Duncan Leininger <duncan.leininger@idmedia.com>",
6
6
  "homepage": "https://translationstudio.tech",
7
- "version": "1.0.10",
7
+ "version": "1.1.0",
8
8
  "keywords": [
9
9
  "translationstudio",
10
10
  "strapi",