Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use getUniqueName from @nextcloud/files #1244

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/components/ConflictPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ import type { ConflictResolutionResult } from '../index.ts'

import { defineComponent } from 'vue'
import { showError } from '@nextcloud/dialogs'
import { getUniqueName } from '@nextcloud/files'

import ArrowRight from 'vue-material-design-icons/ArrowRight.vue'
import Close from 'vue-material-design-icons/Close.vue'
Expand All @@ -111,7 +112,6 @@ import NcDialog from '@nextcloud/vue/dist/Components/NcDialog.js'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'

import { isFileSystemEntry } from '../utils/filesystem.ts'
import { getUniqueName } from '../utils/uniqueName.ts'
import { n, t } from '../utils/l10n.ts'
import logger from '../utils/logger.ts'
import NodesPicker from './NodesPicker.vue'
Expand Down
5 changes: 2 additions & 3 deletions lib/components/UploadPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ import type { Upload } from '../upload.ts'
import type { Directory } from '../utils/fileTree'

import { DialogBuilder, showWarning } from '@nextcloud/dialogs'
import { getNewFileMenuEntries, Folder, NewMenuEntryCategory } from '@nextcloud/files'
import { Folder, NewMenuEntryCategory, getNewFileMenuEntries, getUniqueName } from '@nextcloud/files'
import makeEta from 'simple-eta'
import Vue from 'vue'

Expand All @@ -150,7 +150,6 @@ import IconUpload from 'vue-material-design-icons/Upload.vue'
import { getUploader, openConflictPicker, getConflicts } from '../index.ts'
import { Status } from '../uploader.ts'
import { Status as UploadStatus } from '../upload.ts'
import { getUniqueName } from '../utils/uniqueName'
import { t } from '../utils/l10n.ts'
import logger from '../utils/logger.ts'
import PCancelable from 'p-cancelable'
Expand Down Expand Up @@ -368,7 +367,7 @@ export default Vue.extend({
*
* @param filename The invalid file name
*/
async showInvalidFileNameDialog(filename: string) {
async showInvalidFileNameDialog(filename: string): Promise<boolean> {
return new PCancelable(async (resolve, reject) => {
await new DialogBuilder()
.setName(t('Invalid file name'))
Expand Down
19 changes: 0 additions & 19 deletions lib/utils/uniqueName.ts

This file was deleted.

Loading
Loading