Compare commits
22 Commits
v0.4.0-bet
...
v0.4.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fde5096856 | ||
|
|
f3296dd443 | ||
|
|
820ad7c523 | ||
|
|
9f66ce618e | ||
|
|
2318425160 | ||
|
|
213e3083a1 | ||
|
|
4fc65c8302 | ||
|
|
bcb54faeaf | ||
|
|
f5753f3fde | ||
|
|
5ff8618c10 | ||
|
|
bee918e810 | ||
|
|
37301ae92b | ||
|
|
bd304d5f27 | ||
|
|
827c69bd7b | ||
|
|
812a225334 | ||
|
|
90c4e7818a | ||
|
|
1299df539e | ||
|
|
20b25e0108 | ||
|
|
e959afb2de | ||
|
|
cb25643741 | ||
|
|
bbfb9e713a | ||
|
|
e71a38fe96 |
38
.drone.yml
38
.drone.yml
@@ -22,6 +22,42 @@ pipeline:
|
||||
when:
|
||||
matrix:
|
||||
TESTS: check-app-compatbility
|
||||
check-app-compatbility-12:
|
||||
image: nextcloudci/php7.0:php7.0-17
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=stable12
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
||||
- cd ../server
|
||||
# Code checker
|
||||
- ./occ app:check-code $APP_NAME -c strong-comparison
|
||||
- ./occ app:check-code $APP_NAME -c deprecation
|
||||
- cd apps/$APP_NAME/
|
||||
when:
|
||||
matrix:
|
||||
TESTS: check-app-compatbility-13
|
||||
check-app-compatbility-12:
|
||||
image: nextcloudci/php7.0:php7.0-17
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=stable12
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
||||
- cd ../server
|
||||
# Code checker
|
||||
- ./occ app:check-code $APP_NAME -c strong-comparison
|
||||
- ./occ app:check-code $APP_NAME -c deprecation
|
||||
- cd apps/$APP_NAME/
|
||||
when:
|
||||
matrix:
|
||||
TESTS: check-app-compatbility-12
|
||||
signed-off-check:
|
||||
image: nextcloudci/php7.0:php7.0-17
|
||||
environment:
|
||||
@@ -194,6 +230,8 @@ pipeline:
|
||||
matrix:
|
||||
include:
|
||||
- TESTS: check-app-compatbility
|
||||
- TESTS: check-app-compatbility-12
|
||||
- TESTS: check-app-compatbility-13
|
||||
- TESTS: signed-off-check
|
||||
- TESTS: syntax-php5.6
|
||||
- TESTS: syntax-php7.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## 0.4.0 - unreleased
|
||||
## 0.4.0 - 2018-07-11
|
||||
|
||||
### Added
|
||||
|
||||
|
||||
4
Makefile
4
Makefile
@@ -12,7 +12,7 @@ sign_dir=$(build_dir)/sign
|
||||
cert_dir=$(HOME)/.nextcloud/certificates
|
||||
|
||||
|
||||
default: build
|
||||
default: package
|
||||
|
||||
clean-build:
|
||||
rm -rf $(build_dir)
|
||||
@@ -95,3 +95,5 @@ test-integration:
|
||||
test-js: install-deps
|
||||
cd js && run test
|
||||
|
||||
package:
|
||||
krankerl package
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
- 🚀 Get your project organized
|
||||
|
||||
</description>
|
||||
<version>0.4.0-beta4</version>
|
||||
<version>0.4.0</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Julius Härtl</author>
|
||||
<namespace>Deck</namespace>
|
||||
|
||||
1400
js/package-lock.json
generated
1400
js/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -22,13 +22,13 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-loader": "^7.1.2",
|
||||
"babel-loader": "^7.1.5",
|
||||
"babel-preset-env": "^1.7.0",
|
||||
"css-loader": "^0.28.9",
|
||||
"css-loader": "^1.0.0",
|
||||
"karma": "^2.0.4",
|
||||
"mini-css-extract-plugin": "^0.4.1",
|
||||
"node-sass": "^4.5.3",
|
||||
"webpack": "^4.14.0",
|
||||
"node-sass": "^4.9.2",
|
||||
"webpack": "^4.15.1",
|
||||
"webpack-cli": "^3.0.8",
|
||||
"webpack-merge": "^4.1.3"
|
||||
},
|
||||
|
||||
@@ -67,6 +67,7 @@ OC.L10N.register(
|
||||
"Create new board" : "Neues Board erstellen",
|
||||
"New board title" : "Neuer Board-Titel",
|
||||
"Select an attachment" : "Anhang auswählen",
|
||||
"Cancel upload" : "Hochladen abbrechen",
|
||||
"by" : "von",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dateilöschung rückgängig machen - Andernfalls wird die Datei beim nächsten CronJob-Lauf gelöscht.",
|
||||
"Undo file deletion" : "Dateilöschung rückgängig machen",
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
"Create new board" : "Neues Board erstellen",
|
||||
"New board title" : "Neuer Board-Titel",
|
||||
"Select an attachment" : "Anhang auswählen",
|
||||
"Cancel upload" : "Hochladen abbrechen",
|
||||
"by" : "von",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dateilöschung rückgängig machen - Andernfalls wird die Datei beim nächsten CronJob-Lauf gelöscht.",
|
||||
"Undo file deletion" : "Dateilöschung rückgängig machen",
|
||||
|
||||
@@ -67,6 +67,7 @@ OC.L10N.register(
|
||||
"Create new board" : "Neues Board erstellen",
|
||||
"New board title" : "Neuer Board-Titel",
|
||||
"Select an attachment" : "Wählen Sie einen Anhang",
|
||||
"Cancel upload" : "Hochladen abbrechen",
|
||||
"by" : "von",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dateilöschung rückgängig machen - Andernfalls wird die Datei beim nächsten CronJob-Lauf gelöscht.",
|
||||
"Undo file deletion" : "Dateilöschung rückgängig machen",
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
"Create new board" : "Neues Board erstellen",
|
||||
"New board title" : "Neuer Board-Titel",
|
||||
"Select an attachment" : "Wählen Sie einen Anhang",
|
||||
"Cancel upload" : "Hochladen abbrechen",
|
||||
"by" : "von",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dateilöschung rückgängig machen - Andernfalls wird die Datei beim nächsten CronJob-Lauf gelöscht.",
|
||||
"Undo file deletion" : "Dateilöschung rückgängig machen",
|
||||
|
||||
@@ -24,6 +24,7 @@ OC.L10N.register(
|
||||
"Missing a temporary folder" : "Falta una carpeta temporal",
|
||||
"Could not write file to disk" : "No se ha podido escribir el archivo al disco",
|
||||
"A PHP extension stopped the file upload" : "Una extensión de PHP ha detenido la subida del archivo",
|
||||
"No file uploaded or file size exceeds maximum of %s" : "No se ha subido ningún archivo, o el tamaño del archivo excede el máximo de %s",
|
||||
"Deck" : "Deck",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "Una herramienta de manejo de proyectos y personal al estilo kanban para Nextcloud.",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deckes una herramienta de organización al estilo kanban enfocada en la planificación personal y en la organización de proyectos para equipos, integrada en Nextcloud.\n\n\n- 📥 Añade tus tareas a tarjetas y ordénalas\n- 📄 Escribe notas adicionales en markdown\n- 🔖 Asigna etiquetas para una organización aún mejor\n- 👥 Comparte con tu equipo, amigos o familia\n- 🚀 Organiza tu proyecto",
|
||||
@@ -66,6 +67,7 @@ OC.L10N.register(
|
||||
"Create new board" : "Crear nuevo tablero",
|
||||
"New board title" : "Nuevo título de tablero",
|
||||
"Select an attachment" : "Selecciona un adjunto",
|
||||
"Cancel upload" : "Cancelar la subida",
|
||||
"by" : "por",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Deshacer eliminación del archivo. De otra forma el archivo se borrará durante la próxima ejecución del trabajo cron.",
|
||||
"Undo file deletion" : "Deshacer eliminación del archivo",
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"Missing a temporary folder" : "Falta una carpeta temporal",
|
||||
"Could not write file to disk" : "No se ha podido escribir el archivo al disco",
|
||||
"A PHP extension stopped the file upload" : "Una extensión de PHP ha detenido la subida del archivo",
|
||||
"No file uploaded or file size exceeds maximum of %s" : "No se ha subido ningún archivo, o el tamaño del archivo excede el máximo de %s",
|
||||
"Deck" : "Deck",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "Una herramienta de manejo de proyectos y personal al estilo kanban para Nextcloud.",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deckes una herramienta de organización al estilo kanban enfocada en la planificación personal y en la organización de proyectos para equipos, integrada en Nextcloud.\n\n\n- 📥 Añade tus tareas a tarjetas y ordénalas\n- 📄 Escribe notas adicionales en markdown\n- 🔖 Asigna etiquetas para una organización aún mejor\n- 👥 Comparte con tu equipo, amigos o familia\n- 🚀 Organiza tu proyecto",
|
||||
@@ -64,6 +65,7 @@
|
||||
"Create new board" : "Crear nuevo tablero",
|
||||
"New board title" : "Nuevo título de tablero",
|
||||
"Select an attachment" : "Selecciona un adjunto",
|
||||
"Cancel upload" : "Cancelar la subida",
|
||||
"by" : "por",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Deshacer eliminación del archivo. De otra forma el archivo se borrará durante la próxima ejecución del trabajo cron.",
|
||||
"Undo file deletion" : "Deshacer eliminación del archivo",
|
||||
|
||||
@@ -67,6 +67,7 @@ OC.L10N.register(
|
||||
"Create new board" : "Créer un nouveau tableau",
|
||||
"New board title" : "Nouveau titre pour le tableau",
|
||||
"Select an attachment" : "Sélectionner une pièce jointe",
|
||||
"Cancel upload" : "Annuler le téléversement",
|
||||
"by" : "par",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Annuler la suppression du fichier - Autrement le fichier sera supprimé lors du prochain lancement de la tâche cron.",
|
||||
"Undo file deletion" : "Annuler la suppression du fichier",
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
"Create new board" : "Créer un nouveau tableau",
|
||||
"New board title" : "Nouveau titre pour le tableau",
|
||||
"Select an attachment" : "Sélectionner une pièce jointe",
|
||||
"Cancel upload" : "Annuler le téléversement",
|
||||
"by" : "par",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Annuler la suppression du fichier - Autrement le fichier sera supprimé lors du prochain lancement de la tâche cron.",
|
||||
"Undo file deletion" : "Annuler la suppression du fichier",
|
||||
|
||||
20
l10n/he.js
20
l10n/he.js
@@ -6,14 +6,25 @@ OC.L10N.register(
|
||||
"Remove user from card" : "הסרת משתמש מכרטיס",
|
||||
"Hours" : "שעות",
|
||||
"Minutes" : "דקות",
|
||||
"Maximum file size of {size} exceeded" : "גודל הקבצים המרבי {size} הושג",
|
||||
"Are you sure you want to delete the stack with all of its data?" : "למחוק את הערימה הזאת עם כל הנתונים שלה?",
|
||||
"The card \"%s\" on \"%s\" has reached its due date." : "הכרטיס „%s” שתחת „%s” הגיע למועד התפוגה שלו.",
|
||||
"The board \"%s\" has been shared with you by %s." : "הלוח „%s” שותף אתך על ידי %s.",
|
||||
"{user} has shared the board %s with you." : "הלוח %s שותף אתך על ידי {user}",
|
||||
"No data was provided to create an attachment." : "לא סופקו נתונים ליצירת קובץ מצורף",
|
||||
"Finished" : "הסתיים",
|
||||
"To review" : "לסקירה",
|
||||
"Action needed" : "נדרשת פעולה",
|
||||
"Later" : "מאוחר יותר",
|
||||
"The file was uploaded" : "הקובץ הועלה",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "הקובץ שהועלה חורג מההנחיה upload_max_filesize ב־php.ini",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "הקובץ שהועלה חורג מההנחיה MAX_FILE_SIZE שצוינה בטופס ה־HTML",
|
||||
"The file was only partially uploaded" : "הקובץ הועלה באופן חלקי בלבד",
|
||||
"No file was uploaded" : "לא הועלה קובץ",
|
||||
"Missing a temporary folder" : "חסרה תיקייה זמנית",
|
||||
"Could not write file to disk" : "לא ניתן לכתוב לכונן",
|
||||
"A PHP extension stopped the file upload" : "הרחבת PHP עצרה את העלאת הקובץ",
|
||||
"No file uploaded or file size exceeds maximum of %s" : "לא הועלה אף קובץ או שגודל הקובץ חרג מהסף המרבי של %s",
|
||||
"Deck" : "חפיסה",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "כלי ניהול למיזמים או לדברים אישיים עבור Nextcloud",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "חבילה היא כלי ניהול בסגנון קנבן שמיועד לתכנון אישי או לארגון מיזמים לצוותים בשילוב עם Nextcloud.\n\n\n- 📥 הוספת המשימות שלך וסידור שלהן\n- 📄 כתיבת הערות נוספות בתצורת markdown\n- 🔖 הקצאת תוויות למטרת ארגון טוב יותר\n- 👥 שיתוף עם הצוות, החברים או המשפחה שלך\n- 🚀 ארגון המיזם שלך כמו שצריך",
|
||||
@@ -24,6 +35,7 @@ OC.L10N.register(
|
||||
"Board details" : "פרטי לוח",
|
||||
"All Boards" : "כל הלוחות",
|
||||
"Archived boards" : "לוחות שנשמרו בארכיון",
|
||||
"Drop your files here to upload it to the card" : "ניתן להשליך את הקבצים שלך כאן כדי להעלות אותם לכרטיס",
|
||||
"Archive" : "לארכיון",
|
||||
"Unarchive" : "הוצאה מהארכיון",
|
||||
"Enter a card title" : "נא להקליד כותרת לכרטיס",
|
||||
@@ -54,7 +66,12 @@ OC.L10N.register(
|
||||
"Undo board deletion - Otherwise the board will be deleted during the next cronjob run." : "ביטול מחיקת לוח - אחרת הלוח יימחק במהלך ריצת ה־cronjob הבאה.",
|
||||
"Create new board" : "יצירת לוח חדש",
|
||||
"New board title" : "כותרת לוח חדשה",
|
||||
"Select an attachment" : "נא לבחור קובץ מצורף",
|
||||
"Cancel upload" : "ביטול העלאה",
|
||||
"by" : "מאת",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "ביטול מחיקת קובץ - אחרת הקובץ יימחק עם ריצת משימת ה־cron הבאה.",
|
||||
"Undo file deletion" : "ביטול מחיקת קובץ",
|
||||
"Insert the file into the description" : "הוספת הקובץ לתיאור",
|
||||
"Modified:" : "מועד השינוי",
|
||||
"Created:" : "מועד היצירה:",
|
||||
"Choose a tag" : "נא לבחור תגית",
|
||||
@@ -67,9 +84,12 @@ OC.L10N.register(
|
||||
"Click to set" : "יש ללחוץ להגדרה",
|
||||
"Remove due date" : "הסרת מועד התפוגה",
|
||||
"Description" : "תיאוג",
|
||||
"Attachments" : "קבצים מצורפים",
|
||||
"Saved" : "נשמר",
|
||||
"Unsaved changes" : "שינויים שלא נשמרו",
|
||||
"Formatting help" : "עזרה בסידור בתבנית",
|
||||
"Upload attachment" : "העלאת קבצים מצורפים",
|
||||
"Insert attachment" : "הוספת קובץ מצורף",
|
||||
"Add a card description…" : "הוספת תיאור כרטיס…",
|
||||
"Shared boards" : "לוחות משותפים",
|
||||
"View more" : "הצגת עוד",
|
||||
|
||||
20
l10n/he.json
20
l10n/he.json
@@ -4,14 +4,25 @@
|
||||
"Remove user from card" : "הסרת משתמש מכרטיס",
|
||||
"Hours" : "שעות",
|
||||
"Minutes" : "דקות",
|
||||
"Maximum file size of {size} exceeded" : "גודל הקבצים המרבי {size} הושג",
|
||||
"Are you sure you want to delete the stack with all of its data?" : "למחוק את הערימה הזאת עם כל הנתונים שלה?",
|
||||
"The card \"%s\" on \"%s\" has reached its due date." : "הכרטיס „%s” שתחת „%s” הגיע למועד התפוגה שלו.",
|
||||
"The board \"%s\" has been shared with you by %s." : "הלוח „%s” שותף אתך על ידי %s.",
|
||||
"{user} has shared the board %s with you." : "הלוח %s שותף אתך על ידי {user}",
|
||||
"No data was provided to create an attachment." : "לא סופקו נתונים ליצירת קובץ מצורף",
|
||||
"Finished" : "הסתיים",
|
||||
"To review" : "לסקירה",
|
||||
"Action needed" : "נדרשת פעולה",
|
||||
"Later" : "מאוחר יותר",
|
||||
"The file was uploaded" : "הקובץ הועלה",
|
||||
"The uploaded file exceeds the upload_max_filesize directive in php.ini" : "הקובץ שהועלה חורג מההנחיה upload_max_filesize ב־php.ini",
|
||||
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "הקובץ שהועלה חורג מההנחיה MAX_FILE_SIZE שצוינה בטופס ה־HTML",
|
||||
"The file was only partially uploaded" : "הקובץ הועלה באופן חלקי בלבד",
|
||||
"No file was uploaded" : "לא הועלה קובץ",
|
||||
"Missing a temporary folder" : "חסרה תיקייה זמנית",
|
||||
"Could not write file to disk" : "לא ניתן לכתוב לכונן",
|
||||
"A PHP extension stopped the file upload" : "הרחבת PHP עצרה את העלאת הקובץ",
|
||||
"No file uploaded or file size exceeds maximum of %s" : "לא הועלה אף קובץ או שגודל הקובץ חרג מהסף המרבי של %s",
|
||||
"Deck" : "חפיסה",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "כלי ניהול למיזמים או לדברים אישיים עבור Nextcloud",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "חבילה היא כלי ניהול בסגנון קנבן שמיועד לתכנון אישי או לארגון מיזמים לצוותים בשילוב עם Nextcloud.\n\n\n- 📥 הוספת המשימות שלך וסידור שלהן\n- 📄 כתיבת הערות נוספות בתצורת markdown\n- 🔖 הקצאת תוויות למטרת ארגון טוב יותר\n- 👥 שיתוף עם הצוות, החברים או המשפחה שלך\n- 🚀 ארגון המיזם שלך כמו שצריך",
|
||||
@@ -22,6 +33,7 @@
|
||||
"Board details" : "פרטי לוח",
|
||||
"All Boards" : "כל הלוחות",
|
||||
"Archived boards" : "לוחות שנשמרו בארכיון",
|
||||
"Drop your files here to upload it to the card" : "ניתן להשליך את הקבצים שלך כאן כדי להעלות אותם לכרטיס",
|
||||
"Archive" : "לארכיון",
|
||||
"Unarchive" : "הוצאה מהארכיון",
|
||||
"Enter a card title" : "נא להקליד כותרת לכרטיס",
|
||||
@@ -52,7 +64,12 @@
|
||||
"Undo board deletion - Otherwise the board will be deleted during the next cronjob run." : "ביטול מחיקת לוח - אחרת הלוח יימחק במהלך ריצת ה־cronjob הבאה.",
|
||||
"Create new board" : "יצירת לוח חדש",
|
||||
"New board title" : "כותרת לוח חדשה",
|
||||
"Select an attachment" : "נא לבחור קובץ מצורף",
|
||||
"Cancel upload" : "ביטול העלאה",
|
||||
"by" : "מאת",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "ביטול מחיקת קובץ - אחרת הקובץ יימחק עם ריצת משימת ה־cron הבאה.",
|
||||
"Undo file deletion" : "ביטול מחיקת קובץ",
|
||||
"Insert the file into the description" : "הוספת הקובץ לתיאור",
|
||||
"Modified:" : "מועד השינוי",
|
||||
"Created:" : "מועד היצירה:",
|
||||
"Choose a tag" : "נא לבחור תגית",
|
||||
@@ -65,9 +82,12 @@
|
||||
"Click to set" : "יש ללחוץ להגדרה",
|
||||
"Remove due date" : "הסרת מועד התפוגה",
|
||||
"Description" : "תיאוג",
|
||||
"Attachments" : "קבצים מצורפים",
|
||||
"Saved" : "נשמר",
|
||||
"Unsaved changes" : "שינויים שלא נשמרו",
|
||||
"Formatting help" : "עזרה בסידור בתבנית",
|
||||
"Upload attachment" : "העלאת קבצים מצורפים",
|
||||
"Insert attachment" : "הוספת קובץ מצורף",
|
||||
"Add a card description…" : "הוספת תיאור כרטיס…",
|
||||
"Shared boards" : "לוחות משותפים",
|
||||
"View more" : "הצגת עוד",
|
||||
|
||||
@@ -67,6 +67,7 @@ OC.L10N.register(
|
||||
"Create new board" : "Crea una nuova lavagna",
|
||||
"New board title" : "Titolo nuova lavagna",
|
||||
"Select an attachment" : "Scegli un allegato",
|
||||
"Cancel upload" : "Annulla caricamento",
|
||||
"by" : "da",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Annulla eliminazione del file - Altrimenti il file sarà eliminato durante la prossima esecuzione del job di cron.",
|
||||
"Undo file deletion" : "Annulla l'eliminazione della file",
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
"Create new board" : "Crea una nuova lavagna",
|
||||
"New board title" : "Titolo nuova lavagna",
|
||||
"Select an attachment" : "Scegli un allegato",
|
||||
"Cancel upload" : "Annulla caricamento",
|
||||
"by" : "da",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Annulla eliminazione del file - Altrimenti il file sarà eliminato durante la prossima esecuzione del job di cron.",
|
||||
"Undo file deletion" : "Annulla l'eliminazione della file",
|
||||
|
||||
@@ -28,7 +28,7 @@ OC.L10N.register(
|
||||
"Add card" : "Dodaj kartę",
|
||||
"Close" : "Zamknij",
|
||||
"Sharing" : "Współdzielenie",
|
||||
"Tags" : "Tagi",
|
||||
"Tags" : "Etykiety",
|
||||
"Select users or groups to share with" : "Wybierz użytkowników lub grupy, żeby współdzielić z nimi",
|
||||
"Access for" : "Dostęp dla",
|
||||
"No matching user or group found." : "Nie znaleziono pasujących użytkowników lub grup",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"Add card" : "Dodaj kartę",
|
||||
"Close" : "Zamknij",
|
||||
"Sharing" : "Współdzielenie",
|
||||
"Tags" : "Tagi",
|
||||
"Tags" : "Etykiety",
|
||||
"Select users or groups to share with" : "Wybierz użytkowników lub grupy, żeby współdzielić z nimi",
|
||||
"Access for" : "Dostęp dla",
|
||||
"No matching user or group found." : "Nie znaleziono pasujących użytkowników lub grup",
|
||||
|
||||
@@ -67,6 +67,7 @@ OC.L10N.register(
|
||||
"Create new board" : "Criar novo painel",
|
||||
"New board title" : "Título do novo painel",
|
||||
"Select an attachment" : "Selecionar um anexo",
|
||||
"Cancel upload" : "Cancelar envio",
|
||||
"by" : "por",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Desfazer exclusão de arquivo - Caso contrário será excluído na próxima execução do cronjob.",
|
||||
"Undo file deletion" : "Desfazer exclusão de arquivo",
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
"Create new board" : "Criar novo painel",
|
||||
"New board title" : "Título do novo painel",
|
||||
"Select an attachment" : "Selecionar um anexo",
|
||||
"Cancel upload" : "Cancelar envio",
|
||||
"by" : "por",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Desfazer exclusão de arquivo - Caso contrário será excluído na próxima execução do cronjob.",
|
||||
"Undo file deletion" : "Desfazer exclusão de arquivo",
|
||||
|
||||
@@ -6,6 +6,7 @@ OC.L10N.register(
|
||||
"Remove user from card" : "Убрать пользователя из карточки",
|
||||
"Hours" : "Часы",
|
||||
"Minutes" : "Минуты",
|
||||
"Maximum file size of {size} exceeded" : "Максимальный размер файла {size} превышен",
|
||||
"Are you sure you want to delete the stack with all of its data?" : "Вы действительно хотите удалить стек со всеми его данными?",
|
||||
"The card \"%s\" on \"%s\" has reached its due date." : "Настал срок карточки «%s» в «%s» .",
|
||||
"The board \"%s\" has been shared with you by %s." : "%s предоставил(а) Вам доступ к доске «%s».",
|
||||
@@ -66,6 +67,7 @@ OC.L10N.register(
|
||||
"Create new board" : "Создать новую доску",
|
||||
"New board title" : "Заголовок новой доски",
|
||||
"Select an attachment" : "Выберите вложение",
|
||||
"Cancel upload" : "Прервать загрузку",
|
||||
"by" : "автор",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Отменить удаление файла, иначе он будет автоматически удалена при следующей обработке cronjob.",
|
||||
"Undo file deletion" : "Отменить удаление файла",
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"Remove user from card" : "Убрать пользователя из карточки",
|
||||
"Hours" : "Часы",
|
||||
"Minutes" : "Минуты",
|
||||
"Maximum file size of {size} exceeded" : "Максимальный размер файла {size} превышен",
|
||||
"Are you sure you want to delete the stack with all of its data?" : "Вы действительно хотите удалить стек со всеми его данными?",
|
||||
"The card \"%s\" on \"%s\" has reached its due date." : "Настал срок карточки «%s» в «%s» .",
|
||||
"The board \"%s\" has been shared with you by %s." : "%s предоставил(а) Вам доступ к доске «%s».",
|
||||
@@ -64,6 +65,7 @@
|
||||
"Create new board" : "Создать новую доску",
|
||||
"New board title" : "Заголовок новой доски",
|
||||
"Select an attachment" : "Выберите вложение",
|
||||
"Cancel upload" : "Прервать загрузку",
|
||||
"by" : "автор",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Отменить удаление файла, иначе он будет автоматически удалена при следующей обработке cronjob.",
|
||||
"Undo file deletion" : "Отменить удаление файла",
|
||||
|
||||
@@ -67,6 +67,7 @@ OC.L10N.register(
|
||||
"Create new board" : "Направи нову таблу",
|
||||
"New board title" : "Назив нове табле",
|
||||
"Select an attachment" : "Одаберите прилог",
|
||||
"Cancel upload" : "Откажи отпремање",
|
||||
"by" : "од",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Поништи брисање фајла - у супротном, фајл ће бити обрисан на следеће покретање крон посла.",
|
||||
"Undo file deletion" : "Поништи брисање фајла",
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
"Create new board" : "Направи нову таблу",
|
||||
"New board title" : "Назив нове табле",
|
||||
"Select an attachment" : "Одаберите прилог",
|
||||
"Cancel upload" : "Откажи отпремање",
|
||||
"by" : "од",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Поништи брисање фајла - у супротном, фајл ће бити обрисан на следеће покретање крон посла.",
|
||||
"Undo file deletion" : "Поништи брисање фајла",
|
||||
|
||||
@@ -64,9 +64,12 @@ OC.L10N.register(
|
||||
"Click to set" : "Klicka för att sätta",
|
||||
"Remove due date" : "Ta bort slutdatum",
|
||||
"Description" : "Beskrivning",
|
||||
"Attachments" : "Bilagor",
|
||||
"Saved" : "Sparad",
|
||||
"Unsaved changes" : "Osparade ändringar",
|
||||
"Formatting help" : "Formatteringshjälp",
|
||||
"Upload attachment" : "Ladda upp bilaga",
|
||||
"Insert attachment" : "Infoga bilaga",
|
||||
"Add a card description…" : "Lägg till en kortbeskrivning...",
|
||||
"Shared boards" : "Delade tavlor",
|
||||
"View more" : "Titta mer",
|
||||
|
||||
@@ -62,9 +62,12 @@
|
||||
"Click to set" : "Klicka för att sätta",
|
||||
"Remove due date" : "Ta bort slutdatum",
|
||||
"Description" : "Beskrivning",
|
||||
"Attachments" : "Bilagor",
|
||||
"Saved" : "Sparad",
|
||||
"Unsaved changes" : "Osparade ändringar",
|
||||
"Formatting help" : "Formatteringshjälp",
|
||||
"Upload attachment" : "Ladda upp bilaga",
|
||||
"Insert attachment" : "Infoga bilaga",
|
||||
"Add a card description…" : "Lägg till en kortbeskrivning...",
|
||||
"Shared boards" : "Delade tavlor",
|
||||
"View more" : "Titta mer",
|
||||
|
||||
10
l10n/tr.js
10
l10n/tr.js
@@ -6,10 +6,12 @@ OC.L10N.register(
|
||||
"Remove user from card" : "Kullanıcıyı karttan kaldır",
|
||||
"Hours" : "Saat",
|
||||
"Minutes" : "Dakika",
|
||||
"Maximum file size of {size} exceeded" : "{size} olan en büyük dosya boyutu sınırı aşıldı",
|
||||
"Are you sure you want to delete the stack with all of its data?" : "Bu yığını tüm bilgileri ile silmek istediğinize emin misiniz?",
|
||||
"The card \"%s\" on \"%s\" has reached its due date." : "\"%s\" kartı \"%s\" zamanında son kullanma tarihine ulaştı.",
|
||||
"The board \"%s\" has been shared with you by %s." : "\"%s\" panosu %s tarafından sizinle paylaşıldı.",
|
||||
"{user} has shared the board %s with you." : "{user} sizinle %s panosunu paylaştı.",
|
||||
"No data was provided to create an attachment." : "Bir ek dosyası oluşturmak için herhangi bir veri sağlanmadı.",
|
||||
"Finished" : "Tamamlandı",
|
||||
"To review" : "İncelenecek",
|
||||
"Action needed" : "İşlem yapılması gerekiyor",
|
||||
@@ -22,6 +24,7 @@ OC.L10N.register(
|
||||
"Missing a temporary folder" : "Geçici bir klasör eksik",
|
||||
"Could not write file to disk" : "Dosya diske yazılamadı",
|
||||
"A PHP extension stopped the file upload" : "Bir PHP eklentisi dosyanın yüklenmesini engelledi",
|
||||
"No file uploaded or file size exceeds maximum of %s" : "Herhangi bir dosya yüklenmedi ya da %s olan en büyük dosya boyutu sınırı aşıldı",
|
||||
"Deck" : "Tahta",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "Nextcloud için Kanban tarzında bir proje ve kişisel yönetim uygulaması",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deste, Nextcloud ile bütünleştirilmiş takımlar için Kanban tarzında bir kişisel planlama ve proje yönetimi uygulamasıdır.\n\n\n- 📥 Görevleri kartlara ekleyerek sıralayabilirsiniz\n- 📄 Markdown ile biçimlendirilmiş notlar ekleyebilirsiniz\n- 🔖 Daha iyi düzenleme için etiketler atayabilirsiniz\n- 👥 Takımınız, arkadaşlarınız ya da aileniz ile paylaşabilirsiniz\n- 🚀 Projelerinizi düzenli tutarak izleyebilirsiniz",
|
||||
@@ -50,7 +53,7 @@ OC.L10N.register(
|
||||
"Discard share" : "Paylaşımı kaldır",
|
||||
"Update" : "Güncelle",
|
||||
"Create" : "Ekle",
|
||||
"Create a new tag" : "Yeni bir etiket ekle",
|
||||
"Create a new tag" : "Etiket ekle",
|
||||
"Status" : "Durum",
|
||||
"Title" : "Başlık",
|
||||
"Members" : "Üyeler",
|
||||
@@ -61,9 +64,10 @@ OC.L10N.register(
|
||||
"Delete board" : "Panoyu sil",
|
||||
"Reset" : "Sıfırla",
|
||||
"Undo board deletion - Otherwise the board will be deleted during the next cronjob run." : "Pano silme işlemini geri alır. Yoksa pano zamanlanmış görevin bir sonraki çalışmasında silinir.",
|
||||
"Create new board" : "Yeni pano ekle",
|
||||
"Create new board" : "Pano ekle",
|
||||
"New board title" : "Yeni pano başlığı",
|
||||
"Select an attachment" : "Bir ek dosyası seçin",
|
||||
"Cancel upload" : "Yüklemeyi iptal et",
|
||||
"by" : "Kişi:",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dosya silme işlemini geri alır. Yoksa dosya zamanlanmış görevin bir sonraki çalışmasında silinir.",
|
||||
"Undo file deletion" : "Dosya silmeyi geri al",
|
||||
@@ -90,6 +94,6 @@ OC.L10N.register(
|
||||
"Shared boards" : "Paylaşılmış panolar",
|
||||
"View more" : "Diğerlerini görüntüle",
|
||||
"Move board to archive" : "Panoyu arşive taşı",
|
||||
"Create a new board" : "Yeni bir pano ekle"
|
||||
"Create a new board" : "Pano ekle"
|
||||
},
|
||||
"nplurals=2; plural=(n > 1);");
|
||||
|
||||
10
l10n/tr.json
10
l10n/tr.json
@@ -4,10 +4,12 @@
|
||||
"Remove user from card" : "Kullanıcıyı karttan kaldır",
|
||||
"Hours" : "Saat",
|
||||
"Minutes" : "Dakika",
|
||||
"Maximum file size of {size} exceeded" : "{size} olan en büyük dosya boyutu sınırı aşıldı",
|
||||
"Are you sure you want to delete the stack with all of its data?" : "Bu yığını tüm bilgileri ile silmek istediğinize emin misiniz?",
|
||||
"The card \"%s\" on \"%s\" has reached its due date." : "\"%s\" kartı \"%s\" zamanında son kullanma tarihine ulaştı.",
|
||||
"The board \"%s\" has been shared with you by %s." : "\"%s\" panosu %s tarafından sizinle paylaşıldı.",
|
||||
"{user} has shared the board %s with you." : "{user} sizinle %s panosunu paylaştı.",
|
||||
"No data was provided to create an attachment." : "Bir ek dosyası oluşturmak için herhangi bir veri sağlanmadı.",
|
||||
"Finished" : "Tamamlandı",
|
||||
"To review" : "İncelenecek",
|
||||
"Action needed" : "İşlem yapılması gerekiyor",
|
||||
@@ -20,6 +22,7 @@
|
||||
"Missing a temporary folder" : "Geçici bir klasör eksik",
|
||||
"Could not write file to disk" : "Dosya diske yazılamadı",
|
||||
"A PHP extension stopped the file upload" : "Bir PHP eklentisi dosyanın yüklenmesini engelledi",
|
||||
"No file uploaded or file size exceeds maximum of %s" : "Herhangi bir dosya yüklenmedi ya da %s olan en büyük dosya boyutu sınırı aşıldı",
|
||||
"Deck" : "Tahta",
|
||||
"A kanban style project and personal management tool for Nextcloud" : "Nextcloud için Kanban tarzında bir proje ve kişisel yönetim uygulaması",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 🚀 Get your project organized" : "Deste, Nextcloud ile bütünleştirilmiş takımlar için Kanban tarzında bir kişisel planlama ve proje yönetimi uygulamasıdır.\n\n\n- 📥 Görevleri kartlara ekleyerek sıralayabilirsiniz\n- 📄 Markdown ile biçimlendirilmiş notlar ekleyebilirsiniz\n- 🔖 Daha iyi düzenleme için etiketler atayabilirsiniz\n- 👥 Takımınız, arkadaşlarınız ya da aileniz ile paylaşabilirsiniz\n- 🚀 Projelerinizi düzenli tutarak izleyebilirsiniz",
|
||||
@@ -48,7 +51,7 @@
|
||||
"Discard share" : "Paylaşımı kaldır",
|
||||
"Update" : "Güncelle",
|
||||
"Create" : "Ekle",
|
||||
"Create a new tag" : "Yeni bir etiket ekle",
|
||||
"Create a new tag" : "Etiket ekle",
|
||||
"Status" : "Durum",
|
||||
"Title" : "Başlık",
|
||||
"Members" : "Üyeler",
|
||||
@@ -59,9 +62,10 @@
|
||||
"Delete board" : "Panoyu sil",
|
||||
"Reset" : "Sıfırla",
|
||||
"Undo board deletion - Otherwise the board will be deleted during the next cronjob run." : "Pano silme işlemini geri alır. Yoksa pano zamanlanmış görevin bir sonraki çalışmasında silinir.",
|
||||
"Create new board" : "Yeni pano ekle",
|
||||
"Create new board" : "Pano ekle",
|
||||
"New board title" : "Yeni pano başlığı",
|
||||
"Select an attachment" : "Bir ek dosyası seçin",
|
||||
"Cancel upload" : "Yüklemeyi iptal et",
|
||||
"by" : "Kişi:",
|
||||
"Undo file deletion - Otherwise the file will be deleted during the next cronjob run." : "Dosya silme işlemini geri alır. Yoksa dosya zamanlanmış görevin bir sonraki çalışmasında silinir.",
|
||||
"Undo file deletion" : "Dosya silmeyi geri al",
|
||||
@@ -88,6 +92,6 @@
|
||||
"Shared boards" : "Paylaşılmış panolar",
|
||||
"View more" : "Diğerlerini görüntüle",
|
||||
"Move board to archive" : "Panoyu arşive taşı",
|
||||
"Create a new board" : "Yeni bir pano ekle"
|
||||
"Create a new board" : "Pano ekle"
|
||||
},"pluralForm" :"nplurals=2; plural=(n > 1);"
|
||||
}
|
||||
@@ -29,12 +29,16 @@ use OCA\Deck\StatusException;
|
||||
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
||||
use OCP\AppFramework\Http\EmptyContentSecurityPolicy;
|
||||
use OCP\AppFramework\Http\FileDisplayResponse;
|
||||
use OCP\AppFramework\Http\StreamResponse;
|
||||
use OCP\Files\Cache\IScanner;
|
||||
use OCP\Files\Folder;
|
||||
use OCP\Files\IAppData;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\Files\NotFoundException;
|
||||
use OCP\Files\NotPermittedException;
|
||||
use OCP\Files\SimpleFS\ISimpleFile;
|
||||
use OCP\Files\SimpleFS\ISimpleFolder;
|
||||
use OCP\IConfig;
|
||||
use OCP\IL10N;
|
||||
use OCP\ILogger;
|
||||
use OCP\IRequest;
|
||||
@@ -45,17 +49,23 @@ class FileService implements IAttachmentService {
|
||||
private $appData;
|
||||
private $request;
|
||||
private $logger;
|
||||
private $rootFolder;
|
||||
private $config;
|
||||
|
||||
public function __construct(
|
||||
IL10N $l10n,
|
||||
IAppData $appData,
|
||||
IRequest $request,
|
||||
ILogger $logger
|
||||
ILogger $logger,
|
||||
IRootFolder $rootFolder,
|
||||
IConfig $config
|
||||
) {
|
||||
$this->l10n = $l10n;
|
||||
$this->appData = $appData;
|
||||
$this->request = $request;
|
||||
$this->logger = $logger;
|
||||
$this->rootFolder = $rootFolder;
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -174,9 +184,32 @@ class FileService implements IAttachmentService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Workaround until ISimpleFile can be fetched as a resource
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
private function getFileFromRootFolder(Attachment $attachment) {
|
||||
$folderName = 'file-card-' . (int)$attachment->getCardId();
|
||||
$instanceId = $this->config->getSystemValue('instanceid', null);
|
||||
if ($instanceId === null) {
|
||||
throw new \Exception('no instance id!');
|
||||
}
|
||||
$name = 'appdata_' . $instanceId;
|
||||
$appDataFolder = $this->rootFolder->get($name);
|
||||
$appDataFolder = $appDataFolder->get('deck');
|
||||
$cardFolder = $appDataFolder->get($folderName);
|
||||
return $cardFolder->get($attachment->getData());
|
||||
}
|
||||
|
||||
public function display(Attachment $attachment) {
|
||||
$file = $this->getFileForAttachment($attachment);
|
||||
$file = $this->getFileFromRootFolder($attachment);
|
||||
if (method_exists($file, 'fopen')) {
|
||||
$response = new StreamResponse($file->fopen('r'));
|
||||
$response->addHeader('Content-Disposition', 'inline; filename="' . rawurldecode($file->getName()) . '"');
|
||||
} else {
|
||||
$response = new FileDisplayResponse($file);
|
||||
}
|
||||
if ($file->getMimeType() === 'application/pdf') {
|
||||
// We need those since otherwise chrome won't show the PDF file with CSP rule object-src 'none'
|
||||
// https://bugs.chromium.org/p/chromium/issues/detail?id=271452
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="filename">
|
||||
<span class="basename">{{ attachment.file.name }}</span>
|
||||
</div>
|
||||
<progress value="{{ attachment.progress }}" max="100"></progress>
|
||||
<progress ng-attr-value="{{ attachment.progress }}" max="100"></progress>
|
||||
</div>
|
||||
<button class="icon icon-close button-inline" ng-click="attachment.cancel()">
|
||||
<span class="hidden-visually"><?php p($l->t('Cancel upload')); ?></span>
|
||||
|
||||
@@ -38,11 +38,15 @@ use OCA\Deck\StatusException;
|
||||
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
||||
use OCP\AppFramework\Http\FileDisplayResponse;
|
||||
use OCP\AppFramework\Http\Response;
|
||||
use OCP\AppFramework\Http\StreamResponse;
|
||||
use OCP\AppFramework\IAppContainer;
|
||||
use OCP\Files\Folder;
|
||||
use OCP\Files\IAppData;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\Files\SimpleFS\ISimpleFile;
|
||||
use OCP\Files\SimpleFS\ISimpleFolder;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IConfig;
|
||||
use OCP\IL10N;
|
||||
use OCP\ILogger;
|
||||
use OCP\IRequest;
|
||||
@@ -61,6 +65,10 @@ class FileServiceTest extends TestCase {
|
||||
private $logger;
|
||||
/** @var FileService */
|
||||
private $fileService;
|
||||
/** @var IRootFolder */
|
||||
private $rootFolder;
|
||||
/** @var IConfig */
|
||||
private $config;
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
@@ -68,7 +76,9 @@ class FileServiceTest extends TestCase {
|
||||
$this->appData = $this->createMock(IAppData::class);
|
||||
$this->l10n = $this->createMock(IL10N::class);
|
||||
$this->logger = $this->createMock(ILogger::class);
|
||||
$this->fileService = new FileService($this->l10n, $this->appData, $this->request, $this->logger);
|
||||
$this->rootFolder = $this->createMock(IRootFolder::class);
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
$this->fileService = new FileService($this->l10n, $this->appData, $this->request, $this->logger, $this->rootFolder, $this->config);
|
||||
}
|
||||
|
||||
public function mockGetFolder($cardId) {
|
||||
@@ -253,33 +263,60 @@ class FileServiceTest extends TestCase {
|
||||
}
|
||||
|
||||
public function testDisplay() {
|
||||
$this->config->expects($this->once())
|
||||
->method('getSystemValue')
|
||||
->willReturn('123');
|
||||
$appDataFolder = $this->createMock(Folder::class);
|
||||
$deckAppDataFolder = $this->createMock(Folder::class);
|
||||
$cardFolder = $this->createMock(Folder::class);
|
||||
$this->rootFolder->expects($this->once())->method('get')->willReturn($appDataFolder);
|
||||
$appDataFolder->expects($this->once())->method('get')->willReturn($deckAppDataFolder);
|
||||
$deckAppDataFolder->expects($this->once())->method('get')->willReturn($cardFolder);
|
||||
$attachment = $this->getAttachment();
|
||||
$file = $this->createMock(ISimpleFile::class);
|
||||
$folder = $this->mockGetFolder('123');
|
||||
$folder->expects($this->once())
|
||||
->method('getFile')
|
||||
->willReturn($file);
|
||||
$file->expects($this->exactly(2))
|
||||
$file = $this->createMock(\OCP\Files\File::class);
|
||||
$cardFolder->expects($this->once())->method('get')->willReturn($file);
|
||||
$file->expects($this->any())
|
||||
->method('getMimeType')
|
||||
->willReturn('image/jpeg');
|
||||
$file->expects($this->any())
|
||||
->method('getName')
|
||||
->willReturn('file1');
|
||||
$file->expects($this->any())
|
||||
->method('fopen')
|
||||
->willReturn('fileresource');
|
||||
$actual = $this->fileService->display($attachment);
|
||||
$expected = new FileDisplayResponse($file);
|
||||
$expected = new StreamResponse('fileresource');
|
||||
$expected->addHeader('Content-Type', 'image/jpeg');
|
||||
$expected->addHeader('Content-Disposition', 'inline; filename="' . rawurldecode($file->getName()) . '"');
|
||||
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
public function testDisplayPdf() {
|
||||
$this->config->expects($this->once())
|
||||
->method('getSystemValue')
|
||||
->willReturn('123');
|
||||
$appDataFolder = $this->createMock(Folder::class);
|
||||
$deckAppDataFolder = $this->createMock(Folder::class);
|
||||
$cardFolder = $this->createMock(Folder::class);
|
||||
$this->rootFolder->expects($this->once())->method('get')->willReturn($appDataFolder);
|
||||
$appDataFolder->expects($this->once())->method('get')->willReturn($deckAppDataFolder);
|
||||
$deckAppDataFolder->expects($this->once())->method('get')->willReturn($cardFolder);
|
||||
$attachment = $this->getAttachment();
|
||||
$file = $this->createMock(ISimpleFile::class);
|
||||
$folder = $this->mockGetFolder('123');
|
||||
$folder->expects($this->once())
|
||||
->method('getFile')
|
||||
->willReturn($file);
|
||||
$file->expects($this->exactly(2))
|
||||
$file = $this->createMock(\OCP\Files\File::class);
|
||||
$cardFolder->expects($this->once())->method('get')->willReturn($file);
|
||||
$file->expects($this->any())
|
||||
->method('getMimeType')
|
||||
->willReturn('application/pdf');
|
||||
$file->expects($this->any())
|
||||
->method('getName')
|
||||
->willReturn('file1');
|
||||
$file->expects($this->any())
|
||||
->method('fopen')
|
||||
->willReturn('fileresource');
|
||||
$actual = $this->fileService->display($attachment);
|
||||
$expected = new FileDisplayResponse($file);
|
||||
$expected = new StreamResponse('fileresource');
|
||||
$expected->addHeader('Content-Disposition', 'inline; filename="' . rawurldecode($file->getName()) . '"');
|
||||
$expected->addHeader('Content-Type', 'application/pdf');
|
||||
$policy = new ContentSecurityPolicy();
|
||||
$policy->addAllowedObjectDomain('\'self\'');
|
||||
|
||||
Reference in New Issue
Block a user