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
ab9f718344
commit
271cf2a880
@ -36,14 +36,14 @@ define([
|
||||
var c = types.indexOf(data.type);
|
||||
current = c;
|
||||
var getLi = function (i) {
|
||||
var check = (i < c || (i === c && data.progress >= 100)) ? 'fa-check-square-o'
|
||||
: 'fa-square-o';
|
||||
var check = (i < c || (i === c && data.progress >= 100)) ? 'square-check'
|
||||
: 'square';
|
||||
var percentStr = '';
|
||||
if (i === c) {
|
||||
var p = Math.min(Math.floor(data.progress), 100);
|
||||
percentStr = '<span class="percent">('+p+'%)</span>';
|
||||
}
|
||||
return '<li><i class="fa '+check+'"></i><span>'+Messages['loading_state_'+i]+'</span>' + percentStr;
|
||||
return '<li><i data-lucide="'+check+'"></i><span>'+Messages['loading_state_'+i]+'</span>' + percentStr;
|
||||
};
|
||||
var list = '<ul>';
|
||||
types.forEach(function (el, i) {
|
||||
|
||||
@ -198,7 +198,10 @@ define([
|
||||
"remove-history": "eraser",
|
||||
"square": "square",
|
||||
"timer": "hourglass",
|
||||
"map-pin": "map-pin"
|
||||
"map-pin": "map-pin",
|
||||
"checked-box": "square-check",
|
||||
"unchecked-box": "square",
|
||||
"table": "table"
|
||||
};
|
||||
|
||||
Icons.get = (name, attrs = {}) => {
|
||||
|
||||
@ -276,16 +276,16 @@ define([
|
||||
var isCheckbox = true;
|
||||
if (isCheckedTaskItem) {
|
||||
text = text.replace(checkedTaskItemPtn,
|
||||
'<i class="fa fa-check-square" aria-hidden="true"></i>') + '\n';
|
||||
'<i data-lucide="square-check" aria-hidden="true"></i>') + '\n';
|
||||
} else if (isUncheckedTaskItem) {
|
||||
text = text.replace(uncheckedTaskItemPtn,
|
||||
'<i class="fa fa-square-o" aria-hidden="true"></i>') + '\n';
|
||||
'<i data-lucide="square" aria-hidden="true"></i>') + '\n';
|
||||
} else if (hasBogusCheckedInput) {
|
||||
text = text.replace(bogusCheckPtn,
|
||||
'<i class="fa fa-check-square" aria-hidden="true"></i>') + '\n';
|
||||
'<i data-lucide="square-check" aria-hidden="true"></i>') + '\n';
|
||||
} else if (hasBogusUncheckedInput) {
|
||||
text = text.replace(bogusUncheckPtn,
|
||||
'<i class="fa fa-square-o" aria-hidden="true"></i>') + '\n';
|
||||
'<i data-lucide="square" aria-hidden="true"></i>') + '\n';
|
||||
} else {
|
||||
isCheckbox = false;
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ var factory = function (Util) {
|
||||
var btn = document.createElement('button');
|
||||
btn.setAttribute('class', 'btn btn-default');
|
||||
btn.setAttribute('alt', metadata.alt || "");
|
||||
btn.innerHTML = '<i class="fa fa-save"></i>' + cfg.download.text + '<br>' +
|
||||
btn.innerHTML = '<i data-lucide="save"></i>' + cfg.download.text + '<br>' +
|
||||
(metadata.name ? '<b>' + fixHTML(metadata.name) + '</b>' : '');
|
||||
btn.addEventListener('click', function () {
|
||||
saveFile(content, url, metadata.name);
|
||||
@ -205,7 +205,7 @@ var factory = function (Util) {
|
||||
};
|
||||
var makeDownloadButton = function (cfg, mediaObject, size, cb) {
|
||||
var metadata = cfg.metadata || {};
|
||||
var i = '<i class="fa fa-paperclip"></i>';
|
||||
var i = '<i data-lucide="paperclip"></i>';
|
||||
var name = metadata.name ? '<span class="mediatag-download-name">'+ i +'<b>'+
|
||||
fixHTML(metadata.name)+'</b></span>' : '';
|
||||
var btn = document.createElement('button');
|
||||
|
||||
@ -2861,8 +2861,8 @@ define([
|
||||
|
||||
var options = [{
|
||||
tag: 'a',
|
||||
attributes: {'class': 'cp-form-export-csv fa fa-table'},
|
||||
content: h('span', Messages.form_exportCSV),
|
||||
attributes: {'class': 'cp-form-export-csv'},
|
||||
content: h('span',[ Icons.get('table'), Messages.form_exportCSV]),
|
||||
action: function () {
|
||||
var csv = Exporter.results(content, answers, TYPES, getFullOrder(content));
|
||||
if (!csv) { return void UI.warn(Messages.error); }
|
||||
|
||||
@ -704,10 +704,10 @@ define([
|
||||
// Actions
|
||||
if (!APP.readOnly && (!c.profile || c.profile === profile)) {
|
||||
$('<button>', {
|
||||
'class': 'btn btn-secondary fa fa-times',
|
||||
'class': 'btn btn-secondary',
|
||||
'title': Messages.poll_comment_remove,
|
||||
'data-rt-id': k
|
||||
}).appendTo($actions).click(function () { removeComment(k); });
|
||||
}, Icons.get('close')).appendTo($actions).click(function () { removeComment(k); });
|
||||
/*$('<button>', {
|
||||
'class': 'fa fa-pencil',
|
||||
'title': 'TODO: edit comment',
|
||||
|
||||
@ -78,16 +78,16 @@ define([
|
||||
var isCheckbox = true;
|
||||
if (isCheckedTaskItem) {
|
||||
text = text.replace(checkedTaskItemPtn,
|
||||
'<i class="fa fa-check-square" aria-hidden="true"></i>') + '\n';
|
||||
'<i data-lucide="square-check" aria-hidden="true"></i>') + '\n';
|
||||
} else if (isUncheckedTaskItem) {
|
||||
text = text.replace(uncheckedTaskItemPtn,
|
||||
'<i class="fa fa-square-o" aria-hidden="true"></i>') + '\n';
|
||||
'<i data-lucide="square" aria-hidden="true"></i>') + '\n';
|
||||
} else if (hasBogusCheckedInput) {
|
||||
text = text.replace(bogusCheckPtn,
|
||||
'<i class="fa fa-check-square" aria-hidden="true"></i>') + '\n';
|
||||
'<i data-lucide="square-check" aria-hidden="true"></i>') + '\n';
|
||||
} else if (hasBogusUncheckedInput) {
|
||||
text = text.replace(bogusUncheckPtn,
|
||||
'<i class="fa fa-square-o" aria-hidden="true"></i>') + '\n';
|
||||
'<i data-lucide="square" aria-hidden="true"></i>') + '\n';
|
||||
} else {
|
||||
isCheckbox = false;
|
||||
}
|
||||
|
||||
@ -14,6 +14,8 @@ define([
|
||||
'/todo/todo.js',
|
||||
'/customize/messages.js',
|
||||
'/components/sortablejs/Sortable.min.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',
|
||||
@ -29,7 +31,9 @@ define([
|
||||
Hash,
|
||||
Todo,
|
||||
Messages,
|
||||
Sortable
|
||||
Sortable,
|
||||
Lucide,
|
||||
Icons
|
||||
)
|
||||
{
|
||||
var APP = window.APP = {};
|
||||
@ -92,8 +96,8 @@ define([
|
||||
}
|
||||
|
||||
var checked = entry.state === 1 ?
|
||||
'cp-app-todo-task-checkbox-checked fa-check-square-o':
|
||||
'cp-app-todo-task-checkbox-unchecked fa-square-o';
|
||||
'cp-app-todo-task-checkbox-checked':
|
||||
'cp-app-todo-task-checkbox-unchecked';
|
||||
|
||||
var title = entry.state === 1?
|
||||
Messages.todo_markAsIncompleteTitle:
|
||||
@ -102,9 +106,9 @@ define([
|
||||
|
||||
removeTips();
|
||||
return $('<span>', {
|
||||
'class': 'cp-app-todo-task-checkbox fa ' + checked,
|
||||
'class': 'cp-app-todo-task-checkbox ' + checked,
|
||||
//title: title,
|
||||
}).on('click', function () {
|
||||
}, checked ? Icons.get('checked-box'): Icons.get('unchecked-box')).on('click', function () {
|
||||
entry.state = (entry.state + 1) % 2;
|
||||
if (typeof(cb) === 'function') {
|
||||
cb(entry.state);
|
||||
@ -165,9 +169,9 @@ define([
|
||||
.text(new Date(entry.ctime).toLocaleString())
|
||||
.appendTo($taskDiv);*/
|
||||
$('<button>', {
|
||||
'class': 'fa fa-times cp-app-todo-task-remove btn btn-danger',
|
||||
'class': 'cp-app-todo-task-remove btn btn-danger',
|
||||
title: Messages.todo_removeTaskTitle,
|
||||
}).appendTo($taskDiv).on('click', function() {
|
||||
}, Icons.get('close')).appendTo($taskDiv).on('click', function() {
|
||||
deleteTask(el);
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user