mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
reformat code
This commit is contained in:
parent
ffa77844f8
commit
b5bf159df3
@ -13,8 +13,9 @@ define([
|
||||
'/common/common-ui-elements.js',
|
||||
'/common/common-constants.js',
|
||||
'/common/pad-types.js',
|
||||
'/common/extensions.js'
|
||||
], function ($, h, Msg, AppConfig, LocalStore, Pages, Config, UIElements, Constants, PadTypes, Extensions) {
|
||||
'/common/extensions.js',
|
||||
'/common/common-icons.js'
|
||||
], function ($, h, Msg, AppConfig, LocalStore, Pages, Config, UIElements, Constants, PadTypes, Extensions, Icons) {
|
||||
return function () {
|
||||
document.title = Msg.features;
|
||||
Msg.features_f_apps_note = PadTypes.availableTypes.map(function (app) {
|
||||
@ -27,7 +28,7 @@ define([
|
||||
|
||||
var groupItemTemplate = function (title, content) {
|
||||
return h('li.list-group-item', [
|
||||
h('i', {'data-lucide':'check', 'aria-hidden':'true'}),
|
||||
Icons.get('check'),
|
||||
h('div.cp-content', [
|
||||
h('div.cp-feature', title),
|
||||
h('div.cp-note', content),
|
||||
|
||||
@ -213,7 +213,7 @@ define([
|
||||
]),
|
||||
h('div.cp-app-drive', [
|
||||
h('a.cp-drive-btn', {'href': '/drive/'}, [
|
||||
h('i', {'data-lucide':'hard-drive', 'aria-hidden':'true'}),
|
||||
Icons.get('hdd'),
|
||||
Msg.team_cat_drive
|
||||
]),
|
||||
extraButtons
|
||||
|
||||
@ -4,7 +4,7 @@ define([
|
||||
const Icons = {};
|
||||
|
||||
const map = {
|
||||
"drive-trash-empty": "trash-2",
|
||||
"drive-trash": "trash-2",
|
||||
"drive-search": "search",
|
||||
"add": "plus",
|
||||
"features": "info",
|
||||
@ -15,7 +15,28 @@ define([
|
||||
"donate": "hand-coins",
|
||||
"login": "log-in",
|
||||
"register": "user",
|
||||
"chevron-left": "chevron-left"
|
||||
"chevron-left": "chevron-left",
|
||||
"check": "check",
|
||||
"hdd": "hard-drive",
|
||||
"grid": "layout-grid",
|
||||
"list": "list",
|
||||
"filter": "list-filter-plus",
|
||||
"folder-open": "folder-open",
|
||||
"drive-recent": "clock",
|
||||
"drive-expand": "square-plus",
|
||||
"drive-owned-document": "id-card",
|
||||
"share": "share-2",
|
||||
"drive-password-document": "file-lock",
|
||||
"ellipsis-vertical": "ellipsis-vertical",
|
||||
"ellipsis-horizontal": 'ellipsis',
|
||||
"toolbar-insert": "file-image",
|
||||
"history-prev": 'arrow-left',
|
||||
"history-next": "arrow-right",
|
||||
"history-fast-next": "arrow-right-to-line",
|
||||
"history-fast-prev": "arrow-left-to-line",
|
||||
"history-timeline-position": "flag-triangle-right",
|
||||
"history-restore": "archive-restore",
|
||||
"close": "x"
|
||||
};
|
||||
|
||||
Icons.get = (name, attrs = {}) => {
|
||||
|
||||
@ -21,10 +21,11 @@ define([
|
||||
'/common/inner/invitation.js',
|
||||
'/common/visible.js',
|
||||
'/common/pad-types.js',
|
||||
'/common/common-icons.js',
|
||||
|
||||
'css!/customize/fonts/cptools/style.css',
|
||||
], function ($, Config, Broadcast, Util, Hash, Language, UI, Constants, Feedback, h, Clipboard,
|
||||
Messages, AppConfig, Pages, NThen, InviteInner, Visible, PadTypes) {
|
||||
Messages, AppConfig, Pages, NThen, InviteInner, Visible, PadTypes, Icons) {
|
||||
var UIElements = {};
|
||||
var urlArgs = Config.requireConf.urlArgs;
|
||||
|
||||
@ -907,7 +908,7 @@ define([
|
||||
button = $(h('button.cp-toolbar-mediatag', {
|
||||
//title: Messages.filePickerButton, // TODO display if the label text is collapsed
|
||||
}, [
|
||||
h('i', {'data-lucide': 'file-image', 'aria-hidden':'true'}),
|
||||
Icons.get('toolbar-insert'),
|
||||
h('span.cp-toolbar-name', Messages.toolbar_insert)
|
||||
])).click(common.prepareFeedback(type));
|
||||
break;
|
||||
|
||||
@ -26,7 +26,8 @@ define([
|
||||
'/customize/pages.js',
|
||||
'/common/pad-types.js',
|
||||
'/common/onlyoffice/broken-formats.js',
|
||||
'/customize/fonts/lucide.js'
|
||||
'/customize/fonts/lucide.js',
|
||||
'/common/common-icons.js'
|
||||
], function (
|
||||
$,
|
||||
ApiConfig,
|
||||
@ -49,7 +50,8 @@ define([
|
||||
Pages,
|
||||
PadTypes,
|
||||
BrokenFormats,
|
||||
Lucide)
|
||||
Lucide,
|
||||
Icons)
|
||||
{
|
||||
|
||||
var APP = window.APP = {
|
||||
@ -120,7 +122,7 @@ define([
|
||||
var $fileMenuIcon = $('<span>', {"class": "fa fa-ellipsis-h"});
|
||||
//var $folderIcon = $('<img>', {src: "/customize/images/icons/folder.svg", "class": "folder icon"});
|
||||
var $folderEmptyIcon = $folderIcon.clone();
|
||||
var $folderOpenedIcon = $('<i>', {'data-lucide': 'folder-open', 'aria-hidden': 'true', "class": "cp-app-drive-icon-folder"});
|
||||
var $folderOpenedIcon = $(Icons.get('folder-open'));
|
||||
//var $folderOpenedIcon = $('<img>', {src: "/customize/images/icons/folderOpen.svg", "class": "folder icon"});
|
||||
var $folderOpenedEmptyIcon = $folderOpenedIcon.clone();
|
||||
var $sharedFolderIcon = $('<span>', {"class": faSharedFolder + " cptools cp-app-drive-icon-folder"});
|
||||
@ -128,26 +130,26 @@ define([
|
||||
//var $upIcon = $('<span>', {"class": "fa fa-arrow-circle-up"});
|
||||
var $unsortedIcon = $('<span>', {"class": "fa fa-files-o"});
|
||||
var $templateIcon = $('<span>', {"class": "cptools cptools-template"});
|
||||
var $recentIcon = $('<i>', {'data-lucide': 'clock', 'aria-hidden': 'true' });
|
||||
var $recentIcon = $(Icons.get('drive-recent'));
|
||||
var $trashIcon = $('<span>', {"class": "fa " + faTrash});
|
||||
var $trashEmptyIcon = $('<i>', {"data-lucide": "trash-2", 'aria-hidden': 'true' });
|
||||
var $trashEmptyIcon = $(Icons.get('drive-trash'));
|
||||
//var $collapseIcon = $('<span>', {"class": "fa fa-minus-square-o cp-app-drive-icon-expcol"});
|
||||
var $expandIcon = $('<i>', {'data-lucide': 'square-plus','class':'cp-app-drive-icon-expcol', 'aria-hidden': 'true' });
|
||||
var $expandIcon = $(Icons.get('drive-expand', {'class': 'cp-app-drive-icon-expcol'}));
|
||||
//var $listIcon = $('<button>', {"class": "fa fa-list"});
|
||||
//var $gridIcon = $('<button>', {"class": "fa fa-th-large"});
|
||||
var $sortAscIcon = $('<span>', {"class": "fa fa-angle-up sortasc"});
|
||||
var $sortDescIcon = $('<span>', {"class": "fa fa-angle-down sortdesc"});
|
||||
var $closeIcon = $('<span>', {"class": "fa fa-times"});
|
||||
//var $backupIcon = $('<span>', {"class": "fa fa-life-ring"});
|
||||
var $searchIcon = $('<i>', {'data-lucide': 'search','class':'cp-app-drive-tree-search-icon', 'aria-hidden': 'true' });
|
||||
var $addIcon = $('<i>', {'data-lucide': 'plus', 'aria-hidden': 'true' });
|
||||
var $searchIcon = $($(Icons.get('drive-search', {'class': 'cp-app-drive-tree-search-icon'})));
|
||||
var $addIcon = $(Icons.get('add'));
|
||||
var $renamedIcon = $('<span>', {"class": "fa fa-flag"});
|
||||
var $readonlyIcon = $('<span>', {"class": "fa " + faReadOnly});
|
||||
var $ownedIcon = $('<i>', {'data-lucide': 'id-card', 'aria-hidden': 'true' });
|
||||
var $sharedIcon = $('<i>', {'data-lucide': 'share-2', 'aria-hidden': 'true' });
|
||||
var $ownedIcon = $(Icons.get('drive-owned-document'));
|
||||
var $sharedIcon = $(Icons.get('share'));
|
||||
//var $ownerIcon = $('<span>', {"class": "fa fa-id-card"});
|
||||
var $tagsIcon = $('<span>', {"class": "fa " + faTags});
|
||||
var $passwordIcon = $('<i>', {'data-lucide': 'file-lock', 'aria-hidden': 'true' });
|
||||
var $passwordIcon = $(Icons.get('drive-password-document'));
|
||||
var $restrictedIcon = $('<span>', {"class": "fa fa-ban"});
|
||||
var $expirableIcon = $('<span>', {"class": "fa fa-clock-o"});
|
||||
var $separator = $('<div>', {"class": "dropdown-divider"});
|
||||
@ -664,7 +666,7 @@ define([
|
||||
$content.attr("tabindex", "0");
|
||||
if (APP.loggedIn) {
|
||||
var splitter = h('div.cp-splitter', [
|
||||
h('i',{'data-lucide': 'ellipsis-vertical','aria-hidden':'true'})
|
||||
Icons.get('ellipsis-vertical')
|
||||
]);
|
||||
$contentContainer.append(splitter);
|
||||
APP.$splitter = $(splitter).on('mousedown touchstart', function (e) {
|
||||
@ -2765,8 +2767,8 @@ define([
|
||||
// Create the button allowing the user to switch from list to icons modes
|
||||
var createViewModeButton = function ($container) {
|
||||
var viewMode = getViewMode();
|
||||
var gridIcon = h('i', { 'data-lucide': 'layout-grid', title: Messages.fm_viewGridButton });
|
||||
var listIcon = h('i', {'data-lucide': 'list', title: Messages.fm_viewListButton });
|
||||
var gridIcon = Icons.get('grid', {title: Messages.fm_viewGridButton});
|
||||
var listIcon = Icons.get('list', {title: Messages.fm_viewListButton});
|
||||
|
||||
var $button = $(h('button.cp-app-drive-viewmode-button', [
|
||||
gridIcon,
|
||||
@ -3168,7 +3170,7 @@ define([
|
||||
|
||||
var dropdownConfig = {
|
||||
buttonContent: [
|
||||
h('i', {'data-lucide':'plus', 'aria-hidden':'true'}),
|
||||
Icons.get('add'),
|
||||
h('span.cp-button-name', Messages.fm_newButton),
|
||||
],
|
||||
buttonCls: 'cp-toolbar-dropdown-nowrap',
|
||||
@ -3253,7 +3255,7 @@ define([
|
||||
}
|
||||
var dropdownConfig = {
|
||||
buttonContent: [
|
||||
h('i', {'data-lucide': 'list-filter-plus', 'aria-hidden':'true'}),
|
||||
Icons.get('filter'),
|
||||
h('span.cp-button-name', Messages.fm_filterBy),
|
||||
],
|
||||
buttonCls: 'cp-toolbar-dropdown-nowrap',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user