Skip to content

Commit

Permalink
fix(files): Change icons+wording for adding text doc and folder descr…
Browse files Browse the repository at this point in the history
…iption

Fixes: #5535

Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- authored and Pytal committed Mar 20, 2024
1 parent c94406a commit 0546f91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/helpers/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { showSuccess, showError } from '@nextcloud/dialogs'
import axios from '@nextcloud/axios'
import { dirname } from 'path'

import FilePlusSvg from '@mdi/svg/svg/file-plus.svg'
import TextSvg from '@mdi/svg/svg/text.svg'

const FILE_ACTION_IDENTIFIER = 'Edit with text app'

Expand Down Expand Up @@ -134,14 +134,14 @@ export const addMenuRichWorkspace = () => {
const descriptionFile = t('text', 'Readme') + '.' + loadState('text', 'default_file_extension')
addNewFileMenuEntry({
id: 'rich-workspace-init',
displayName: t('text', 'Add description'),
displayName: t('text', 'Add folder description'),
enabled(context) {
if (Number(context.attributes['rich-workspace-file'])) {
return false
}
return (context.permissions & Permission.CREATE) !== 0
},
iconSvgInline: FilePlusSvg,
iconSvgInline: TextSvg,
async handler(context, content) {
const contentNames = content.map((node) => node.basename)

Expand Down
2 changes: 1 addition & 1 deletion src/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const newRichWorkspaceFileMenuPlugin = {
// register the new menu entry
menu.addMenuEntry({
id: 'rich-workspace-init',
displayName: t('text', 'Add description'),
displayName: t('text', 'Add folder description'),
templateName: descriptionFile,
iconClass: 'icon-rename',
fileType: 'file',
Expand Down

0 comments on commit 0546f91

Please sign in to comment.