diff --git a/customize.dist/src/less2/include/alertify.less b/customize.dist/src/less2/include/alertify.less index b118b5df0..50da34969 100644 --- a/customize.dist/src/less2/include/alertify.less +++ b/customize.dist/src/less2/include/alertify.less @@ -70,10 +70,13 @@ .lucide { width: 1.2em; height: 1.2em; - margin-right: 0.2rem; + margin-right: @variables_icon_margin; } .cp-checkmark { color: @cryptpad_text_col; + svg { + margin: 0; + } } .cp-admin-message { @@ -220,9 +223,6 @@ border-radius: @variables_radius; } } - svg { - margin: 0; - } } } .cp-alertify-type-container { diff --git a/customize.dist/src/less2/include/drive.less b/customize.dist/src/less2/include/drive.less index b6b859c5e..2133d94aa 100644 --- a/customize.dist/src/less2/include/drive.less +++ b/customize.dist/src/less2/include/drive.less @@ -30,7 +30,7 @@ .lucide { width: 1.2em; height: 1.2em; - margin-right: 0.2rem; + margin-right: @variables_icon_margin; } .cp-unselectable { .tools_unselectable(); diff --git a/customize.dist/src/less2/include/infopages.less b/customize.dist/src/less2/include/infopages.less index 6695d68ea..709b0b8a3 100644 --- a/customize.dist/src/less2/include/infopages.less +++ b/customize.dist/src/less2/include/infopages.less @@ -54,7 +54,7 @@ body.html { .lucide { width: 1.2em; height: 1.2em; - margin-right: 0.2rem; + margin-right: @variables_icon_margin; } border: 0; padding: 0; diff --git a/customize.dist/src/less2/include/notifications.less b/customize.dist/src/less2/include/notifications.less index 11b0b6ee1..59fdf2318 100644 --- a/customize.dist/src/less2/include/notifications.less +++ b/customize.dist/src/less2/include/notifications.less @@ -14,7 +14,7 @@ .lucide { width: 1.2rem; height: 1.2rem; - margin-right: 0.2rem; + margin-right: @variables_icon_margin; } @notif-height: 50px; .cp-notifications-container { diff --git a/customize.dist/src/less2/include/toolbar.less b/customize.dist/src/less2/include/toolbar.less index ede063668..86c07c04e 100644 --- a/customize.dist/src/less2/include/toolbar.less +++ b/customize.dist/src/less2/include/toolbar.less @@ -438,7 +438,7 @@ svg { height: 1.125em; width: 1.125em; - margin-right: 0.5em; + margin-right: @variables_icon_margin; } } diff --git a/customize.dist/src/less2/include/variables.less b/customize.dist/src/less2/include/variables.less index 1df205e11..2db4df261 100644 --- a/customize.dist/src/less2/include/variables.less +++ b/customize.dist/src/less2/include/variables.less @@ -23,3 +23,5 @@ @variables_radius_L: 10px; @variables_focus_style: @cryptpad_color_brand solid 2px; + +@variables_icon_margin: 0.2rem; diff --git a/customize.dist/src/less2/pages/page-index.less b/customize.dist/src/less2/pages/page-index.less index 2d77b7ebf..ddbedd5e9 100644 --- a/customize.dist/src/less2/pages/page-index.less +++ b/customize.dist/src/less2/pages/page-index.less @@ -91,7 +91,7 @@ margin-top: 20px; svg { font-size: 1.2em; - margin-right: 5px; + margin-right: @variables_icon_margin; } } .cp-instance-links { diff --git a/www/calendar/app-calendar.less b/www/calendar/app-calendar.less index 5555ed8f5..c2c204ebb 100644 --- a/www/calendar/app-calendar.less +++ b/www/calendar/app-calendar.less @@ -677,7 +677,7 @@ position: initial; .cp-dropdown-content{ svg { - margin-right: 0.2rem; + margin-right: @variables_icon_margin; } @media screen and (max-width: 600px) { diff --git a/www/form/app-form.less b/www/form/app-form.less index bfbd27264..1a9ebe76b 100644 --- a/www/form/app-form.less +++ b/www/form/app-form.less @@ -102,7 +102,7 @@ .cp-form-color-container { span.cp-form-palette { svg.lucide { - margin: 0.2rem; + margin: @variables_icon_margin; } } .is-hidden { diff --git a/www/install/onboardscreen.js b/www/install/onboardscreen.js index 6440b46b2..75f2a2dbf 100644 --- a/www/install/onboardscreen.js +++ b/www/install/onboardscreen.js @@ -43,6 +43,7 @@ define([ var nextPageForm = nextPageFunction(Env); let frame = h('div.cp-onboarding-box', nextPageForm); Env.overlay.empty().append(frame); + Lucide.createIcons(); }; const blocks = Sidebar.blocks('admin'); diff --git a/www/secureiframe/app-secure.less b/www/secureiframe/app-secure.less index 5d7adb6b4..cee46b2d7 100644 --- a/www/secureiframe/app-secure.less +++ b/www/secureiframe/app-secure.less @@ -35,7 +35,7 @@ .lucide { height:1.2rem; width: 1.2rem; - margin-right: 0.2rem; + margin-right: @variables_icon_margin; } .cp-modal { border-radius: @variables_radius_L; diff --git a/www/teams/app-team.less b/www/teams/app-team.less index a330b265a..fb0f4bc66 100644 --- a/www/teams/app-team.less +++ b/www/teams/app-team.less @@ -273,13 +273,18 @@ .tools_unselectable(); } .cp-team-member-actions { - .fa { + span{ + border-radius: @variables_radius; + cursor: pointer; + &:focus-visible { + outline: @variables_focus_style; + } + } + svg { height: 25px; width: 25px; - display: inline-flex; - justify-content: center; - align-items: center; - cursor: pointer; + border-radius: @variables_radius; + margin: 0; &:hover { background-color: @roster-bg-color-hover2; } diff --git a/www/teams/inner.js b/www/teams/inner.js index b4ef0e049..4cd93fda3 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -812,10 +812,11 @@ define([ var ADMIN = ROLES.indexOf('ADMIN'); // If they're an admin and I am an owner, I can promote them to owner if (!isMe && myRole > theirRole && theirRole === ADMIN && !data.pending) { - var promoteOwner = Icons.get('promote', { - title: Messages.team_rosterPromoteOwner + var promoteOwner = h('span', Icons.get('promote'), { + title: Messages.team_rosterPromoteOwner, + 'tabindex': '0' }); - $(promoteOwner).click(function () { + Util.onClickEnter($(promoteOwner), function () { UI.confirm(Messages.team_ownerConfirm, function (yes) { if (!yes) { return; } $(promoteOwner).hide(); @@ -835,10 +836,11 @@ define([ } // If they're a viewer/member and I have a higher role than them, I can promote them to admin if (!isMe && myRole >= ADMIN && theirRole < ADMIN && !data.pending) { - var promote = Icons.get('promote', { - title: Messages.team_rosterPromote + var promote = h('span', Icons.get('promote'), { + title: Messages.team_rosterPromote, + 'tabindex': '0' }); - $(promote).click(function () { + Util.onClickEnter($(promote), function () { $(promote).hide(); describeUser(common, data.curvePublic, { role: ROLES[theirRole + 1] @@ -849,10 +851,11 @@ define([ // If I'm not a member and I have an equal or higher role than them, I can demote them // (if they're not already a MEMBER) if (myRole >= theirRole && myRole >= ADMIN && theirRole > 0 && !data.pending) { - var demote = Icons.get('downgrade', { - title: Messages.team_rosterDemote + var demote = h('span', Icons.get('downgrade'), { + title: Messages.team_rosterDemote, + 'tabindex': '0' }); - $(demote).click(function () { + Util.onClickEnter($(demote), function () { var todo = function () { var role = ROLES[theirRole - 1] || 'VIEWER'; $(demote).hide(); @@ -875,10 +878,11 @@ define([ // If I'm at least an admin and I have an equal or higher role than them, I can remove them // Note: we can't remove owners, we have to demote them first if (!isMe && myRole >= ADMIN && myRole >= theirRole && theirRole !== ROLES.indexOf('OWNER')) { - var remove = Icons.get('close', { - title: Messages.team_rosterKick + var remove = h('span', Icons.get('close'), { + title: Messages.team_rosterKick, + 'tabindex': 0 }); - $(remove).click(function () { + Util.onClickEnter($(remove), function () { UI.confirm(Messages._getKey('team_kickConfirm', [Util.fixHTML(displayName)]), function (yes) { if (!yes) { return; } APP.module.execCommand('REMOVE_USER', { @@ -930,6 +934,7 @@ define([ common.openURL('/profile/#' + data.profile); }); } + setTimeout(() => Lucide.createIcons()); return div; }; APP.refreshRoster = function (common, roster) { diff --git a/www/whiteboard/app-whiteboard.less b/www/whiteboard/app-whiteboard.less index b288438a4..ff9c568cd 100644 --- a/www/whiteboard/app-whiteboard.less +++ b/www/whiteboard/app-whiteboard.less @@ -87,7 +87,7 @@ #cp-app-whiteboard-clear { svg { - margin-right: 0.2rem; + margin-right: @variables_icon_margin; } display: inline-flex; align-items: center;