Skip to content
Open
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build/
.php-cs-fixer.cache

# Vite build outputs (reference widget)
js/
# js/ - Now committed for deployment

# IDE files
.idea/
Expand Down
2 changes: 2 additions & 0 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,7 @@ Admin Panel:
<settings>
<admin-section>OCA\DashLink\Settings\AdminSection</admin-section>
<admin>OCA\DashLink\Settings\Admin</admin>
<personal-section>OCA\DashLink\Settings\PersonalSection</personal-section>
<personal>OCA\DashLink\Settings\Personal</personal>
</settings>
</info>
12 changes: 12 additions & 0 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
['name' => 'link#deleteIcon', 'url' => '/api/v1/admin/links/{id}/icon', 'verb' => 'DELETE'],
['name' => 'link#getGroups', 'url' => '/api/v1/admin/groups', 'verb' => 'GET'],

// User Link Routes (user-private links)
['name' => 'userLink#index', 'url' => '/api/v1/user/links', 'verb' => 'GET'],
['name' => 'userLink#create', 'url' => '/api/v1/user/links', 'verb' => 'POST'],
['name' => 'userLink#exportLinks', 'url' => '/api/v1/user/links/export', 'verb' => 'GET'],
['name' => 'userLink#importLinks', 'url' => '/api/v1/user/links/import', 'verb' => 'POST'],
['name' => 'userLink#updateOrder', 'url' => '/api/v1/user/links/order', 'verb' => 'PUT'],
['name' => 'userLink#update', 'url' => '/api/v1/user/links/{id}', 'verb' => 'PUT'],
['name' => 'userLink#delete', 'url' => '/api/v1/user/links/{id}', 'verb' => 'DELETE'],
['name' => 'userLink#uploadIcon', 'url' => '/api/v1/user/links/{id}/icon', 'verb' => 'POST'],
['name' => 'userLink#deleteIcon', 'url' => '/api/v1/user/links/{id}/icon', 'verb' => 'DELETE'],
['name' => 'userLink#getIcon', 'url' => '/api/v1/user/links/{id}/icon', 'verb' => 'GET'],

// Settings Routes
['name' => 'settings#index', 'url' => '/api/v1/admin/settings', 'verb' => 'GET'],
['name' => 'settings#update', 'url' => '/api/v1/admin/settings', 'verb' => 'PUT'],
Expand Down
3 changes: 3 additions & 0 deletions js/dashlink-admin.js

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions js/dashlink-admin.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*!
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/

/*!
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

/*!
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

/*!
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/

/*!
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

/*!
* SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/

/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/

/*!
* focus-trap 7.7.0
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/

/*!
* tabbable 6.3.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/

/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**
* @vue/runtime-dom v3.5.26
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/

/**
* @vue/shared v3.5.26
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
1 change: 1 addition & 0 deletions js/dashlink-admin.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions js/dashlink-dashboard.js

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions js/dashlink-dashboard.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*!
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/

/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/

/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */

/**
* @vue/runtime-dom v3.5.26
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/

/**
* @vue/shared v3.5.26
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
1 change: 1 addition & 0 deletions js/dashlink-dashboard.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions js/dashlink-personal.js

Large diffs are not rendered by default.

65 changes: 65 additions & 0 deletions js/dashlink-personal.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*!
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/

/*!
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

/*!
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/

/*!
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

/*!
* SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/

/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/

/*!
* focus-trap 7.7.0
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/

/*!
* tabbable 6.3.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/

/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**
* @vue/runtime-dom v3.5.26
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/

/**
* @vue/shared v3.5.26
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
1 change: 1 addition & 0 deletions js/dashlink-personal.js.map

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion lib/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ public function index(): JSONResponse {
*
* @AdminRequired
*/
public function update(?string $hoverEffect = null, ?string $widgetTitle = null): JSONResponse {
public function update(
?string $hoverEffect = null,
?string $widgetTitle = null,
?bool $userLinksEnabled = null,
?int $userLinkLimit = null
): JSONResponse {
try {
if ($hoverEffect !== null) {
$this->settingsService->setHoverEffect($hoverEffect);
Expand All @@ -44,6 +49,14 @@ public function update(?string $hoverEffect = null, ?string $widgetTitle = null)
$this->settingsService->setWidgetTitle($widgetTitle);
}

if ($userLinksEnabled !== null) {
$this->settingsService->setUserLinksEnabled($userLinksEnabled);
}

if ($userLinkLimit !== null) {
$this->settingsService->setUserLinkLimit($userLinkLimit);
}

return new JSONResponse(['status' => 'ok']);
} catch (\InvalidArgumentException $e) {
return new JSONResponse(['error' => $e->getMessage()], 400);
Expand Down
Loading