@allurereport/web-summary 3.0.1 → 3.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.
- package/dist/app-851fa01320c53776e2df.js +2 -0
- package/dist/{app-47bd4545267915e75245.js.LICENSE.txt → app-851fa01320c53776e2df.js.LICENSE.txt} +7 -0
- package/dist/manifest.json +1 -1
- package/package.json +5 -5
- package/src/components/ThemeButton/index.tsx +6 -17
- package/src/index.tsx +1 -2
- package/src/stores/index.ts +0 -1
- package/dist/app-47bd4545267915e75245.js +0 -2
- package/src/stores/theme.ts +0 -29
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/web-summary",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "The static files for Allure Report Summary",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"IE 11"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@allurereport/core-api": "3.0
|
|
31
|
-
"@allurereport/web-commons": "3.0
|
|
32
|
-
"@allurereport/web-components": "3.0
|
|
33
|
-
"@preact/signals": "^
|
|
30
|
+
"@allurereport/core-api": "3.1.0",
|
|
31
|
+
"@allurereport/web-commons": "3.1.0",
|
|
32
|
+
"@allurereport/web-components": "3.1.0",
|
|
33
|
+
"@preact/signals": "^2.6.1",
|
|
34
34
|
"clsx": "^2.1.1",
|
|
35
35
|
"i18next": "^24.0.2",
|
|
36
36
|
"preact": "^10.28.2",
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { themeStore, toggleUserTheme } from "@allurereport/web-commons";
|
|
2
|
+
import { ThemeButton as UIThemeButton } from "@allurereport/web-components";
|
|
3
|
+
import { computed } from "@preact/signals";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
const theme = themeStore.value;
|
|
7
|
-
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
getTheme();
|
|
10
|
-
}, []);
|
|
5
|
+
const selectedTheme = computed(() => themeStore.value.selected);
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
onClick={toggleTheme}
|
|
15
|
-
style="ghost"
|
|
16
|
-
icon={theme === "light" ? allureIcons.lineShapesMoon : allureIcons.lineShapesSun}
|
|
17
|
-
size="s"
|
|
18
|
-
/>
|
|
19
|
-
);
|
|
7
|
+
export const ThemeButton = () => {
|
|
8
|
+
return <UIThemeButton theme={selectedTheme.value} toggleTheme={toggleUserTheme} />;
|
|
20
9
|
};
|
package/src/index.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import "@/assets/scss/index.scss";
|
|
|
8
8
|
import { EmptyPlaceholder } from "@/components/EmptyPlaceholder";
|
|
9
9
|
import { Footer } from "@/components/Footer";
|
|
10
10
|
import { Header } from "@/components/Header";
|
|
11
|
-
import { currentLocale, getLocale,
|
|
11
|
+
import { currentLocale, getLocale, useI18n, waitForI18next } from "@/stores";
|
|
12
12
|
import * as styles from "./styles.scss";
|
|
13
13
|
|
|
14
14
|
export const currentLocaleIso = computed(() => LANG_LOCALE[currentLocale.value]?.iso ?? LANG_LOCALE.en.iso);
|
|
@@ -21,7 +21,6 @@ const App = () => {
|
|
|
21
21
|
|
|
22
22
|
useEffect(() => {
|
|
23
23
|
getLocale();
|
|
24
|
-
getTheme();
|
|
25
24
|
waitForI18next.then(() => {
|
|
26
25
|
setLoaded(true);
|
|
27
26
|
});
|
package/src/stores/index.ts
CHANGED