From f5f7654f4b9a99d3b57d55435e6d467084186c4d Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 14 Feb 2020 01:09:39 +0900 Subject: Improve custom emoji managemant --- src/client/scripts/select-file.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client/scripts') diff --git a/src/client/scripts/select-file.ts b/src/client/scripts/select-file.ts index 1025b23e03..70e68e88c0 100644 --- a/src/client/scripts/select-file.ts +++ b/src/client/scripts/select-file.ts @@ -1,8 +1,8 @@ -import { faUpload, faCloud, faLink } from '@fortawesome/free-solid-svg-icons'; +import { faUpload, faCloud } from '@fortawesome/free-solid-svg-icons'; import { selectDriveFile } from './select-drive-file'; import { apiUrl } from '../config'; -export function selectFile(component: any, src: any, label: string, multiple = false) { +export function selectFile(component: any, src: any, label: string | null, multiple = false) { return new Promise((res, rej) => { const chooseFileFromPc = () => { const input = document.createElement('input'); @@ -56,10 +56,10 @@ export function selectFile(component: any, src: any, label: string, multiple = f }; component.$root.menu({ - items: [{ + items: [label ? { text: label, type: 'label' - }, { + } : undefined, { text: component.$t('upload'), icon: faUpload, action: chooseFileFromPc -- cgit v1.2.3-freya