+
{{ $t('default_value') }}
-
+
-
+
{{ $t('allow_null') }}
-
+
@@ -116,17 +116,17 @@ export default defineComponent({
function setType(value: typeof types[number]) {
if (value === 'uuid') {
- state.fieldData.system.special = 'uuid';
+ state.fieldData.meta.special = 'uuid';
} else {
- state.fieldData.system.special = null;
+ state.fieldData.meta.special = null;
}
// We'll reset the interface/display as they most likely won't work for the newly selected
// type
- state.fieldData.system.interface = null;
- state.fieldData.system.options = null;
- state.fieldData.system.display = null;
- state.fieldData.system.display_options = null;
+ state.fieldData.meta.interface = null;
+ state.fieldData.meta.options = null;
+ state.fieldData.meta.display = null;
+ state.fieldData.meta.display_options = null;
state.fieldData.type = value;
}
},
diff --git a/app/src/modules/settings/routes/data-model/field-detail/store.ts b/app/src/modules/settings/routes/data-model/field-detail/store.ts
index 9fd182bc31..ab27293464 100644
--- a/app/src/modules/settings/routes/data-model/field-detail/store.ts
+++ b/app/src/modules/settings/routes/data-model/field-detail/store.ts
@@ -25,12 +25,12 @@ function initLocalStore(
fieldData: {
field: '',
type: '',
- database: {
+ schema: {
default_value: undefined,
max_length: undefined,
is_nullable: true,
},
- system: {
+ meta: {
hidden: false,
interface: undefined,
options: undefined,
@@ -52,8 +52,8 @@ function initLocalStore(
state.fieldData.field = existingField.field;
state.fieldData.type = existingField.type;
- state.fieldData.database = existingField.schema;
- state.fieldData.system = existingField.meta;
+ state.fieldData.schema = existingField.schema;
+ state.fieldData.meta = existingField.meta;
state.relations = relationsStore.getRelationsForField(collection, field);
}
@@ -122,11 +122,11 @@ function initLocalStore(
}
if (type === 'o2m') {
- delete state.fieldData.database;
+ delete state.fieldData.schema;
delete state.fieldData.type;
if (!isExisting) {
- state.fieldData.system.special = 'o2m';
+ state.fieldData.meta.special = 'o2m';
state.relations = [
{
@@ -159,11 +159,11 @@ function initLocalStore(
}
if (type === 'm2m' || type === 'files') {
- delete state.fieldData.database;
+ delete state.fieldData.schema;
delete state.fieldData.type;
if (!isExisting) {
- state.fieldData.system.special = 'm2m';
+ state.fieldData.meta.special = 'm2m';
state.relations = [
{
diff --git a/app/src/router.ts b/app/src/router.ts
index 39778616c8..086a0c7263 100644
--- a/app/src/router.ts
+++ b/app/src/router.ts
@@ -1,7 +1,6 @@
import VueRouter, { NavigationGuard, RouteConfig, Route } from 'vue-router';
import LoginRoute from '@/routes/login';
import LogoutRoute from '@/routes/logout';
-import InstallRoute from '@/routes/install';
import ResetPasswordRoute from '@/routes/reset-password';
import { refresh } from '@/auth';
import { hydrate } from '@/hydrate';
@@ -17,17 +16,6 @@ export const defaultRoutes: RouteConfig[] = [
path: '/',
redirect: '/login',
},
- {
- name: 'install',
- path: '/install',
- component: InstallRoute,
- /**
- * @todo redirect to /login if project is already installed
- */
- meta: {
- public: true,
- },
- },
{
name: 'login',
path: '/login',
diff --git a/app/src/routes/install/index.ts b/app/src/routes/install/index.ts
deleted file mode 100644
index 90f648c871..0000000000
--- a/app/src/routes/install/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import InstallRoute from './install.vue';
-
-export { InstallRoute };
-export default InstallRoute;
diff --git a/app/src/routes/install/install-database.vue b/app/src/routes/install/install-database.vue
deleted file mode 100644
index cc9f94af48..0000000000
--- a/app/src/routes/install/install-database.vue
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
{{ $t('database_connection') }}
-
-
- {{ $t('back') }}
-
- {{ $t('create_project') }}
-
-
-
-
-
-
-
-
diff --git a/app/src/routes/install/install-final.vue b/app/src/routes/install/install-final.vue
deleted file mode 100644
index 59ddff1389..0000000000
--- a/app/src/routes/install/install-final.vue
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
- {{ $t('creating_project') }}
- {{ $t('creating_project_failed') }}
- {{ $t('creating_project_success') }}
-
-
-
-
-
-
- {{ errorFormatted }}
-
-
- {{ $t('creating_project_success_copy') }}
-
-
-
- {{ $t('creating_project_success_super_admin_password') }}
-
-
-
-
-
-
-
-
- {{ $t('back') }}
- {{ $t('sign_in') }}
-
-
-
-
-
-
-
diff --git a/app/src/routes/install/install-project.vue b/app/src/routes/install/install-project.vue
deleted file mode 100644
index f35a051e39..0000000000
--- a/app/src/routes/install/install-project.vue
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
{{ $t('project_info') }}
-
-
- {{ $t('back') }}
-
- {{ $t('next') }}
-
-
-
-
-
-
-
-
diff --git a/app/src/routes/install/install-requirements.vue b/app/src/routes/install/install-requirements.vue
deleted file mode 100644
index ee25154a1f..0000000000
--- a/app/src/routes/install/install-requirements.vue
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
{{ $t('requirements') }}
-
-
-
-
-
- {{ requirement.value }}
-
-
-
- {{ $t('back') }}
- {{ $t('next') }}
-
-
-
-
-
-
-
diff --git a/app/src/routes/install/install-welcome.vue b/app/src/routes/install/install-welcome.vue
deleted file mode 100644
index a1250eb786..0000000000
--- a/app/src/routes/install/install-welcome.vue
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
{{ $t('welcome_to_directus') }}
-
{{ $t('welcome_to_directus_copy') }}
-
- {{ $t('next') }}
-
-
-
-
{{ $t('create_new_project') }}
-
- {{ $t('create_new_project_copy') }}
-
-
-
-
-
-
-
-
- {{ $t('next') }}
-
-
-
-
-
-
-
diff --git a/app/src/routes/install/install.vue b/app/src/routes/install/install.vue
deleted file mode 100644
index 8ab7f3ba0b..0000000000
--- a/app/src/routes/install/install.vue
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/utils/upload-file/upload-file.ts b/app/src/utils/upload-file/upload-file.ts
index 0a74d7ce74..d8dfcfcf82 100644
--- a/app/src/utils/upload-file/upload-file.ts
+++ b/app/src/utils/upload-file/upload-file.ts
@@ -3,6 +3,8 @@ import api from '@/api';
import notify from '@/utils/notify';
import i18n from '@/lang';
+import emitter, { Events } from '@/events';
+
export default async function uploadFile(
file: File,
onProgressChange?: (percentage: number) => void,
@@ -24,7 +26,9 @@ export default async function uploadFile(
});
}
- return response;
+ emitter.emit(Events.upload);
+
+ return response.data.data;
} catch (error) {
if (showNotifications) {
notify({
diff --git a/app/src/utils/upload-files/upload-files.ts b/app/src/utils/upload-files/upload-files.ts
index e8769339c7..e544308048 100644
--- a/app/src/utils/upload-files/upload-files.ts
+++ b/app/src/utils/upload-files/upload-files.ts
@@ -8,7 +8,7 @@ export default async function uploadFiles(files: File[], onProgressChange?: (per
const progressForFiles = files.map(() => 0);
try {
- await Promise.all(
+ const uploadedFiles = await Promise.all(
files.map((file, index) =>
uploadFile(
file,
@@ -20,10 +20,13 @@ export default async function uploadFiles(files: File[], onProgressChange?: (per
)
)
);
+
notify({
title: i18n.t('upload_files_success', { count: files.length }),
type: 'success',
});
+
+ return uploadedFiles;
} catch (error) {
notify({
title: i18n.t('upload_files_failed', { count: files.length }),