|
33 | 33 | # Align Vue in client and server. |
34 | 34 | try: |
35 | 35 | from trame.ui.vuetify import SinglePageWithDrawerLayout |
36 | | - from trame.widgets import vuetify as v3 |
| 36 | + from trame.widgets import vuetify as vue |
37 | 37 | CLIENT_TYPE = "vue2" |
38 | 38 | except ModuleNotFoundError: |
39 | 39 | from trame.ui.vuetify3 import SinglePageWithDrawerLayout |
40 | | - from trame.widgets import vuetify3 as v3 |
| 40 | + from trame.widgets import vuetify3 as vue |
41 | 41 | CLIENT_TYPE = "vue3" |
42 | 42 |
|
43 | 43 |
|
@@ -356,144 +356,144 @@ def view_isometric(): |
356 | 356 |
|
357 | 357 | # Add buttons to side drawer/menu |
358 | 358 | with layout.drawer: |
359 | | - with v3.VList(shaped=True): |
| 359 | + with vue.VList(shaped=True): |
360 | 360 | # Tools Section |
361 | | - with v3.VListGroup(value=("true",)): |
362 | | - with v3.Template(v_slot_activator=True): |
363 | | - with v3.VListItemContent(): |
364 | | - v3.VListItemTitle("Tools") |
365 | | - |
366 | | - with v3.VListItem(click=self.ctrl.toggle_measure): |
367 | | - with v3.VListItemIcon(): |
368 | | - v3.VIcon("mdi-ruler") |
369 | | - with v3.VListItemContent(): |
370 | | - v3.VListItemTitle("Measurement Tool") |
371 | | - |
372 | | - with v3.VListItem(click=self.ctrl.toggle_mesh_slider): |
373 | | - with v3.VListItemIcon(): |
374 | | - v3.VIcon("mdi-content-cut") |
375 | | - with v3.VListItemContent(): |
376 | | - v3.VListItemTitle("Mesh Slicer") |
377 | | - |
378 | | - with v3.VListItem(click=self.ctrl.toggle_ruler): |
379 | | - with v3.VListItemIcon(): |
380 | | - v3.VIcon("mdi-ruler") |
381 | | - with v3.VListItemContent(): |
382 | | - v3.VListItemTitle("Ruler") |
383 | | - |
384 | | - with v3.VListItem(click=self.ctrl.take_screenshot): |
385 | | - with v3.VListItemIcon(): |
386 | | - v3.VIcon("mdi-camera") |
387 | | - with v3.VListItemContent(): |
388 | | - v3.VListItemTitle("Take Screenshot") |
389 | | - |
390 | | - with v3.VListItem(click=self.ctrl.download_html): |
391 | | - with v3.VListItemIcon(): |
392 | | - v3.VIcon("mdi-download") |
393 | | - with v3.VListItemContent(): |
394 | | - v3.VListItemTitle("Download HTML") |
| 361 | + with vue.VListGroup(value=("true",)): |
| 362 | + with vue.Template(v_slot_activator=True): |
| 363 | + with vue.VListItemContent(): |
| 364 | + vue.VListItemTitle("Tools") |
| 365 | + |
| 366 | + with vue.VListItem(click=self.ctrl.toggle_measure): |
| 367 | + with vue.VListItemIcon(): |
| 368 | + vue.VIcon("mdi-ruler") |
| 369 | + with vue.VListItemContent(): |
| 370 | + vue.VListItemTitle("Measurement Tool") |
| 371 | + |
| 372 | + with vue.VListItem(click=self.ctrl.toggle_mesh_slider): |
| 373 | + with vue.VListItemIcon(): |
| 374 | + vue.VIcon("mdi-content-cut") |
| 375 | + with vue.VListItemContent(): |
| 376 | + vue.VListItemTitle("Mesh Slicer") |
| 377 | + |
| 378 | + with vue.VListItem(click=self.ctrl.toggle_ruler): |
| 379 | + with vue.VListItemIcon(): |
| 380 | + vue.VIcon("mdi-ruler") |
| 381 | + with vue.VListItemContent(): |
| 382 | + vue.VListItemTitle("Ruler") |
| 383 | + |
| 384 | + with vue.VListItem(click=self.ctrl.take_screenshot): |
| 385 | + with vue.VListItemIcon(): |
| 386 | + vue.VIcon("mdi-camera") |
| 387 | + with vue.VListItemContent(): |
| 388 | + vue.VListItemTitle("Take Screenshot") |
| 389 | + |
| 390 | + with vue.VListItem(click=self.ctrl.download_html): |
| 391 | + with vue.VListItemIcon(): |
| 392 | + vue.VIcon("mdi-download") |
| 393 | + with vue.VListItemContent(): |
| 394 | + vue.VListItemTitle("Download HTML") |
395 | 395 |
|
396 | 396 | # Camera Movement Section |
397 | | - with v3.VListGroup(value=("true",)): |
398 | | - with v3.Template(v_slot_activator=True): |
399 | | - with v3.VListItemContent(): |
400 | | - v3.VListItemTitle("Camera Movement") |
401 | | - |
402 | | - with v3.VListItem(click=self.ctrl.displace_camera_x_up): |
403 | | - with v3.VListItemIcon(): |
404 | | - v3.VIcon("mdi-arrow-up-bold") |
405 | | - with v3.VListItemContent(): |
406 | | - v3.VListItemTitle("Move X+") |
407 | | - |
408 | | - with v3.VListItem(click=self.ctrl.displace_camera_x_down): |
409 | | - with v3.VListItemIcon(): |
410 | | - v3.VIcon("mdi-arrow-down-bold") |
411 | | - with v3.VListItemContent(): |
412 | | - v3.VListItemTitle("Move X-") |
413 | | - |
414 | | - with v3.VListItem(click=self.ctrl.displace_camera_y_up): |
415 | | - with v3.VListItemIcon(): |
416 | | - v3.VIcon("mdi-arrow-up-bold") |
417 | | - with v3.VListItemContent(): |
418 | | - v3.VListItemTitle("Move Y+") |
419 | | - |
420 | | - with v3.VListItem(click=self.ctrl.displace_camera_y_down): |
421 | | - with v3.VListItemIcon(): |
422 | | - v3.VIcon("mdi-arrow-down-bold") |
423 | | - with v3.VListItemContent(): |
424 | | - v3.VListItemTitle("Move Y-") |
425 | | - |
426 | | - with v3.VListItem(click=self.ctrl.displace_camera_z_up): |
427 | | - with v3.VListItemIcon(): |
428 | | - v3.VIcon("mdi-arrow-up-bold") |
429 | | - with v3.VListItemContent(): |
430 | | - v3.VListItemTitle("Move Z+") |
431 | | - |
432 | | - with v3.VListItem(click=self.ctrl.displace_camera_z_down): |
433 | | - with v3.VListItemIcon(): |
434 | | - v3.VIcon("mdi-arrow-down-bold") |
435 | | - with v3.VListItemContent(): |
436 | | - v3.VListItemTitle("Move Z-") |
| 397 | + with vue.VListGroup(value=("true",)): |
| 398 | + with vue.Template(v_slot_activator=True): |
| 399 | + with vue.VListItemContent(): |
| 400 | + vue.VListItemTitle("Camera Movement") |
| 401 | + |
| 402 | + with vue.VListItem(click=self.ctrl.displace_camera_x_up): |
| 403 | + with vue.VListItemIcon(): |
| 404 | + vue.VIcon("mdi-arrow-up-bold") |
| 405 | + with vue.VListItemContent(): |
| 406 | + vue.VListItemTitle("Move X+") |
| 407 | + |
| 408 | + with vue.VListItem(click=self.ctrl.displace_camera_x_down): |
| 409 | + with vue.VListItemIcon(): |
| 410 | + vue.VIcon("mdi-arrow-down-bold") |
| 411 | + with vue.VListItemContent(): |
| 412 | + vue.VListItemTitle("Move X-") |
| 413 | + |
| 414 | + with vue.VListItem(click=self.ctrl.displace_camera_y_up): |
| 415 | + with vue.VListItemIcon(): |
| 416 | + vue.VIcon("mdi-arrow-up-bold") |
| 417 | + with vue.VListItemContent(): |
| 418 | + vue.VListItemTitle("Move Y+") |
| 419 | + |
| 420 | + with vue.VListItem(click=self.ctrl.displace_camera_y_down): |
| 421 | + with vue.VListItemIcon(): |
| 422 | + vue.VIcon("mdi-arrow-down-bold") |
| 423 | + with vue.VListItemContent(): |
| 424 | + vue.VListItemTitle("Move Y-") |
| 425 | + |
| 426 | + with vue.VListItem(click=self.ctrl.displace_camera_z_up): |
| 427 | + with vue.VListItemIcon(): |
| 428 | + vue.VIcon("mdi-arrow-up-bold") |
| 429 | + with vue.VListItemContent(): |
| 430 | + vue.VListItemTitle("Move Z+") |
| 431 | + |
| 432 | + with vue.VListItem(click=self.ctrl.displace_camera_z_down): |
| 433 | + with vue.VListItemIcon(): |
| 434 | + vue.VIcon("mdi-arrow-down-bold") |
| 435 | + with vue.VListItemContent(): |
| 436 | + vue.VListItemTitle("Move Z-") |
437 | 437 |
|
438 | 438 | # Camera Views Section |
439 | | - with v3.VListGroup(): |
440 | | - with v3.Template(v_slot_activator=True): |
441 | | - with v3.VListItemContent(): |
442 | | - v3.VListItemTitle("Camera Views") |
443 | | - |
444 | | - with v3.VListItem(click=self.ctrl.view_xy_plus): |
445 | | - with v3.VListItemIcon(): |
446 | | - v3.VIcon("mdi-axis-arrow") |
447 | | - with v3.VListItemContent(): |
448 | | - v3.VListItemTitle("XY+ View") |
449 | | - |
450 | | - with v3.VListItem(click=self.ctrl.view_xy_minus): |
451 | | - with v3.VListItemIcon(): |
452 | | - v3.VIcon("mdi-axis-arrow") |
453 | | - with v3.VListItemContent(): |
454 | | - v3.VListItemTitle("XY- View") |
455 | | - |
456 | | - with v3.VListItem(click=self.ctrl.view_xz_plus): |
457 | | - with v3.VListItemIcon(): |
458 | | - v3.VIcon("mdi-axis-arrow") |
459 | | - with v3.VListItemContent(): |
460 | | - v3.VListItemTitle("XZ+ View") |
461 | | - |
462 | | - with v3.VListItem(click=self.ctrl.view_xz_minus): |
463 | | - with v3.VListItemIcon(): |
464 | | - v3.VIcon("mdi-axis-arrow") |
465 | | - with v3.VListItemContent(): |
466 | | - v3.VListItemTitle("XZ- View") |
467 | | - |
468 | | - with v3.VListItem(click=self.ctrl.view_yz_plus): |
469 | | - with v3.VListItemIcon(): |
470 | | - v3.VIcon("mdi-axis-arrow") |
471 | | - with v3.VListItemContent(): |
472 | | - v3.VListItemTitle("YZ+ View") |
473 | | - |
474 | | - with v3.VListItem(click=self.ctrl.view_yz_minus): |
475 | | - with v3.VListItemIcon(): |
476 | | - v3.VIcon("mdi-axis-arrow") |
477 | | - with v3.VListItemContent(): |
478 | | - v3.VListItemTitle("YZ- View") |
479 | | - |
480 | | - with v3.VListItem(click=self.ctrl.view_isometric): |
481 | | - with v3.VListItemIcon(): |
482 | | - v3.VIcon("mdi-cube-outline") |
483 | | - with v3.VListItemContent(): |
484 | | - v3.VListItemTitle("Isometric View") |
| 439 | + with vue.VListGroup(): |
| 440 | + with vue.Template(v_slot_activator=True): |
| 441 | + with vue.VListItemContent(): |
| 442 | + vue.VListItemTitle("Camera Views") |
| 443 | + |
| 444 | + with vue.VListItem(click=self.ctrl.view_xy_plus): |
| 445 | + with vue.VListItemIcon(): |
| 446 | + vue.VIcon("mdi-axis-arrow") |
| 447 | + with vue.VListItemContent(): |
| 448 | + vue.VListItemTitle("XY+ View") |
| 449 | + |
| 450 | + with vue.VListItem(click=self.ctrl.view_xy_minus): |
| 451 | + with vue.VListItemIcon(): |
| 452 | + vue.VIcon("mdi-axis-arrow") |
| 453 | + with vue.VListItemContent(): |
| 454 | + vue.VListItemTitle("XY- View") |
| 455 | + |
| 456 | + with vue.VListItem(click=self.ctrl.view_xz_plus): |
| 457 | + with vue.VListItemIcon(): |
| 458 | + vue.VIcon("mdi-axis-arrow") |
| 459 | + with vue.VListItemContent(): |
| 460 | + vue.VListItemTitle("XZ+ View") |
| 461 | + |
| 462 | + with vue.VListItem(click=self.ctrl.view_xz_minus): |
| 463 | + with vue.VListItemIcon(): |
| 464 | + vue.VIcon("mdi-axis-arrow") |
| 465 | + with vue.VListItemContent(): |
| 466 | + vue.VListItemTitle("XZ- View") |
| 467 | + |
| 468 | + with vue.VListItem(click=self.ctrl.view_yz_plus): |
| 469 | + with vue.VListItemIcon(): |
| 470 | + vue.VIcon("mdi-axis-arrow") |
| 471 | + with vue.VListItemContent(): |
| 472 | + vue.VListItemTitle("YZ+ View") |
| 473 | + |
| 474 | + with vue.VListItem(click=self.ctrl.view_yz_minus): |
| 475 | + with vue.VListItemIcon(): |
| 476 | + vue.VIcon("mdi-axis-arrow") |
| 477 | + with vue.VListItemContent(): |
| 478 | + vue.VListItemTitle("YZ- View") |
| 479 | + |
| 480 | + with vue.VListItem(click=self.ctrl.view_isometric): |
| 481 | + with vue.VListItemIcon(): |
| 482 | + vue.VIcon("mdi-cube-outline") |
| 483 | + with vue.VListItemContent(): |
| 484 | + vue.VListItemTitle("Isometric View") |
485 | 485 |
|
486 | 486 | # Display Controls Section |
487 | | - with v3.VListGroup(): |
488 | | - with v3.Template(v_slot_activator=True): |
489 | | - with v3.VListItemContent(): |
490 | | - v3.VListItemTitle("Display Options") |
491 | | - |
492 | | - with v3.VListItem(click=self.ctrl.toggle_dark_mode): |
493 | | - with v3.VListItemIcon(): |
494 | | - v3.VIcon("mdi-theme-light-dark") |
495 | | - with v3.VListItemContent(): |
496 | | - v3.VListItemTitle("Dark Mode") |
| 487 | + with vue.VListGroup(): |
| 488 | + with vue.Template(v_slot_activator=True): |
| 489 | + with vue.VListItemContent(): |
| 490 | + vue.VListItemTitle("Display Options") |
| 491 | + |
| 492 | + with vue.VListItem(click=self.ctrl.toggle_dark_mode): |
| 493 | + with vue.VListItemIcon(): |
| 494 | + vue.VIcon("mdi-theme-light-dark") |
| 495 | + with vue.VListItemContent(): |
| 496 | + vue.VListItemTitle("Dark Mode") |
497 | 497 |
|
498 | 498 | # Hide footer with trame watermark |
499 | 499 | layout.footer.hide() |
|
0 commit comments