Max ce1844e521
feat(webapp): several group and personal invitation links (#8504)
* invite codes refactor

typo

* lint fixes

* remove duplicate initeCodes on User

* fix typo

* clean permissionMiddleware

* dummy permissions

* separate validateInviteCode call

* permissions group & user

* test validateInviteCode + adjustments

* more validateInviteCode fixes

* missing test

* generatePersonalInviteCode

* generateGroupInviteCode

* old tests

* lint fixes

* more lint fixes

* fix validateInviteCode

* fix redeemInviteCode, fix signup

* fix all tests

* fix lint

* uniform types in config

* test & fix invalidateInviteCode

* cleanup test

* fix & test redeemInviteCode

* permissions

* fix Group->inviteCodes

* more cleanup

* improve tests

* fix code generation

* cleanup

* order inviteCodes result on User and Group

* lint

* test max invite codes + fix

* better description of collision

* tests: properly define group ids

* reused old group query

* reuse old Groupmembers query

* remove duplicate skip

* update comment

* fix uniqueInviteCode

* fix test

* fix lint

* Get invite codes

* Show invitation data in registration

* Add invitation list to menu (WIP)

* Add mutations, add CreateInvitation, some fixes

* Improve style, fix long comments

* Lock scrolling when popover is open, but prevent layout change

* small fixes

* instant updates

* Introduce config for link limit; add texts, layout changes

* Validate comment length

* Improve layout

* Add message to copied link

* Add invite link section to group settings

* Handle hidden groups

* Add menu entry for group invite links

* Fix locale

* hotfix invite codes

* Add copy messages

* More styling (WIP)

* Design update

* Don't forget user state

* Localize placeholder

* Add locale

* Instant updates for group invites

* fix registration with invite code

* Fix text overflow

* Fix instant updates

* Overhaul styles, add locales, add heading

* Add test and snapshot for CreateInvitation

* Improve accessability; add invitation test

* Add tests for InvitationList

* Fix locales

* Round plus button

* Fix tests

* Fix tests

* fix locales

* fix linting

* Don't show name of hidden group in invite message

* Add more tests

* Update webapp/locales/de.json

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>

* Update webapp/locales/de.json

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-10 08:25:03 +00:00

187 lines
3.0 KiB
SCSS

@import './imports/_tooltip.scss';
@import './imports/_toast.scss';
// Transition Easing
$easeOut: cubic-bezier(0.19, 1, 0.22, 1);
.disabled-content {
position: relative;
&::before {
@include border-radius($border-radius-x-large);
box-shadow: inset 0 0 0 5px $color-danger;
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 2;
pointer-events: none;
}
}
.layout-enter-active {
transition: opacity 80ms ease-out;
transition-delay: 80ms;
}
.layout-leave-active {
transition: opacity 80ms ease-in;
}
.layout-enter,
.layout-leave-active {
opacity: 0;
}
// slide up ease
.slide-up-enter-active {
transition: all 500ms $easeOut;
transition-delay: 20ms;
opacity: 1;
transform: translate3d(0, 0, 0);
}
.slide-up-enter,
.slide-up-leave-active {
opacity: 0;
box-shadow: none;
transform: translate3d(0, 15px, 0);
}
.main-navigation {
background: #fff;
}
blockquote {
display: block;
padding: 15px 20px 15px 45px;
margin: 0 0 20px;
position: relative;
/*Font*/
font-size: $font-size-base;
line-height: 1.2;
color: $color-neutral-40;
font-family: $font-family-serif;
font-style: italic;
border-left: 3px dotted $color-neutral-70;
&::before {
content: '\201C';
/*Unicode for Left Double Quote*/
/*Font*/
font-size: $font-size-xxxx-large;
font-weight: bold;
color: $color-neutral-50;
/*Positioning*/
position: absolute;
left: 10px;
top: 5px;
}
p {
margin-top: 0;
}
}
.main-navigation {
box-shadow: $box-shadow-base;
position: fixed;
width: 100%;
z-index: $z-index-page-submenu;
a {
outline: none;
}
}
hr {
border: 0;
width: 100%;
color: $color-neutral-80;
background-color: $color-neutral-80;
height: 1px !important;
}
[class$='menu-trigger'] {
user-select: none;
}
[class$='menu-popover'] {
display: inline-block;
nav {
margin-left: -17px;
margin-right: -15px;
}
}
#overlay {
display: block;
opacity: 0;
width: 100%;
height: 100%;
top: 0;
left: 0;
position: fixed;
background: rgba(0, 0, 0, 0.15);
z-index: $z-index-overlay;
pointer-events: none;
transition: opacity 150ms ease-out;
transition-delay: 50ms;
.dropdown-open & {
opacity: 1;
transition-delay: 0;
transition: opacity 80ms ease-out;
@media(hover: none) {
pointer-events: all;
}
}
}
body.dropdown-open {
max-height: 100vh;
overflow: hidden;
scrollbar-gutter: stable;
}
.base-card > .ds-section {
padding: 0;
margin: -$space-base;
.ds-container {
padding: $space-base;
}
}
[class$='menu-popover'] {
min-width: 130px;
button {
display: flex;
align-content: center;
align-items: center;
.base-icon {
padding-right: $space-xx-small;
}
}
}
.v-popover.open .trigger a {
color: $text-color-link-active;
}
.hyphenate-text {
hyphens: auto;
overflow-wrap: break-word;
word-wrap: break-word;
}
.dropdown-arrow {
font-size: $font-size-xx-small;
}