feat: Integrate official drive_provider, update user profile features & UI improvements
All checks were successful
CI / container-job (push) Successful in 41s
All checks were successful
CI / container-job (push) Successful in 41s
- adonisrc.ts: Load official drive_provider and unload custom driver_provider. - packages.json: Add @headlessui/vue dependency for tab components. - AvatarController.ts: Rewrite avatar generation logic to always return the same avatar per user. - auth/UserController.ts: Add profile and profileUpdate methods to support user profile editing. - Submitter/datasetController.ts & app/models/file.ts: Adapt code to use the official drive_provider. - app/models/user.ts: Introduce “isAdmin” getter. - config/drive.ts: Create new configuration for the official drive_provider. - providers/vinejs_provider.ts: Adapt allowedExtensions control to use provided options or database enabled extensions. - resource/js/app.ts: Load default Head and Link components. - resources/js/menu.ts: Add settings-profile.edit menu point. - resources/js/Components/action-message.vue: Add new component for improved user feedback after form submissions. - New avatar-input.vue component: Enable profile picture selection. - Components/CardBox.vue: Alter layout to optionally show HeaderIcon in title bar. - FormControl.vue: Define a readonly prop for textareas. - Improve overall UI with updates to NavBar.vue, UserAvatar.vue, UserAvatarCurrentUser.vue, and add v-model support to password-meter.vue. - Remove profile editing logic from AccountInfo.vue and introduce new profile components (show.vue, update-password-form.vue, update-profile-information.vue). - app.edge: Modify page (add @inertiaHead tag) for better meta management. - routes.ts: Add new routes for editing user profiles. - General npm updates.
This commit is contained in:
parent
a41b091214
commit
36cd7a757b
34 changed files with 1396 additions and 407 deletions
233
config/drive_self.ts
Normal file
233
config/drive_self.ts
Normal file
|
@ -0,0 +1,233 @@
|
|||
/**
|
||||
* Config source: https://git.io/JBt3o
|
||||
*
|
||||
* Feel free to let us know via PR, if you find something broken in this config
|
||||
* file.
|
||||
*/
|
||||
import { defineConfig } from '#providers/drive/src/types/define_config';
|
||||
import env from '#start/env';
|
||||
// import { driveConfig } from '@adonisjs/core/build/config';
|
||||
// import { driveConfig } from "@adonisjs/drive/build/config.js";
|
||||
// import Application from '@ioc:Adonis/Core/Application';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Drive Config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The `DriveConfig` relies on the `DisksList` interface which is
|
||||
| defined inside the `contracts` directory.
|
||||
|
|
||||
*/
|
||||
export default defineConfig({
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default disk to use for managing file uploads. The value is driven by
|
||||
| the `DRIVE_DISK` environment variable.
|
||||
|
|
||||
*/
|
||||
disk: env.get('DRIVE_DISK', 'local'),
|
||||
|
||||
disks: {
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Local
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Uses the local file system to manage files. Make sure to turn off serving
|
||||
| files when not using this disk.
|
||||
|
|
||||
*/
|
||||
local: {
|
||||
driver: 'local',
|
||||
visibility: 'public',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Storage root - Local driver only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define an absolute path to the storage directory from where to read the
|
||||
| files.
|
||||
|
|
||||
*/
|
||||
// root: Application.tmpPath('uploads'),
|
||||
root: '/storage/app/data',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Serve files - Local driver only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When this is set to true, AdonisJS will configure a files server to serve
|
||||
| files from the disk root. This is done to mimic the behavior of cloud
|
||||
| storage services that has inbuilt capabilities to serve files.
|
||||
|
|
||||
*/
|
||||
serveFiles: true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Base path - Local driver only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Base path is always required when "serveFiles = true". Also make sure
|
||||
| the `basePath` is unique across all the disks using "local" driver and
|
||||
| you are not registering routes with this prefix.
|
||||
|
|
||||
*/
|
||||
basePath: '/files',
|
||||
},
|
||||
|
||||
local: {
|
||||
driver: 'local',
|
||||
visibility: 'public',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Storage root - Local driver only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define an absolute path to the storage directory from where to read the
|
||||
| files.
|
||||
|
|
||||
*/
|
||||
// root: Application.tmpPath('uploads'),
|
||||
root: '/storage/app/data',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Serve files - Local driver only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When this is set to true, AdonisJS will configure a files server to serve
|
||||
| files from the disk root. This is done to mimic the behavior of cloud
|
||||
| storage services that has inbuilt capabilities to serve files.
|
||||
|
|
||||
*/
|
||||
serveFiles: true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Base path - Local driver only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Base path is always required when "serveFiles = true". Also make sure
|
||||
| the `basePath` is unique across all the disks using "local" driver and
|
||||
| you are not registering routes with this prefix.
|
||||
|
|
||||
*/
|
||||
basePath: '/files',
|
||||
},
|
||||
|
||||
fs: {
|
||||
driver: 'local',
|
||||
visibility: 'public',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Storage root - Local driver only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define an absolute path to the storage directory from where to read the
|
||||
| files.
|
||||
|
|
||||
*/
|
||||
// root: Application.tmpPath('uploads'),
|
||||
root: '/storage/app/public',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Serve files - Local driver only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When this is set to true, AdonisJS will configure a files server to serve
|
||||
| files from the disk root. This is done to mimic the behavior of cloud
|
||||
| storage services that has inbuilt capabilities to serve files.
|
||||
|
|
||||
*/
|
||||
serveFiles: true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Base path - Local driver only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Base path is always required when "serveFiles = true". Also make sure
|
||||
| the `basePath` is unique across all the disks using "local" driver and
|
||||
| you are not registering routes with this prefix.
|
||||
|
|
||||
*/
|
||||
basePath: '/public',
|
||||
},
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| S3 Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Uses the S3 cloud storage to manage files. Make sure to install the s3
|
||||
| drive separately when using it.
|
||||
|
|
||||
|**************************************************************************
|
||||
| npm i @adonisjs/drive-s3
|
||||
|**************************************************************************
|
||||
|
|
||||
*/
|
||||
// s3: {
|
||||
// driver: 's3',
|
||||
// visibility: 'public',
|
||||
// key: Env.get('S3_KEY'),
|
||||
// secret: Env.get('S3_SECRET'),
|
||||
// region: Env.get('S3_REGION'),
|
||||
// bucket: Env.get('S3_BUCKET'),
|
||||
// endpoint: Env.get('S3_ENDPOINT'),
|
||||
//
|
||||
// // For minio to work
|
||||
// // forcePathStyle: true,
|
||||
// },
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| GCS Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Uses the Google cloud storage to manage files. Make sure to install the GCS
|
||||
| drive separately when using it.
|
||||
|
|
||||
|**************************************************************************
|
||||
| npm i @adonisjs/drive-gcs
|
||||
|**************************************************************************
|
||||
|
|
||||
*/
|
||||
// gcs: {
|
||||
// driver: 'gcs',
|
||||
// visibility: 'public',
|
||||
// keyFilename: Env.get('GCS_KEY_FILENAME'),
|
||||
// bucket: Env.get('GCS_BUCKET'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Uniform ACL - Google cloud storage only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the Uniform ACL on the bucket, the "visibility" option is
|
||||
| ignored. Since, the files ACL is managed by the google bucket policies
|
||||
| directly.
|
||||
|
|
||||
|**************************************************************************
|
||||
| Learn more: https://cloud.google.com/storage/docs/uniform-bucket-level-access
|
||||
|**************************************************************************
|
||||
|
|
||||
| The following option just informs drive whether your bucket is using uniform
|
||||
| ACL or not. The actual setting needs to be toggled within the Google cloud
|
||||
| console.
|
||||
|
|
||||
*/
|
||||
// usingUniformAcl: false,
|
||||
// },
|
||||
},
|
||||
});
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue