Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1f026ef
initial commit
memurats Dec 18, 2024
078cdb6
changes for us optimization
memurats Dec 20, 2024
777465e
Update info.xml
memurats Dec 20, 2024
3187f3b
sharing app update
memurats Dec 23, 2024
149d5fb
raised version number
memurats Dec 23, 2024
aa5bf1e
Merge branch 'nmc/optimized-sharing' of https://github.com/nextmcloud…
liviu-preda-tsystems Jan 6, 2025
7654b64
new sharing permissions updated
psawalka Jan 15, 2025
467479f
Merge pull request #55 from nextmcloud/nmc/3696-new-sharing-permissions
psawalka Jan 16, 2025
558a57c
minor changes
memurats Jan 21, 2025
92c9127
changed share settings order
memurats Jan 22, 2025
592be11
Merge branch 'nmc/optimized-sharing' of https://github.com/nextmcloud…
liviu-preda-tsystems Jan 22, 2025
dbda5ce
fix lint errors
memurats Jan 22, 2025
567e106
added default sharing settings
memurats Jan 22, 2025
69c35ee
Merge branch 'nmc/optimized-sharing' of https://github.com/nextmcloud…
liviu-preda-tsystems Jan 23, 2025
66c586b
fixed filtering out of existing shares
memurats Jan 23, 2025
266f78e
fixed details click handler
memurats Jan 23, 2025
f3c529c
seperated media mime types for sharing permissions
psawalka Jan 24, 2025
1a6025d
lint fixes
psawalka Jan 24, 2025
c0b5485
lint fixes
psawalka Jan 24, 2025
773eca8
fixed optical issues and translations
memurats Jan 24, 2025
b6bfd6d
Merge pull request #56 from nextmcloud/nmc/3696-new-sharing-permissions
memurats Jan 24, 2025
b967a85
Merge branch 'nmc/optimized-sharing' of https://github.com/nextmcloud…
liviu-preda-tsystems Jan 24, 2025
20b20df
add translations, back button and styles for link and email permissio…
liviu-preda-tsystems Jan 27, 2025
7c52d09
Merge pull request #57 from nextmcloud/nmc/style-permissions-view
memurats Jan 28, 2025
8810869
mixed share permissions
memurats Jan 31, 2025
59d762b
Set mixed email shares options and expiry date (#58)
liviu-preda-tsystems Feb 7, 2025
fab150b
streamline attributes handling
memurats Feb 7, 2025
716613d
fixed share success and input
memurats Feb 18, 2025
1c0dd1c
fixed errors
memurats Feb 18, 2025
449c024
fixed multiple issues
memurats Feb 20, 2025
e8158b7
added shared with me and resharing improvements
memurats Feb 27, 2025
c03a531
fixed password and expire date inputs, disabled sharing from trashbin…
memurats Mar 11, 2025
ab99021
added default active expiry date
memurats Mar 11, 2025
bb6dcbe
fix expiration date and share actions on e2ee folders
memurats Mar 13, 2025
327425b
fix linter issues
liviu-preda-tsystems Apr 17, 2025
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 appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<name>MagentaCLOUD sharing</name>
<summary>Customisation of sharing.</summary>
<description><![CDATA[MagentaCLOUD sharing handling with changed sidebars and views.]]></description>
<version>2.0.1</version>
<version>3.0.1</version>
<licence>agpl</licence>
<author mail="aleksei.efremov@t-systems.com">Aleksei Efremov</author>
<namespace>Nmcsharing</namespace>
Expand Down
21 changes: 17 additions & 4 deletions l10n/de.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
OC.L10N.register(
'nmcsharing',
{
Sharing: 'Teilen',
'Sharing': 'Teilen',
'Add link': 'Link erstellen',
'Add new link': 'Neuen Link erstellen',
'Read only': 'Nur lesen',
'Can edit': 'Kann bearbeiten',
'File drop': 'Sammelbox',
User: 'Benutzer',
Permissions: 'Berechtigungen',
'User': 'Benutzer',
'Permissions': 'Berechtigungen',
'Read, write and upload': 'Kann bearbeiten',
'Read and write': 'Kann bearbeiten',
'File drop (upload only)': 'Sammelbox',
'With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.': 'Bei der Sammelbox ist nur das Hochladen erlaubt. Nur Sie sehen Dateien und Ordner die hochgeladen worden sind.',
Advanced: 'Erweiterte',
'Advanced': 'Erweiterte',
'Set password': 'Passwortschutz',
'Your shares': 'Ihre Freigaben',
'Manage access': 'Zugriff verwalten',
'Send': 'Send',
'Send link via E-Mail': 'Link per E-Mail senden',
'Links sent via E-Mail': 'Links per E-Mail versandt',
'Accept settings': 'Übernehmen',
'Or': 'Oder',
'Links to Copy': 'Links zum Kopieren',
'Anyone with the link can edit': 'Jeder mit dem Link kann bearbeiten',
'Anyone with the link can only view': 'Jeder mit dem Link kann nur anzeigen',
'Anyone with the link can file drop': 'Jeder mit dem Link kann Dateien hinzufügen',
'Create new link': 'Neuen Link erstellen',
'Shares': 'Geteilte Inhalte',
'No shares created yet.': 'Noch keine Freigaben erstellt.',
'Advanced permissions': 'Erweiterte Berechtigungen',
'Allow resharing': 'Weiterteilen erlauben',
Expand Down
35 changes: 32 additions & 3 deletions l10n/de.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,56 @@
{
"translations": {
"Sharing": "Teilen",
"Manage shares": "Freigaben verwalten",
"Add link": "Link erstellen",
"Add new link": "Neuen Link erstellen",
"Read only": "Nur lesen",
"Can edit": "Kann bearbeiten",
"File drop": "Sammelbox",
"User": "Benutzer",
"Permissions": "Berechtigungen",
"Shared with me": "Mit mir geteilt",
"Read, write and upload": "Kann bearbeiten",
"Read and write": "Kann bearbeiten",
"File drop (upload only)": "Sammelbox",
"With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.": "Bei der Sammelbox ist nur das Hochladen erlaubt. Nur Sie sehen Dateien und Ordner die hochgeladen worden sind.",
"Advanced": "Erweiterte",
"Set password": "Passwortschutz",
"Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.": "Bitte beachten sie, dass beim internen teilen, also dem Teilen an andere MagentaCLOUD Nutzer, die Sammelbox nicht verfügbar ist.",
"Please note that resharing is only available for internal sharing, i.e. sharing with other MagentaCLOUD users.": "Bitte beachten sie, dass das Weiterteilen, nur beim internen Teilen, also dem Teilen an andere MagentaCLOUD Nutzer, verfügbar ist.",
"Advanced settings": "Erweiterte Einstellungen",
"Set password": "Passwort setzen",
"Your shares": "Ihre Freigaben",
"Manage access": "Zugriff verwalten",
"Here you can see who has access to your file/folder.": "Hier sehen Sie wer Zugriff auf Ihre Datei/Ihren Ordner hat.",
"You haven't shared your file/folder yet. Share to give others access.": "Sie haben Ihre Datei/Ihren Ordner noch nicht geteilt. Teilen Sie um Anderen Zugriff zu geben.",
"Send": "Senden",
"Send link via E-Mail": "Link per E-Mail senden",
"Links sent via E-Mail": "Links per E-Mail versandt",
"Accept settings": "Übernehmen",
"or": "oder",
"Link to \"{fileName}\" was sent.": "Link zu \"{fileName}\" gesendet.",
"To": "An",
"Link to copy": "Link zum Kopieren",
"Copy": "Kopieren",
"Copied": "Kopiert",
"Anyone with the link can": "Jeder mit dem Link kann",
"only view": "nur anzeigen",
"edit": "bearbeiten",
"Anyone with the link can edit": "Jeder mit dem Link kann bearbeiten",
"Anyone with the link can only view": "Jeder mit dem Link kann nur anzeigen",
"Anyone with the link can file drop": "Jeder mit dem Link kann Dateien hinzufügen",
"Create new link": "Neuen Link erstellen",
"Shares": "Geteilte Inhalte",
"No shares created yet.": "Noch keine Freigaben erstellt.",
"Advanced permissions": "Erweiterte Berechtigungen",
"Allow resharing": "Weiterteilen erlauben",
"Set download limit": "Downloads begrenzen",
"Resharing is allowed": "Weiterteilen ist erlaubt",
"You can create links or send shares by mail. If you invite MagentaCLOUD users, you have more opportunities for collaboration.": "Sie können Links erstellen oder Freigaben per Mail versenden. Wenn Sie MagentaCLOUD Nutzer einladen, bieten sich Ihnen mehr Möglichkeiten der Zusammenarbeit.",
"Share updated": "Freigabe aktualisiert",
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "Diese Freigabe ist auf {limit} Downloads beschränkt. Es sind noch {downloadsLeft} Downloads zugelassen."
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "Diese Freigabe ist auf {limit} Downloads beschränkt. Es sind noch {downloadsLeft} Downloads zugelassen.",
"Deny download": "Download verhindern",
"Name, email": "Name, E-Mail-Adresse",
"Password must be at least 6 characters long": "Passwort muss mindestens 6 Zeichen lang sein"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
35 changes: 32 additions & 3 deletions l10n/de_DE.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,56 @@
{
"translations": {
"Sharing": "Teilen",
"Manage shares": "Zugriff verwalten",
"Add link": "Link erstellen",
"Add new link": "Neuen Link erstellen",
"Read only": "Nur lesen",
"Can edit": "Kann bearbeiten",
"File drop": "Sammelbox",
"User": "Benutzer",
"Permissions": "Berechtigungen",
"Shared with me": "Mit mir geteilt",
"Read, write and upload": "Kann bearbeiten",
"Read and write": "Kann bearbeiten",
"File drop (upload only)": "Sammelbox",
"With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.": "Bei der Sammelbox ist nur das Hochladen erlaubt. Nur Sie sehen Dateien und Ordner die hochgeladen worden sind.",
"Advanced": "Erweiterte",
"Set password": "Passwortschutz",
"Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.": "Bitte beachten sie, dass beim internen teilen, also dem Teilen an andere MagentaCLOUD Nutzer, die Sammelbox nicht verfügbar ist.",
"Please note that resharing is only available for internal sharing, i.e. sharing with other MagentaCLOUD users.": "Bitte beachten sie, dass das Weiterteilen, nur beim internen Teilen, also dem Teilen an andere MagentaCLOUD Nutzer, verfügbar ist.",
"Advanced settings": "Erweiterte Einstellungen",
"Set password": "Passwort setzen",
"Your shares": "Ihre Freigaben",
"Manage access": "Zugriff verwalten",
"Here you can see who has access to your file/folder.": "Hier sehen Sie wer Zugriff auf Ihre Datei/Ihren Ordner hat.",
"You haven't shared your file/folder yet. Share to give others access.": "Sie haben Ihre Datei/Ihren Ordner noch nicht geteilt. Teilen Sie um Anderen Zugriff zu geben.",
"Send": "Senden",
"Send link via E-Mail": "Link per E-Mail senden",
"Links sent via E-Mail": "Links per E-Mail versandt",
"Accept settings": "Übernehmen",
"or": "oder",
"Link to \"{fileName}\" was sent.": "Link zu \"{fileName}\" gesendet.",
"To": "An",
"Link to copy": "Link zum Kopieren",
"Copy": "Kopieren",
"Copied": "Kopiert",
"Anyone with the link can": "Jeder mit dem Link kann",
"only view": "nur anzeigen",
"edit": "bearbeiten",
"Anyone with the link can edit": "Jeder mit dem Link kann bearbeiten",
"Anyone with the link can only view": "Jeder mit dem Link kann nur anzeigen",
"Anyone with the link can file drop": "Jeder mit dem Link kann Dateien hinzufügen",
"Create new link": "Neuen Link erstellen",
"Shares": "Geteilte Inhalte",
"No shares created yet.": "Noch keine Freigaben erstellt.",
"Advanced permissions": "Erweiterte Berechtigungen",
"Allow resharing": "Weiterteilen erlauben",
"Set download limit": "Downloads begrenzen",
"Resharing is allowed": "Weiterteilen ist erlaubt",
"You can create links or send shares by mail. If you invite MagentaCLOUD users, you have more opportunities for collaboration.": "Sie können Links erstellen oder Freigaben per Mail versenden. Wenn Sie MagentaCLOUD Nutzer einladen, bieten sich Ihnen mehr Möglichkeiten der Zusammenarbeit.",
"Share updated": "Freigabe aktualisiert",
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "Diese Freigabe ist auf {limit} Downloads beschränkt. Es sind noch {downloadsLeft} Downloads zugelassen."
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "Diese Freigabe ist auf {limit} Downloads beschränkt. Es sind noch {downloadsLeft} Downloads zugelassen.",
"Deny download": "Download verhindern",
"Name, email": "Name, E-Mail-Adresse",
"Password must be at least 6 characters long": "Passwort muss mindestens 6 Zeichen lang sein"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
33 changes: 31 additions & 2 deletions l10n/en.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,56 @@
{
"translations": {
"Sharing": "Sharing",
"Manage shares": "Manage shares",
"Add link": "Add link",
"Add new link": "Add new link",
"Read only": "Read only",
"Can edit": "Can edit",
"File drop": "File drop",
"User": "User",
"Permissions": "Permissions",
"Shared with me": "Shared with me",
"Read, write and upload": "Read, write and upload",
"Read and write": "Read and write",
"File drop (upload only)": "File drop (upload only)",
"With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.": "With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.",
"Advanced": "Advanced",
"Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.": "Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.",
"Please note that resharing is only available for internal sharing, i.e. sharing with other MagentaCLOUD users.": "Please note that resharing is only available for internal sharing, i.e. sharing with other MagentaCLOUD users.",
"Advanced settings": "Advanced settings",
"Set password": "Set password",
"Your shares": "Your shares",
"Manage access": "Manage Access",
"Here you can see who has access to your file/folder.": "Here you can see who has access to your file/folder.",
"You haven't shared your file/folder yet. Share to give others access.": "You haven't shared your file/folder yet. Share to give others access.",
"Send": "Send",
"Send link via E-Mail": "Send link via E-Mail",
"Links sent via E-Mail": "Links sent via E-Mail",
"Accept settings": "Accept settings",
"or": "or",
"Link to \"{fileName}\" was sent.": "Link to \"{fileName}\" was sent.",
"To": "To",
"Link to copy": "Link to Copy",
"Copy": "Copy",
"Copied": "Copied",
"Anyone with the link can": "Anyone with the link can",
"only view": "only view",
"edit": "edit",
"Anyone with the link can edit": "Anyone with the link can edit",
"Anyone with the link can only view": "Anyone with the link can only view",
"Anyone with the link can file drop": "Anyone with the link can file drop",
"Create new link": "Create new link",
"Shares": "Shares",
"No shares created yet.": "No shares created yet.",
"Advanced permissions": "Advanced permissions",
"Allow resharing": "Allow resharing",
"Set download limit": "Set download limit",
"Resharing is allowed": "Resharing is allowed",
"You can create links or send shares by mail. If you invite MagentaCLOUD users, you have more opportunities for collaboration.": "You can create links or send shares by mail. If you invite MagentaCLOUD users, you have more opportunities for collaboration.",
"Share updated": "Share updated",
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed."
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.",
"Deny download": "Deny download",
"Name, email": "Name, email",
"Password must be at least 6 characters long": "Password must be at least 6 characters long"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
21 changes: 17 additions & 4 deletions l10n/en_GB.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
OC.L10N.register(
'nmcsharing',
{
Sharing: 'Sharing',
'Sharing': 'Sharing',
'Add link': 'Add link',
'Add new link': 'Add new link',
'Read only': 'Read only',
'Can edit': 'Can edit',
'File drop': 'File drop',
User: 'User',
Permissions: 'Permissions',
'User': 'User',
'Permissions': 'Permissions',
'Read, write and upload': 'Read, write and upload',
'Read and write': 'Read and write',
'File drop (upload only)': 'File drop (upload only)',
'With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.': 'With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.',
Advanced: 'Advanced',
'Advanced': 'Advanced',
'Set password': 'Set password',
'Your shares': 'Your shares',
'Manage access': 'Manage Access',
'Send': 'Send',
'Send link via E-Mail': 'Send link via E-Mail',
'Links sent via E-Mail': 'Links sent via E-Mail',
'Accept settings': 'Accept settings',
'Or': 'Or',
'Links to Copy': 'Links to Copy',
'Anyone with the link can edit': 'Anyone with the link can edit',
'Anyone with the link can only view': 'Anyone with the link can only view',
'Anyone with the link can file drop': 'Anyone with the link can file drop',
'Create new link': 'Create new link',
'Shares': 'Shares',
'No shares created yet.': 'No shares created yet.',
'Advanced permissions': 'Advanced permissions',
'Allow resharing': 'Allow resharing',
Expand Down
33 changes: 31 additions & 2 deletions l10n/en_GB.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,56 @@
{
"translations": {
"Sharing": "Sharing",
"Manage shares": "Manage shares",
"Add link": "Add link",
"Add new link": "Add new link",
"Read only": "Read only",
"Can edit": "Can edit",
"File drop": "File drop",
"User": "User",
"Permissions": "Permissions",
"Shared with me": "Shared with me",
"Read, write and upload": "Read, write and upload",
"Read and write": "Read and write",
"File drop (upload only)": "File drop (upload only)",
"With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.": "With File drop, only uploading is allowed. Only you can see files and folders that have been uploaded.",
"Advanced": "Advanced",
"Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.": "Please note that file drop is not available for internal sharing, i.e. sharing with other MagentaCLOUD users.",
"Please note that resharing is only available for internal sharing, i.e. sharing with other MagentaCLOUD users.": "Please note that resharing is only available for internal sharing, i.e. sharing with other MagentaCLOUD users.",
"Advanced settings": "Advanced settings",
"Set password": "Set password",
"Your shares": "Your shares",
"Manage access": "Manage Access",
"Here you can see who has access to your file/folder.": "Here you can see who has access to your file/folder.",
"You haven't shared your file/folder yet. Share to give others access.": "You haven't shared your file/folder yet. Share to give others access.",
"Send": "Send",
"Send link via E-Mail": "Send link via E-Mail",
"Links sent via E-Mail": "Links sent via E-Mail",
"Accept settings": "Accept settings",
"or": "or",
"Link to \"{fileName}\" was sent.": "Link to \"{fileName}\" was sent.",
"To": "To",
"Link to copy": "Link to Copy",
"Copy": "Copy",
"Copied": "Copied",
"Anyone with the link can": "Anyone with the link can",
"only view": "only view",
"edit": "edit",
"Anyone with the link can edit": "Anyone with the link can edit",
"Anyone with the link can only view": "Anyone with the link can only view",
"Anyone with the link can file drop": "Anyone with the link can file drop",
"Create new link": "Create new link",
"Shares": "Shares",
"No shares created yet.": "No shares created yet.",
"Advanced permissions": "Advanced permissions",
"Allow resharing": "Allow resharing",
"Set download limit": "Set download limit",
"Resharing is allowed": "Resharing is allowed",
"You can create links or send shares by mail. If you invite MagentaCLOUD users, you have more opportunities for collaboration.": "You can create links or send shares by mail. If you invite MagentaCLOUD users, you have more opportunities for collaboration.",
"Share updated": "Share updated",
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed."
"This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.": "This share was limited to {limit} downloads. There is still {downloadsLeft} left allowed.",
"Deny download": "Deny download",
"Name, email": "Name, email",
"Password must be at least 6 characters long": "Password must be at least 6 characters long"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
3 changes: 2 additions & 1 deletion lib/Listener/BeforeTemplateRenderedListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public function handle(Event $event): void {

// you can add additional styles, links and scripts before rendering
// keep src for future use: \OCP\Util::addScript("nmctheme", "../dist/l10nappender");
\OCP\Util::addScript("nmcsharing", "nmcsharing-sharing");
\OCP\Util::addScript("nmcsharing", "nmcsharing-tab");
\OCP\Util::addScript("nmcsharing", "nmcsharing-popup");
\OCP\Util::addScript("nmcsharing", "nmcsharing-action");
}
}
8 changes: 6 additions & 2 deletions src/action.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { registerFileAction } from '@nextcloud/files'
import { action } from './actions/sharingStatusAction'
import { action as statusAtion } from './actions/sharingStatusAction'
import { action as popupAction } from './actions/sharingPopupAction'
import { action as popupMenuAction } from './actions/sharingPopupMenuAction'

registerFileAction(action)
registerFileAction(statusAtion)
registerFileAction(popupAction)
registerFileAction(popupMenuAction)
45 changes: 45 additions & 0 deletions src/actions/popupAction.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { Permission, FileAction } from '@nextcloud/files'
import { translate as t } from '@nextcloud/l10n'

export const ACTION_DETAILS = 'details'

export const action = new FileAction({
id: ACTION_DETAILS,
displayName: () => t('files', 'Open details'),
iconSvgInline: () => '',

// Sidebar currently supports user folder only, /files/USER
enabled: (nodes) => {
// Only works on single node
if (nodes.length !== 1) {
return false
}

if (!nodes[0]) {
return false
}

return (nodes[0].root?.startsWith('/files/') && nodes[0].permissions !== Permission.NONE) ?? false
},

async exec(node, view, dir) {
try {
// TODO: migrate Sidebar to use a Node instead
await window.OCA.Files.Sidebar.open(node.path)

// Silently update current fileid
window.OCP.Files.Router.goToRoute(
null,
{ view: view.id, fileid: node.fileid },
{ dir },
true,
)

return null
} catch (error) {
return false
}
},

order: -50,
})
Loading