Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin and moderation changes #1438

Merged
merged 108 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
6b1e8ff
Add sidebarlayout framework base
yflory Jan 29, 2024
070d8dc
Support V2 prototype
yflory Feb 12, 2024
6f3fb50
Add new admin page
yflory Feb 12, 2024
c798bca
Merge branch 'staging' into sidebar
yflory Feb 12, 2024
7c78091
Keep the old sidebar layout working
yflory Feb 12, 2024
6b7cba1
Add first entries in the new admin page
yflory Feb 12, 2024
6493f3a
New support: add tickets to chainpad doc
yflory Feb 14, 2024
1f5c1b3
Sidebar refactoring, add checkbox block
yflory Feb 14, 2024
e08aa14
Commit changes for sidebar
DianaXWiki Feb 14, 2024
f9ed41c
Merge branch 'sidebar' of https://github.com/cryptpad/cryptpad into s…
DianaXWiki Feb 14, 2024
8e24b8b
New support: moderator view
yflory Feb 15, 2024
4658fdb
Add initial general panel
DianaXWiki Feb 15, 2024
72fddef
Add first review fixes for panel general
DianaXWiki Feb 16, 2024
43047ab
New support: reply & notify the other user
yflory Feb 19, 2024
503bba9
New support: realtime update of admin and user views
yflory Feb 20, 2024
0900216
New support: close tickets
yflory Feb 20, 2024
e26ed38
New support: delete user ticket
yflory Feb 20, 2024
bc85d86
Add users panel + setlimit functionality on storage
DianaXWiki Feb 21, 2024
80efd51
Fix list layout
DianaXWiki Feb 21, 2024
6205292
Merge branch 'sidebar' into support2
yflory Feb 21, 2024
06d9201
New support: answer anonymously for admins
yflory Feb 21, 2024
643e859
New support: option to disable notifications and PIN
yflory Feb 21, 2024
0d64845
Add new blocks.list function
DianaXWiki Feb 22, 2024
af4935e
Fix list layout for users panel
DianaXWiki Feb 22, 2024
a67b1ea
New support: disable quota for the support pin log
yflory Feb 22, 2024
757f30d
New support: add moderator role
yflory Feb 22, 2024
20dd15b
New support: rotate keys
yflory Feb 26, 2024
a62dc7c
New support: key rotation part 2
yflory Feb 27, 2024
d525852
New support: lint compliance and clean XXX
yflory Feb 27, 2024
037ee00
Merge branch 'staging' into support2
yflory Feb 27, 2024
b7f70e9
New support: fix missing translation key
yflory Feb 27, 2024
9692659
New support: fix missing user data
yflory Feb 27, 2024
dacb91e
New support: fixes
yflory Feb 27, 2024
6f96127
Fix previous commit
yflory Feb 27, 2024
0c15697
New support: provide moderators unsafeKey
yflory Feb 27, 2024
267ccae
New support: fix sharedworker issue
yflory Feb 27, 2024
47284dc
New support: move tickets between active and pending
yflory Feb 28, 2024
0056603
New support: create ticket from admin side
yflory Feb 28, 2024
de825af
New support: load legacy tickets
yflory Feb 28, 2024
7cc2ca3
Add more panels until support
DianaXWiki Feb 29, 2024
d0d3496
New support: migration from the legacy system
yflory Feb 29, 2024
a10f903
Add working disk-usage and getlimits
DianaXWiki Feb 29, 2024
8048335
New support: show pending tickets on a single column
yflory Mar 1, 2024
563c018
New support: fix scroll after refresh and add copy button to profile
yflory Mar 1, 2024
2618eeb
Merge branch 'sidebar' into support2
yflory Mar 1, 2024
5283fda
New support: pre-recorded messages
yflory Mar 1, 2024
c101765
New support: fix race condition causing UI issues
yflory Mar 1, 2024
50f0159
Add new panels refactored
DianaXWiki Mar 3, 2024
ec5bfc2
New support: add tags to tickets
yflory Mar 4, 2024
a8ae2eb
New support: filter by tag
yflory Mar 4, 2024
b943930
New support: responsiveness
yflory Mar 6, 2024
a4bdc64
New support: add search and fix UI issues
yflory Mar 6, 2024
eaf94f6
New support: fix UI issues
yflory Mar 6, 2024
0cc8766
New support: cleaning
yflory Mar 6, 2024
6a3bc3c
New support: fix type error
yflory Mar 8, 2024
a7f1fcc
Fix functionalities for refactored panels
DianaXWiki Mar 12, 2024
101e551
Implement review fixes
DianaXWiki Mar 12, 2024
349e45e
Fix user directory in new admin panel
yflory Mar 13, 2024
6a050ad
Merge branch 'staging' into support2
yflory Mar 13, 2024
25098e2
lint compliance
yflory Mar 13, 2024
26c65c8
Fix database functionality and create radio broadcast element
DianaXWiki Mar 14, 2024
d4d9ff9
Fix buttons in admin panel staying disabled
yflory Mar 14, 2024
2e9fa4e
Rename sidebar-layout blocks
yflory Mar 14, 2024
3f42b92
Fix minor issue wiht admin refactoring
yflory Mar 14, 2024
1063fd3
lint compliance
yflory Mar 14, 2024
58b3a80
Fix user storage + statistics
DianaXWiki Mar 15, 2024
7d141f9
Fix issue with new dropdowns
yflory Mar 15, 2024
0560739
Allow admin to upload a new logo for the instance
yflory Mar 15, 2024
21025c3
Upload logo: fix issue and add button to restore default logo
yflory Mar 15, 2024
944fb63
Merge branch 'staging' into admin-customize
yflory Mar 15, 2024
c07fc80
Merge branch 'sidebar' into support2
yflory Mar 15, 2024
aaf5de2
Remove test app
yflory Mar 15, 2024
c91d89d
Merge branch 'staging' into sidebar
yflory Mar 15, 2024
71fa786
lint compliance
yflory Mar 15, 2024
b4d9a0d
Merge branch 'sidebar' into support2
yflory Mar 15, 2024
237b712
Fix issues after sidebar merge
yflory Mar 15, 2024
14c05fd
Fix button placement + maintenance
DianaXWiki Mar 16, 2024
aa56739
Merge branch 'sidebar' of https://github.com/cryptpad/cryptpad into s…
DianaXWiki Mar 16, 2024
d8ea21d
Add additional styling
DianaXWiki Mar 16, 2024
b7d9e40
Re-add fixes that were lost during merge
yflory Mar 18, 2024
2357d64
Commit modified labelledInput function + changes from review
DianaXWiki Mar 19, 2024
5f5371e
Survey: refresh only the link and not the form
yflory Mar 19, 2024
eb74673
Merge branch 'sidebar' into support2
yflory Mar 19, 2024
7ddd8cd
Add new support initialization to refactored admin page
yflory Mar 19, 2024
0d213c8
Merge branch 'sidebar' into admin-customize
yflory Mar 19, 2024
f147ad4
Add admin customize section to refactored admin page
yflory Mar 19, 2024
0dcce94
Add color customization and add updated logo to loading screen
yflory Mar 19, 2024
0791242
Fix hiding support message after merge with other branches
yflory Mar 20, 2024
b80a6e6
Apply box-sizing property to avoid bootstrap requirement
yflory Mar 20, 2024
e6fe295
Merge branch 'sidebar' into support2
yflory Mar 20, 2024
25522de
Make newadmin default
yflory Mar 20, 2024
53707f2
Merge branch 'admin-customize' into support2
yflory Mar 20, 2024
6ffa611
Merge branch 'sidebar' into admin-support-sidebar
yflory Mar 20, 2024
f233d6d
Apply style rules for admin/customize section
yflory Mar 20, 2024
012f9a7
Support: UI fixes
yflory Mar 20, 2024
deb9613
Fix UI issues in moderation app
yflory Mar 21, 2024
5cbb752
More UI fixes
yflory Mar 21, 2024
769a605
Merge branch 'staging' into admin-support-sidebar
yflory Mar 21, 2024
e3a9a27
lint compliance
yflory Mar 21, 2024
606de4c
Hide empty tables
yflory Mar 21, 2024
b998cc0
Re-organise categories
davidbenque Mar 22, 2024
747aeaf
Placeholder microcopy for admin customizations
davidbenque Mar 22, 2024
d3a402e
Microcopy and icon change
davidbenque Mar 22, 2024
347f418
Edit
davidbenque Mar 22, 2024
1491345
Re-organise admin categories
davidbenque Mar 25, 2024
8f3ee15
Split support setup and support team management in admin page
yflory Mar 25, 2024
5adc43c
Support setup: add button to open support page
yflory Mar 25, 2024
7e4caca
Flush cache automatically after admin panel update
yflory Mar 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion customize.dist/loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ define([

elem.innerHTML = [
'<div class="cp-loading-logo">',
'<img class="cp-loading-cryptofist" src="/customize/CryptPad_logo.svg?' + urlArgs + '" alt="' + Messages.label_logo + '">',
'<img class="cp-loading-cryptofist" src="/api/logo?' + urlArgs + '" alt="' + Messages.label_logo + '">',
'</div>',
'<div class="cp-loading-container">',
'<div class="cp-loading-spinner-container">',
Expand Down
2 changes: 1 addition & 1 deletion customize.dist/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ define([
h('div.row.cp-home-hero', [
h('div.cp-title.col-lg-6', [
h('img', {
src: '/customize/CryptPad_logo_hero.svg?' + urlArgs,
src: '/api/logo?' + urlArgs,
'aria-hidden': 'true',
alt: ''
}),
Expand Down
2 changes: 1 addition & 1 deletion customize.dist/pre-loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(function () {
var logoPath = '/customize/CryptPad_logo.svg';
if (location.pathname === '/' || location.pathname === '/index.html') {
logoPath = '/customize/CryptPad_logo_hero.svg';
logoPath = '/api/logo';
}

var elem = document.createElement('div');
Expand Down
20 changes: 10 additions & 10 deletions customize.dist/src/less2/include/colortheme-dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@
@colortheme_app-font-size-small: 13px;
@colortheme_app-font: @colortheme_app-font-size @colortheme_font;

// Colors
@cryptpad_color_brand: #0087FF;
@cryptpad_color_brand_300: lighten(@cryptpad_color_brand, 30%);
@cryptpad_color_brand_fade: fade(@cryptpad_color_brand, 75%);
@cryptpad_color_brand_fader: fade(@cryptpad_color_brand, 50%);
@cryptpad_color_brand_fadest: fade(@cryptpad_color_brand, 25%);

@colortheme_apps: {
default: #0087FF;
drive: #0087FF; // Used as icon color in index.js (index.html)
default: @cryptpad_color_brand;
drive: @cryptpad_color_brand; // Used as icon color in index.js (index.html)
pad: #256ad5;
code: #EAA000;
slide: #e57614;
Expand All @@ -27,18 +34,11 @@
}

@colortheme_static_apps: {
default: #0087FF;
default: @cryptpad_color_brand;
teams: #4A3BBD;
contacts: #607B8D;
}

// Colors
@cryptpad_color_brand: #0087FF;
@cryptpad_color_brand_300: lighten(@cryptpad_color_brand, 30%);
@cryptpad_color_brand_fade: fade(@cryptpad_color_brand, 75%);
@cryptpad_color_brand_fader: fade(@cryptpad_color_brand, 50%);
@cryptpad_color_brand_fadest: fade(@cryptpad_color_brand, 25%);

@cryptpad_color_white: #FFF;
@cryptpad_color_grey_50: #FAFAFA;
@cryptpad_color_grey_100: #F5F5F5;
Expand Down
20 changes: 10 additions & 10 deletions customize.dist/src/less2/include/colortheme.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@
@colortheme_app-font-size-small: 13px;
@colortheme_app-font: @colortheme_app-font-size @colortheme_font;

// Colors
@cryptpad_color_brand: #0087FF;
@cryptpad_color_brand_300: lighten(@cryptpad_color_brand, 30%);
@cryptpad_color_brand_fade: fade(@cryptpad_color_brand, 75%);
@cryptpad_color_brand_fader: fade(@cryptpad_color_brand, 50%);
@cryptpad_color_brand_fadest: fade(@cryptpad_color_brand, 25%);

@colortheme_apps: {
default: #0087FF;
drive: #0087FF; // Used as icon color in index.js (index.html)
default: @cryptpad_color_brand;
drive: @cryptpad_color_brand; // Used as icon color in index.js (index.html)
pad: #256ad5;
code: #EAA000;
slide: #e57614;
Expand All @@ -27,18 +34,11 @@
}

@colortheme_static_apps: {
default: #0087FF;
default: @cryptpad_color_brand;
teams: #4A3BBD;
contacts: #607B8D;
}

// Colors
@cryptpad_color_brand: #0087FF;
@cryptpad_color_brand_300: lighten(@cryptpad_color_brand, 30%);
@cryptpad_color_brand_fade: fade(@cryptpad_color_brand, 75%);
@cryptpad_color_brand_fader: fade(@cryptpad_color_brand, 50%);
@cryptpad_color_brand_fadest: fade(@cryptpad_color_brand, 25%);

@cryptpad_color_white: #FFF;
@cryptpad_color_grey_50: #FAFAFA;
@cryptpad_color_grey_100: #F5F5F5;
Expand Down
3 changes: 2 additions & 1 deletion customize.dist/src/less2/include/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
}

textarea, div.cp-textarea {
padding: 8px;
padding: 8px @alertify_padding-base;
&[readonly] {
overflow: hidden;
resize: none;
Expand Down Expand Up @@ -130,6 +130,7 @@
text-align: center;
text-transform: uppercase;
font-size: 14px;
font-family: inherit;
text-decoration: none;
cursor: pointer;
border-radius: @variables_radius;
Expand Down
3 changes: 2 additions & 1 deletion customize.dist/src/less2/include/loading.less
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
margin-left: auto;
margin-right: auto;
max-width: 90vw;
max-height: 300px;
max-height: ~"max(40vh, 250px)";
//max-height: 300px;
width: auto;
height: auto;
margin-bottom: 2em;
Expand Down
8 changes: 8 additions & 0 deletions customize.dist/src/less2/include/notifications.less
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@
.avatar_main(30px);
padding: 0 5px;
}
.cp-avatar-image {
display: inline-flex;
align-items: center;
justify-content: center;
img {
height: 40px;
}
}
.cp-notification-content {
flex: 1;
align-items: stretch;
Expand Down
155 changes: 146 additions & 9 deletions customize.dist/src/less2/include/sidebar-layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
@import (reference) "/customize/src/less2/include/leftside-menu.less";
@import (reference) "/customize/src/less2/include/browser.less";

@sidebar_button-width: 400px;
@sidebar_block-width: 25rem;;
@sidebar_base-margin: 0.5rem;

.sidebar-layout_main() {
--LessLoader_require: LessLoader_currentFile();
Expand All @@ -24,6 +25,9 @@
display: flex;
flex: 1;
min-height: 0;
* {
box-sizing: border-box;
}
@media(min-width:800px) {
#cp-sidebarlayout-leftside {
overflow-y: scroll;
Expand Down Expand Up @@ -91,15 +95,140 @@
pre {
color: @cryptpad_text_col;
}
label:not(.noTitle), .cp-default-label {
display: block;
font-weight: bold;
margin-bottom: 0;

&.cp-sidebar-force-hide {
display: none !important;
}

&:not([data-item]) { // Old sidebar-layout blocks
label:not(.noTitle), .cp-default-label {
display: block;
font-weight: bold;
margin-bottom: 0;
}
}
&[data-item] { // New sidebar-layout blocks
label.cp-item-label, .cp-default-label {
display: block;
font-weight: bold;
margin-bottom: 0;
}
.cp-sidebar-form {
display: flex;
flex-flow: column;
align-items: baseline;
}
label {
margin-bottom: 0;
}
input, textarea {
font-family: inherit;
max-width: @sidebar_block-width;
}
[type="color"] {
width: @sidebar_block-width/5;
padding: 3px;
}
.cp-labelled-input {
margin-top: @sidebar_base-margin;
max-width: ~"min(100%, 25rem)";
width: @sidebar_block-width;
label {
width: 100%;
}
}
nav {
display: flex;
align-items: baseline;
margin-top: @sidebar_base-margin;
.btn {
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
}
}
.cp-sidebar-flex-block {
display: flex;
align-items: center;
nav {
margin-top: 0;
}
}
nav, .cp-sidebar-flex-block {
& > * {
margin-right: @sidebar_base-margin;
&:last-child {
margin-right: 0;
}
}
}
.cp-sidebar-bigger-alert {
font-size: 16px;
}
.cp-checkmark {
padding: @sidebar_base-margin;
padding-left: 0;
}
code {
color: @cryptpad_text_col;
}
.cp-sidebar-table {
margin-top: @sidebar_base-margin;
pre {
margin: 0;
}
th {
border: 1px solid @cp_drive-icon-border;
padding: 7px;
}
td {
border: 1px solid @cp_drive-icon-border;
padding: 0.3rem;
margin-right: 2px;
*:not(:last-child) {
margin-right: @sidebar_base-margin;
}
}
tbody {
tr:nth-child(odd) {
background-color: @cp_sidebar-left-item-bg;
}
}
}
.cp-sidebar-input-block {
display: inline-flex;
width: @sidebar_block-width;
max-width: 100%;
input {
flex: 1;
//border-radius: 0.25em 0 0 0.25em;
border: 1px solid @cryptpad_color_grey_500;
border-right: 0px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
button {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border-left: 0px;
height: 40px;
margin: 0 !important;
}
}
a {
color: @cryptpad_color_link;
text-decoration: underline;
}
table {
.cp-strong {
font-weight: bold;
}
}
}
.cp-sidebarlayout-description {
display: block;
color: @cp_sidebar-hint;
margin-bottom: 0.5rem;
margin-bottom: @sidebar_base-margin;
p {
margin-bottom: 0;
}
Expand All @@ -121,9 +250,14 @@
height: 40px;
box-sizing: border-box;
}
[type="file"] { // XXX hack, to fix with sidebar layout refactoring
height: auto;
box-sizing: border-box;
padding: 6.5px;
}
.cp-sidebarlayout-input-block {
display: inline-flex;
width: @sidebar_button-width;
width: @sidebar_block-width;
max-width: 100%;
input {
flex: 1;
Expand All @@ -145,7 +279,10 @@
margin: 10px 0;
}
button.btn {
margin: 0 0.5rem 0 0;
margin: 0 @sidebar_base-margin 0 0;
&:last-child {
margin-right: 0;
}
}
span.cp-password-container {
margin-bottom: 1rem;
Expand All @@ -159,7 +296,7 @@
padding-bottom: 20px;
.cp-sidebarlayout-categories {
.cp-sidebarlayout-category {
margin: 0 0 0.5rem 0;
margin: 0 0 @sidebar_base-margin 0;
span.cp-sidebar-layout-category-name {
display: inline !important; // override "narrow" mode
}
Expand Down
Loading