- When new user was created via admin, the verification email was send

- Item name in list view type is now extended on the full page width
This commit is contained in:
Čarodej
2022-06-01 10:09:18 +02:00
parent 428b4c87a3
commit 94afb626eb
13 changed files with 46 additions and 36 deletions

View File

@@ -7,6 +7,8 @@
- You are now allowed to set price for metered billing in 3 decimal places
- Solved UI issue with empty notification popup
- Plans in fixed subscription are now automatically sorted from lower to higher price
- When new user was created via admin, the verification email was send
- Item name in list view type is now extended on the full page width
### New Features
- API version 1 released

View File

@@ -8,7 +8,8 @@
<div class="fixed top-0 bottom-0 left-0 right-0 z-10 m-auto w-full bg-white shadow-xl dark:bg-dark-foreground md:relative md:w-[490px] md:rounded-xl">
<div class="flex h-full -translate-y-7 transform items-center justify-center px-8 text-center md:translate-y-0">
<div>
<img src="https://twemoji.maxcdn.com/v/13.1.0/svg/1f627.svg" alt="" class="mx-auto mb-4 w-20 md:mt-6 min-h-[80px]" />
<img v-if="isSuccess" src="https://twemoji.maxcdn.com/v/13.1.1/svg/1f609.svg" alt="" class="mx-auto mb-4 w-20 md:mt-6 min-h-[80px]" />
<img v-if="isAlert" src="https://twemoji.maxcdn.com/v/13.1.0/svg/1f627.svg" alt="" class="mx-auto mb-4 w-20 md:mt-6 min-h-[80px]" />
<h1 v-if="title" class="mb-2 text-2xl font-bold">
{{ title }}
@@ -46,7 +47,8 @@ export default {
message: undefined,
title: undefined,
button: undefined,
emoji: undefined,
isSuccess: undefined,
isAlert: undefined,
}
},
methods: {
@@ -58,18 +60,14 @@ export default {
// Show alert
events.$on('alert:open', (args) => {
this.isVisibleWrapper = true
this.isAlert = true
this.title = args.title || undefined
this.message = args.message || undefined
this.button = this.$te('alerts.error_confirm') ? this.$t('alerts.error_confirm') : 'Thats horrible!'
this.emoji = '😢😢😢'
this.buttonStyle = 'danger'
if (args.emoji) {
this.emoji = args.emoji
}
if (args.buttonStyle) {
this.buttonStyle = args.buttonStyle
}
@@ -82,22 +80,20 @@ export default {
// Show alert
events.$on('success:open', (args) => {
this.isVisibleWrapper = true
this.isSuccess = true
this.title = args.title
this.message = args.message
this.button = this.$t('alerts.success_confirm')
this.emoji = '🥳🥳🥳'
this.buttonStyle = 'theme'
if (args.emoji) {
this.emoji = args.emoji
}
})
// Close popup
events.$on('popup:close', () => {
this.isVisibleWrapper = false
this.isSuccess = undefined
this.isAlert = undefined
})
},
}

View File

@@ -1,5 +1,6 @@
<template>
<div
id="spotlight"
v-if="isVisible"
@keyup.esc="exitSpotlight"
@click.exact.self="exitSpotlight"
@@ -959,3 +960,9 @@ export default {
},
}
</script>
<style lang="scss">
#spotlight .item-name {
padding-right: 35px;
}
</style>

View File

@@ -51,12 +51,14 @@
</div>
<!--Item Info-->
<div class="pl-2">
<div class="pl-2 min-w-0">
<!--Item Title-->
<span
class="mb-0.5 block overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold"
:class="{ 'hover:underline cursor-text': canEditName }"
style="max-width: 240px"
class="item-name mb-0.5 block overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold lg:pr-0 pr-4"
:class="{
'hover:underline cursor-text': canEditName,
'lg:!pr-16': mobileHandler && $isMobile(),
}"
ref="name"
@input="renameItem"
@keydown.delete.stop
@@ -125,7 +127,11 @@ export default {
EyeIcon,
Emoji,
},
props: ['mobileHandler', 'highlight', 'entry'],
props: [
'mobileHandler',
'highlight',
'entry',
],
watch: {
isChecked: function (val) {
if (val) {

View File

@@ -1,7 +1,7 @@
<template>
<div class="flex select-none items-center rounded-xl" spellcheck="false">
<!--Item thumbnail-->
<div class="relative w-16">
<div class="relative w-16 shrink-0">
<!--Member thumbnail for team folders-->
<MemberAvatar
v-if="user && canShowAuthor"
@@ -39,12 +39,9 @@
</div>
<!--Item Info-->
<div class="pl-2">
<div class="pl-2 min-w-0">
<!--Item Title-->
<b
class="mb-0.5 block overflow-hidden text-ellipsis whitespace-nowrap text-sm hover:underline"
style="max-width: 240px"
>
<b class="mb-0.5 block overflow-hidden text-ellipsis whitespace-nowrap text-sm hover:underline">
{{ item.data.attributes.name }}
</b>

View File

@@ -8,7 +8,7 @@
<file-icon v-if="icon === 'file'" class="text-theme vue-feather" size="19" />
</div>
<div>
<b class="block w-52 overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold 2xl:w-72">
<b class="block overflow-hidden text-ellipsis text-sm font-bold">
{{ title }}
</b>
<small class="block text-xs font-bold text-gray-400">

View File

@@ -91,7 +91,7 @@ export default {
this.isSendingRequest = true
axios
.post(this.$store.getters.api + '/admin/users/' + this.$route.params.id + '/delete', {
.post(this.$store.getters.api + '/admin/users/' + this.$route.params.id, {
name: this.userName,
_method: 'delete',
})
@@ -104,7 +104,7 @@ export default {
})
}
if (response.status === 204) {
if (response.status === 200) {
events.$emit('success:open', {
emoji: '👍',
title: this.$t('popup_deleted_user.title'),

View File

@@ -36,7 +36,7 @@
<div
@contextmenu.prevent.capture="contextMenu($event, undefined)"
class="lg:flex lg:flex-col lg:w-full lg:px-3.5"
class="lg:flex lg:flex-col lg:w-full lg:px-3.5 min-w-0"
>
<DesktopToolbar />
@@ -47,7 +47,7 @@
<!--File list & info sidebar-->
<div class="flex space-x-3 lg:overflow-hidden grow" @drop.stop.prevent="uploadDroppedItems($event)" @dragenter.prevent @dragover.prevent>
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
<router-view id="file-view" class="relative w-full min-w-0" :key="$route.fullPath" />
<InfoSidebar v-if="isVisibleSidebar" />
</div>

View File

@@ -25,7 +25,7 @@
<div
@contextmenu.prevent.capture="contextMenu($event, undefined)"
class="lg:flex lg:flex-col lg:w-full lg:px-3.5"
class="lg:flex lg:flex-col lg:w-full lg:px-3.5 min-w-0"
>
<DesktopSharepageToolbar />
@@ -36,7 +36,7 @@
<!--File list & info sidebar-->
<div class="flex space-x-3 lg:overflow-hidden grow" @drop.stop.prevent="uploadDroppedItems($event)" @dragenter.prevent @dragover.prevent>
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
<router-view id="file-view" class="relative w-full min-w-0" :key="$route.fullPath" />
<InfoSidebar v-if="isVisibleSidebar" />
</div>

View File

@@ -21,7 +21,7 @@
<div
@contextmenu.prevent.capture="contextMenu($event, undefined)"
class="lg:flex lg:flex-col lg:w-full lg:px-3.5"
class="lg:flex lg:flex-col lg:w-full lg:px-3.5 min-w-0"
>
<DesktopUploadRequestToolbar v-if="canShowUI" />
<MobileUploadRequestToolBar v-if="canShowUI" />
@@ -31,7 +31,7 @@
<!--File list & info sidebar-->
<div class="flex space-x-3 lg:overflow-hidden grow" @drop.stop.prevent="uploadDroppedItems($event)" @dragenter.prevent @dragover.prevent>
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
<router-view id="file-view" class="relative w-full min-w-0" :key="$route.fullPath" />
<InfoSidebarUploadRequest v-if="canShowUI && isVisibleSidebar" />
</div>

View File

@@ -40,12 +40,13 @@ Route::group(['prefix' => 'users'], function () {
Route::get('/{user}/transactions', GetUserTransactionsController::class);
Route::get('/{user}/storage', ShowUserStorageCapacityController::class);
Route::patch('/{user}/role', ChangeUserRoleController::class);
Route::delete('/{user}/delete', DeleteUserController::class);
Route::delete('/{user}', DeleteUserController::class);
});
Route::get('/transactions', GetAllTransactionsController::class);
Route::apiResource('/pages', AdminPagesController::class);
Route::apiResource('/users', UserController::class);
Route::apiResource('/users', UserController::class)
->only(['index', 'show', 'store']);
// Settings
Route::group(['prefix' => 'settings'], function () {

View File

@@ -43,8 +43,6 @@ class CreateNewUserAction extends Controller
$user->markEmailAsVerified();
}
event(new Registered($user));
return $user;
}

View File

@@ -2,6 +2,7 @@
namespace App\Users\Controllers\Authentication;
use App\Users\DTO\CreateUserData;
use Illuminate\Auth\Events\Registered;
use Illuminate\Http\JsonResponse;
use App\Http\Controllers\Controller;
use App\Users\Actions\CreateNewUserAction;
@@ -45,6 +46,8 @@ class RegisterUserController extends Controller
], 409);
}
event(new Registered($user));
// Log in if verification is disabled
if (! $user->password || ! intval(get_settings('user_verification'))) {
$this->guard->login($user);