Skip to content

Commit

Permalink
Merge branch 'main' into feat/support-nested-style-object
Browse files Browse the repository at this point in the history
  • Loading branch information
pyshx authored May 18, 2023
2 parents de71084 + c3ab031 commit c0f3bab
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions web/src/components/molecules/Common/Header/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ const HeaderProfile: React.FC<Props & Partial<LoginProps>> = ({
<MenuListItem>
<MenuListItemLabel icon="logout" onClick={onSignOut} text={t("Log out")} />
</MenuListItem>
<MenuListItem>
<MenuListItemLabel text={`v${__APP_VERSION__}`} />
</MenuListItem>
</MenuList>
</ChildrenWrapper>
</StyledDropdown>
Expand Down
1 change: 1 addition & 0 deletions web/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export type Config = {
};

declare global {
let __APP_VERSION__: string;
interface Window {
REEARTH_CONFIG?: Config;
REEARTH_E2E_ACCESS_TOKEN?: string;
Expand Down
8 changes: 5 additions & 3 deletions web/src/core/engines/Cesium/Feature/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ export default function Feature({
k: keyof AppearanceTypes,
f?: ComputedFeature,
): JSX.Element | null => {
const componentId = `${layer.id}_${f?.id ?? ""}_${k}_${isHidden}_${
JSON.stringify(f?.[k]) ?? ""
}`;
const componentId = generateIDWithMD5(
`${layer.id}_${f?.id ?? ""}_${k}_${isHidden}_${data?.url ?? ""}_${
JSON.stringify(f?.[k]) ?? ""
}`,
);

const cachedComponent = CACHED_COMPONENTS.get(componentId);
if (cachedComponent) {
Expand Down
3 changes: 3 additions & 0 deletions web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ import cesium from "vite-plugin-cesium";
import tsconfigPaths from "vite-tsconfig-paths";
import { configDefaults } from "vitest/config";

import pkg from "./package.json";

export default defineConfig({
envPrefix: "REEARTH_WEB_",
plugins: [react(), yaml(), cesium(), serverHeaders(), config(), tsconfigPaths()],
define: {
"process.env.QTS_DEBUG": "false", // quickjs-emscripten
__APP_VERSION__: JSON.stringify(pkg.version),
},
server: {
port: 3000,
Expand Down

0 comments on commit c0f3bab

Please sign in to comment.