Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangshenghang committed Jan 7, 2025
1 parent 27f7373 commit a8782c7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
4 changes: 1 addition & 3 deletions seatunnel-ui/src/assets/styles/default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/

$box-node-content: "Double click to configure. After configure, Connect each node ends to another.";

.x6-graph-scroller {
overflow: hidden !important;
&:hover {
Expand All @@ -35,7 +33,7 @@
.x6-widget-selection-box.x6-widget-selection-box-node:hover {
position: relative;
&::before {
content: $box-node-content;
content: var(--node-config-hint);
width: 210px;
height: 40px;
background: #eeecec;
Expand Down
5 changes: 4 additions & 1 deletion seatunnel-ui/src/locales/en_US/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,8 @@ export default {
theme,
project,
hook,
transforms
transforms,
dag: {
nodeConfigHint: 'Double click to configure. After configure, Connect each node ends to another.'
}
}
5 changes: 4 additions & 1 deletion seatunnel-ui/src/locales/zh_CN/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,8 @@ export default {
theme,
project,
hook,
transforms
transforms,
dag: {
nodeConfigHint: '双击节点进行配置。配置完成后,连接每个节点的端点到其他节点。'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { defineComponent, ref, onMounted } from 'vue'
import { defineComponent, ref, onMounted, watch } from 'vue'
import { DagSidebar } from './sidebar'
import { DagCanvas } from './canvas'
import { DagToolbar } from './toolbar'
Expand All @@ -32,7 +32,7 @@ const SynchronizationDefinitionDag = defineComponent({
type: '',
name: ''
}
const { t } = useI18n()
const { t, locale } = useI18n()
const { state, detailInit, onDelete, onSave } = useDagDetail()
const handelDragstart = (type: any, name: any) => {
tempNode.type = type
Expand Down Expand Up @@ -85,8 +85,22 @@ const SynchronizationDefinitionDag = defineComponent({
result.nodesAndEdges.edges
)
}
document.documentElement.style.setProperty(
'--node-config-hint',
`"${t('dag.nodeConfigHint')}"`
)
})

watch(
() => locale.value,
() => {
document.documentElement.style.setProperty(
'--node-config-hint',
`"${t('dag.nodeConfigHint')}"`
)
}
)

return () => (
<NSpin show={state.loading}>
<NSpace vertical>
Expand Down

0 comments on commit a8782c7

Please sign in to comment.