Skip to content
Snippets Groups Projects
Commit abed2f0d authored by Steinwender, Tamara's avatar Steinwender, Tamara
Browse files

Change clipboard filehandling

parent e3ce24fb
No related branches found
No related tags found
No related merge requests found
Pipeline #44059 failed
......@@ -17,7 +17,7 @@ let nextcloudFileURL = nextcloudBaseURL + '/apps/files/?dir=';
export default (async () => {
return {
input: (build !== 'test') ? ['src/demo.js', 'src/dbp-file-source.js', 'src/dbp-file-sink.js'] : glob.sync('test/**/*.js'),
input: (build !== 'test') ? ['src/demo.js', 'src/dbp-file-source.js', 'src/dbp-file-sink.js', 'src/dbp-clipboard.js'] : glob.sync('test/**/*.js'),
output: {
dir: 'dist',
entryFileNames: '[name].js',
......
This diff is collapsed.
import * as commonUtils from "@dbp-toolkit/common/utils";
import {Clipboard} from './clipboard';
commonUtils.defineCustomElement('dbp-clipboard', Clipboard);
......@@ -11,7 +11,7 @@ import FileSaver from 'file-saver';
import MicroModal from "./micromodal.es";
import * as fileHandlingStyles from './styles';
import { send } from '@dbp-toolkit/common/notification';
import {FileHandlingClipboard} from "./dbp-file-handling-clipboard";
import {Clipboard} from "@dbp-toolkit/file-handling/src/clipboard";
/**
......@@ -46,7 +46,7 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) {
'dbp-icon': Icon,
'dbp-mini-spinner': MiniSpinner,
'dbp-nextcloud-file-picker': NextcloudFilePicker,
'dbp-clipboard': FileHandlingClipboard,
'dbp-clipboard': Clipboard,
};
}
......@@ -239,6 +239,7 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) {
<dbp-clipboard
id="clipboard-file-sink"
subscribe="clipboard-files:clipboard-files"
file-sink
lang="${this.lang}"
auth-url="${this.nextcloudAuthUrl}"
allowed-mime-types="${this.allowedMimeTypes}"
......
......@@ -10,7 +10,7 @@ import {NextcloudFilePicker} from "./dbp-nextcloud-file-picker";
import {classMap} from 'lit-html/directives/class-map.js';
import MicroModal from './micromodal.es';
import * as fileHandlingStyles from './styles';
import {FileHandlingClipboard} from "./dbp-file-handling-clipboard";
import {Clipboard} from "@dbp-toolkit/file-handling/src/clipboard";
function mimeTypesToAccept(mimeTypes) {
// Some operating systems can't handle mime types and
......@@ -64,7 +64,7 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) {
'dbp-icon': Icon,
'dbp-mini-spinner': MiniSpinner,
'dbp-nextcloud-file-picker': NextcloudFilePicker,
'dbp-clipboard': FileHandlingClipboard,
'dbp-clipboard': Clipboard,
};
}
......@@ -428,7 +428,7 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) {
return html`
<dbp-clipboard
id="clipboard-file-picker"
clipboard-source
file-source
subscribe="clipboard-files:clipboard-files"
lang="${this.lang}"
auth-url="${this.nextcloudAuthUrl}"
......
......@@ -106,6 +106,41 @@
"save-files-from-clipboard_plurafile-sinkl": "{{count}} Dateien aus der Zwischenablage speichern",
"save-from-clipboard": "Aktuellen Inhalt aus der Zwischenablage speichern:",
"save-from-clipboard-btn": "Zwischenablage sichern",
"save-to-clipboard-title": "Dateien in der Zwischenablage ablegen"
"save-to-clipboard-title": "Dateien in der Zwischenablage ablegen",
"add-files": "Dateien der Zwischenablage hinzufügen",
"add-files-btn": "Dateien hinzufügen",
"remove-all": "Alle Dateien aus der Zwischenablage entfernen.",
"remove-all-btn": "Alle entfernen",
"remove-count": "Eine Datei aus der Zwischenablage entfernen.",
"remove-count_plural": "{{count}} Dateien aus der Zwischenablage entfernen.",
"remove-count-btn": "Datei entfernen",
"remove-count-btn_plural": "{{count}} Dateien entfernen",
"save-all": "Alle Dateien aus der Zwischenablage speichern",
"save-all-btn": "Alle sichern",
"upload-area-text": "Sie können in diesem Bereich Dokumente mit einer Maximalgröße von bis zu 32MB pro Dokument per Drag & Drop oder per Direktauswahl hochladen.",
"upload-button-label": "Dateien auswählen",
"clear-clipboard-title": "Zwischenablage geleert",
"clear-clipboard-body": "Die Zwischenablage wurde erfolgreich geleert.",
"clear-count-clipboard-title": "Datei entfernt",
"clear-count-clipboard-title_plural": "Dateien entfernt",
"clear-count-clipboard-body": "Eine Datei wurde erfolgreich aus der Zwischenablage entfernt.",
"clear-count-clipboard-body_plural": "{{count}} Dateien wurde erfolgreich aus der Zwischenablage entfernt.",
"saved-files-title": "Datei erfolgreich abgelegt",
"saved-files-title_plural": "Dateien erfolgreich abgelegt",
"saved-files-body": "Eine Datei wurde erfolgreich temporär in der Zwischenablage abgelegt und kann jetzt innerhalb dieser Applikation verwendet werden.",
"saved-files-body_plural": "{{count}} Dateien wurde erfolgreich temporär in der Zwischenablage abgelegt und können jetzt innerhalb dieser Applikation verwendet werden.",
"save-count-btn": "Datei speichern",
"save-count-btn_plural": "{{count}} Dateien speichern",
"save-count": "Eine Datei aus der Zwischenablage speichern",
"save-count_plural": "{{count}} Dateien aus der Zwischenablage speichern",
"file-name": "Name",
"file-size": "Größe",
"file-type": "Art",
"file-mod": "Geändert",
"select-all": "Alle auswählen",
"select-all-title": "Alle verfügbaren Dateien in diesem Ordner auswählen",
"select-nothing": "Nichts auswählen",
"select-nothing-title": "Alle gewählten Dateien nicht mehr selektieren",
"no-data": "Keine Dateien vorhanden"
}
}
......@@ -106,6 +106,41 @@
"save-files-from-clipboard_plural": "Save {{count}} files from the clipboard",
"save-from-clipboard": "Save the current content from the clipboard:",
"save-from-clipboard-btn": "Save the clipboard",
"save-to-clipboard-title": "Cached files in the clipboard "
"save-to-clipboard-title": "Cached files in the clipboard ",
"add-files": "Add files to clipboard",
"add-files-btn": "Add files",
"remove-all": "Remove all files from the clipboard.",
"remove-all-btn": "Remove all",
"remove-count": "Remove file from the clipboard.",
"remove-count_plural": "Remove {{count}} files from the clipboard.",
"remove-count-btn": "Remove file",
"remove-count-btn_plural": "Remove {{count}} files",
"save-all": "Save all files from the clipboard",
"save-all-btn": "Save all",
"upload-area-text": "In this area you can upload documents up to a size of 32MB via Drag & Drop or by selecting them directly. ",
"upload-button-label": "Load to clipboard",
"clear-clipboard-title": "Clipboard cleared",
"clear-clipboard-body": "The clipboard was successfully cleared.",
"clear-count-clipboard-title": "File removed",
"clear-count-clipboard-title_plural": "Files removed",
"clear-count-clipboard-body": "One file was successfully removed from clipboard.",
"clear-count-clipboard-body_plural": "{{count}} files were successfully removed from clipboard.",
"saved-files-title": "File successfully filed",
"saved-files-title_plural": "Files successfully filed",
"saved-files-body": "A file was successfully stored temporarily in the clipboard and can now be used within this application.",
"saved-files-body_plural": "{{count}} files were successfully stored temporarily in the clipboard and can now be used within this application.",
"save-count-btn": "Save file",
"save-count-btn_plural": "Save {{count}} files",
"save-count": "Save one file from the clipboard",
"save-count_plural": "Save {{count}} files from the clipboard",
"file-name": "Name",
"file-size": "Size",
"file-type": "Type",
"file-mod": "Last modified",
"select-all": "Alle auswählen",
"select-all-title": "Alle verfügbaren Dateien in diesem Ordner auswählen",
"select-nothing": "Nichts auswählen",
"select-nothing-title": "Alle gewählten Dateien nicht mehr selektieren",
"no-data": "There are no files"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment