mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
update icons
This commit is contained in:
parent
f130de70b9
commit
dfc4743f68
@ -143,7 +143,7 @@ define([
|
||||
var locationBlock;
|
||||
if (Pages.Instance.location) {
|
||||
locationBlock = h('div.cp-instance-location', [
|
||||
h('i.fa.fa-map-pin', {'aria-hidden': 'true'}),
|
||||
Icons.get('map-pin'),
|
||||
Msg._getKey('home_location', [ Pages.Instance.location ]),
|
||||
]);
|
||||
} else {
|
||||
|
||||
@ -197,7 +197,8 @@ define([
|
||||
"badge-error": "circle-alert",
|
||||
"remove-history": "eraser",
|
||||
"square": "square",
|
||||
"timer": "hourglass"
|
||||
"timer": "hourglass",
|
||||
"map-pin": "map-pin"
|
||||
};
|
||||
|
||||
Icons.get = (name, attrs = {}) => {
|
||||
|
||||
@ -17,10 +17,12 @@ define([
|
||||
'/customize/pages.js',
|
||||
'/common/rpc.js',
|
||||
'onboardscreen.js',
|
||||
'/customize/fonts/lucide.js',
|
||||
'/common/common-icons.js',
|
||||
|
||||
'less!/install/onboarding.less',
|
||||
'css!/components/components-font-awesome/css/font-awesome.min.css',
|
||||
], function ($, Login, Cryptpad, /*Test,*/ Cred, UI, Util, Realtime, Constants, Feedback, LocalStore, h, Pages, Rpc, OnboardScreen) {
|
||||
], function ($, Login, Cryptpad, /*Test,*/ Cred, UI, Util, Realtime, Constants, Feedback, LocalStore, h, Pages, Rpc, OnboardScreen, Lucide, Icons) {
|
||||
if (window.top !== window) { return; }
|
||||
var Messages = Cryptpad.Messages;
|
||||
$(function () {
|
||||
@ -144,7 +146,7 @@ define([
|
||||
setTimeout(function () {
|
||||
var span = h('span', [
|
||||
h('h2', [
|
||||
h('i.fa.fa-warning'),
|
||||
Icons.get('alert'),
|
||||
' ',
|
||||
Messages.register_warning,
|
||||
]),
|
||||
|
||||
@ -13,6 +13,8 @@ define([
|
||||
'/common/common-ui-elements.js',
|
||||
'/common/pad-types.js',
|
||||
'/components/nthen/index.js',
|
||||
'/customize/fonts/lucide.js',
|
||||
'/common/common-icons.js',
|
||||
|
||||
'css!/components/bootstrap/dist/css/bootstrap.min.css',
|
||||
'css!/components/components-font-awesome/css/font-awesome.min.css',
|
||||
@ -27,7 +29,9 @@ define([
|
||||
Util,
|
||||
UIElements,
|
||||
PadTypes,
|
||||
nThen
|
||||
nThen,
|
||||
Lucide,
|
||||
Icons
|
||||
) {
|
||||
|
||||
let pages = [];
|
||||
@ -314,7 +318,7 @@ define([
|
||||
[
|
||||
icon,
|
||||
h('span.cp-app-name', name),
|
||||
h('i.fa.fa-check.cp-on-enabled')
|
||||
Icons.get('check', {'class': 'cp-on-enabled'})
|
||||
]);
|
||||
let $app = $(appBlock).appendTo($grid);
|
||||
if (appsToDisable.includes(app)) {
|
||||
|
||||
@ -22,6 +22,8 @@ define([
|
||||
'json.sortify',
|
||||
|
||||
'/lib/datepicker/flatpickr.js',
|
||||
'/customize/fonts/lucide.js',
|
||||
'/common/common-icons.js',
|
||||
'/components/tweetnacl/nacl-fast.min.js',
|
||||
|
||||
'css!/lib/datepicker/flatpickr.min.css',
|
||||
@ -46,7 +48,9 @@ define([
|
||||
Support,
|
||||
Clipboard,
|
||||
Sortify,
|
||||
Flatpickr
|
||||
Flatpickr,
|
||||
Lucide,
|
||||
Icons
|
||||
)
|
||||
{
|
||||
var APP = {
|
||||
@ -1633,7 +1637,7 @@ Example
|
||||
var url = privateData.origin + Hash.hashToHref(key, 'register');
|
||||
|
||||
var del = h('button.btn.btn-danger', [
|
||||
h('i.fa.fa-trash'),
|
||||
Icons.get('trash-full'),
|
||||
h('span', Messages.kanban_delete)
|
||||
]);
|
||||
var $del = $(del);
|
||||
@ -1646,7 +1650,7 @@ Example
|
||||
});
|
||||
});
|
||||
var copy = h('button.btn.btn-secondary', [
|
||||
h('i.fa.fa-clipboard'),
|
||||
Icons.get('copy'),
|
||||
h('span', Messages.admin_invitationCopy)
|
||||
]);
|
||||
Util.onClickEnter($(copy), function () {
|
||||
@ -1834,7 +1838,7 @@ Example
|
||||
var data = all[key];
|
||||
var editUser = () => {};
|
||||
var del = h('button.btn.btn-danger', [
|
||||
h('i.fa.fa-trash'),
|
||||
Icons.get('trash-full'),
|
||||
Messages.admin_usersRemove
|
||||
]);
|
||||
var $del = $(del);
|
||||
@ -1847,7 +1851,7 @@ Example
|
||||
});
|
||||
});
|
||||
var edit = h('button.btn.btn-secondary', [
|
||||
h('i.fa.fa-pencil'),
|
||||
Icons.get('edit'),
|
||||
h('span', Messages.tag_edit)
|
||||
]);
|
||||
Util.onClickEnter($(edit), function () {
|
||||
@ -1889,7 +1893,7 @@ Example
|
||||
var infoButton = h('button.btn.primary.cp-report', {
|
||||
style: 'margin-left: 10px; cursor: pointer;',
|
||||
}, [
|
||||
h('i.fa.fa-database'),
|
||||
Icons.get('database'),
|
||||
h('span', Messages.admin_diskUsageButton)
|
||||
]);
|
||||
$(infoButton).click(() => {
|
||||
@ -3906,15 +3910,15 @@ Example
|
||||
};
|
||||
|
||||
var SIDEBAR_ICONS = {
|
||||
general: 'fa fa-user-o',
|
||||
stats: 'fa fa-line-chart',
|
||||
users: 'fa fa-address-card-o',
|
||||
quota: 'fa fa-hdd-o',
|
||||
support: 'fa fa-life-ring',
|
||||
broadcast: 'fa fa-bullhorn',
|
||||
performance: 'fa fa-heartbeat',
|
||||
network: 'fa fa-sitemap', // or fa-university ?
|
||||
database: 'fa fa-database',
|
||||
general: 'user-profile',
|
||||
stats: 'stats',
|
||||
users: 'teams',
|
||||
quota: 'drive',
|
||||
support: 'support',
|
||||
broadcast: 'broadcast',
|
||||
performance: 'performance',
|
||||
network: 'newtork',
|
||||
database: 'database',
|
||||
};
|
||||
|
||||
var createLeftside = function () {
|
||||
@ -3932,7 +3936,7 @@ Example
|
||||
var iconClass = SIDEBAR_ICONS[key];
|
||||
var icon;
|
||||
if (iconClass) {
|
||||
icon = h('span', { class: iconClass });
|
||||
icon = Icons.get(iconClass);
|
||||
}
|
||||
var $category = $(h('div', {
|
||||
'tabindex': 0,
|
||||
|
||||
@ -15,8 +15,10 @@ define([
|
||||
'/common/outer/local-store.js',
|
||||
'/common/outer/login-block.js',
|
||||
'/customize/messages.js',
|
||||
'/customize/fonts/lucide.js',
|
||||
'/common/common-icons.js',
|
||||
], function (ApiConfig, $, h, Util, Cred, UI, Login, Constants,
|
||||
ServerCommand, LocalStore, Block, Messages) {
|
||||
ServerCommand, LocalStore, Block, Messages, Lucide, Icons) {
|
||||
if (window.top !== window) { return; }
|
||||
|
||||
let ssoAuthCb = function (cb) {
|
||||
@ -150,7 +152,7 @@ define([
|
||||
if (data.register) {
|
||||
var span = h('span', [
|
||||
h('h2', [
|
||||
h('i.fa.fa-warning'),
|
||||
Icons.get('alert'),
|
||||
' ',
|
||||
Messages.register_warning,
|
||||
]),
|
||||
|
||||
@ -13,7 +13,9 @@ define([
|
||||
'/common/common-ui-elements.js',
|
||||
'/customize/messages.js',
|
||||
'/customize/pages.js',
|
||||
], function ($, ApiConfig, h, UI, Hash, Util, Clipboard, UIElements, Messages, Pages) {
|
||||
'/customize/fonts/lucide.js',
|
||||
'/common/common-icons.js',
|
||||
], function ($, ApiConfig, h, UI, Hash, Util, Clipboard, UIElements, Messages, Pages, Lucide, Icons) {
|
||||
|
||||
var getDebuggingData = function (ctx, data) {
|
||||
var common = ctx.common;
|
||||
@ -244,7 +246,7 @@ define([
|
||||
$recorded.append(h('span.cp-support-recorded-insert',
|
||||
Messages.support_insertRecorded));
|
||||
let $span = $(h('span')).appendTo($recorded);
|
||||
let $fakeMore = $(h('button.btn.btn-secondary.fa.fa-ellipsis-h.cp-fake-dropdown')).appendTo($recorded);
|
||||
let $fakeMore = $(h('button.btn.btn-secondary.cp-fake-dropdown', Icons.get('ellipsis-horizontal'))).appendTo($recorded);
|
||||
let opts = [];
|
||||
|
||||
let all = recorded.all;
|
||||
@ -286,8 +288,8 @@ define([
|
||||
});
|
||||
});
|
||||
let dropdownConfig = {
|
||||
//buttonContent: [ h('i.fa.fa-ellipsis-h') ],
|
||||
buttonCls: 'btn btn-secondary fa fa-ellipsis-h',
|
||||
buttonCls: 'btn btn-secondary',
|
||||
iconCls: 'ellipsis-horizontal',
|
||||
options: opts, // Entries displayed in the menu
|
||||
left: true, // Open to the left of the button
|
||||
common: ctx.common
|
||||
@ -328,7 +330,7 @@ define([
|
||||
'data-name': name,
|
||||
'data-href': href
|
||||
}, [
|
||||
x = h('i.fa.fa-times'),
|
||||
x = Icons.get('close'),
|
||||
a = h('a', {
|
||||
href: '#'
|
||||
}, name)
|
||||
@ -410,7 +412,7 @@ define([
|
||||
// Admin actions
|
||||
|
||||
// Copy URL
|
||||
let url = h('button.btn.fa.fa-link', { title: Messages.share_linkCopy, });
|
||||
let url = h('button.btn', { title: Messages.share_linkCopy, }, Icons.get('link'));
|
||||
$(url).click(function (e) {
|
||||
e.stopPropagation();
|
||||
let cat = content.category === 'closed' ? 'closed' : 'open';
|
||||
@ -455,7 +457,7 @@ define([
|
||||
if (onMove && !onMove.disableMove) {
|
||||
let text = onMove.isTicketActive ? Messages.support_movePending
|
||||
: Messages.support_moveActive;
|
||||
move = h('button.btn.btn-secondary.fa.fa-archive', { title: text });
|
||||
move = h('button.btn.btn-secondary', { title: text }, Icons.get('history'));
|
||||
Util.onClickEnter($(move), function () {
|
||||
onMove(ticket, id, content);
|
||||
});
|
||||
@ -463,9 +465,9 @@ define([
|
||||
|
||||
let tag;
|
||||
if (onTag && onTag.getAllTags) {
|
||||
tag = h('button.btn.btn-secondary.fa.fa-tags', {
|
||||
tag = h('button.btn.btn-secondary', {
|
||||
title: Messages.fm_tagsName
|
||||
});
|
||||
}, Icons.get('tag'));
|
||||
if (onTag.readOnly) { tag = undefined; }
|
||||
tagsContainer = h('div.cp-support-ticket-tags');
|
||||
tagsList = h('div.cp-tags-list');
|
||||
@ -510,7 +512,7 @@ define([
|
||||
$tags.toggle();
|
||||
});
|
||||
let close = h('button.btn.btn-secondary.cp-token-close', [
|
||||
h('i.fa.fa-times'),
|
||||
Icons.get('close'),
|
||||
h('span', Messages.filePicker_close)
|
||||
]);
|
||||
Util.onClickEnter($(close), () => {
|
||||
@ -610,9 +612,9 @@ define([
|
||||
|| (!senderKey && content.sender.accountName === 'support'); // XXX anon key?
|
||||
var fromPremium = Boolean(content.sender.plan || Util.find(content, ['sender', 'quota', 'plan']));
|
||||
|
||||
var copyUser = h('button.btn.btn-secondary.fa.fa-clipboard.cp-support-copydata', {
|
||||
var copyUser = h('button.btn.btn-secondary.cp-support-copydata', {
|
||||
title: Messages.support_copyUserData
|
||||
});
|
||||
}, Icons.get('copy'));
|
||||
Util.onClickEnter($(copyUser), () => {
|
||||
let data = JSON.stringify({
|
||||
name: content.sender.name,
|
||||
|
||||
@ -458,7 +458,7 @@ define([
|
||||
title: Messages.canvas_imageEmbed,
|
||||
text: Messages.toolbar_insert,
|
||||
drawer: false,
|
||||
icon: 'fa-picture-o',
|
||||
icon: 'file-image',
|
||||
name: 'mediatag'
|
||||
}).click(function () {
|
||||
$('<input>', {type:'file'}).on('change', onUpload).click();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user