{
+ code: number
+ data: P
+ msg: string
+}
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/assets/background.png b/paimon-web-ui-new/src/assets/background.png
new file mode 100644
index 000000000..bd8f30bf7
Binary files /dev/null and b/paimon-web-ui-new/src/assets/background.png differ
diff --git a/paimon-web-ui-new/src/assets/logo.svg b/paimon-web-ui-new/src/assets/logo.svg
new file mode 100644
index 000000000..ffb904faf
--- /dev/null
+++ b/paimon-web-ui-new/src/assets/logo.svg
@@ -0,0 +1,16 @@
+
+
\ No newline at end of file
diff --git a/paimon-web-ui-new/tailwind.config.js b/paimon-web-ui-new/src/composables/locales.ts
similarity index 76%
rename from paimon-web-ui-new/tailwind.config.js
rename to paimon-web-ui-new/src/composables/locales.ts
index 96f869c5c..059c3e4ba 100644
--- a/paimon-web-ui-new/tailwind.config.js
+++ b/paimon-web-ui-new/src/composables/locales.ts
@@ -15,13 +15,12 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License. */
-/** @type {import('tailwindcss').Config} */
-export const content = ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'];
-export const theme = {
- extend: {},
-};
-export const variants = {
- extend: {},
-};
-export const plugins = [];
+import { useI18n } from 'vue-i18n'
+export const useLocaleHooks = () => {
+ const { t } = useI18n()
+
+ return {
+ t
+ }
+}
diff --git a/paimon-web-ui-new/src/locales/en/index.ts b/paimon-web-ui-new/src/locales/en/index.ts
new file mode 100644
index 000000000..12cbef875
--- /dev/null
+++ b/paimon-web-ui-new/src/locales/en/index.ts
@@ -0,0 +1,22 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License. */
+
+import login from './modules/login'
+
+export default {
+ login
+}
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/locales/en/modules/login.ts b/paimon-web-ui-new/src/locales/en/modules/login.ts
new file mode 100644
index 000000000..28bf49ba4
--- /dev/null
+++ b/paimon-web-ui-new/src/locales/en/modules/login.ts
@@ -0,0 +1,26 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License. */
+
+export default {
+ login: 'Login',
+ username: 'Username',
+ password: 'Password',
+ username_tips: 'Please input username',
+ password_tips: 'Please input password',
+ light: 'Light',
+ dark: 'Dark'
+}
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/locales/index.ts b/paimon-web-ui-new/src/locales/index.ts
new file mode 100644
index 000000000..0ee3fb72e
--- /dev/null
+++ b/paimon-web-ui-new/src/locales/index.ts
@@ -0,0 +1,32 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License. */
+
+import { createI18n } from 'vue-i18n'
+import en from './en'
+import zh from './zh'
+
+const i18n = createI18n({
+ locale: 'en',
+ legacy: false,
+ fallbackLocale: 'zh',
+ messages: {
+ en,
+ zh
+ }
+})
+
+export default i18n
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/locales/zh/index.ts b/paimon-web-ui-new/src/locales/zh/index.ts
new file mode 100644
index 000000000..12cbef875
--- /dev/null
+++ b/paimon-web-ui-new/src/locales/zh/index.ts
@@ -0,0 +1,22 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License. */
+
+import login from './modules/login'
+
+export default {
+ login
+}
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/locales/zh/modules/login.ts b/paimon-web-ui-new/src/locales/zh/modules/login.ts
new file mode 100644
index 000000000..38b5f3e1b
--- /dev/null
+++ b/paimon-web-ui-new/src/locales/zh/modules/login.ts
@@ -0,0 +1,26 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License. */
+
+export default {
+ login: '登录',
+ username: '用户名',
+ password: '密码',
+ username_tips: '请输入用户名',
+ password_tips: '请输入密码',
+ light: '浅色',
+ dark: '暗色'
+}
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/main.ts b/paimon-web-ui-new/src/main.ts
index e3353be49..3fb07b3af 100644
--- a/paimon-web-ui-new/src/main.ts
+++ b/paimon-web-ui-new/src/main.ts
@@ -18,16 +18,16 @@ under the License. */
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
-
import App from './App'
import router from './router'
import naive from 'naive-ui'
+import i18n from './locales'
import { Setting } from './config'
-import './assets/tailMain.css'
const app = createApp(App)
-
const pinia = createPinia()
+
+app.use(i18n)
app.use(pinia)
pinia.use(piniaPluginPersistedstate)
app.use(router)
diff --git a/paimon-web-ui-new/src/router/index.ts b/paimon-web-ui-new/src/router/index.ts
index b66de13c5..0ab49869b 100644
--- a/paimon-web-ui-new/src/router/index.ts
+++ b/paimon-web-ui-new/src/router/index.ts
@@ -27,6 +27,11 @@ const router = createRouter({
// this generates a separate chunk (About.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import('../views/HomePage')
+ },
+ {
+ path: '/login',
+ name: 'login',
+ component: () => import('../views/login')
}
]
})
diff --git a/paimon-web-ui-new/src/store/config/index.ts b/paimon-web-ui-new/src/store/config/index.ts
new file mode 100644
index 000000000..ec3e8bf34
--- /dev/null
+++ b/paimon-web-ui-new/src/store/config/index.ts
@@ -0,0 +1,43 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License. */
+
+type Theme = 'dark' | 'light'
+type Locale = 'en' | 'zh'
+
+export const useConfigStore = defineStore({
+ id: 'config',
+ state: (): { theme: Theme, locale: Locale } => ({
+ theme: 'light',
+ locale: 'zh'
+ }),
+ getters: {
+ getCurrentLocale(): Locale {
+ return this.locale
+ },
+ getCurrentTheme(): Theme {
+ return this.theme
+ }
+ },
+ actions: {
+ setCurrentLocale(locale: Locale): void {
+ this.locale = locale
+ },
+ setCurrentTheme(theme: Theme): void {
+ this.theme = theme
+ }
+ }
+})
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/themes/index.ts b/paimon-web-ui-new/src/themes/index.ts
new file mode 100644
index 000000000..ade06551d
--- /dev/null
+++ b/paimon-web-ui-new/src/themes/index.ts
@@ -0,0 +1,26 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License. */
+
+import dark from './modules/dark'
+import light from './modules/light'
+
+const themes = {
+ dark,
+ light
+}
+
+export default themes
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/themes/modules/dark.ts b/paimon-web-ui-new/src/themes/modules/dark.ts
new file mode 100644
index 000000000..0a712c5a1
--- /dev/null
+++ b/paimon-web-ui-new/src/themes/modules/dark.ts
@@ -0,0 +1,73 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License. */
+
+import type { GlobalThemeOverrides } from 'naive-ui'
+
+const textColor = '#EFEFEF'
+
+const dark: GlobalThemeOverrides = {
+ common: {
+ bodyColor: '#131313',
+
+ primaryColor: '#2475FE',
+ primaryColorHover: '#3a7bfa',
+ primaryColorPressed: '#1a6efb',
+ primaryColorSuppl: '#0060fa',
+
+ infoColor: '#A6A6A6',
+ successColor: '#00B69B',
+ warningColor: '#FCBE2D',
+ errorColor: '#EC4C4D'
+ },
+ Card: {
+ color: '#1B1C1D',
+ borderRadius: '8px'
+ },
+ Button: {
+ textColorPrimary: textColor,
+ textColorHoverPrimary: textColor,
+ textColorPressedPrimary: textColor,
+ textColorFocusPrimary: textColor,
+ textColorDisabledPrimary: textColor,
+
+ textColorInfo: textColor,
+ textColorHoverInfo: textColor,
+ textColorPressedInfo: textColor,
+ textColorFocusInfo: textColor,
+ textColorDisabledInfo: textColor,
+
+ textColorSuccess: textColor,
+ textColorHoverSuccess: textColor,
+ textColorPressedSuccess: textColor,
+ textColorFocusSuccess: textColor,
+ textColorDisabledSuccess: textColor,
+
+ textColorWarning: textColor,
+ textColorHoverWarning: textColor,
+ textColorPressedWarning: textColor,
+ textColorFocusWarning: textColor,
+ textColorDisabledWarning: textColor,
+
+ textColorError: textColor,
+ textColorHoverError: textColor,
+ textColorPressedError: textColor,
+ textColorFocusError: textColor,
+ textColorDisabledError: textColor
+ }
+}
+
+export default dark
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/themes/modules/light.ts b/paimon-web-ui-new/src/themes/modules/light.ts
new file mode 100644
index 000000000..5e9140557
--- /dev/null
+++ b/paimon-web-ui-new/src/themes/modules/light.ts
@@ -0,0 +1,40 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License. */
+
+import type { GlobalThemeOverrides } from 'naive-ui'
+
+const light: GlobalThemeOverrides = {
+ common: {
+ bodyColor: '#F4F5F6',
+
+ primaryColor: '#2475FE',
+ primaryColorHover: '#3a7bfa',
+ primaryColorPressed: '#1a6efb',
+ primaryColorSuppl: '#0060fa',
+
+ infoColor: '#A6A6A6',
+ successColor: '#00B69B',
+ warningColor: '#FCBE2D',
+ errorColor: '#EC4C4D'
+ },
+ Card: {
+ color: '#FAFAFA',
+ borderRadius: '8px'
+ }
+}
+
+export default light
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/views/login/index.module.scss b/paimon-web-ui-new/src/views/login/index.module.scss
new file mode 100644
index 000000000..0d815754e
--- /dev/null
+++ b/paimon-web-ui-new/src/views/login/index.module.scss
@@ -0,0 +1,37 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License. */
+
+.container {
+ height: 100vh;
+ width: 100vw;
+}
+
+.background {
+ width: 600px;
+ height: 100%;
+ border-radius: 8px 0 0 8px;
+}
+
+.form-container {
+ padding: 30px 50px;
+ width: 488px;
+}
+
+.logo {
+ height: 80px;
+ width: 80px;
+}
\ No newline at end of file
diff --git a/paimon-web-ui-new/src/views/login/index.tsx b/paimon-web-ui-new/src/views/login/index.tsx
new file mode 100644
index 000000000..11767f748
--- /dev/null
+++ b/paimon-web-ui-new/src/views/login/index.tsx
@@ -0,0 +1,121 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License. */
+
+import { useForm } from './use-form'
+import { useConfigStore } from '@/store/config'
+import i18n from '@/locales'
+import backgroundImage from '@/assets/background.png'
+import logoImage from '@/assets/logo.svg'
+import styles from './index.module.scss'
+
+export default defineComponent({
+ name: 'LoginPage',
+ setup() {
+ const { state, handleLogin } = useForm()
+
+ const configStore = useConfigStore()
+
+ const handleLocale = () => {
+ configStore.setCurrentLocale(configStore.getCurrentLocale === 'zh' ? 'en' : 'zh')
+ i18n.global.locale.value = configStore.getCurrentLocale === 'zh' ? 'en' : 'zh'
+ }
+
+ return {
+ configStore,
+ handleLogin,
+ handleLocale,
+ ...toRefs(state)
+ }
+ },
+ render() {
+ return Apache Paimon
+