Skip to content

Commit

Permalink
format modal
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev committed Aug 18, 2023
1 parent f0f79f6 commit 14c402a
Showing 1 changed file with 63 additions and 61 deletions.
124 changes: 63 additions & 61 deletions src/modal.html
Original file line number Diff line number Diff line change
@@ -1,66 +1,68 @@
<div>
<sly-field title="Upload To" description="Select destination project and dataset,
new project is created if it does not exist">
<sly-icon slot="icon" :options="{ color: '#2cd26e', bgColor: '#d8f8e7', rounded: false }">
<i class="zmdi zmdi-collection-video"></i>
</sly-icon>
<sly-select-team-workspace
:team-id.sync="state.teamId"
:workspace-id.sync="state.workspaceId"
:disabled="true"
/>
<div>
<sly-field
title="Upload To"
description="Select destination project and dataset (new or existing)"
>
<sly-icon
slot="icon"
:options="{ color: '#2cd26e', bgColor: '#d8f8e7', rounded: false }"
>
<i class="zmdi zmdi-collection-video"></i>
</sly-icon>

<el-select v-model="state.importMode">
<el-option key="new" label="Create new project" value="new"></el-option>
<el-option
key="project"
label="Upload to existing project"
value="project"
></el-option>
<el-option
key="dataset"
label="Upload to existing dataset"
value="dataset"
></el-option>
</el-select>
<el-select v-model="state.importMode">
<el-option key="new" label="Create new project" value="new"></el-option>
<el-option
key="project"
label="Upload to existing project"
value="project"
></el-option>
<el-option
key="dataset"
label="Upload to existing dataset"
value="dataset"
></el-option>
</el-select>

<div v-if="state.importMode === 'new'">
<sly-field
title="Result Project Name"
description="Enter project name manually (optional) or keep empty to generate it automatically"
>
<el-input
placeholder="Enter Project Name"
v-model="state.projectName"
></el-input>
</sly-field>
</div>
<div v-if="state.importMode === 'new'">
<sly-field
description="Result Project Name"
>
<el-input
placeholder="Enter Project Name"
v-model="state.projectName"
></el-input>
</sly-field>
</div>

<div v-if="state.importMode === 'project'">
<sly-select-project
:workspace-id="context.workspaceId"
:project-id.sync="state.inputProjectId"
:options="{availableTypes: ['videos']}"
></sly-select-project>
<el-input
placeholder="Enter Dataset Name"
v-model="state.datasets"
></el-input>
</div>
<div v-if="state.importMode === 'project'">
<sly-select-project
:workspace-id="context.workspaceId"
:project-id.sync="state.inputProjectId"
:options="{availableTypes: ['videos']}"
></sly-select-project>
<div>
<sly-field
description="Result Dataset name"
>
<el-input
placeholder="Enter Dataset Name"
v-model="state.datasets"
></el-input>
</sly-field>
</div>
</div>

<div v-if="state.importMode === 'dataset'">
<sly-select-project
:workspace-id="context.workspaceId"
:project-id.sync="state.inputProjectId"
:options="{availableTypes: ['videos']}"
></sly-select-project>
<sly-select-dataset
:project-id="state.inputProjectId"
:datasets.sync="state.datasets"
></sly-select-dataset>
</div>

</div>
</sly-field>
</div>
<div v-if="state.importMode === 'dataset'">
<sly-select-project
:workspace-id="context.workspaceId"
:project-id.sync="state.inputProjectId"
:options="{availableTypes: ['videos']}"
></sly-select-project>
<sly-select-dataset
:project-id="state.inputProjectId"
:datasets.sync="state.datasets"
></sly-select-dataset>
</div>
</sly-field>
</div>

0 comments on commit 14c402a

Please sign in to comment.