Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: some customization

Ramesh Mane8509aff2e736
diff --git a/packages/nc-gui/components/nc/form-builder/index.vue b/packages/nc-gui/components/nc/form-builder/index.vue
index 3112ef81ae..20547e7df3 100644
--- a/packages/nc-gui/components/nc/form-builder/index.vue
+++ b/packages/nc-gui/components/nc/form-builder/index.vue
@@ -30,8 +30,8 @@ const selectMode = (field: FormBuilderElement) => {
return field.selectMode === 'multipleWithInput' || field.selectMode === 'singleWithInput'
? 'tags'
: field.selectMode === 'multiple'
- ? 'multiple'
- : undefined
+ ? 'multiple'
+ : undefined
}
const haveIntegrationInput = computed(() => {
@@ -204,44 +204,28 @@ watch(
<div class="nc-form-section">
<div v-if="category !== FORM_BUILDER_NON_CATEGORIZED" class="nc-form-section-title">{{ category }}</div>
<div class="nc-form-section-body-grid">
- <template
- v-for="(field, fieldIndex) in formElementsCategorized[category]"
- :key="field.model || `space-${fieldIndex}`"
- >
+ <template v-for="(field, fieldIndex) in formElementsCategorized[category]"
+ :key="field.model || `space-${fieldIndex}`">
<template v-if="field.type === FormBuilderInputType.Space">
- <div
- :style="{
- gridColumn: `span ${field.span || 24}`,
- }"
- ></div>
+ <div :style="{
+ gridColumn: `span ${field.span || 24}`,
+ }"></div>
</template>
<template v-else>
<!-- Group toggle button (shown before first field in a collapsible group) -->
- <div
- v-if="
- field.group &&
- isGroupCollapsibleInCategory(category, field.group) &&
- (fieldIndex === 0 || formElementsCategorized[category][fieldIndex - 1]?.group !== field.group)
- "
- class="nc-group-toggle"
- :style="{ gridColumn: 'span 24' }"
- >
- <NcButton
- type="text"
- size="small"
- class="!text-nc-content-gray"
- @click="toggleGroup(`${category}-${field.group}`)"
- >
+ <div v-if="
+ field.group &&
+ isGroupCollapsibleInCategory(category, field.group) &&
+ (fieldIndex === 0 || formElementsCategorized[category][fieldIndex - 1]?.group !== field.group)
+ " class="nc-group-toggle" :style="{ gridColumn: 'span 24' }">
+ <NcButton type="text" size="small" class="!text-nc-content-gray"
+ @click="toggleGroup(`${category}-${field.group}`)">
<div class="flex items-center gap-2">
- <GeneralIcon
- :icon="
- isGroupCollapsed(`${category}-${field.group}`, getGroupDefaultCollapsed(category, field.group))
- ? 'ncChevronDown'
- : 'ncChevronUp'
- "
- class="flex-none"
- />
+ <GeneralIcon :icon="isGroupCollapsed(`${category}-${field.group}`, getGroupDefaultCollapsed(category, field.group))
+ ? 'ncChevronDown'
+ : 'ncChevronUp'
+ " class="flex-none" />
<span>{{
isGroupCollapsed(`${category}-${field.group}`, getGroupDefaultCollapsed(category, field.group))
? field.groupLabel || $t('general.showMore')
@@ -252,36 +236,26 @@ watch(
</div>
<!-- Regular form field -->
- <a-form-item
- v-if="
- !field.group ||
- !isGroupCollapsibleInCategory(category, field.group) ||
- !isGroupCollapsed(`${category}-${field.group}`, getGroupDefaultCollapsed(category, field.group))
- "
- v-bind="validateInfos[field.model]"
- class="nc-form-item"
- :style="{
- gridColumn: `span ${field.span || 24}`,
- }"
- :required="false"
- :data-testid="`nc-form-input-${field.model}`"
- >
- <template v-if="![FormBuilderInputType.Switch, FormBuilderInputType.Checkbox].includes(field.type)" #label>
+ <a-form-item v-if="
+ !field.group ||
+ !isGroupCollapsibleInCategory(category, field.group) ||
+ !isGroupCollapsed(`${category}-${field.group}`, getGroupDefaultCollapsed(category, field.group))
+ " v-bind="validateInfos[field.model]" class="nc-form-item" :style="{
+ gridColumn: `span ${field.span || 24}`,
+ }" :required="false" :data-testid="`nc-form-input-${field.model}`">
+ <template v-if="![FormBuilderInputType.Switch, FormBuilderInputType.Checkbox].includes(field.type)"
+ #label>
<div class="flex items-center gap-1 w-full">
<div class="flex-1 flex items-center gap-1">
<span>{{ field.label }}</span>
- <span
- v-if="
- field.required &&
- ![
- FormBuilderInputType.Select,
- FormBuilderInputType.SelectIntegration,
- FormBuilderInputType.SelectBase,
- ].includes(field.type)
- "
- class="text-nc-content-red-medium"
- >*</span
- >
+ <span v-if="
+ field.required &&
+ ![
+ FormBuilderInputType.Select,
+ FormBuilderInputType.SelectIntegration,
+ FormBuilderInputType.SelectBase,
+ ].includes(field.type)
+ " class="text-nc-content-red-medium">*</span>
<NcTooltip v-if="field.helpText && field.showHintAsTooltip">
<template #title>
<div class="text-xs">
@@ -292,77 +266,51 @@ watch(
</NcTooltip>
</div>
- <a
- v-if="field.docsLink"
- :href="field.docsLink"
- target="_blank"
- rel="noopener noreferrer"
- class="text-xs justify-self-end no-underline hover:underline"
- >
+ <a v-if="field.docsLink" :href="field.docsLink" target="_blank" rel="noopener noreferrer"
+ class="text-xs justify-self-end no-underline hover:underline">
{{ $t('title.docs') }}
</a>
</div>
</template>
<template v-if="field.type === FormBuilderInputType.Input">
- <a-input
- autocomplete="off"
- class="!w-full"
- :disabled="disabled"
- :value="deepReference(field.model)"
- :placeholder="field.placeholder"
- @update:value="setFormStateWithEmit(field.model, $event)"
- />
+ <a-input autocomplete="off" class="!w-full" :disabled="disabled" :value="deepReference(field.model)"
+ :placeholder="field.placeholder" @update:value="setFormStateWithEmit(field.model, $event)">
+
+ <!-- Todo: @rameshmane7218 slots customization -->
+ <!-- <template v-if="$slots[getValidSlotName(field.model, 'prefix')]" #prefix>
+ <slot :name="getValidSlotName(field.model, 'prefix')" />
+ </template>
+<template v-if="$slots[getValidSlotName(field.model, 'suffix')]" #suffix>
+ <slot :name="getValidSlotName(field.model, 'suffix')" />
+ </template> -->
+ </a-input>
</template>
<template v-else-if="field.type === FormBuilderInputType.Textarea">
- <a-textarea
- class="!w-full !rounded-lg !text-sm !min-h-[90px] max-h-[500px] nc-scrollbar-thin"
- size="large"
- hide-details
- :value="deepReference(field.model)"
- :placeholder="field.placeholder"
- @update:value="setFormStateWithEmit(field.model, $event)"
- />
+ <a-textarea class="!w-full !rounded-lg !text-sm !min-h-[90px] max-h-[500px] nc-scrollbar-thin"
+ size="large" hide-details :value="deepReference(field.model)" :placeholder="field.placeholder"
+ @update:value="setFormStateWithEmit(field.model, $event)" />
</template>
<template v-else-if="field.type === FormBuilderInputType.Number">
- <a-input-number
- autocomplete="off"
- class="!w-full !rounded-lg"
- :controls="false"
- :disabled="disabled"
- :value="deepReference(field.model)"
- :placeholder="field.placeholder"
- @update:value="setFormStateWithEmit(field.model, $event)"
- />
+ <a-input-number autocomplete="off" class="!w-full !rounded-lg" :controls="false"
+ :disabled="disabled" :value="deepReference(field.model)" :placeholder="field.placeholder"
+ @update:value="setFormStateWithEmit(field.model, $event)" />
</template>
<template v-else-if="field.type === FormBuilderInputType.Password">
- <a-input-password
- readonly
- :disabled="disabled"
- onfocus="this.removeAttribute('readonly');"
- onblur="this.setAttribute('readonly', true);"
- autocomplete="off"
- :value="deepReference(field.model)"
- :placeholder="field.placeholder"
- @update:value="setFormStateWithEmit(field.model, $event)"
- />
+ <a-input-password readonly :disabled="disabled" onfocus="this.removeAttribute('readonly');"
+ onblur="this.setAttribute('readonly', true);" autocomplete="off"
+ :value="deepReference(field.model)" :placeholder="field.placeholder"
+ @update:value="setFormStateWithEmit(field.model, $event)" />
</template>
<template v-else-if="field.type === FormBuilderInputType.Select">
<NcFormBuilderInputMountedWrapper @mounted="loadOptions(field)">
- <NcSelect
- :disabled="disabled"
- :value="getSelectValue(field)"
- :mode="selectMode(field)"
- :max-tag-count="field.selectMode === 'singleWithInput' ? 1 : undefined"
- show-search
+ <NcSelect :disabled="disabled" :value="getSelectValue(field)" :mode="selectMode(field)"
+ :max-tag-count="field.selectMode === 'singleWithInput' ? 1 : undefined" show-search
:placeholder="field.placeholder"
:loading="field.fetchOptionsKey && getIsLoadingFieldOptions(field.model)"
- @update:value="handleSelectChange(field, $event)"
- >
+ @update:value="handleSelectChange(field, $event)">
<a-select-option
v-for="option in field.fetchOptionsKey ? getFieldOptions(field.model) : field.options"
- :key="option.value"
- :value="option.value"
- >
+ :key="option.value" :value="option.value">
<div class="w-full flex gap-2 items-center" :data-testid="option.value">
<GeneralIcon v-if="option.icon" :icon="option.icon" class="flex-none h-4 w-4" />
<NcTooltip class="flex-1 truncate min-w-0" show-on-truncate-only>
@@ -371,16 +319,11 @@ watch(
</template>
{{ option.label }}
</NcTooltip>
- <component
- :is="iconMap.check"
- v-if="
- ncIsArray(getSelectValue(field))
- ? getSelectValue(field).includes(option.value)
- : getSelectValue(field) === option.value
- "
- id="nc-selected-item-icon"
- class="text-nc-content-brand w-4 h-4"
- />
+ <component :is="iconMap.check" v-if="
+ ncIsArray(getSelectValue(field))
+ ? getSelectValue(field).includes(option.value)
+ : getSelectValue(field) === option.value
+ " id="nc-selected-item-icon" class="text-nc-content-brand w-4 h-4" />
</div>
</a-select-option>
</NcSelect>
@@ -389,11 +332,8 @@ watch(
<template v-else-if="field.type === FormBuilderInputType.Switch">
<div class="flex flex-col px-2" :class="field.border ? 'border-1 rounded-lg shadow' : ''">
<div class="flex items-center aa">
- <NcSwitch
- :disabled="disabled"
- :checked="!!deepReference(field.model)"
- @update:checked="setFormStateWithEmit(field.model, $event)"
- />
+ <NcSwitch :disabled="disabled" :checked="!!deepReference(field.model)"
+ @update:checked="setFormStateWithEmit(field.model, $event)" />
<span class="ml-[6px] font-bold">{{ field.label }}</span>
<NcTooltip v-if="field.helpText">
<template #title>
@@ -410,25 +350,15 @@ watch(
</div>
</template>
<template v-else-if="field.type === FormBuilderInputType.SelectIntegration">
- <a-select
- :value="deepReference(field.model)"
- :options="integrationOptions[field.model]"
- dropdown-match-select-width
- class="nc-select nc-select-shadow"
- placeholder="Select Integration"
- allow-clear
- :disabled="disabled"
- show-search
- @update:value="setFormStateWithEmit(field.model, $event)"
- >
+ <a-select :value="deepReference(field.model)" :options="integrationOptions[field.model]"
+ dropdown-match-select-width class="nc-select nc-select-shadow" placeholder="Select Integration"
+ allow-clear :disabled="disabled" show-search
+ @update:value="setFormStateWithEmit(field.model, $event)">
<template #suffixIcon>
<GeneralIcon icon="ncChevronDown" class="text-nc-content-gray-muted" />
</template>
- <a-select-option
- v-for="integration in filteredIntegrations[field.model]"
- :key="integration.id"
- :value="integration.id"
- >
+ <a-select-option v-for="integration in filteredIntegrations[field.model]" :key="integration.id"
+ :value="integration.id">
<div class="w-full flex gap-2 items-center" :data-testid="integration.title">
<GeneralIntegrationIcon v-if="integration?.sub_type" :type="integration.sub_type" />
<NcTooltip class="flex-1 truncate" show-on-truncate-only>
@@ -437,23 +367,16 @@ watch(
</template>
{{ integration.title }}
</NcTooltip>
- <component
- :is="iconMap.check"
- v-if="formState.fk_integration_id === integration.id"
- id="nc-selected-item-icon"
- class="text-nc-content-brand w-4 h-4"
- />
+ <component :is="iconMap.check" v-if="formState.fk_integration_id === integration.id"
+ id="nc-selected-item-icon" class="text-nc-content-brand w-4 h-4" />
</div>
</a-select-option>
<template #dropdownRender="{ menuNode: menu }">
<component :is="menu" />
<a-divider style="margin: 4px 0" />
- <div
- class="px-1.5 flex items-center text-nc-content-brand text-sm cursor-pointer"
- @mousedown.prevent
- @click="handleAddNewConnection(field)"
- >
+ <div class="px-1.5 flex items-center text-nc-content-brand text-sm cursor-pointer"
+ @mousedown.prevent @click="handleAddNewConnection(field)">
<div class="w-full flex items-center gap-2 px-2 py-2 rounded-md hover:bg-nc-bg-gray-light">
<GeneralIcon icon="plus" class="flex-none" />
{{ $t('general.new') }} {{ $t('general.connection').toLowerCase() }}
@@ -463,59 +386,39 @@ watch(
</a-select>
</template>
<template v-else-if="field.type === FormBuilderInputType.SelectBase">
- <NcFormBuilderInputSelectBase
- :value="deepReference(field.model)"
- :disabled="disabled"
- @update:value="setFormStateWithEmit(field.model, $event)"
- />
+ <NcFormBuilderInputSelectBase :value="deepReference(field.model)" :disabled="disabled"
+ @update:value="setFormStateWithEmit(field.model, $event)" />
</template>
<template v-else-if="field.type === FormBuilderInputType.SelectTable">
<NcFormBuilderInputMountedWrapper @mounted="loadOptions(field)">
- <NcFormBuilderInputSelectTable
- :multiple="field?.selectMode === 'multiple'"
- :value="deepReference(field.model)"
- :disabled="disabled"
- :options="getFieldOptions(field.model)"
- @update:value="setFormStateWithEmit(field.model, $event)"
- />
+ <NcFormBuilderInputSelectTable :multiple="field?.selectMode === 'multiple'"
+ :value="deepReference(field.model)" :disabled="disabled" :options="getFieldOptions(field.model)"
+ @update:value="setFormStateWithEmit(field.model, $event)" />
</NcFormBuilderInputMountedWrapper>
</template>
<template v-else-if="field.type === FormBuilderInputType.SelectView">
<NcFormBuilderInputMountedWrapper @mounted="loadOptions(field)">
- <NcFormBuilderInputSelectView
- :multiple="field?.selectMode === 'multiple'"
- :value="deepReference(field.model)"
- :disabled="disabled"
- :options="getFieldOptions(field.model)"
- @update:value="setFormStateWithEmit(field.model, $event)"
- />
+ <NcFormBuilderInputSelectView :multiple="field?.selectMode === 'multiple'"
+ :value="deepReference(field.model)" :disabled="disabled" :options="getFieldOptions(field.model)"
+ @update:value="setFormStateWithEmit(field.model, $event)" />
</NcFormBuilderInputMountedWrapper>
</template>
<template v-else-if="field.type === FormBuilderInputType.SelectField">
<NcFormBuilderInputMountedWrapper @mounted="loadOptions(field)">
- <NcFormBuilderInputSelectField
- :multiple="field?.selectMode === 'multiple'"
- :value="deepReference(field.model)"
- :disabled="disabled"
- :options="getFieldOptions(field.model)"
- @update:value="setFormStateWithEmit(field.model, $event)"
- />
+ <NcFormBuilderInputSelectField :multiple="field?.selectMode === 'multiple'"
+ :value="deepReference(field.model)" :disabled="disabled" :options="getFieldOptions(field.model)"
+ @update:value="setFormStateWithEmit(field.model, $event)" />
</NcFormBuilderInputMountedWrapper>
</template>
<template v-else-if="field.type === FormBuilderInputType.OAuth">
- <NcFormBuilderInputOAuth
- :value="deepReference(field.model)"
- :element="field"
- :have-value="!!deepReference(field.model)"
- :form-data="formState"
- @update:value="setFormStateWithEmit(field.model, $event)"
- />
+ <NcFormBuilderInputOAuth :value="deepReference(field.model)" :element="field"
+ :have-value="!!deepReference(field.model)" :form-data="formState"
+ @update:value="setFormStateWithEmit(field.model, $event)" />
</template>
<template v-else-if="field.type === FormBuilderInputType.Checkbox">
<div
class="px-3 py-2 border-1 cursor-pointer rounded-lg shadow-default transition-shadow border-nc-border-gray-medium"
- @click="setFormStateWithEmit(field.model, !deepReference(field.model))"
- >
+ @click="setFormStateWithEmit(field.model, !deepReference(field.model))">
<div class="flex gap-3">
<NcCheckbox :disabled="disabled" :checked="deepReference(field.model)" />
<div class="text-nc-content-gray text-caption">
@@ -528,30 +431,19 @@ watch(
</div>
</template>
<template v-else-if="field.type === FormBuilderInputType.WorkflowInput">
- <NcFormBuilderInputWorkflowInput
- :model-value="deepReference(field.model)"
- :placeholder="field.placeholder"
- :variables="workflowVariables"
- :read-only="disabled"
- :plugins="field.plugins"
- :grouped-variables="workflowVariablesGrouped"
- @update:model-value="setFormStateWithEmit(field.model, $event)"
- />
+ <NcFormBuilderInputWorkflowInput :model-value="deepReference(field.model)"
+ :placeholder="field.placeholder" :variables="workflowVariables" :read-only="disabled"
+ :plugins="field.plugins" :grouped-variables="workflowVariablesGrouped"
+ @update:model-value="setFormStateWithEmit(field.model, $event)" />
</template>
<template v-else-if="field.type === FormBuilderInputType.FieldMapping">
<NcFormBuilderInputMountedWrapper @mounted="loadOptions(field)">
- <NcFormBuilderInputFieldMapping
- :model-value="deepReference(field.model)"
- :element="field"
- :disabled="disabled"
- @update:model-value="setFormStateWithEmit(field.model, $event)"
- />
+ <NcFormBuilderInputFieldMapping :model-value="deepReference(field.model)" :element="field"
+ :disabled="disabled" @update:model-value="setFormStateWithEmit(field.model, $event)" />
</NcFormBuilderInputMountedWrapper>
</template>
- <div
- v-if="field.helpText && field.type !== FormBuilderInputType.Switch && !field.showHintAsTooltip"
- class="w-full mt-1"
- >
+ <div v-if="field.helpText && field.type !== FormBuilderInputType.Switch && !field.showHintAsTooltip"
+ class="w-full mt-1">
<div class="text-xs text-nc-content-gray-muted">{{ field.helpText }}</div>
</div>
</a-form-item>
@@ -562,11 +454,8 @@ watch(
</template>
</a-form>
<template v-if="haveIntegrationInput && activeModel">
- <WorkspaceIntegrationsTab
- is-modal
- :filter-category="filterIntegration.type"
- :filter-integration="filterIntegration.sub_type"
- />
+ <WorkspaceIntegrationsTab is-modal :filter-category="filterIntegration.type"
+ :filter-integration="filterIntegration.sub_type" />
<WorkspaceIntegrationsEditOrAdd />
</template>
<general-overlay :model-value="isLoading" inline transition class="!bg-opacity-15">
@@ -612,6 +501,7 @@ watch(
}
.nc-form-builder {
+
:deep(.ant-input-affix-wrapper),
:deep(.ant-input),
:deep(.ant-select) {
@@ -698,7 +588,8 @@ watch(
:deep(.ant-row:not(.ant-form-item)) {
@apply !-mx-1.5;
- & > .ant-col {
+
+ &>.ant-col {
@apply !px-1.5;
}
}
@@ -712,7 +603,7 @@ watch(
@apply mt-2 mb-2;
button {
- @apply hover:!text-nc-content-brand;
+ @apply hover: !text-nc-content-brand;
}
}
</style>
diff --git a/packages/nc-gui/components/smartsheet/topbar/SandboxModal.vue b/packages/nc-gui/components/smartsheet/topbar/SandboxModal.vue
index ec394d520a..add61027fd 100644
--- a/packages/nc-gui/components/smartsheet/topbar/SandboxModal.vue
+++ b/packages/nc-gui/components/smartsheet/topbar/SandboxModal.vue
@@ -202,56 +202,43 @@ watch(
</script>
<template>
- <GeneralModal :visible="visible" size="large" centered @update:visible="emit('update:visible', $event)">
+ <NcModal :visible="visible" size="lg" nc-modal-class-name="!p-0" centered
+ @update:visible="emit('update:visible', $event)">
<div class="flex flex-col h-full">
<!-- Header -->
- <div class="flex items-center justify-between px-6 py-4 border-b border-nc-border-gray-medium">
+ <div class="flex items-center justify-between px-4 py-3 border-b border-nc-border-gray-medium">
<div>
- <div class="font-semibold text-lg text-nc-content-gray-emphasis">Sandbox Management</div>
- <div class="text-xs text-nc-content-gray-subtle2">Manage versions and track deployments</div>
+ <div class="text-bodyLgBold text-nc-content-gray-emphasis">Sandbox Management</div>
+ <div class="text-bodySm text-nc-content-gray-subtle2">Manage versions and track deployments</div>
</div>
- <GeneralIcon
- icon="close"
- class="w-5 h-5 text-nc-content-gray cursor-pointer hover:text-nc-content-gray-emphasis"
- @click="emit('update:visible', false)"
- />
+
+
+ <NcButton size="small" type="text" @click="emit('update:visible', false)" class="self-start">
+ <GeneralIcon icon="close" class="text-nc-content-gray-subtle2" />
+ </NcButton>
</div>
<!-- Tabs -->
<div class="flex gap-6 px-6 pt-3 border-b border-nc-border-gray-medium">
- <button
- v-if="isDraft"
- class="pb-2 px-1 text-sm font-medium transition-colors border-b-2"
- :class="[
- activeTab === 'publish'
- ? 'border-nc-content-brand text-nc-content-brand'
- : 'border-transparent text-nc-content-gray hover:text-nc-content-gray-emphasis',
- ]"
- @click="activeTab = 'publish'"
- >
+ <button v-if="isDraft" class="pb-2 px-1 text-sm font-medium transition-colors border-b-2" :class="[
+ activeTab === 'publish'
+ ? 'border-nc-content-brand text-nc-content-brand'
+ : 'border-transparent text-nc-content-gray hover:text-nc-content-gray-emphasis',
+ ]" @click="activeTab = 'publish'">
Publish
</button>
- <button
- v-if="isPublished"
- class="pb-2 px-1 text-sm font-medium transition-colors border-b-2"
- :class="[
- activeTab === 'fork'
- ? 'border-nc-content-brand text-nc-content-brand'
- : 'border-transparent text-nc-content-gray hover:text-nc-content-gray-emphasis',
- ]"
- @click="activeTab = 'fork'"
- >
+ <button v-if="isPublished" class="pb-2 px-1 text-sm font-medium transition-colors border-b-2" :class="[
+ activeTab === 'fork'
+ ? 'border-nc-content-brand text-nc-content-brand'
+ : 'border-transparent text-nc-content-gray hover:text-nc-content-gray-emphasis',
+ ]" @click="activeTab = 'fork'">
Fork
</button>
- <button
- class="pb-2 px-1 text-sm font-medium transition-colors border-b-2"
- :class="[
- activeTab === 'deployments'
- ? 'border-nc-content-brand text-nc-content-brand'
- : 'border-transparent text-nc-content-gray hover:text-nc-content-gray-emphasis',
- ]"
- @click="activeTab = 'deployments'"
- >
+ <button class="pb-2 px-1 text-sm font-medium transition-colors border-b-2" :class="[
+ activeTab === 'deployments'
+ ? 'border-nc-content-brand text-nc-content-brand'
+ : 'border-transparent text-nc-content-gray hover:text-nc-content-gray-emphasis',
+ ]" @click="activeTab = 'deployments'">
Deployments
</button>
</div>
@@ -264,7 +251,8 @@ watch(
<div class="flex gap-3">
<GeneralIcon icon="info" class="w-5 h-5 text-nc-content-blue-dark mt-0.5 flex-shrink-0" />
<div class="text-sm text-nc-content-gray">
- Publishing version <strong>{{ currentVersion?.version }}</strong> will make it available in the App Store and
+ Publishing version <strong>{{ currentVersion?.version }}</strong> will make it available in the App
+ Store and
automatically update all installations.
</div>
</div>
@@ -282,13 +270,8 @@ watch(
<div>
<label class="text-nc-content-gray text-sm font-medium mb-2 block">Release Notes (Optional)</label>
- <a-textarea
- v-model:value="publishForm.releaseNotes"
- placeholder="Describe what's new in this version"
- :rows="6"
- size="large"
- class="rounded-lg"
- />
+ <a-textarea v-model:value="publishForm.releaseNotes" placeholder="Describe what's new in this version"
+ :rows="6" size="large" class="rounded-lg" />
</div>
</div>
</div>
@@ -315,7 +298,8 @@ watch(
<span class="text-nc-content-gray-subtle2">v</span>
</template>
</a-input>
- <div class="text-xs text-nc-content-gray-subtle2 mt-1.5">Use semantic versioning (e.g., 2.0.0, 2.1.0)</div>
+ <div class="text-xs text-nc-content-gray-subtle2 mt-1.5">Use semantic versioning (e.g., 2.0.0, 2.1.0)
+ </div>
</div>
</div>
</div>
@@ -339,7 +323,8 @@ watch(
<div class="text-3xl font-bold text-nc-content-gray-emphasis mb-1">
{{ deploymentStats.statistics?.totalDeployments || 0 }}
</div>
- <div class="text-xs font-medium text-nc-content-gray-subtle2 uppercase tracking-wide">Total Deployments</div>
+ <div class="text-xs font-medium text-nc-content-gray-subtle2 uppercase tracking-wide">Total Deployments
+ </div>
</div>
<!-- Active -->
@@ -390,11 +375,8 @@ watch(
<!-- Version List with Real Stats -->
<div v-if="deploymentStats.versionStats && deploymentStats.versionStats.length > 0" class="space-y-2">
- <div
- v-for="(versionStat, index) in deploymentStats.versionStats"
- :key="versionStat.versionId"
- class="bg-nc-bg-gray-light border border-nc-border-gray-light rounded-lg p-4 hover:border-nc-border-brand hover:shadow-sm transition-all duration-200"
- >
+ <div v-for="(versionStat, index) in deploymentStats.versionStats" :key="versionStat.versionId"
+ class="bg-nc-bg-gray-light border border-nc-border-gray-light rounded-lg p-4 hover:border-nc-border-brand hover:shadow-sm transition-all duration-200">
<div class="flex items-center justify-between">
<div class="flex items-center gap-4 flex-1">
<!-- Version Badge -->
@@ -404,13 +386,10 @@ watch(
</div>
<div>
<div class="flex items-center gap-2">
- <span class="font-mono font-bold text-base text-nc-content-gray-emphasis"
- >v{{ versionStat.version }}</span
- >
- <div
- v-if="index === 0 && versionStat.status === 'published'"
- class="px-2 py-0.5 text-xs rounded-full bg-nc-bg-green-light text-nc-content-green-dark font-semibold"
- >
+ <span class="font-mono font-bold text-base text-nc-content-gray-emphasis">v{{
+ versionStat.version }}</span>
+ <div v-if="index === 0 && versionStat.status === 'published'"
+ class="px-2 py-0.5 text-xs rounded-full bg-nc-bg-green-light text-nc-content-green-dark font-semibold">
Current
</div>
</div>
@@ -424,11 +403,11 @@ watch(
<!-- Deployment Count -->
<template v-if="versionStat.deploymentCount === 0">
<div
- class="flex items-center gap-3 px-4 py-2 bg-white dark:bg-nc-bg-gray-medium rounded-lg border border-nc-border-gray-light transition-all"
- >
+ class="flex items-center gap-3 px-4 py-2 bg-white dark:bg-nc-bg-gray-medium rounded-lg border border-nc-border-gray-light transition-all">
<GeneralIcon icon="ncServer" class="w-4 h-4 text-nc-content-gray-subtle2" />
<div class="text-right">
- <div class="text-lg font-bold text-nc-content-gray-emphasis">{{ versionStat.deploymentCount }}</div>
+ <div class="text-lg font-bold text-nc-content-gray-emphasis">{{ versionStat.deploymentCount }}
+ </div>
</div>
</div>
</template>
@@ -436,11 +415,11 @@ watch(
<a-tooltip placement="top" title="Click to view deployments">
<div
class="flex items-center gap-3 px-4 py-2 bg-white dark:bg-nc-bg-gray-medium rounded-lg border border-nc-border-gray-light cursor-pointer hover:border-nc-border-brand hover:shadow-sm transition-all"
- @click="openVersionDeploymentsModal(versionStat)"
- >
+ @click="openVersionDeploymentsModal(versionStat)">
<GeneralIcon icon="ncServer" class="w-4 h-4 text-nc-content-gray-subtle2" />
<div class="text-right">
- <div class="text-lg font-bold text-nc-content-gray-emphasis">{{ versionStat.deploymentCount }}</div>
+ <div class="text-lg font-bold text-nc-content-gray-emphasis">{{ versionStat.deploymentCount }}
+ </div>
</div>
</div>
</a-tooltip>
@@ -455,7 +434,8 @@ watch(
<GeneralIcon icon="ncServer" class="w-8 h-8 text-nc-content-gray-subtle2" />
</div>
<div class="text-base font-medium text-nc-content-gray-emphasis mb-1">No deployments yet</div>
- <div class="text-sm text-nc-content-gray-subtle2">Users will appear here once they install your application</div>
+ <div class="text-sm text-nc-content-gray-subtle2">Users will appear here once they install your
+ application</div>
</div>
</template>
@@ -470,25 +450,21 @@ watch(
</div>
<!-- Footer -->
- <div v-if="activeTab === 'publish' || activeTab === 'fork'" class="px-6 py-4 border-t border-nc-border-gray-medium">
+ <div v-if="activeTab === 'publish' || activeTab === 'fork'"
+ class="px-6 py-4 border-t border-nc-border-gray-medium">
<div class="flex justify-end gap-2">
<NcButton type="secondary" size="medium" @click="emit('update:visible', false)"> Cancel </NcButton>
- <NcButton v-if="activeTab === 'publish'" type="primary" size="medium" :loading="isLoading" @click="publishCurrentDraft">
+ <NcButton v-if="activeTab === 'publish'" type="primary" size="medium" :loading="isLoading"
+ @click="publishCurrentDraft">
<template #icon>
<GeneralIcon icon="upload" />
</template>
Publish Version
</NcButton>
- <NcButton
- v-if="activeTab === 'fork'"
- type="primary"
- size="medium"
- :loading="isLoading"
- :disabled="!forkForm.version"
- @click="createNewDraft"
- >
+ <NcButton v-if="activeTab === 'fork'" type="primary" size="medium" :loading="isLoading"
+ :disabled="!forkForm.version" @click="createNewDraft">
<template #icon>
<GeneralIcon icon="plus" />
</template>
@@ -499,10 +475,7 @@ watch(
</div>
<!-- Version Deployments Modal -->
- <SmartsheetTopbarSandboxVersionDeploymentsModal
- v-model:visible="showVersionDeploymentsModal"
- :sandbox="sandbox"
- :version="selectedVersion"
- />
- </GeneralModal>
+ <SmartsheetTopbarSandboxVersionDeploymentsModal v-model:visible="showVersionDeploymentsModal" :sandbox="sandbox"
+ :version="selectedVersion" />
+ </NcModal>
</template>
diff --git a/packages/nc-gui/components/workspace/project/AppMarket.vue b/packages/nc-gui/components/workspace/project/AppMarket.vue
index 884a28fd66..2deac8098c 100644
--- a/packages/nc-gui/components/workspace/project/AppMarket.vue
+++ b/packages/nc-gui/components/workspace/project/AppMarket.vue
@@ -125,7 +125,6 @@ watch(
<template>
<NcModal v-model:visible="visible" :footer="null" nc-modal-class-name="!p-0" size="large" @close="emit('close')">
-
<div class="flex items-center gap-3 px-4 py-3 border-b-1 border-b-nc-border-gray-medium">
<GeneralIcon icon="ncBox" class="h-5 w-5" />
<div class="flex-1 text-bodyLgBold">{{ t('labels.appMarket') }}</div>
@@ -138,7 +137,7 @@ watch(
<div class="flex flex-col gap-4 h-[600px] p-6">
<!-- Search and Filter Bar -->
<div class="flex gap-3">
- <a-input v-model:value="searchQuery" class="flex-1 nc-input-sm nc-input-shadow" :placeholder="t('placeholder.searchByTitle')" allow-clear>
+ <a-input v-model:value="searchQuery" class="flex-1 nc-input-sm nc-input-shadow !rounded-md" :placeholder="t('placeholder.searchByTitle')" allow-clear>
<template #prefix>
<GeneralIcon icon="search" class="h-4 w-4 text-nc-content-gray-muted" />
</template>
diff --git a/packages/nc-gui/utils/browserUtils.ts b/packages/nc-gui/utils/browserUtils.ts
index b625b4c341..bb899869d3 100644
--- a/packages/nc-gui/utils/browserUtils.ts
+++ b/packages/nc-gui/utils/browserUtils.ts
@@ -224,3 +224,18 @@ export const openContactSalesEmail = (email: string = '[email protected]') => {
a.target = '_blank'
a.click()
}
+
+
+export const getValidSlotName = (name: string, prefix?: string, suffix?: string): string => {
+ let slotName = name.replace(/\./g, '__')
+
+ if (prefix) {
+ slotName = `${prefix}-${slotName}`
+ }
+
+ if (suffix) {
+ slotName = `${slotName}-${suffix}`
+ }
+
+ return slotName
+}