update icons

This commit is contained in:
daria 2025-08-19 11:36:24 +03:00
parent ab9f718344
commit 271cf2a880
No known key found for this signature in database
GPG Key ID: 3B75240E6B2F2701
8 changed files with 32 additions and 25 deletions

View File

@ -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) {

View File

@ -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 = {}) => {

View File

@ -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;
}

View File

@ -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');

View File

@ -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); }

View File

@ -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',

View File

@ -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;
}

View File

@ -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);
});