Spaces:
Configuration error
Configuration error
Commit
·
543dfd9
1
Parent(s):
111d106
Update Modal
Browse files
frontend/src/components/Modal/importer.js
CHANGED
@@ -44,11 +44,11 @@ export default function Import(props){
|
|
44 |
<button id="shared-sub-tab" data-tabs-target="#Gradio" type="button" role="tab" aria-controls="shared-gradio" aria-selected={tab === "gradio" ? "true" : "false"} className={`inline-block p-4 px-6 text-base font-sans font-bold ${subTab === 1 ? 'bg-gray-300' : '' } hover:bg-gray-300 `}>Shared</button>
|
45 |
</li>
|
46 |
</ul>
|
47 |
-
{subTab === 0 && <
|
48 |
{subTab === 1 && <Shared textHandler={props.textHandler} appendHandler={props.appendHandler} />}
|
49 |
|
50 |
{props.catch && <div className='p-5'>
|
51 |
-
<Message negative>
|
52 |
<Message.Header className=" text-lg text-center">🚫 Something went wrong...</Message.Header>
|
53 |
<br/>
|
54 |
<h1 className=" underline pb-3 font-bold text-lg">🤔 Possible Things That could of happen <br/></h1>
|
@@ -73,6 +73,22 @@ export default function Import(props){
|
|
73 |
</div>)
|
74 |
}
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
function Shared(props){
|
77 |
const [preview, setPreview] = useState("")
|
78 |
const [fetchable, setFetch] = useState(false)
|
@@ -92,8 +108,11 @@ function Shared(props){
|
|
92 |
}
|
93 |
|
94 |
return (
|
95 |
-
<div className='w-full shadow-lg'
|
96 |
-
|
|
|
|
|
|
|
97 |
<div className={`flex items-center rounded-md bg-light-white mt-6 border-dashed`}>
|
98 |
<label className="relative block w-full p-5 focus:shadow-xl">
|
99 |
<span className={`absolute inset-y-0 left-0 flex items-center pl-8`}>
|
@@ -112,8 +131,10 @@ function Shared(props){
|
|
112 |
</div>
|
113 |
{ fetchable === true && <div className=' w-full'>
|
114 |
<h1 className=' text-xl font-sans font-bold text-center text-black mb-2'> Preview </h1>
|
115 |
-
<div className='p-
|
116 |
-
<
|
|
|
|
|
117 |
</div>
|
118 |
</div>}
|
119 |
<div className={`flex items-center rounded-md bg-light-white mt-6 border-dashed`}>
|
@@ -131,7 +152,7 @@ function Shared(props){
|
|
131 |
/>
|
132 |
</label>
|
133 |
</div>
|
134 |
-
<div className=' ml-
|
135 |
<button className="relative inline-flex justify-center p-0.5 mb-2 mr-2 overflow-hidden text-sm font-sans font-bold text-gray-900 rounded-lg group bg-gradient-to-br from-purple-600 to-blue-500 group-hover:from-purple-600 group-hover:to-blue-500 hover:text-white dark:text-white focus:ring-4 focus:outline-none focus:ring-blue-300 dark:focus:ring-blue-800"
|
136 |
onClick={()=>{props.appendHandler()}}>
|
137 |
<span className="relative px-5 py-2.5 transition-all ease-in duration-75 bg-white dark:bg-gray-900 rounded-md group-hover:bg-opacity-0">
|
@@ -139,6 +160,8 @@ function Shared(props){
|
|
139 |
</span>
|
140 |
</button>
|
141 |
</div>
|
|
|
|
|
142 |
</div>
|
143 |
|
144 |
)
|
|
|
44 |
<button id="shared-sub-tab" data-tabs-target="#Gradio" type="button" role="tab" aria-controls="shared-gradio" aria-selected={tab === "gradio" ? "true" : "false"} className={`inline-block p-4 px-6 text-base font-sans font-bold ${subTab === 1 ? 'bg-gray-300' : '' } hover:bg-gray-300 `}>Shared</button>
|
45 |
</li>
|
46 |
</ul>
|
47 |
+
{subTab === 0 && <Local/>}
|
48 |
{subTab === 1 && <Shared textHandler={props.textHandler} appendHandler={props.appendHandler} />}
|
49 |
|
50 |
{props.catch && <div className='p-5'>
|
51 |
+
<Message floating negative>
|
52 |
<Message.Header className=" text-lg text-center">🚫 Something went wrong...</Message.Header>
|
53 |
<br/>
|
54 |
<h1 className=" underline pb-3 font-bold text-lg">🤔 Possible Things That could of happen <br/></h1>
|
|
|
73 |
</div>)
|
74 |
}
|
75 |
|
76 |
+
function Local(props){
|
77 |
+
return (
|
78 |
+
<div className='p-5'>
|
79 |
+
<Message floating color=''>
|
80 |
+
|
81 |
+
<Message.Header>🏗️ Comming soon...</Message.Header>
|
82 |
+
<Message.Content className='p-5'>
|
83 |
+
This tab will allow you grab your function from a given directory and build
|
84 |
+
your own tabular module gradio functions
|
85 |
+
</Message.Content>
|
86 |
+
|
87 |
+
</Message>
|
88 |
+
</div>
|
89 |
+
)
|
90 |
+
}
|
91 |
+
|
92 |
function Shared(props){
|
93 |
const [preview, setPreview] = useState("")
|
94 |
const [fetchable, setFetch] = useState(false)
|
|
|
108 |
}
|
109 |
|
110 |
return (
|
111 |
+
<div className='w-full shadow-lg' onKeyPress={(e)=>{
|
112 |
+
if (e.key.includes("Enter")) props.appendHandler()
|
113 |
+
}}>
|
114 |
+
<div className='p-5'>
|
115 |
+
<Message color='' floating>
|
116 |
<div className={`flex items-center rounded-md bg-light-white mt-6 border-dashed`}>
|
117 |
<label className="relative block w-full p-5 focus:shadow-xl">
|
118 |
<span className={`absolute inset-y-0 left-0 flex items-center pl-8`}>
|
|
|
131 |
</div>
|
132 |
{ fetchable === true && <div className=' w-full'>
|
133 |
<h1 className=' text-xl font-sans font-bold text-center text-black mb-2'> Preview </h1>
|
134 |
+
<div className='p-3 px-1 w-3/4 h-80 bg-gray-200 mr-auto ml-auto rounded-xl'>
|
135 |
+
<div className='w-full h-full overflow-hidden relative -ml-[5px]'>
|
136 |
+
<iframe title='Preview' src={preview} className=' absolute top-0 bottom-0 left-0 -right-[25px] overflow-y-scroll w-full h-full mr-auto ml-auto'/>
|
137 |
+
</div>
|
138 |
</div>
|
139 |
</div>}
|
140 |
<div className={`flex items-center rounded-md bg-light-white mt-6 border-dashed`}>
|
|
|
152 |
/>
|
153 |
</label>
|
154 |
</div>
|
155 |
+
<div className=' right-0 ml-5'>
|
156 |
<button className="relative inline-flex justify-center p-0.5 mb-2 mr-2 overflow-hidden text-sm font-sans font-bold text-gray-900 rounded-lg group bg-gradient-to-br from-purple-600 to-blue-500 group-hover:from-purple-600 group-hover:to-blue-500 hover:text-white dark:text-white focus:ring-4 focus:outline-none focus:ring-blue-300 dark:focus:ring-blue-800"
|
157 |
onClick={()=>{props.appendHandler()}}>
|
158 |
<span className="relative px-5 py-2.5 transition-all ease-in duration-75 bg-white dark:bg-gray-900 rounded-md group-hover:bg-opacity-0">
|
|
|
160 |
</span>
|
161 |
</button>
|
162 |
</div>
|
163 |
+
</Message>
|
164 |
+
</div>
|
165 |
</div>
|
166 |
|
167 |
)
|
frontend/src/css/dist/output.css
CHANGED
@@ -583,6 +583,10 @@ video {
|
|
583 |
}
|
584 |
}
|
585 |
|
|
|
|
|
|
|
|
|
586 |
.visible {
|
587 |
visibility: visible;
|
588 |
}
|
@@ -644,6 +648,38 @@ video {
|
|
644 |
top: 1rem;
|
645 |
}
|
646 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
647 |
.z-20 {
|
648 |
z-index: 20;
|
649 |
}
|
@@ -676,18 +712,6 @@ video {
|
|
676 |
margin: 0px;
|
677 |
}
|
678 |
|
679 |
-
.m-3 {
|
680 |
-
margin: 0.75rem;
|
681 |
-
}
|
682 |
-
|
683 |
-
.m-1 {
|
684 |
-
margin: 0.25rem;
|
685 |
-
}
|
686 |
-
|
687 |
-
.m-0\.5 {
|
688 |
-
margin: 0.125rem;
|
689 |
-
}
|
690 |
-
|
691 |
.mr-2 {
|
692 |
margin-right: 0.5rem;
|
693 |
}
|
@@ -700,28 +724,28 @@ video {
|
|
700 |
margin-top: 1.5rem;
|
701 |
}
|
702 |
|
703 |
-
.ml-4 {
|
704 |
-
margin-left: 1rem;
|
705 |
-
}
|
706 |
-
|
707 |
.mb-2 {
|
708 |
margin-bottom: 0.5rem;
|
709 |
}
|
710 |
|
711 |
-
.
|
712 |
-
margin-
|
713 |
-
}
|
714 |
-
|
715 |
-
.-mt-2 {
|
716 |
-
margin-top: -0.5rem;
|
717 |
}
|
718 |
|
719 |
.ml-auto {
|
720 |
margin-left: auto;
|
721 |
}
|
722 |
|
723 |
-
.
|
724 |
-
margin-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
725 |
}
|
726 |
|
727 |
.-mt-3 {
|
@@ -732,6 +756,70 @@ video {
|
|
732 |
margin-top: 0.25rem;
|
733 |
}
|
734 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
735 |
.block {
|
736 |
display: block;
|
737 |
}
|
@@ -760,6 +848,10 @@ video {
|
|
760 |
height: 20px;
|
761 |
}
|
762 |
|
|
|
|
|
|
|
|
|
763 |
.h-screen {
|
764 |
height: 100vh;
|
765 |
}
|
@@ -788,22 +880,6 @@ video {
|
|
788 |
height: 41px;
|
789 |
}
|
790 |
|
791 |
-
.h-60 {
|
792 |
-
height: 15rem;
|
793 |
-
}
|
794 |
-
|
795 |
-
.h-80 {
|
796 |
-
height: 20rem;
|
797 |
-
}
|
798 |
-
|
799 |
-
.h-\[10px\] {
|
800 |
-
height: 10px;
|
801 |
-
}
|
802 |
-
|
803 |
-
.h-\[30px\] {
|
804 |
-
height: 30px;
|
805 |
-
}
|
806 |
-
|
807 |
.w-full {
|
808 |
width: 100%;
|
809 |
}
|
@@ -816,6 +892,10 @@ video {
|
|
816 |
width: 20px;
|
817 |
}
|
818 |
|
|
|
|
|
|
|
|
|
819 |
.w-10 {
|
820 |
width: 2.5rem;
|
821 |
}
|
@@ -852,34 +932,6 @@ video {
|
|
852 |
width: 100vw;
|
853 |
}
|
854 |
|
855 |
-
.w-1\/2 {
|
856 |
-
width: 50%;
|
857 |
-
}
|
858 |
-
|
859 |
-
.w-3\/4 {
|
860 |
-
width: 75%;
|
861 |
-
}
|
862 |
-
|
863 |
-
.w-\[90\%\] {
|
864 |
-
width: 90%;
|
865 |
-
}
|
866 |
-
|
867 |
-
.w-\[98\%\] {
|
868 |
-
width: 98%;
|
869 |
-
}
|
870 |
-
|
871 |
-
.w-\[100\%\] {
|
872 |
-
width: 100%;
|
873 |
-
}
|
874 |
-
|
875 |
-
.w-\[10px\] {
|
876 |
-
width: 10px;
|
877 |
-
}
|
878 |
-
|
879 |
-
.w-\[30px\] {
|
880 |
-
width: 30px;
|
881 |
-
}
|
882 |
-
|
883 |
.max-w-full {
|
884 |
max-width: 100%;
|
885 |
}
|
@@ -969,6 +1021,26 @@ video {
|
|
969 |
overflow: hidden;
|
970 |
}
|
971 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
972 |
.break-all {
|
973 |
word-break: break-all;
|
974 |
}
|
@@ -985,16 +1057,12 @@ video {
|
|
985 |
border-radius: 0.375rem;
|
986 |
}
|
987 |
|
988 |
-
.rounded-full {
|
989 |
-
border-radius: 9999px;
|
990 |
-
}
|
991 |
-
|
992 |
.rounded-xl {
|
993 |
border-radius: 0.75rem;
|
994 |
}
|
995 |
|
996 |
-
.rounded-
|
997 |
-
border-radius:
|
998 |
}
|
999 |
|
1000 |
.rounded-t-lg {
|
@@ -1129,11 +1197,6 @@ video {
|
|
1129 |
background-color: rgb(254 169 89 / var(--tw-bg-opacity));
|
1130 |
}
|
1131 |
|
1132 |
-
.bg-gray-400 {
|
1133 |
-
--tw-bg-opacity: 1;
|
1134 |
-
background-color: rgb(156 163 175 / var(--tw-bg-opacity));
|
1135 |
-
}
|
1136 |
-
|
1137 |
.bg-gradient-to-bl {
|
1138 |
background-image: linear-gradient(to bottom left, var(--tw-gradient-stops));
|
1139 |
}
|
@@ -1463,16 +1526,16 @@ video {
|
|
1463 |
line-height: 1.75rem;
|
1464 |
}
|
1465 |
|
1466 |
-
.text-4xl {
|
1467 |
-
font-size: 2.25rem;
|
1468 |
-
line-height: 2.5rem;
|
1469 |
-
}
|
1470 |
-
|
1471 |
.text-xl {
|
1472 |
font-size: 1.25rem;
|
1473 |
line-height: 1.75rem;
|
1474 |
}
|
1475 |
|
|
|
|
|
|
|
|
|
|
|
1476 |
.text-3xl {
|
1477 |
font-size: 1.875rem;
|
1478 |
line-height: 2.25rem;
|
|
|
583 |
}
|
584 |
}
|
585 |
|
586 |
+
.pointer-events-none {
|
587 |
+
pointer-events: none;
|
588 |
+
}
|
589 |
+
|
590 |
.visible {
|
591 |
visibility: visible;
|
592 |
}
|
|
|
648 |
top: 1rem;
|
649 |
}
|
650 |
|
651 |
+
.-right-4 {
|
652 |
+
right: -1rem;
|
653 |
+
}
|
654 |
+
|
655 |
+
.-right-\[17px\] {
|
656 |
+
right: -17px;
|
657 |
+
}
|
658 |
+
|
659 |
+
.-right-\[20px\] {
|
660 |
+
right: -20px;
|
661 |
+
}
|
662 |
+
|
663 |
+
.-right-\[30px\] {
|
664 |
+
right: -30px;
|
665 |
+
}
|
666 |
+
|
667 |
+
.-right-\[28px\] {
|
668 |
+
right: -28px;
|
669 |
+
}
|
670 |
+
|
671 |
+
.-right-\[25px\] {
|
672 |
+
right: -25px;
|
673 |
+
}
|
674 |
+
|
675 |
+
.-right-\[22px\] {
|
676 |
+
right: -22px;
|
677 |
+
}
|
678 |
+
|
679 |
+
.-right-\[23px\] {
|
680 |
+
right: -23px;
|
681 |
+
}
|
682 |
+
|
683 |
.z-20 {
|
684 |
z-index: 20;
|
685 |
}
|
|
|
712 |
margin: 0px;
|
713 |
}
|
714 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
715 |
.mr-2 {
|
716 |
margin-right: 0.5rem;
|
717 |
}
|
|
|
724 |
margin-top: 1.5rem;
|
725 |
}
|
726 |
|
|
|
|
|
|
|
|
|
727 |
.mb-2 {
|
728 |
margin-bottom: 0.5rem;
|
729 |
}
|
730 |
|
731 |
+
.mr-auto {
|
732 |
+
margin-right: auto;
|
|
|
|
|
|
|
|
|
733 |
}
|
734 |
|
735 |
.ml-auto {
|
736 |
margin-left: auto;
|
737 |
}
|
738 |
|
739 |
+
.ml-4 {
|
740 |
+
margin-left: 1rem;
|
741 |
+
}
|
742 |
+
|
743 |
+
.mt-4 {
|
744 |
+
margin-top: 1rem;
|
745 |
+
}
|
746 |
+
|
747 |
+
.-mt-2 {
|
748 |
+
margin-top: -0.5rem;
|
749 |
}
|
750 |
|
751 |
.-mt-3 {
|
|
|
756 |
margin-top: 0.25rem;
|
757 |
}
|
758 |
|
759 |
+
.mr-3 {
|
760 |
+
margin-right: 0.75rem;
|
761 |
+
}
|
762 |
+
|
763 |
+
.mr-4 {
|
764 |
+
margin-right: 1rem;
|
765 |
+
}
|
766 |
+
|
767 |
+
.-ml-2 {
|
768 |
+
margin-left: -0.5rem;
|
769 |
+
}
|
770 |
+
|
771 |
+
.-ml-3 {
|
772 |
+
margin-left: -0.75rem;
|
773 |
+
}
|
774 |
+
|
775 |
+
.-ml-1 {
|
776 |
+
margin-left: -0.25rem;
|
777 |
+
}
|
778 |
+
|
779 |
+
.-ml-0 {
|
780 |
+
margin-left: -0px;
|
781 |
+
}
|
782 |
+
|
783 |
+
.-ml-\[8px\] {
|
784 |
+
margin-left: -8px;
|
785 |
+
}
|
786 |
+
|
787 |
+
.-ml-\[10px\] {
|
788 |
+
margin-left: -10px;
|
789 |
+
}
|
790 |
+
|
791 |
+
.-ml-\[4px\] {
|
792 |
+
margin-left: -4px;
|
793 |
+
}
|
794 |
+
|
795 |
+
.-ml-\[5px\] {
|
796 |
+
margin-left: -5px;
|
797 |
+
}
|
798 |
+
|
799 |
+
.ml-96 {
|
800 |
+
margin-left: 24rem;
|
801 |
+
}
|
802 |
+
|
803 |
+
.ml-\[30rem\] {
|
804 |
+
margin-left: 30rem;
|
805 |
+
}
|
806 |
+
|
807 |
+
.ml-\[46rem\] {
|
808 |
+
margin-left: 46rem;
|
809 |
+
}
|
810 |
+
|
811 |
+
.ml-\[40rem\] {
|
812 |
+
margin-left: 40rem;
|
813 |
+
}
|
814 |
+
|
815 |
+
.ml-\[44rem\] {
|
816 |
+
margin-left: 44rem;
|
817 |
+
}
|
818 |
+
|
819 |
+
.ml-5 {
|
820 |
+
margin-left: 1.25rem;
|
821 |
+
}
|
822 |
+
|
823 |
.block {
|
824 |
display: block;
|
825 |
}
|
|
|
848 |
height: 20px;
|
849 |
}
|
850 |
|
851 |
+
.h-80 {
|
852 |
+
height: 20rem;
|
853 |
+
}
|
854 |
+
|
855 |
.h-screen {
|
856 |
height: 100vh;
|
857 |
}
|
|
|
880 |
height: 41px;
|
881 |
}
|
882 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
883 |
.w-full {
|
884 |
width: 100%;
|
885 |
}
|
|
|
892 |
width: 20px;
|
893 |
}
|
894 |
|
895 |
+
.w-3\/4 {
|
896 |
+
width: 75%;
|
897 |
+
}
|
898 |
+
|
899 |
.w-10 {
|
900 |
width: 2.5rem;
|
901 |
}
|
|
|
932 |
width: 100vw;
|
933 |
}
|
934 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
935 |
.max-w-full {
|
936 |
max-width: 100%;
|
937 |
}
|
|
|
1021 |
overflow: hidden;
|
1022 |
}
|
1023 |
|
1024 |
+
.overflow-scroll {
|
1025 |
+
overflow: scroll;
|
1026 |
+
}
|
1027 |
+
|
1028 |
+
.overflow-y-auto {
|
1029 |
+
overflow-y: auto;
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
.overflow-x-hidden {
|
1033 |
+
overflow-x: hidden;
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
.overflow-y-hidden {
|
1037 |
+
overflow-y: hidden;
|
1038 |
+
}
|
1039 |
+
|
1040 |
+
.overflow-y-scroll {
|
1041 |
+
overflow-y: scroll;
|
1042 |
+
}
|
1043 |
+
|
1044 |
.break-all {
|
1045 |
word-break: break-all;
|
1046 |
}
|
|
|
1057 |
border-radius: 0.375rem;
|
1058 |
}
|
1059 |
|
|
|
|
|
|
|
|
|
1060 |
.rounded-xl {
|
1061 |
border-radius: 0.75rem;
|
1062 |
}
|
1063 |
|
1064 |
+
.rounded-full {
|
1065 |
+
border-radius: 9999px;
|
1066 |
}
|
1067 |
|
1068 |
.rounded-t-lg {
|
|
|
1197 |
background-color: rgb(254 169 89 / var(--tw-bg-opacity));
|
1198 |
}
|
1199 |
|
|
|
|
|
|
|
|
|
|
|
1200 |
.bg-gradient-to-bl {
|
1201 |
background-image: linear-gradient(to bottom left, var(--tw-gradient-stops));
|
1202 |
}
|
|
|
1526 |
line-height: 1.75rem;
|
1527 |
}
|
1528 |
|
|
|
|
|
|
|
|
|
|
|
1529 |
.text-xl {
|
1530 |
font-size: 1.25rem;
|
1531 |
line-height: 1.75rem;
|
1532 |
}
|
1533 |
|
1534 |
+
.text-4xl {
|
1535 |
+
font-size: 2.25rem;
|
1536 |
+
line-height: 2.5rem;
|
1537 |
+
}
|
1538 |
+
|
1539 |
.text-3xl {
|
1540 |
font-size: 1.875rem;
|
1541 |
line-height: 2.25rem;
|