Skip to content

Commit

Permalink
wip: split view
Browse files Browse the repository at this point in the history
  • Loading branch information
todti committed Feb 11, 2025
1 parent caaf8b1 commit e9d7426
Show file tree
Hide file tree
Showing 19 changed files with 6 additions and 147 deletions.
1 change: 1 addition & 0 deletions .pnp.cjs

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

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion allurerc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default defineConfig({
name: "Allure Report 3",
output: "./out/allure-report",
plugins: {
allure2: {
awesome: {
options: {
singleFile: true,
reportLanguage: "en",
Expand Down
61 changes: 0 additions & 61 deletions packages/web-awesome/src/components/BaseLayout--/index.tsx

This file was deleted.

60 changes: 0 additions & 60 deletions packages/web-awesome/src/components/BaseLayout--/styles.scss

This file was deleted.

4 changes: 2 additions & 2 deletions packages/web-awesome/src/components/BaseLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { treeStore } from "@/stores/tree";
import * as styles from "./styles.scss";

export const BaseLayout = () => {
const { id: testResultId, params } = route.value;
const { id: testResultId } = route.value;

useEffect(() => {
if (testResultId) {
Expand All @@ -32,7 +32,7 @@ export const BaseLayout = () => {
</div>,
);
}
}, [cachedMain]); // Устанавливаем `cachedMain` только один раз
}, [cachedMain]);

const testResult = testResultId ? (
<Loadable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { IconButton, SvgIcon, Text, allureIcons } from "@allurereport/web-compon
import clsx from "clsx";
import type { FunctionalComponent } from "preact";
import type { AllureAwesomeTestResult } from "types";
import { LanguagePicker } from "@/components/LanguagePicker";
import { ThemeButton } from "@/components/ThemeButton/ThemeButton";
import { navigateTo } from "@/stores/router";
import * as styles from "./styles.scss";

Expand Down Expand Up @@ -46,8 +44,6 @@ export const TestResultHeader: FunctionalComponent<TestResultHeaderProps> = ({ t
</Text>
</div>
</div>
{/* <LanguagePicker />*/}
{/* <ThemeButton />*/}
</div>
);
};
21 changes: 2 additions & 19 deletions packages/web-awesome/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,18 @@ const App = () => {
fetchEnvInfo();
}, []);

// const [testResultId, setTestResultId] = useState<string>("");
//
// const getLocationHashId = () => {
// const hash = globalThis.location.hash;
// const match = hash.match(/[^#/]+$/);
// return match ? match[0] : null;
// };
//
useEffect(() => {
// const handleHashChange = () => {
// const id = getLocationHashId();
// setTestResultId(id);
// };

handleHashChange();
globalThis.addEventListener("hashchange", handleHashChange);
globalThis.addEventListener("hashchange", () => handleHashChange());

return () => {
globalThis.removeEventListener("hashchange", handleHashChange);
globalThis.removeEventListener("hashchange", () => handleHashChange());
};
}, []);

return <BaseLayout />;
};

// export const navigateTo = (path: string) => {
// globalThis.location.hash = path;
// };
//
export const openInNewTab = (path: string) => {
window.open(`#${path}`, "_blank");
};
Expand Down

0 comments on commit e9d7426

Please sign in to comment.