added image to label and duplicate names will be renamed on upload

This commit is contained in:
paul
2024-09-28 21:50:30 +05:30
parent e12d76a7bc
commit d5ba357265
6 changed files with 83 additions and 8 deletions

View File

@@ -19,7 +19,7 @@ const Themes = {
class AnalogTimePicker extends TkinterBase{
static widgetType = "analogue_timepicker"
static widgetType = "analog_timepicker"
static requiredImports = [
...TkinterBase.requiredImports,

View File

@@ -173,7 +173,7 @@ class PandasTable extends TkinterBase{
}
if (defaultTable){
code.push(`${variableName}.importCSV(${getPythonAssetPath(defaultTable, "text/csv")})`)
code.push(`${variableName}.importCSV(${getPythonAssetPath(defaultTable.name, "text/csv")})`)
}
return [

View File

@@ -65,13 +65,13 @@ class VideoPlayer extends TkinterBase{
const defaultVideo = this.getAttrValue("defaultVideo")
const play = this.getAttrValue("play")
const code = [
`${variableName} = TkinterVideo(master=${parent}, scaled=True)`,
]
if (defaultVideo){
code.push(`${variableName}.load(${getPythonAssetPath(defaultVideo, "video")})`)
code.push(`${variableName}.load(${getPythonAssetPath(defaultVideo.name, "video")})`)
}
if (play){
@@ -100,6 +100,9 @@ class VideoPlayer extends TkinterBase{
}
renderContent(){
// const defaultVideo = this.getAttrValue("defaultVideo")
return (
<div className="tw-w-flex tw-flex-col tw-w-full tw-h-full tw-rounded-md
tw-border tw-border-solid tw-border-gray-400 tw-overflow-hidden">