未验证 提交 34345f26 编写于 作者: P Peter Pan 提交者: GitHub

2.0.0-beta.35 (#621)

* fix: minor bug fix

* fix: navbar index url

* v2.0.0-beta.34

* fix: samples page walltime mistake

* v2.0.0-beta.35
上级 917c7204
......@@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "2.0.0-beta.33",
"version": "2.0.0-beta.35",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
......
......@@ -4,7 +4,7 @@
"workspaces": [
"packages/*"
],
"version": "2.0.0-beta.33",
"version": "2.0.0-beta.35",
"description": "A platform to visualize the deep learning process and result.",
"keywords": [
"visualdl",
......
{
"name": "@visualdl/app",
"version": "2.0.0-beta.33",
"version": "2.0.0-beta.35",
"private": true,
"description": "A platform to visualize the deep learning process and result.",
"keywords": [
......@@ -21,7 +21,7 @@
"repository": {
"type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/app"
"directory": "frontend/packages/app"
},
"scripts": {
"dev": "electron index.js",
......@@ -29,7 +29,7 @@
"test": "echo \"Error: no test specified\" && exit 0"
},
"dependencies": {
"@visualdl/server": "2.0.0-beta.33",
"@visualdl/server": "2.0.0-beta.35",
"pm2": "4.4.0"
},
"devDependencies": {
......
{
"name": "@visualdl/cli",
"version": "2.0.0-beta.33",
"version": "2.0.0-beta.35",
"description": "A platform to visualize the deep learning process and result.",
"keywords": [
"visualdl",
......@@ -20,7 +20,7 @@
"repository": {
"type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/cli"
"directory": "frontend/packages/cli"
},
"scripts": {
"dev": "cross-env NODE_ENV=development ts-node index.ts",
......@@ -34,7 +34,7 @@
"dist"
],
"dependencies": {
"@visualdl/server": "2.0.0-beta.33",
"@visualdl/server": "2.0.0-beta.35",
"open": "7.0.3",
"ora": "4.0.4",
"pm2": "4.4.0",
......
......@@ -39,14 +39,13 @@ const colors = {
};
const Wrapper = styled.a<{type?: keyof typeof colors; rounded?: boolean; disabled?: boolean}>`
cursor: pointer;
height: ${height};
line-height: ${height};
border-radius: ${props => (props.rounded ? half(height) : borderRadius)};
${props => (props.type ? '' : sameBorder({color: borderColor}))}
background-color: ${props => (props.type ? colors[props.type].default : 'transparent')};
color: ${props => (props.disabled ? textLighterColor : props.type ? textInvertColor : textColor)};
cursor: ${props => (props.disabled ? 'not-allowed' : 'cursor')};
cursor: ${props => (props.disabled ? 'not-allowed' : 'pointer')};
display: inline-block;
vertical-align: top;
text-align: center;
......
......@@ -7,7 +7,7 @@ type IconProps = {
};
const Icon: FunctionComponent<IconProps & WithStyled> = ({type, className}) => {
return <i className={`vdl-icon icon-${type} ${className}`} />;
return <i className={`vdl-icon icon-${type} ${className ?? ''}`} />;
};
export default Icon;
import {Link, config, i18n, useTranslation} from '~/utils/i18n';
import React, {FunctionComponent} from 'react';
import React, {FunctionComponent, useMemo} from 'react';
import {
border,
navbarBackgroundColor,
......@@ -12,6 +12,7 @@ import {
} from '~/utils/style';
import Icon from '~/components/Icon';
import {InitConfig} from '@visualdl/i18n';
import Language from '~/components/Language';
import ee from '~/utils/event';
import intersection from 'lodash/intersection';
......@@ -99,13 +100,23 @@ const changeLanguage = () => {
};
const Navbar: FunctionComponent = () => {
const {t} = useTranslation('common');
const {t, i18n} = useTranslation('common');
const {pathname} = useRouter();
const indexUrl = useMemo(() => {
// TODO: fix type
const subpath = (i18n.options as InitConfig).localeSubpaths?.[i18n.language];
let path = process.env.PUBLIC_PATH ?? '';
if (subpath) {
path += `/${subpath}`;
}
return `${path}/index`;
}, [i18n.options, i18n.language]);
return (
<Nav>
<div className="left">
<Logo href={process.env.PUBLIC_PATH || '/'}>
<Logo href={indexUrl}>
<img alt="PaddlePaddle" src={`${process.env.PUBLIC_PATH}/images/logo.svg`} />
<span>VisualDL</span>
</Logo>
......
......@@ -168,7 +168,7 @@ const SampleChart: FunctionComponent<SampleChartProps> = ({run, tag, brightness,
<span>{run}</span>
</Title>
<StepSlider value={step} steps={steps} onChange={setStep} onChangeComplete={cacheImageSrc}>
{formatTime(wallTime, i18n.language)}
{formatTime(wallTime * 1000, i18n.language)}
</StepSlider>
<Container brightness={brightness} contrast={contrast} fit={fit}>
{Content}
......
{
"name": "@visualdl/core",
"version": "2.0.0-beta.33",
"version": "2.0.0-beta.35",
"title": "VisualDL",
"description": "A platform to visualize the deep learning process and result.",
"keywords": [
......@@ -21,7 +21,7 @@
"repository": {
"type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/core"
"directory": "frontend/packages/core"
},
"scripts": {
"dev": "next",
......@@ -31,8 +31,8 @@
"test": "echo \"Error: no test specified\" && exit 0"
},
"dependencies": {
"@visualdl/i18n": "2.0.0-beta.33",
"@visualdl/wasm": "2.0.0-beta.33",
"@visualdl/i18n": "2.0.0-beta.35",
"@visualdl/wasm": "2.0.0-beta.35",
"bignumber.js": "9.0.0",
"dagre-d3": "0.6.4",
"echarts": "4.7.0",
......@@ -73,7 +73,7 @@
"@types/react": "16.9.34",
"@types/react-dom": "16.9.7",
"@types/styled-components": "5.1.0",
"@visualdl/mock": "2.0.0-beta.33",
"@visualdl/mock": "2.0.0-beta.35",
"babel-plugin-emotion": "10.0.33",
"babel-plugin-styled-components": "1.10.7",
"babel-plugin-typescript-to-proptypes": "1.3.2",
......
{
"name": "@visualdl/i18n",
"version": "2.0.0-beta.33",
"version": "2.0.0-beta.35",
"description": "A platform to visualize the deep learning process and result.",
"keywords": [
"visualdl",
......@@ -20,7 +20,7 @@
"repository": {
"type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/i18n"
"directory": "frontend/packages/i18n"
},
"scripts": {
"build": "tsc",
......
{
"name": "@visualdl/mock",
"version": "2.0.0-beta.33",
"version": "2.0.0-beta.35",
"description": "A platform to visualize the deep learning process and result.",
"keywords": [
"visualdl",
......@@ -20,7 +20,7 @@
"repository": {
"type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/mock"
"directory": "frontend/packages/mock"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "@visualdl/server",
"version": "2.0.0-beta.33",
"version": "2.0.0-beta.35",
"description": "A platform to visualize the deep learning process and result.",
"keywords": [
"visualdl",
......@@ -20,7 +20,7 @@
"repository": {
"type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/server"
"directory": "frontend/packages/server"
},
"scripts": {
"dev": "cross-env NODE_ENV=development nodemon --watch index.ts --watch webpack.config.js --exec \"ts-node index.ts\"",
......@@ -36,8 +36,8 @@
"ecosystem.config.d.ts"
],
"dependencies": {
"@visualdl/core": "2.0.0-beta.33",
"@visualdl/i18n": "2.0.0-beta.33",
"@visualdl/core": "2.0.0-beta.35",
"@visualdl/i18n": "2.0.0-beta.35",
"express": "4.17.1",
"http-proxy-middleware": "1.0.3",
"next": "9.3.6",
......@@ -49,7 +49,7 @@
"@types/shelljs": "0.8.7",
"@types/webpack": "4.41.12",
"@types/webpack-dev-middleware": "3.7.0",
"@visualdl/mock": "2.0.0-beta.33",
"@visualdl/mock": "2.0.0-beta.35",
"cross-env": "7.0.2",
"nodemon": "2.0.3",
"shelljs": "0.8.4",
......
{
"name": "@visualdl/serverless",
"version": "2.0.0-beta.33",
"version": "2.0.0-beta.35",
"description": "A platform to visualize the deep learning process and result.",
"keywords": [
"visualdl",
......@@ -20,7 +20,7 @@
"repository": {
"type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/serverless"
"directory": "frontend/packages/serverless"
},
"main": "dist/index.html",
"files": [
......@@ -33,7 +33,7 @@
"devDependencies": {
"@types/node": "13.13.5",
"@types/rimraf": "3.0.0",
"@visualdl/core": "2.0.0-beta.33",
"@visualdl/core": "2.0.0-beta.35",
"cross-env": "7.0.2",
"rimraf": "3.0.2",
"ts-node": "8.10.1",
......
{
"name": "@visualdl/wasm",
"version": "2.0.0-beta.33",
"version": "2.0.0-beta.35",
"title": "VisualDL",
"description": "A platform to visualize the deep learning process and result.",
"keywords": [
......@@ -21,7 +21,7 @@
"repository": {
"type": "git",
"url": "https://github.com/PaddlePaddle/VisualDL.git",
"directory": "frontend/wasm"
"directory": "frontend/packages/wasm"
},
"files": [
"dist/index_bg.wasm",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册