diff options
Diffstat (limited to 'core/src/icons.js')
-rw-r--r-- | core/src/icons.js | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/core/src/icons.js b/core/src/icons.js index 3cd685dce8c..5845b01fea1 100644 --- a/core/src/icons.js +++ b/core/src/icons.js @@ -1,5 +1,9 @@ +/** + * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ /* eslint-disable quote-props */ -/* eslint-disable node/no-unpublished-import */ +/* eslint-disable n/no-unpublished-import */ import path from 'path' import fs from 'fs' import sass from 'sass' @@ -7,7 +11,8 @@ import sass from 'sass' const colors = { dark: '000', white: 'fff', - yellow: 'FC0', + // gold but for backwards compatibility called yellow + yellow: 'a08b00', red: 'e9322d', orange: 'eca700', green: '46ba61', @@ -94,9 +99,11 @@ const icons = { 'sound': path.join(__dirname, '../img', 'actions', 'sound.svg'), 'star': path.join(__dirname, '../img', 'actions', 'star.svg'), 'starred': path.join(__dirname, '../img', 'actions', 'star-dark.svg'), + 'star-rounded': path.join(__dirname, '../img', 'actions', 'star-rounded.svg'), 'tablet': path.join(__dirname, '../img', 'clients', 'tablet.svg'), 'tag': path.join(__dirname, '../img', 'actions', 'tag.svg'), 'talk': path.join(__dirname, '../img', 'apps', 'spreed.svg'), + 'teams': path.join(__dirname, '../img', 'apps', 'circles.svg'), 'template-add': path.join(__dirname, '../img', 'actions', 'template-add.svg'), 'timezone': path.join(__dirname, '../img', 'actions', 'timezone.svg'), 'toggle-background': path.join(__dirname, '../img', 'actions', 'toggle-background.svg'), @@ -122,6 +129,10 @@ const icons = { } const iconsColor = { + 'add-folder-description': { + path: path.join(__dirname, '../img', 'actions', 'add-folder-description.svg'), + color: 'grey', + }, 'settings': { path: path.join(__dirname, '../img', 'actions', 'settings.svg'), color: 'black', @@ -164,6 +175,14 @@ const iconsColor = { // TODO: replace primary ? color: 'primary', }, + 'filetype-text': { + path: path.join(__dirname, '../img', 'filetypes', 'text.svg'), + color: 'grey', + }, + 'file-text': { + path: path.join(__dirname, '../img', 'filetypes', 'text.svg'), + color: 'black', + }, } // use this to define aliases to existing icons @@ -207,7 +226,6 @@ const iconsAliases = { 'icon-category-security': 'icon-password-dark', 'icon-category-search': 'icon-search-dark', 'icon-category-tools': 'icon-settings-dark', - 'icon-filetype-text': 'icon-file-grey', 'nav-icon-systemtagsfilter': 'icon-tag-dark', } @@ -219,7 +237,7 @@ const colorSvg = function(svg = '', color = '000') { } // add fill (fill is not present on black elements) - const fillRe = /<((circle|rect|path)((?!fill)[a-z0-9 =".\-#():;,])+)\/>/gmi + const fillRe = /<((circle|rect|path)((?!fill=)[a-z0-9 =".\-#():;,])+)\/>/gmi svg = svg.replace(fillRe, '<$1 fill="#' + color + '"/>') // replace any fill or stroke colors |