Skip to content

Commit f2fe775

Browse files
committed
fix: some bugfix
1 parent 1756389 commit f2fe775

8 files changed

Lines changed: 16 additions & 12 deletions

File tree

src/frontend/platform/src/components/bs-ui/button/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { cva, type VariantProps } from "class-variance-authority"
44
import { cname } from "../utils"
55
import { LoadIcon } from "@/components/bs-icons"
66
const buttonVariants = cva(
7-
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
7+
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
88
{
99
variants: {
1010
variant: {

src/frontend/platform/src/pages/BuildPage/flow/FlowNode/component/VarInput.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ export default function VarInput({
116116

117117
useEffect(() => {
118118
console.log('!!!value :>> ', value);
119-
// if (valueRef.current && valueRef.current === value) return
119+
if (valueRef.current && valueRef.current !== value) {
120+
valueRef.current = value;
121+
}
120122
textareaRef.current.innerHTML = parseToHTML(value || '')[0];
121123
setFullVarInputValue(value)
122124
placeholderInit();

src/frontend/platform/src/pages/Dashboard/components/charts/MetricCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export function MetricCard({ data, dataConfig, styleConfig }: MetricCardProps) {
164164
<div style={titleStyle}>{indicatorName}</div>
165165
</div>
166166
{/* value */}
167-
<div style={metricStyle}>
167+
<div style={metricStyle} className='leading-[1.2em]'>
168168
{formatValue}
169169
{displayUnit && <span className="text-xl ml-2 text-muted-foreground">{displayUnit}</span>}
170170
</div>

src/frontend/platform/src/pages/Dashboard/components/charts/QueryFilter.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ export function QueryFilter({ isDark, component, isPreviewMode = false }: QueryF
5757
}, [queryConditions.defaultValue, queryConditions.defaultValue])
5858

5959
return (
60-
<div className="w-full h-full p-4 flex flex-col gap-3 relative">
60+
<div className="w-full h-full p-4 py-0 flex flex-col gap-3 relative">
6161
{/* date zone */}
62-
<div className="flex flex-col gap-2 pr-24">
62+
{/* <div className="flex flex-col gap-2 pr-24">
6363
<label className={cn("text-sm font-medium", "dark:text-gray-400")}>{t('selectDate')}</label>
64-
</div>
64+
</div> */}
6565

6666
{/* query btn */}
67-
<div className="no-drag w-full flex flex-1 gap-2 items-center select-none">
67+
<div className="no-drag w-full flex flex-1 gap-4 items-center select-none">
6868
<AdvancedDatePicker
6969
granularity={map[queryConditions.timeGranularity]}
7070
mode={queryConditions.displayType}

src/frontend/platform/src/pages/Dashboard/components/editor/ComponentWrapper.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ export function ComponentWrapper({
4242

4343
useEffect(() => {
4444
console.log('componentData :>> ', componentData);
45-
setTitle(component.title)
46-
}, [editingComponent, component])
45+
setTitle(componentData.title)
46+
}, [editingComponent])
4747

4848
useEffect(() => {
4949
if (isEditing && inputRef.current) {

src/frontend/platform/src/pages/Dashboard/components/editor/EditorCanvas.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,13 @@ export function EditorCanvas({ isLoading, isPreviewMode, dashboard }: EditorCanv
241241
<>
242242
<div className="flex h-full">
243243
<div
244+
id="edit-charts-panne"
244245
className={cn("flex-1 overflow-auto no-scrollbar", theme)}
245246
style={{
246247
backgroundColor: theme === 'dark' ? '#1a1a1a' : '#f5f5f5',
247248
}}
248249
>
249-
<div id="edit-charts-panne"
250+
<div
250251
ref={containerRef}
251252
className="min-w-[1000px]">
252253
<div className="mx-auto relative" style={{

src/frontend/platform/src/pages/LoginPage/login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const LoginPage = () => {
7575
localStorage.removeItem('LOGIN_PATHNAME')
7676
location.href = pathname
7777
} else {
78-
const path = import.meta.env.DEV ? '/' : '/workspace'
78+
const path = import.meta.env.DEV ? '/admin' : '/workspace'
7979
const rootUrl = `${location.origin}${__APP_ENV__.BASE_URL}${path}`
8080
location.href = `${__APP_ENV__.BASE_URL}${location.pathname}` === '/' ? rootUrl : location.href
8181
}

src/frontend/platform/src/routes/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ const baseConfig = {
5252

5353
const RedirectToExternalLink = () => {
5454
useEffect(() => {
55-
window.location.href = window.location.origin + '/workspace/';
55+
const path = import.meta.env.DEV ? '/admin' : '/workspace/'
56+
window.location.href = window.location.origin + path;
5657
}, []);
5758

5859
return null;

0 commit comments

Comments
 (0)