Signed-off-by: dartcafe <github@dartcafe.de>
This commit is contained in:
dartcafe 2022-01-16 17:34:47 +01:00
Родитель 1fbac009f1
Коммит 969acbec9b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: CCE73CEF3035D3C8
6 изменённых файлов: 482 добавлений и 7 удалений

Просмотреть файл

@ -25,10 +25,12 @@
namespace OCA\Polls\AppInfo;
use Closure;
use OC\EventDispatcher\SymfonyAdapter;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\Collaboration\Resources\IProviderManager;
use OCP\Notification\IManager as NotificationManager;
use OCP\Group\Events\GroupDeletedEvent;
use OCP\User\Events\UserDeletedEvent;
@ -62,6 +64,7 @@ use OCA\Polls\Listener\OptionListener;
use OCA\Polls\Listener\PollListener;
use OCA\Polls\Listener\ShareListener;
use OCA\Polls\Listener\VoteListener;
use OCA\Polls\Provider\ResourceProvider;
class Application extends App implements IBootstrap {
@ -74,6 +77,7 @@ class Application extends App implements IBootstrap {
public function boot(IBootContext $context): void {
$context->injectFn(Closure::fromCallable([$this, 'registerNotifications']));
$context->injectFn(Closure::fromCallable([$this, 'registerCollaborationResources']));
}
public function register(IRegistrationContext $context): void {
@ -108,4 +112,7 @@ class Application extends App implements IBootstrap {
public function registerNotifications(NotificationManager $notificationManager): void {
$notificationManager->registerNotifierService(Notifier::class);
}
protected function registerCollaborationResources(IProviderManager $resourceManager, SymfonyAdapter $symfonyAdapter): void {
$resourceManager->registerResourceProvider(ResourceProvider::class);
}
}

Просмотреть файл

@ -0,0 +1,104 @@
<?php
/**
* @copyright Copyright (c) 2021 René Gieling <github@dartcafe.de>
*
* @author René Gieling <github@dartcafe.de>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Polls\Provider;
use OCA\Polls\Model\Acl;
use OCA\Polls\Db\PollMapper;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\QueryException;
use OCP\Collaboration\Resources\IManager;
use OCP\Collaboration\Resources\IProvider;
use OCP\Collaboration\Resources\IResource;
use OCP\IUser;
use OCP\IURLGenerator;
class ResourceProvider implements IProvider {
public const RESOURCE_TYPE = 'poll';
/** @var Acl */
private $acl;
/** @var PollMapper */
private $pollMapper;
/** @var IURLGenerator */
private $urlGenerator;
public function __construct(
PollMapper $pollMapper,
Acl $acl,
IURLGenerator $urlGenerator
) {
$this->pollMapper = $pollMapper;
$this->urlGenerator = $urlGenerator;
$this->acl = $acl;
}
public function getType(): string {
return self::RESOURCE_TYPE;
}
public function getResourceRichObject(IResource $resource): array {
$poll = $this->pollMapper->find($resource->getId());
return [
'type' => self::RESOURCE_TYPE,
'id' => $resource->getId(),
'name' => $poll->getTitle(),
'link' => $poll->getVoteUrl(),
'iconUrl' => $this->urlGenerator->imagePath('polls', 'polls-black.svg')
];
}
public function canAccessResource(IResource $resource, ?IUser $user): bool {
if ($resource->getType() !== self::RESOURCE_TYPE || !$user instanceof IUser) {
return false;
}
try {
$this->acl->setPollId($resource->getID());
$poll = $this->acl->getPoll();
} catch (NotAuthorizedException $e) {
return false;
} catch (DoesNotExistException $e) {
return false;
}
return true;
}
public function invalidateAccessCache($pollId = null) {
try {
/** @var IManager $resourceManager */
$resourceManager = \OC::$server->query(IManager::class);
} catch (QueryException $e) {
}
if ($pollId !== null) {
$resource = $resourceManager->getResourceForUser(self::RESOURCE_TYPE, (string)$pollId, null);
$resourceManager->invalidateAccessCacheForResource($resource);
} else {
$resourceManager->invalidateAccessCacheForProvider($this);
}
}
}

Просмотреть файл

@ -29,7 +29,7 @@ use OCP\Settings\IIconSection;
class AdminSection implements IIconSection {
/** @var IL10N */
/** @var IL10N */
private $trans;
/** @var IURLGenerator */

361
package-lock.json сгенерированный
Просмотреть файл

@ -24,6 +24,7 @@
"linkify-string": "^3.0.4",
"lodash": "^4.17.21",
"marked": "^4.0.10",
"nextcloud-vue-collections": "^0.9.0",
"v-click-outside": "^3.1.2",
"vue": "^2.6.14",
"vue-clipboard2": "^0.3.3",
@ -2964,7 +2965,6 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
"engines": {
"node": ">=8"
}
@ -6922,6 +6922,12 @@
"url": "https://github.com/chalk/supports-color?sponsor=1"
}
},
"node_modules/jquery": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==",
"peer": true
},
"node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
@ -7929,6 +7935,157 @@
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
},
"node_modules/nextcloud-vue-collections": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/nextcloud-vue-collections/-/nextcloud-vue-collections-0.9.0.tgz",
"integrity": "sha512-GItjPWV4O53CNRPxdRegjEpZUM2ZV1mun2gVM/tLr3Nc2WzchgjAEzHjLxWomdW7kRv0sFJNS20udYJ2wEX76Q==",
"dependencies": {
"@nextcloud/axios": "^1.5.0",
"@nextcloud/browserslist-config": "^1.0.0",
"@nextcloud/router": "^1.2.0",
"@nextcloud/vue": "^3.1.2",
"lodash": "^4.17.20",
"vue": "^2.6.12"
},
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"@nextcloud/vue": "^3.1.2",
"vue": "^2.6.12"
}
},
"node_modules/nextcloud-vue-collections/node_modules/@nextcloud/browserslist-config": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@nextcloud/browserslist-config/-/browserslist-config-1.0.0.tgz",
"integrity": "sha512-f+sKpdLZXkODV+OY39K1M+Spmd4RgxmtEXmNn4Bviv4R7uBFHXuw+JX9ZdfDeOryfHjJ/TRQxQEp0GMpBwZFUw=="
},
"node_modules/nextcloud-vue-collections/node_modules/@nextcloud/event-bus": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@nextcloud/event-bus/-/event-bus-1.3.0.tgz",
"integrity": "sha512-+U5MnCvfnNWvf0lvdqJg8F+Nm8wN+s9ayuBjtiEQxTAcootv7lOnlMgfreqF3l2T0Wet2uZh4JbFVUWf8l3w7g==",
"dependencies": {
"@types/semver": "^7.3.5",
"core-js": "^3.11.2",
"semver": "^7.3.5"
}
},
"node_modules/nextcloud-vue-collections/node_modules/@nextcloud/router": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@nextcloud/router/-/router-1.2.0.tgz",
"integrity": "sha512-kn9QsL9LuhkIMaSSgdiqRL3SZ6PatuAjXUiyq343BbSnI99Oc5eJH8kU6cT2AHije7wKy/tK8Xe3VQuVO32SZQ==",
"dependencies": {
"core-js": "^3.6.4"
}
},
"node_modules/nextcloud-vue-collections/node_modules/@nextcloud/vue": {
"version": "3.10.2",
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-3.10.2.tgz",
"integrity": "sha512-/8r2fE8V7nw9erjm06x3nCALC+6o9q2CzNSL0eDRfsKXCVySFoZ4bYX+zziQUStienisKDRXRhxh7RUAwkS2+w==",
"dependencies": {
"@nextcloud/auth": "^1.2.3",
"@nextcloud/axios": "^1.3.2",
"@nextcloud/browser-storage": "^0.1.1",
"@nextcloud/capabilities": "^1.0.2",
"@nextcloud/dialogs": "^3.0.0",
"@nextcloud/event-bus": "^1.1.4",
"@nextcloud/l10n": "^1.2.3",
"@nextcloud/router": "^1.0.2",
"core-js": "^3.6.5",
"debounce": "1.2.1",
"emoji-mart-vue-fast": "^7.0.7",
"escape-html": "^1.0.3",
"hammerjs": "^2.0.8",
"linkifyjs": "~2.1.9",
"md5": "^2.2.1",
"regenerator-runtime": "^0.13.5",
"string-length": "^4.0.1",
"striptags": "^3.1.1",
"style-loader": "^2.0.0",
"tributejs": "^5.1.3",
"v-click-outside": "^3.0.1",
"v-tooltip": "^2.0.3",
"vue": "^2.6.11",
"vue-color": "^2.7.1",
"vue-multiselect": "^2.1.6",
"vue-visible": "^1.0.2",
"vue2-datepicker": "^3.6.3"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/nextcloud-vue-collections/node_modules/char-regex": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz",
"integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==",
"engines": {
"node": ">=10"
}
},
"node_modules/nextcloud-vue-collections/node_modules/linkifyjs": {
"version": "2.1.9",
"resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-2.1.9.tgz",
"integrity": "sha512-74ivurkK6WHvHFozVaGtQWV38FzBwSTGNmJolEgFp7QgR2bl6ArUWlvT4GcHKbPe1z3nWYi+VUdDZk16zDOVug==",
"peerDependencies": {
"jquery": ">= 1.11.0",
"react": ">= 0.14.0",
"react-dom": ">= 0.14.0"
}
},
"node_modules/nextcloud-vue-collections/node_modules/lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dependencies": {
"yallist": "^4.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/nextcloud-vue-collections/node_modules/semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"dependencies": {
"lru-cache": "^6.0.0"
},
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/nextcloud-vue-collections/node_modules/string-length": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz",
"integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==",
"dependencies": {
"char-regex": "^1.0.2",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/nextcloud-vue-collections/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/nextcloud-vue-collections/node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"node_modules/node-gettext": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/node-gettext/-/node-gettext-3.0.0.tgz",
@ -8271,7 +8428,6 @@
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
@ -8925,6 +9081,33 @@
"safe-buffer": "^5.1.0"
}
},
"node_modules/react": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
"integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
"peer": true,
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/react-dom": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
"integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
"peer": true,
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"scheduler": "^0.20.2"
},
"peerDependencies": {
"react": "17.0.2"
}
},
"node_modules/readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
@ -9388,6 +9571,16 @@
}
}
},
"node_modules/scheduler": {
"version": "0.20.2",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
"integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
"peer": true,
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
}
},
"node_modules/schema-utils": {
"version": "2.6.5",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.5.tgz",
@ -13959,8 +14152,7 @@
"ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
},
"ansi-styles": {
"version": "3.2.1",
@ -16942,6 +17134,12 @@
}
}
},
"jquery": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==",
"peer": true
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
@ -17737,6 +17935,127 @@
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
},
"nextcloud-vue-collections": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/nextcloud-vue-collections/-/nextcloud-vue-collections-0.9.0.tgz",
"integrity": "sha512-GItjPWV4O53CNRPxdRegjEpZUM2ZV1mun2gVM/tLr3Nc2WzchgjAEzHjLxWomdW7kRv0sFJNS20udYJ2wEX76Q==",
"requires": {
"@nextcloud/axios": "^1.5.0",
"@nextcloud/browserslist-config": "^1.0.0",
"@nextcloud/router": "^1.2.0",
"@nextcloud/vue": "^3.1.2",
"lodash": "^4.17.20",
"vue": "^2.6.12"
},
"dependencies": {
"@nextcloud/browserslist-config": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@nextcloud/browserslist-config/-/browserslist-config-1.0.0.tgz",
"integrity": "sha512-f+sKpdLZXkODV+OY39K1M+Spmd4RgxmtEXmNn4Bviv4R7uBFHXuw+JX9ZdfDeOryfHjJ/TRQxQEp0GMpBwZFUw=="
},
"@nextcloud/event-bus": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@nextcloud/event-bus/-/event-bus-1.3.0.tgz",
"integrity": "sha512-+U5MnCvfnNWvf0lvdqJg8F+Nm8wN+s9ayuBjtiEQxTAcootv7lOnlMgfreqF3l2T0Wet2uZh4JbFVUWf8l3w7g==",
"requires": {
"@types/semver": "^7.3.5",
"core-js": "^3.11.2",
"semver": "^7.3.5"
}
},
"@nextcloud/router": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@nextcloud/router/-/router-1.2.0.tgz",
"integrity": "sha512-kn9QsL9LuhkIMaSSgdiqRL3SZ6PatuAjXUiyq343BbSnI99Oc5eJH8kU6cT2AHije7wKy/tK8Xe3VQuVO32SZQ==",
"requires": {
"core-js": "^3.6.4"
}
},
"@nextcloud/vue": {
"version": "3.10.2",
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-3.10.2.tgz",
"integrity": "sha512-/8r2fE8V7nw9erjm06x3nCALC+6o9q2CzNSL0eDRfsKXCVySFoZ4bYX+zziQUStienisKDRXRhxh7RUAwkS2+w==",
"requires": {
"@nextcloud/auth": "^1.2.3",
"@nextcloud/axios": "^1.3.2",
"@nextcloud/browser-storage": "^0.1.1",
"@nextcloud/capabilities": "^1.0.2",
"@nextcloud/dialogs": "^3.0.0",
"@nextcloud/event-bus": "^1.1.4",
"@nextcloud/l10n": "^1.2.3",
"@nextcloud/router": "^1.0.2",
"core-js": "^3.6.5",
"debounce": "1.2.1",
"emoji-mart-vue-fast": "^7.0.7",
"escape-html": "^1.0.3",
"hammerjs": "^2.0.8",
"linkifyjs": "~2.1.9",
"md5": "^2.2.1",
"regenerator-runtime": "^0.13.5",
"string-length": "^4.0.1",
"striptags": "^3.1.1",
"style-loader": "^2.0.0",
"tributejs": "^5.1.3",
"v-click-outside": "^3.0.1",
"v-tooltip": "^2.0.3",
"vue": "^2.6.11",
"vue-color": "^2.7.1",
"vue-multiselect": "^2.1.6",
"vue-visible": "^1.0.2",
"vue2-datepicker": "^3.6.3"
}
},
"char-regex": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz",
"integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="
},
"linkifyjs": {
"version": "2.1.9",
"resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-2.1.9.tgz",
"integrity": "sha512-74ivurkK6WHvHFozVaGtQWV38FzBwSTGNmJolEgFp7QgR2bl6ArUWlvT4GcHKbPe1z3nWYi+VUdDZk16zDOVug==",
"requires": {}
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"requires": {
"yallist": "^4.0.0"
}
},
"semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"requires": {
"lru-cache": "^6.0.0"
}
},
"string-length": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz",
"integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==",
"requires": {
"char-regex": "^1.0.2",
"strip-ansi": "^6.0.0"
}
},
"strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"requires": {
"ansi-regex": "^5.0.1"
}
},
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
}
},
"node-gettext": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/node-gettext/-/node-gettext-3.0.0.tgz",
@ -18003,8 +18322,7 @@
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-inspect": {
"version": "1.11.0",
@ -18452,6 +18770,27 @@
"safe-buffer": "^5.1.0"
}
},
"react": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
"integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
"peer": true,
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
}
},
"react-dom": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
"integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
"peer": true,
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"scheduler": "^0.20.2"
}
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
@ -18782,6 +19121,16 @@
"neo-async": "^2.6.2"
}
},
"scheduler": {
"version": "0.20.2",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
"integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
"peer": true,
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
}
},
"schema-utils": {
"version": "2.6.5",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.5.tgz",

Просмотреть файл

@ -50,6 +50,7 @@
"linkify-string": "^3.0.4",
"lodash": "^4.17.21",
"marked": "^4.0.10",
"nextcloud-vue-collections": "^0.9.0",
"v-click-outside": "^3.1.2",
"vue": "^2.6.14",
"vue-clipboard2": "^0.3.3",

Просмотреть файл

@ -22,14 +22,20 @@
<template>
<div class="sidebar-share">
<CollectionList v-if="pollId"
:id="`${pollId}`"
:name="pollTitle"
type="poll" />
<SharesListUnsent class="shares unsent" />
<SharesList class="shares effective" />
</div>
</template>
<script>
import { mapState } from 'vuex'
import SharesList from '../Shares/SharesList'
import SharesListUnsent from '../Shares/SharesListUnsent'
import { CollectionList } from 'nextcloud-vue-collections'
export default {
name: 'SideBarTabShare',
@ -37,8 +43,16 @@ export default {
components: {
SharesList,
SharesListUnsent,
CollectionList,
},
computed: {
...mapState({
pollId: (state) => state.poll.id,
pollTitle: (state) => state.poll.title,
}),
},
}
</script>