diff --git a/.gitignore b/.gitignore index 02ef12c..04a90a4 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ /media /kirby /site/cache +/~ diff --git a/.nvmrc b/.nvmrc index 89b0bdc..ee09fac 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v16.3.0 \ No newline at end of file +v20.11.1 diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md new file mode 100644 index 0000000..2ffdb42 --- /dev/null +++ b/BREAKING_CHANGES.md @@ -0,0 +1,7 @@ +- Moderation Cookies entfernt +- Snippets angepasst +- Comments und Replies getrennt +- Alles jetzt als Object, keine Arrays mehr +- hasQueuedKomments DEPRECATED +- Quote ist weg, wurde sowieso nicht aktiv genutzt +- \ No newline at end of file diff --git a/assets/komments.css b/assets/komments.css index 4942ca2..6e45dba 100644 --- a/assets/komments.css +++ b/assets/komments.css @@ -144,7 +144,39 @@ animation-delay: 0.2s; } -#kommentsWebmentions .single-komment { +#kommentsWebmentions { + /* .single-komment { + display: grid; + grid-template-columns: 20px 40px 1fr; + + grid-template-areas: + 'icon avatar action' + 'icon avatar content'; + + grid-column-gap: 10px; + grid-row-gap: 10px; + + line-height: 1.2; + + border-bottom: 1px solid grey; + padding-bottom: 20px; + margin-bottom: 20px; + } */ +} +#kommentsWebmentions .list-reposts, +#kommentsWebmentions .list-mentions, +#kommentsWebmentions .list-likes { + display: flex; + flex-direction: row; + gap: 10px; +} +#kommentsWebmentions .list-reposts .author-action, +#kommentsWebmentions .list-mentions .author-action, +#kommentsWebmentions .list-likes .author-action { + display: none; +} +#kommentsWebmentions .list-comments .single-komment, +#kommentsWebmentions .list-replies .single-komment { display: grid; grid-template-columns: 20px 40px 1fr; grid-template-areas: "icon avatar action" "icon avatar content"; @@ -181,37 +213,36 @@ line-height: 1.5; } -.splitted-komments .list-reposts, -.splitted-komments .list-mentions, -.splitted-komments .list-likes { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(30px, 60px)); - grid-column-gap: 10px; - grid-row-gap: 10px; -} -.splitted-komments .single-komment { - display: block; -} -.splitted-komments .single-komment .author-avatar img { - max-width: 60px; -} -.splitted-komments .single-komment .author-action, -.splitted-komments .single-komment .type-of { - display: none; -} -.splitted-komments .list-replies { - list-style-type: none; - padding-left: 0; -} -.splitted-komments .list-replies .single-komment .author-action, -.splitted-komments .list-replies .single-komment .type-of { - display: block; -} -.splitted-komments .kommentReply { - display: block; - text-align: right; -} +/* .splitted-komments { + + .single-komment { + display: block; + } + + .single-komment .author-avatar img { + max-width: 60px; + } + + .single-komment .author-action, + .single-komment .type-of { + display: none; + } + + .list-replies { + list-style-type: none; + padding-left: 0; + + .single-komment .author-action, + .single-komment .type-of { + display: block; + } + } + .kommentReply { + display: block; + text-align: right; + } +} */ @-webkit-keyframes sk-cubeGridScaleDelay { 0%, 70%, 100% { -webkit-transform: scale3D(1, 1, 1); diff --git a/assets/komments.css.map b/assets/komments.css.map index fe0bca0..1416e95 100644 --- a/assets/komments.css.map +++ b/assets/komments.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../src/komments.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EAEA,qBACE;EAUF;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAEF;EACE;;AAEF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;;AAKF;EACE;EACA;EAEA,qBACE;EAGF;EACA;EAEA;EAEA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAEF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;;AAKF;AAAA;AAAA;EAGE;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;;AAEA;AAAA;EAEE;;AAIJ;EACE;EACA;;;AAIJ;EACE;IAGE;IACA;;EAEF;IACE;IACA;;;AAIJ;EACE;IAGE;IACA;;EAEF;IACE;IACA","file":"komments.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../src/komments.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EAEA,qBACI;EAUJ;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI,YACI;EAGJ;EACA;EACA;EACA;EACA;;AAGJ;EACI;;AAEJ;EACI;;AAEJ;EACI;;AAGJ;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;;;AAIR;AAkCI;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAjCA;AAAA;AAAA;EAGI;EACA;EACA;;AAEA;AAAA;AAAA;EACI;;AAMJ;AAAA;EACI;EACA;EAEA,qBACI;EAGJ;EACA;EAEA;EAEA;EACA;EACA;;AAsBR;EACI;EACA;;AAGJ;EACI;EACA;;AAEJ;EACI;EACA;;AAGJ;EACI;EACA;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;;;AAIR;;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BA;EACI;IAGI;IACA;;EAEJ;IACI;IACA;;;AAIR;EACI;IAGI;IACA;;EAEJ;IACI;IACA","file":"komments.css"} \ No newline at end of file diff --git a/assets/komments.js b/assets/komments.js index 43646c2..c38df09 100644 --- a/assets/komments.js +++ b/assets/komments.js @@ -127,7 +127,7 @@ docReady(function () { link.addEventListener('click', (event) => { const kommentId = event.target.dataset.id; const kommentHandle = event.target.dataset.handle; - console.log(kommentId, kommentHandle); + kommentForm.querySelector('input[name=replyTo]').value = kommentId; kommentForm.querySelector('input[name=replyHandle]').value = kommentHandle; replyHandleDisplay.innerHTML = `@${kommentHandle}`; diff --git a/blueprints/sections/komments.yml b/blueprints/sections/komments.yml index b9eeb20..91f930d 100644 --- a/blueprints/sections/komments.yml +++ b/blueprints/sections/komments.yml @@ -41,11 +41,6 @@ fields: MENTION: Mention KOMMENT: Komment SPAM: Spam - - quote: - type: textarea - label: Quote - width: 1/1 komment: type: textarea label: Komment diff --git a/components/api.php b/components/api.php index bf93fb9..e2384d4 100644 --- a/components/api.php +++ b/components/api.php @@ -2,68 +2,10 @@ namespace mauricerenck\Komments; -use Structure; use Kirby\Http\Response; return [ 'routes' => [ - [ - 'pattern' => 'komments/queued', - 'action' => function () { - - $pendingKomments = []; - $collection = site()->index(); - - foreach ($collection as $item) { - if ($item->kommentsInbox()->isNotEmpty()) { - foreach ($item->kommentsInbox()->yaml() as $komment) { - $komment['spamlevel'] = (isset($komment['spamlevel'])) ? $komment['spamlevel'] : 0; // backward compatiblity - - if (($komment['status'] === 'false' || $komment['status'] === false) && (integer)$komment['spamlevel'] === 0) { - $pendingKomments[] = [ - 'author' => $komment['author'], - 'komment' => $komment['komment'], - 'kommentType' => (isset($komment['kommenttype'])) ? $komment['kommenttype'] : 'komment', // backward compatiblity - 'image' => $komment['avatar'], - 'title' => (string) $item->title(), - 'url' => $item->panel()->url(), - ]; - } - } - } - } - - return new Response(json_encode($pendingKomments), 'application/json'); - } - ], - [ - 'pattern' => 'komments/spam', - 'action' => function () { - $spamKomments = []; - $collection = site()->index(); - - - foreach ($collection as $item) { - if ($item->kommentsInbox()->isNotEmpty()) { - foreach ($item->kommentsInbox()->yaml() as $komment) { - $komment['spamlevel'] = (isset($komment['spamlevel'])) ? $komment['spamlevel'] : 0; // backward compatiblity - if ((integer)$komment['spamlevel'] > 0) { - $spamKomments[] = [ - 'author' => $komment['author'], - 'komment' => $komment['komment'], - 'kommentType' => (isset($komment['kommenttype'])) ? $komment['kommenttype'] : 'komment', // backward compatiblity - 'image' => $komment['avatar'], - 'title' => (string) $item->title(), - 'url' => $item->panel()->url(), - ]; - } - } - } - } - - return new Response(json_encode($spamKomments), 'application/json'); - } - ], [ 'pattern' => 'komments/spam', 'method' => 'POST', @@ -74,7 +16,7 @@ $kommentModeration->markAsSpam($formData['pageSlug'], $formData['kommentId'], $formData['isSpam']); return new Response(json_encode(['message' => 'okay']), 'application/json'); - } + }, ], [ 'pattern' => 'komments/verify', @@ -83,10 +25,14 @@ $formData = kirby()->request()->data(); $kommentModeration = new KommentModeration(); - $kommentModeration->markAsVerified($formData['pageSlug'], $formData['kommentId'], $formData['isVerified']); + $kommentModeration->markAsVerified( + $formData['pageSlug'], + $formData['kommentId'], + $formData['isVerified'] + ); return new Response(json_encode(['message' => 'okay']), 'application/json'); - } + }, ], [ 'pattern' => 'komments/publish', @@ -98,7 +44,7 @@ $kommentModeration->publish($formData['pageSlug'], $formData['kommentId'], $formData['isPublished']); return new Response(json_encode(['message' => 'okay']), 'application/json'); - } + }, ], [ 'pattern' => 'komments/delete', @@ -110,7 +56,7 @@ $kommentModeration->delete($formData['pageSlug'], $formData['kommentId']); return new Response(json_encode(['message' => 'okay']), 'application/json'); - } + }, ], - ] + ], ]; diff --git a/components/areas.php b/components/areas.php index eae20b9..279ee48 100644 --- a/components/areas.php +++ b/components/areas.php @@ -3,7 +3,7 @@ namespace mauricerenck\Komments; return [ - 'komments' => function ($kirby) { + 'komments' => function () { return [ 'label' => 'Komments', 'icon' => 'chat', @@ -18,14 +18,15 @@ 'title' => 'Komments', 'props' => [ 'queuedKomments' => function () { - $kommentUtils = new KommentBaseUtils(); - return $kommentUtils->getPendingKomments(); + $kommentModeration = new KommentModeration(); + return $kommentModeration->getSiteWideComments('pending'); }, + 'kirbyVersion' => kirby()->version(), ], ]; - } - ] - ] + }, + ], + ], ]; - } + }, ]; diff --git a/components/fields.php b/components/fields.php index 4e9d464..de47e83 100644 --- a/components/fields.php +++ b/components/fields.php @@ -4,24 +4,23 @@ return [ 'kommentType' => [ - 'props' => [ - ] + 'props' => [], ], 'kommentsPending' => [ 'props' => [ 'queuedComments' => function () { $kommentUtils = new KommentBaseUtils(); - $pendingComments = $kommentUtils->getPendingCommentCount(); + $pendingComments = $kommentUtils->getSiteWideCommentCount('pending'); return $pendingComments; }, - ] + ], ], 'komments' => [ 'props' => [ 'queuedComments' => function () { - $kommentUtils = new KommentBaseUtils(); - return $kommentUtils->getPendingKomments(); + $kommentModeration = new KommentModeration(); + return $kommentModeration->getSiteWideComments('pending'); }, - ] - ] + ], + ], ]; diff --git a/components/page-methods.php b/components/page-methods.php index 2088c61..9108f87 100644 --- a/components/page-methods.php +++ b/components/page-methods.php @@ -2,27 +2,19 @@ namespace mauricerenck\Komments; -use mauricerenck\Komments\KommentBaseUtils; -use mauricerenck\Komments\KommentModeration; - return [ - 'kommentCount' => function () { - $count = 0; - foreach ($this->kommentsInbox()->yaml() as $komment) { - if ($komment['status'] !== 'false' && $komment['status'] !== false) { - $count++; - } - } - return $count; + 'kommentCount' => function ($language = null) { + $baseUtils = new KommentBaseUtils(); + return $baseUtils->getCommentsCountOfPage($this, 'published'); }, 'hasQueuedKomments' => function ($kommentId, $kommenStatus) { - $kommentModeration = new KommentModeration(); - return $kommentModeration->pageHasQueuedKomments($kommentId, $kommenStatus); + deprecated('`hasQueuedKomments()` is deprecated, queued comment cookies habe been removed, this is no more needed. `hasQueuedKomments()` will be removed in future versions.'); + return 0; }, 'kommentsAreEnabled' => function () { - $kommentBaseUtils = new KommentBaseUtils(); + $kommentsFrontend = new KommentsFrontend(); - if ($kommentBaseUtils->kommentsAreExpired($this)) { + if ($kommentsFrontend->kommentsAreExpired($this)) { return false; } diff --git a/components/site-methods.php b/components/site-methods.php index 80a2876..9642842 100644 --- a/components/site-methods.php +++ b/components/site-methods.php @@ -7,10 +7,10 @@ return [ 'numberOfPendingComments' => function () { $kommentBaseUtils = new KommentBaseUtils(); - return $kommentBaseUtils->getPendingCommentCount(); + return $kommentBaseUtils->getSiteWideCommentCount('pending'); }, 'numberOfSpamComments' => function () { $kommentBaseUtils = new KommentBaseUtils(); - return $kommentBaseUtils->getSpamCommentCount(); - } + return $kommentBaseUtils->getSiteWideCommentCount('spam'); + }, ]; diff --git a/composer.json b/composer.json index 7c841d5..3680697 100644 --- a/composer.json +++ b/composer.json @@ -15,13 +15,12 @@ "psr-4": { "mauricerenck\\Komments\\": "utils/" }, - "classmap": [ - "utils" - ] + "classmap": ["utils"] }, "require-dev": { "getkirby/cms": "^4", - "phpunit/phpunit": "^9.5." + "phpunit/phpunit": "^9.5.", + "mockery/mockery": "^1.6" }, "require": { "getkirby/composer-installer": "^1.2", @@ -39,13 +38,9 @@ } }, "scripts": { - "test": "vendor/bin/phpunit --testdox tests", + "test": "vendor/bin/phpunit --testdox --colors=always", "build-test-package": "git archive HEAD -o komments.zip --worktree-attributes", "build-composer": "composer install --no-dev --optimize-autoloader", - "build-release": [ - "composer test", - "composer install --no-dev --optimize-autoloader", - "npm run build" - ] + "build-release": ["composer test tests", "composer install --no-dev --optimize-autoloader", "npm run build"] } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 5acdd23..06f1a52 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "38b0b518f6e92d3b4e2adad55c8ad5c3", + "content-hash": "8447a5363dd0db0e374c48a12b87ca1c", "packages": [ { "name": "getkirby/composer-installer", @@ -499,16 +499,16 @@ }, { "name": "getkirby/cms", - "version": "4.0.3", + "version": "4.1.1", "source": { "type": "git", "url": "https://github.com/getkirby/kirby.git", - "reference": "a537a4d95c8db03ecaf3ebfd5c6a7747357fde7c" + "reference": "1353c9fbe3ede6bee946f527d146841719eef7d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getkirby/kirby/zipball/a537a4d95c8db03ecaf3ebfd5c6a7747357fde7c", - "reference": "a537a4d95c8db03ecaf3ebfd5c6a7747357fde7c", + "url": "https://api.github.com/repos/getkirby/kirby/zipball/1353c9fbe3ede6bee946f527d146841719eef7d5", + "reference": "1353c9fbe3ede6bee946f527d146841719eef7d5", "shasum": "" }, "require": { @@ -598,7 +598,58 @@ "type": "custom" } ], - "time": "2024-01-10T10:28:21+00:00" + "time": "2024-02-26T10:06:07+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" }, { "name": "laminas/laminas-escaper", @@ -777,6 +828,89 @@ }, "time": "2016-12-13T01:01:17+00:00" }, + { + "name": "mockery/mockery", + "version": "1.6.7", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06", + "reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": ">=7.3" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.6.10", + "symplify/easy-coding-standard": "^12.0.8" + }, + "type": "library", + "autoload": { + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "https://github.com/padraic", + "role": "Author" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "docs": "https://docs.mockery.io/", + "issues": "https://github.com/mockery/mockery/issues", + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" + }, + "time": "2023-12-10T02:24:34+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.11.1", @@ -838,16 +972,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.0.0", + "version": "v5.0.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" + "reference": "2218c2252c874a4624ab2f613d86ac32d227bc69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", - "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/2218c2252c874a4624ab2f613d86ac32d227bc69", + "reference": "2218c2252c874a4624ab2f613d86ac32d227bc69", "shasum": "" }, "require": { @@ -890,9 +1024,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.1" }, - "time": "2024-01-07T17:17:35+00:00" + "time": "2024-02-21T19:24:10+00:00" }, { "name": "phar-io/manifest", @@ -1088,16 +1222,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.30", + "version": "9.2.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", "shasum": "" }, "require": { @@ -1154,7 +1288,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" }, "funding": [ { @@ -1162,7 +1296,7 @@ "type": "github" } ], - "time": "2023-12-22T06:47:57+00:00" + "time": "2024-03-02T06:37:42+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1407,16 +1541,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.16", + "version": "9.6.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f" + "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3767b2c56ce02d01e3491046f33466a1ae60a37f", - "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1a156980d78a6666721b7e8e8502fe210b587fcd", + "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd", "shasum": "" }, "require": { @@ -1490,7 +1624,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.16" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.17" }, "funding": [ { @@ -1506,7 +1640,7 @@ "type": "tidelift" } ], - "time": "2024-01-19T07:03:14+00:00" + "time": "2024-02-23T13:14:51+00:00" }, { "name": "psr/log", @@ -1560,16 +1694,16 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -1604,7 +1738,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, "funding": [ { @@ -1612,7 +1746,7 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", @@ -1858,16 +1992,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -1912,7 +2046,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -1920,7 +2054,7 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", @@ -1987,16 +2121,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -2052,7 +2186,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -2060,20 +2194,20 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -2116,7 +2250,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -2124,7 +2258,7 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", @@ -2591,16 +2725,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -2614,9 +2748,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2653,7 +2784,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -2669,7 +2800,7 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-idn", @@ -2760,16 +2891,16 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -2780,9 +2911,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2824,7 +2952,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -2840,7 +2968,7 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", diff --git a/config/translations.php b/config/translations.php index 3d06040..6e4bb3a 100644 --- a/config/translations.php +++ b/config/translations.php @@ -12,7 +12,8 @@ 'mauricerenck.komments.disabled' => 'Comments were disabled on this page.', 'mauricerenck.komments.externalReply' => 'Reply elsewhere', 'mauricerenck.komments.form.submit' => 'send', - 'mauricerenck.komments.form.privacy' => 'Your E-Mail address will be encrypted before saving the comment. It will only be used to display a gravatar. By submitting your data, you agree that all entered data may be saved and displayed as a comment.', + 'mauricerenck.komments.form.privacy' => + 'Your E-Mail address will be encrypted before saving the comment. It will only be used to display a gravatar. By submitting your data, you agree that all entered data may be saved and displayed as a comment.', 'mauricerenck.komments.form.label.comment' => 'Comment', 'mauricerenck.komments.form.label.email' => 'E-mail', 'mauricerenck.komments.form.label.name' => 'Name', @@ -21,6 +22,7 @@ 'mauricerenck.komments.headline.reposts' => 'Shares', 'mauricerenck.komments.headline.mentions' => 'Mentions', 'mauricerenck.komments.headline.replies' => 'Replies', + 'mauricerenck.komments.headline.comments' => 'Comments', 'mauricerenck.komments.action.reply.text' => 'reply', 'mauricerenck.komments.pagenotfound' => 'The page you wrote a comment for could not be found.', 'mauricerenck.komments.error' => 'Error', @@ -37,7 +39,8 @@ 'mauricerenck.komments.disabled' => 'Die Kommentarfunktion wurde auf dieser Seite deaktiviert.', 'mauricerenck.komments.externalReply' => 'Woanders antworten', 'mauricerenck.komments.form.submit' => 'Abschicken', - 'mauricerenck.komments.form.privacy' => 'Die eingegebene E-Mail-Adresse wird vor dem Speichern unwiderruflich verschlüsselt und dient nur zur Darstellung des Avatars. Mit dem Absenden stimmst du zu, dass die eingegebenen Daten gespeichert und in Form eines Kommentars dargestellt werden dürfen.', + 'mauricerenck.komments.form.privacy' => + 'Die eingegebene E-Mail-Adresse wird vor dem Speichern unwiderruflich verschlüsselt und dient nur zur Darstellung des Avatars. Mit dem Absenden stimmst du zu, dass die eingegebenen Daten gespeichert und in Form eines Kommentars dargestellt werden dürfen.', 'mauricerenck.komments.form.label.comment' => 'Kommentar', 'mauricerenck.komments.form.label.email' => 'E-Mail', 'mauricerenck.komments.form.label.name' => 'Name', @@ -46,6 +49,7 @@ 'mauricerenck.komments.headline.reposts' => 'Geteilt', 'mauricerenck.komments.headline.mentions' => 'Erwähnungen', 'mauricerenck.komments.headline.replies' => 'Antworten', + 'mauricerenck.komments.headline.comments' => 'Kommentare', 'mauricerenck.komments.action.reply.text' => 'antworten', 'mauricerenck.komments.pagenotfound' => 'Die kommentierte Seite wurde nicht gefunden', 'mauricerenck.komments.error' => 'Fehler', @@ -62,7 +66,8 @@ 'mauricerenck.komments.disabled' => 'Les commentaires ont été désactivés sur cette page.', 'mauricerenck.komments.externalReply' => 'Répondre ailleurs', 'mauricerenck.komments.form.submit' => 'envoyer', - 'mauricerenck.komments.form.privacy' => 'Votre adresse électronique sera chiffrée avant de sauvegarder le commentaire. Elle ne sera utilisée que pour afficher un gravatar. En soumettant vos données, vous acceptez que toutes les données saisies soient sauvegardées et affichées sous forme de commentaire.', + 'mauricerenck.komments.form.privacy' => + 'Votre adresse électronique sera chiffrée avant de sauvegarder le commentaire. Elle ne sera utilisée que pour afficher un gravatar. En soumettant vos données, vous acceptez que toutes les données saisies soient sauvegardées et affichées sous forme de commentaire.', 'mauricerenck.komments.form.label.kommentar' => 'Commentaire', 'mauricerenck.komments.form.label.email' => 'E-mail', 'mauricerenck.komments.form.label.name' => 'Nom', @@ -71,8 +76,10 @@ 'mauricerenck.komments.headline.reposts' => 'Partages', 'mauricerenck.komments.headline.mentions' => 'Mentions', 'mauricerenck.komments.headline.replies' => 'Réponses', + 'mauricerenck.komments.headline.comments' => 'Commentaires', 'mauricerenck.komments.action.reply.text' => 'répondre', - 'mauricerenck.komments.pagenotfound' => 'La page pour laquelle vous avez écrit un commentaire n’a pas pu être trouvée.', + 'mauricerenck.komments.pagenotfound' => + 'La page pour laquelle vous avez écrit un commentaire n’a pas pu être trouvée.', 'mauricerenck.komments.error' => 'Erreur', 'mauricerenck.komments.lookslikespam' => 'Votre commentaire a été rejeté parce qu’il ressemble à un spam.', 'mauricerenck.komments.invalidfieldvalues' => 'Valeurs de champs non valides', diff --git a/content/home/default.de.txt b/content/home/default.de.txt index de1fcb2..8f7addd 100644 --- a/content/home/default.de.txt +++ b/content/home/default.de.txt @@ -9,141 +9,20 @@ Kommentsenabledonpage: true Kommentsinbox: - - author: Maurice + author: DeUserLike avatar: > https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 authorurl: "" - kommenttype: KOMMENT - quote: "" - komment: just a test - source: https://komments.test:8890 - target: https://komments.test:8890 - mentionof: https://komments.test:8890 - property: KOMMENT - published: 2022-07-01 15:05:00 + authoremail: "" + kommenttype: LIKE + komment: "" + source: null + target: null + mentionof: null + property: null + published: 2024-01-24 17:05:00 status: 'true' - verified: 'true' - id: 69e47b8d360d466d0b18c88b2f5f65da - spamlevel: 0 -- - author: Maurice - avatar: > - https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 - authorurl: "" - kommenttype: KOMMENT - quote: "" - komment: skjdf sdlfjsd lfsd - source: https://komments.test:8890 - target: https://komments.test:8890 - mentionof: https://komments.test:8890 - property: KOMMENT - published: 2022-07-01 15:05:00 - status: 'true' - verified: 'true' - id: 18e4701f1daed91c1f7dd3018d2537e0 - spamlevel: 0 -- - author: sdfsdf - avatar: > - https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 - authorurl: "" - kommenttype: KOMMENT - quote: "" - komment: sdfsdfsdf - source: https://komments.test:8890 - target: https://komments.test:8890 - mentionof: https://komments.test:8890 - property: KOMMENT - published: 2022-07-01 15:25:00 - status: 'true' - verified: 'true' - id: 5ff0d17abcf50a3566ba347f6e80b832 - spamlevel: 0 -- - author: sdfsdfs - avatar: > - https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 - authorurl: "" - kommenttype: KOMMENT - quote: "" - komment: sdfsd - source: https://komments.test:8890/en - target: https://komments.test:8890/en - mentionof: https://komments.test:8890/en - property: KOMMENT - published: 2023-08-08 07:20:00 - status: 'true' - verified: 'true' - id: 4d84cfa624de930e106cb62056596ef2 - spamlevel: 0 -- - author: sdfsdfs - avatar: > - https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 - authorurl: "" - kommenttype: KOMMENT - quote: "" - komment: sdfsd - source: https://komments.test:8890/en - target: https://komments.test:8890/en - mentionof: https://komments.test:8890/en - property: KOMMENT - published: 2023-08-08 07:25:00 - status: 'true' - verified: 'true' - id: b53b321e3df94a297aebe0854921c79e - spamlevel: 0 -- - author: sdfsdf - avatar: > - https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 - authorurl: "" - kommenttype: KOMMENT - quote: "" - komment: sdfsdfsdf - source: https://komments.test:8890/en - target: https://komments.test:8890/en - mentionof: https://komments.test:8890/en - property: KOMMENT - published: 2023-08-08 07:25:00 - status: 'true' - verified: 'true' - id: f8cc69a6569a8cb1be0a0102d42cbf3a - spamlevel: 0 -- - author: sdfsdfsdfsdf - avatar: > - https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 - authorurl: "" - kommenttype: KOMMENT - quote: "" - komment: sdfsdfsdf - source: https://komments.test:8890/en - target: https://komments.test:8890/en - mentionof: https://komments.test:8890/en - property: KOMMENT - published: 2023-08-08 10:30:00 - status: 'true' - verified: 'true' - id: 173f70c58803c163a70efc99c62bbbcd - spamlevel: 0 -- - author: dfgd - avatar: > - https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 - authorurl: "" - kommenttype: KOMMENT - quote: "" - komment: dfgdfgdfg - source: https://komments.test:8890/de - target: https://komments.test:8890/de - mentionof: https://komments.test:8890/de - property: KOMMENT - published: 2023-08-08 10:30:00 - status: 'true' - verified: 'true' - id: 76cf1489035b5a5cb00d62839d58beb0 - spamlevel: 0 + verified: 'false' ---- diff --git a/content/home/default.en.txt b/content/home/default.en.txt index 2928fa0..72cc9e3 100644 --- a/content/home/default.en.txt +++ b/content/home/default.en.txt @@ -12,10 +12,10 @@ Kommentsinbox: author: Maurice avatar: > https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 - authorurl: "" + authorurl: https://maurice-renck.de + authoremail: "" kommenttype: KOMMENT - quote: "" - komment: just a test + komment: This is a verified comment source: https://komments.test:8890 target: https://komments.test:8890 mentionof: https://komments.test:8890 @@ -23,6 +23,7 @@ Kommentsinbox: published: 2022-07-01 15:05:00 status: 'true' verified: 'true' + quote: "" id: 69e47b8d360d466d0b18c88b2f5f65da spamlevel: 0 - @@ -30,76 +31,80 @@ Kommentsinbox: avatar: > https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 authorurl: "" + authoremail: "" kommenttype: KOMMENT - quote: "" - komment: skjdf sdlfjsd lfsd + komment: This is a comment source: https://komments.test:8890 target: https://komments.test:8890 - mentionof: https://komments.test:8890 + mentionof: 69e47b8d360d466d0b18c88b2f5f65da property: KOMMENT published: 2022-07-01 15:05:00 status: 'true' - verified: 'true' + verified: 'false' + quote: "" id: 18e4701f1daed91c1f7dd3018d2537e0 spamlevel: 0 - - author: sdfsdf + author: userLike avatar: > https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 authorurl: "" - kommenttype: KOMMENT - quote: "" - komment: sdfsdfsdf + authoremail: "" + kommenttype: LIKE + komment: "" source: https://komments.test:8890 target: https://komments.test:8890 mentionof: https://komments.test:8890 property: KOMMENT published: 2022-07-01 15:25:00 status: 'true' - verified: 'true' + verified: 'false' + quote: "" id: 5ff0d17abcf50a3566ba347f6e80b832 spamlevel: 0 - - author: sdfsdfs + author: userRepost avatar: > https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 authorurl: "" - kommenttype: KOMMENT - quote: "" - komment: sdfsd + authoremail: "" + kommenttype: REPOST + komment: "" source: https://komments.test:8890/en target: https://komments.test:8890/en mentionof: https://komments.test:8890/en property: KOMMENT published: 2023-08-08 07:20:00 status: 'true' - verified: 'true' + verified: 'false' + quote: "" id: 4d84cfa624de930e106cb62056596ef2 spamlevel: 0 - - author: sdfsdfs + author: userMention avatar: > https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 authorurl: "" - kommenttype: KOMMENT - quote: "" - komment: sdfsd + authoremail: "" + kommenttype: MENTION + komment: "" source: https://komments.test:8890/en target: https://komments.test:8890/en mentionof: https://komments.test:8890/en property: KOMMENT published: 2023-08-08 07:25:00 status: 'true' - verified: 'true' + verified: 'false' + quote: "" id: b53b321e3df94a297aebe0854921c79e spamlevel: 0 - - author: sdfsdf + author: userSpam avatar: > https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 authorurl: "" - kommenttype: KOMMENT - quote: "" + authoremail: "" + kommenttype: SPAM komment: sdfsdfsdf source: https://komments.test:8890/en target: https://komments.test:8890/en @@ -107,26 +112,46 @@ Kommentsinbox: property: KOMMENT published: 2023-08-08 07:25:00 status: 'true' - verified: 'true' + verified: 'false' + quote: "" id: f8cc69a6569a8cb1be0a0102d42cbf3a spamlevel: 0 - - author: sdfsdfsdfsdf + author: userReply avatar: > https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 authorurl: "" - kommenttype: KOMMENT - quote: "" - komment: sdfsdfsdf + authoremail: "" + kommenttype: REPLY + komment: This is a reply source: https://komments.test:8890/en target: https://komments.test:8890/en mentionof: https://komments.test:8890/en property: KOMMENT published: 2023-08-08 10:30:00 status: 'true' - verified: 'true' + verified: 'false' + quote: "" id: 173f70c58803c163a70efc99c62bbbcd spamlevel: 0 +- + author: replyGuy + avatar: > + https://www.gravatar.com/avatar/8b77c0a84579af62f82da07d9abedf56 + authorurl: "" + authoremail: "" + kommenttype: KOMMENT + komment: This is a reply to a comment + source: https://komments.test:8890/en + target: https://komments.test:8890/en + mentionof: 18e4701f1daed91c1f7dd3018d2537e0 + property: KOMMENT + published: 2024-01-25 11:20:00 + status: 'true' + verified: 'true' + id: 612763db7d5a035ad11d73acb5bb5cda + quote: "" + spamlevel: 0 ---- diff --git a/content/phpunit/default.en.txt b/content/phpunit/default.en.txt index 02d057a..ba5ebcf 100644 --- a/content/phpunit/default.en.txt +++ b/content/phpunit/default.en.txt @@ -15,7 +15,6 @@ Kommentsinbox: authorurl: "" authoremail: "" kommenttype: KOMMENT - quote: "" komment: A regular comment of an unkown user source: https://komments.test:8890/phpunit target: https://komments.test:8890/phpunit @@ -24,6 +23,7 @@ Kommentsinbox: published: 2021-11-10 13:50:00 status: 'false' verified: 'false' + quote: "" id: 1bfffa3f189b3c5b5d6f3ed3271d3342 spamlevel: 0 - @@ -33,7 +33,6 @@ Kommentsinbox: authorurl: https://maurice-renck.de authoremail: "" kommenttype: KOMMENT - quote: "" komment: A regular comment of a verified user source: https://komments.test:8890/phpunit target: https://komments.test:8890/phpunit @@ -42,6 +41,7 @@ Kommentsinbox: published: 2021-11-10 13:50:00 status: 'false' verified: 'true' + quote: "" id: c62bc1426c1d39eb6d8a6b4f5b3ef3ee spamlevel: 0 - @@ -51,7 +51,6 @@ Kommentsinbox: authorurl: "" authoremail: "" kommenttype: KOMMENT - quote: "" komment: A spam comment by an evil bot source: https://komments.test:8890/phpunit target: https://komments.test:8890/phpunit @@ -60,6 +59,7 @@ Kommentsinbox: published: 2021-11-10 13:50:00 status: 'false' verified: 'false' + quote: "" id: 594a3bdc4947c1a8496d2beb8a065cb1 spamlevel: 100 - @@ -69,7 +69,6 @@ Kommentsinbox: authorurl: "" authoremail: "" kommenttype: KOMMENT - quote: "" komment: sdfsdfsdfs source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -78,6 +77,7 @@ Kommentsinbox: published: 2023-08-08 07:25:00 status: 'true' verified: 'true' + quote: "" id: 844a605a0e656b226691d36a6deceaae spamlevel: 0 - @@ -87,7 +87,6 @@ Kommentsinbox: authorurl: "" authoremail: "" kommenttype: KOMMENT - quote: "" komment: dfgdfg source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -96,6 +95,7 @@ Kommentsinbox: published: 2023-08-08 07:25:00 status: 'true' verified: 'true' + quote: "" id: 020ad1b6c6d4c7f97d59c5759e908bd1 spamlevel: 0 - @@ -105,7 +105,6 @@ Kommentsinbox: authorurl: "" authoremail: "" kommenttype: KOMMENT - quote: "" komment: dfgdfggdfg source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -114,6 +113,7 @@ Kommentsinbox: published: 2023-08-08 10:35:00 status: 'true' verified: 'true' + quote: "" id: 5a61aabc59cb4fcb11756a651fa5b5ef spamlevel: 0 - @@ -123,7 +123,6 @@ Kommentsinbox: authorurl: "" authoremail: "" kommenttype: KOMMENT - quote: "" komment: dfgdfgdfg source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -132,6 +131,7 @@ Kommentsinbox: published: 2023-08-08 10:35:00 status: 'true' verified: 'true' + quote: "" id: a716a89e7b115623218d4ea52bff06ce spamlevel: 0 - @@ -141,7 +141,6 @@ Kommentsinbox: authorurl: "" authoremail: "" kommenttype: KOMMENT - quote: "" komment: > hier ist mein kommentar, er ist sehr schön! @@ -152,6 +151,7 @@ Kommentsinbox: published: 2023-09-13 09:10:00 status: 'true' verified: 'true' + quote: "" id: db4e9594bdda80340d7155f367e3b5f8 spamlevel: 0 - @@ -161,7 +161,6 @@ Kommentsinbox: authorurl: "" authoremail: "" kommenttype: KOMMENT - quote: "" komment: was gehet aaaaaaab? source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -170,6 +169,7 @@ Kommentsinbox: published: 2023-09-13 09:10:00 status: 'true' verified: 'true' + quote: "" id: ab75d4591808b517f07e8e6cc110ceb7 spamlevel: 0 - @@ -179,7 +179,6 @@ Kommentsinbox: authorurl: https://wwb.site authoremail: "" kommenttype: KOMMENT - quote: "" komment: kommentar source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -188,6 +187,7 @@ Kommentsinbox: published: 2023-09-13 09:35:00 status: 'true' verified: 'true' + quote: "" id: daf0a12ebaf7eb83ee3c4f400058ce51 spamlevel: 0 - @@ -197,7 +197,6 @@ Kommentsinbox: authorurl: https://wwb.site authoremail: "" kommenttype: KOMMENT - quote: "" komment: kommentar source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -206,6 +205,7 @@ Kommentsinbox: published: 2023-09-13 09:35:00 status: 'true' verified: 'true' + quote: "" id: e3d1e414380898bace9e47eebf6d9419 spamlevel: 0 - @@ -215,7 +215,6 @@ Kommentsinbox: authorurl: https://test.de authoremail: "" kommenttype: KOMMENT - quote: "" komment: sdfsdfsdf source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -224,6 +223,7 @@ Kommentsinbox: published: 2023-09-13 09:35:00 status: 'true' verified: 'true' + quote: "" id: b39a7f8c72770a7cc03add4e3cfcf3de spamlevel: 0 - @@ -233,7 +233,6 @@ Kommentsinbox: authorurl: https://test.de authoremail: "" kommenttype: KOMMENT - quote: "" komment: sdfsdfsdf source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -242,6 +241,7 @@ Kommentsinbox: published: 2023-09-13 09:45:00 status: 'true' verified: 'true' + quote: "" id: 653279f37f7ca0649c333fdc071878a8 spamlevel: 0 - @@ -251,7 +251,6 @@ Kommentsinbox: authorurl: https://test.de authoremail: "" kommenttype: KOMMENT - quote: "" komment: sdfsdfsdf source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -260,6 +259,7 @@ Kommentsinbox: published: 2023-09-13 09:45:00 status: 'true' verified: 'true' + quote: "" id: 4cb42e8a0ac5dec2f000fd73ba2399fa spamlevel: 0 - @@ -269,7 +269,6 @@ Kommentsinbox: authorurl: https://test.de authoremail: "" kommenttype: KOMMENT - quote: "" komment: sdfsdfsdf source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -278,6 +277,7 @@ Kommentsinbox: published: 2023-09-13 09:45:00 status: 'true' verified: 'true' + quote: "" id: e38cd8362e6c8ecde5f634cafca97258 spamlevel: 0 - @@ -287,7 +287,6 @@ Kommentsinbox: authorurl: https://test.de authoremail: "" kommenttype: KOMMENT - quote: "" komment: sdfsdfsdf source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -296,6 +295,7 @@ Kommentsinbox: published: 2023-09-13 09:45:00 status: 'true' verified: 'true' + quote: "" id: 6832fd61a1ceff974ad9ccad605dc303 spamlevel: 0 - @@ -305,7 +305,6 @@ Kommentsinbox: authorurl: https://test.de authoremail: maurice@maurice-renck.de kommenttype: KOMMENT - quote: "" komment: sdfsdfsdf source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -314,6 +313,7 @@ Kommentsinbox: published: 2023-09-13 09:45:00 status: 'true' verified: 'true' + quote: "" id: 0572d8b288e486f8342b8ad60839345f spamlevel: 0 - @@ -323,7 +323,6 @@ Kommentsinbox: authorurl: https://test.de authoremail: "" kommenttype: KOMMENT - quote: "" komment: sdfsdfsdf source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -332,6 +331,7 @@ Kommentsinbox: published: 2023-09-13 09:50:00 status: 'true' verified: 'true' + quote: "" id: 899ce6bff0f8261fe56a710f8b4ef345 spamlevel: 0 - @@ -341,7 +341,6 @@ Kommentsinbox: authorurl: https://test.de authoremail: "" kommenttype: KOMMENT - quote: "" komment: sdfsdfsdf source: https://komments.test:8890/en/phpunit target: https://komments.test:8890/en/phpunit @@ -350,6 +349,7 @@ Kommentsinbox: published: 2023-09-13 09:50:00 status: 'true' verified: 'true' + quote: "" id: ebd429cd5fa3b6fce3706c5e4584f976 spamlevel: 0 diff --git a/index.css b/index.css index 964c09d..99c5466 100644 --- a/index.css +++ b/index.css @@ -1 +1 @@ -.k-komments-view .comments-grid{display:grid;grid-template-columns:1fr 3fr;gap:var(--spacing-4)}.komment-moderation{border:1px solid var(--color-border);border-radius:var(--rounded);box-shadow:var(--shadow);background-color:var(--color-white);padding:var(--spacing-8)}.komment-moderation .metadata{display:grid;grid-template-columns:60px 1fr;gap:var(--spacing-4);line-height:1.25}.komment-moderation .avatar img{width:60px;border-radius:var(--rounded)}.komment-moderation .author-short .k-icon{display:inline-block;margin-left:.5em}.komment-moderation .meta{color:var(--color-gray-500);font-size:var(--text-sm)}.komment-moderation .actions{display:flex;justify-content:space-between;margin:var(--spacing-4) 0;padding:var(--spacing-2);background-color:var(--color-gray-100)}.komment-moderation .actions .k-button{margin-right:1.75em}.komment-moderation .actions .k-button:last-child{margin-right:0}.komment-moderation .actions .k-bar-slot[data-position=right]{text-align:right}.komment-moderation .text{padding:var(--spacing-2)}.komment-moderation .text a{color:var(--color-negative)}.k-komments-view .komments-list ul{display:flex;flex-direction:column;gap:var(--spacing-2)}.k-komments-view .komments-list .komment-preview{line-height:1.5}.k-komments-view .komments-list .answer{align-self:end;box-shadow:var(--box-shadow-focus)}.k-komments-view .komments-list .meta{color:var(--color-gray-500);font-size:var(--text-sm);padding-bottom:var(--spacing-1)}.k-komments-view .komments-list .badge{border-radius:var(--rounded);background:var(--color-gray-300);font-size:var(--text-xs);padding:0 7px;line-height:1.5;display:inline-block}.k-komments-view .komments-list .badge.green{background:var(--color-green);color:var(--color-white)}.k-komments-view .komments-list .badge.blue{background:var(--color-blue);color:var(--color-white)}.k-komments-view .komments-list .badge.red{background:var(--color-red);color:var(--color-white)}.k-komments-view .komments-list .status span{margin-right:var(--spacing-1)}.k-komments-view .komments-list .list-item{display:flex;gap:var(--spacing-2);place-items:center;transition:all .125s;border:1px solid var(--color-border);border-radius:var(--rounded);cursor:pointer;box-shadow:var(--shadow);background-color:var(--color-white);padding:var(--spacing-2)}.k-komments-view .komments-list .list-item img{width:60px;border-radius:var(--rounded);margin-right:var(--spacing-2)}.k-komments-view .komments-list .list-item.active{position:relative;box-shadow:var(--shadow-lg);background-color:var(--color-gray-200);border-color:var(--color-blue)}.k-komments-view .komments-list .list-item:hover,.k-komments-view .komments-list .list-item:focus{background-color:var(--color-gray-100)}.kommentsPendingCounter{position:relative;padding:1rem;background:#fff;box-shadow:var(--box-shadow-item);text-align:center}.kommentsPendingCounter .count{font-size:var(--text-5xl)} +.k-komments-view.version3{padding:var(--spacing-10)}.k-komments-view.version3 .komment-list,.k-komments-view.version3 .komment-details{grid-column-start:inherit}.k-komments-view .comments-grid{display:grid;grid-template-columns:1fr 3fr;gap:var(--spacing-4)}.komment-moderation{border:1px solid var(--color-border);border-radius:var(--rounded);box-shadow:var(--shadow);background-color:var(--color-white);padding:var(--spacing-8)}.komment-moderation .metadata{display:grid;grid-template-columns:60px 1fr;gap:var(--spacing-4);line-height:1.25}.komment-moderation .avatar img{width:60px;border-radius:var(--rounded)}.komment-moderation .author-short .k-icon{display:inline-block;margin-left:.5em}.komment-moderation .meta{color:var(--color-gray-500);font-size:var(--text-sm)}.komment-moderation .actions{display:flex;justify-content:space-between;margin:var(--spacing-4) 0;padding:var(--spacing-2);background-color:var(--color-gray-100)}.komment-moderation .actions .k-button{margin-right:1.75em}.komment-moderation .actions .k-button:last-child{margin-right:0}.komment-moderation .actions .k-bar-slot[data-position=right]{text-align:right}.komment-moderation .text{padding:var(--spacing-2)}.komment-moderation .text a{color:var(--color-negative)}.k-komments-view .komments-list ul{display:flex;flex-direction:column;gap:var(--spacing-2)}.k-komments-view .komments-list .komment-preview{line-height:1.5}.k-komments-view .komments-list .answer{align-self:end;box-shadow:var(--box-shadow-focus)}.k-komments-view .komments-list .meta{color:var(--color-gray-500);font-size:var(--text-sm);padding-bottom:var(--spacing-1)}.k-komments-view .komments-list .badge{border-radius:var(--rounded);background:var(--color-gray-300);font-size:var(--text-xs);padding:0 7px;line-height:1.5;display:inline-block}.k-komments-view .komments-list .badge.green{background:var(--color-green);color:var(--color-white)}.k-komments-view .komments-list .badge.blue{background:var(--color-blue);color:var(--color-white)}.k-komments-view .komments-list .badge.red{background:var(--color-red);color:var(--color-white)}.k-komments-view .komments-list .status span{margin-right:var(--spacing-1)}.k-komments-view .komments-list .list-item{display:flex;gap:var(--spacing-2);place-items:center;transition:all .125s;border:1px solid var(--color-border);border-radius:var(--rounded);cursor:pointer;box-shadow:var(--shadow);background-color:var(--color-white);padding:var(--spacing-2)}.k-komments-view .komments-list .list-item img{width:60px;border-radius:var(--rounded);margin-right:var(--spacing-2)}.k-komments-view .komments-list .list-item.active{position:relative;box-shadow:var(--shadow-lg);background-color:var(--color-gray-200);border-color:var(--color-blue)}.k-komments-view .komments-list .list-item:hover,.k-komments-view .komments-list .list-item:focus{background-color:var(--color-gray-100)}.kommentsPendingCounter{position:relative;padding:1rem;background:#fff;box-shadow:var(--box-shadow-item);text-align:center}.kommentsPendingCounter .count{font-size:var(--text-5xl)} diff --git a/index.js b/index.js index ada3ad1..f85de22 100644 --- a/index.js +++ b/index.js @@ -1 +1 @@ -(function(){"use strict";function o(s,e,t,i,l,m,d,T){var n=typeof s=="function"?s.options:s;e&&(n.render=e,n.staticRenderFns=t,n._compiled=!0),i&&(n.functional=!0),m&&(n._scopeId="data-v-"+m);var r;if(d?(r=function(a){a=a||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!a&&typeof __VUE_SSR_CONTEXT__<"u"&&(a=__VUE_SSR_CONTEXT__),l&&l.call(this,a),a&&a._registeredComponents&&a._registeredComponents.add(d)},n._ssrRegister=r):l&&(r=T?function(){l.call(this,(n.functional?this.parent:this).$root.$options.shadowRoot)}:l),r)if(n.functional){n._injectStyles=r;var N=n.render;n.render=function(U,c){return r.call(c),N(U,c)}}else{var h=n.beforeCreate;n.beforeCreate=h?[].concat(h,r):[r]}return{exports:s,options:n}}const u={data(){return{selectedKomment:{},kommentList:[]}},props:{title:String,queuedKomments:Array},created(){this.kommentList=this.queuedKomments,this.loadKomments(),this.kommentList[0]&&this.selectKomment(this.kommentList[0].id)},methods:{async loadKomments(){try{panel.api.get("komments/queued").then(s=>{this.komments=s})}catch(s){console.log(s)}},selectKomment(s){this.selectedKomment=this.queuedKomments.find(e=>e.id===s)},onMarkAsSpam(s){for(let e=0;es.id!==this.selectedKomment.id),this.selectedKomment=this.kommentList[0]}}};var p=function(){var e=this,t=e._self._c;return t("k-inside",[t("div",{staticClass:"k-komments-view"},[t("k-header",[e._v("Komments")]),t("div",[e.kommentList.length===0?t("div",{staticClass:"so-empty"},[t("NoKomments"),t("div",[t("k-info-field",{attrs:{theme:"positive",text:"There are no comments waiting for moderation. Have a nice day!"}})],1)],1):t("div",{staticClass:"comments-grid"},[t("k-column",{staticClass:"komment-list",attrs:{width:"1/3"}},[t("KommentList",{attrs:{queuedKomments:e.kommentList,onSelectKomment:e.selectKomment,selectedKomment:this.selectedKomment}})],1),t("k-column",{staticClass:"komment-details",attrs:{width:"2/3"}},[t("KommentDetails",{attrs:{komment:this.selectedKomment,onMarkAsSpam:this.onMarkAsSpam,onMarkAsVerified:this.onMarkAsVerified,onMarkAsPublished:this.onMarkAsPublished,onDelete:this.onDelete}})],1)],1)])],1)])},k=[],_=o(u,p,k,!1,null,null,null,null);const f=_.exports,v={props:{komment:Object,onMarkAsSpam:Function,onMarkAsVerified:Function,onMarkAsPublished:Function,onDelete:Function},methods:{markAsSpam(s,e,t){this.komment.spamlevel=null,panel.api.post("komments/spam",{pageSlug:s,kommentId:e,isSpam:t}).then(()=>{this.onMarkAsSpam(t)})},markAsVerified(s,e,t){this.komment.verified=null,panel.api.post("komments/verify",{pageSlug:s,kommentId:e,isVerified:t}).then(()=>{this.onMarkAsVerified(t)})},publish(s,e,t){this.komment.status=null,panel.api.post("komments/publish",{pageSlug:s,kommentId:e,isPublished:t}).then(()=>{this.onMarkAsPublished(t)})},deleteKomment(s,e,t){panel.api.post("komments/delete",{pageSlug:s,kommentId:e}).then(()=>{this.onDelete(),t.deleteDialog.close()})},nl2br(s){return s.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1
$2")}}};var g=function(){var e=this,t=e._self._c;return t("div",{staticClass:"komment-moderation"},[e.komment.id?t("div",[t("div",{staticClass:"metadata"},[t("div",{staticClass:"avatar"},[e.komment.image?t("img",{attrs:{src:e.komment.image}}):e._e()]),t("div",{staticClass:"komment-info"},[t("div",{staticClass:"author-short"},[t("strong",[e._v(e._s(e.komment.author))]),e.komment.authorUrl?t("k-link",{attrs:{to:e.komment.authorUrl,title:e.komment.authorUrl,target:"_blank"}},[t("k-icon",{attrs:{type:"url"}})],1):e._e()],1),t("div",{staticClass:"meta"},[e._v(e._s(e.komment.published))]),t("div",{staticClass:"meta"},[t("k-link",{attrs:{to:e.komment.url,title:e.komment.url}},[e._v(e._s(e.komment.title))])],1)])]),t("div",{staticClass:"actions"},[t("div",{staticClass:"left"},[e.komment.status===!0?t("k-button",{staticClass:"publish",attrs:{theme:"positive",icon:"circle-filled"},on:{click:function(i){return e.publish(e.komment.slug,e.komment.id,!1)}}},[e._v(" Published ")]):e.komment.status===!1&&e.komment.spamlevel===0?t("k-button",{staticClass:"publish",attrs:{disabled:e.komment.spamlevel>0,icon:"circle"},on:{click:function(i){return e.publish(e.komment.slug,e.komment.id,!0)}}},[e._v(" Publish ")]):t("k-button",{attrs:{icon:"protected",disabled:!0}},[e._v(" Publish ")]),e.komment.verified===!0?t("k-button",{attrs:{theme:"positive",icon:"check"},on:{click:function(i){return e.markAsVerified(e.komment.slug,e.komment.id,!1)}}},[e._v(" Verified user ")]):e.komment.verified===!1&&e.komment.spamlevel===0?t("k-button",{attrs:{icon:"check",disabled:e.komment.spamlevel>0},on:{click:function(i){return e.markAsVerified(e.komment.slug,e.komment.id,!0)}}},[e._v(" Verify user ")]):t("k-button",{attrs:{icon:"protected",disabled:!0}},[e._v(" Verify user ")]),e.komment.spamlevel===0?t("k-button",{attrs:{icon:"bolt"},on:{click:function(i){return e.markAsSpam(e.komment.slug,e.komment.id,!0)}}},[e._v(" Flag as spam ")]):e.komment.spamlevel>0?t("k-button",{attrs:{theme:"negative",icon:"bolt"},on:{click:function(i){return e.markAsSpam(e.komment.slug,e.komment.id,!1)}}},[e._v(" Remove from spam ")]):t("k-button",{attrs:{icon:"clock",disabled:!0}},[e._v(" Marked as spam ")])],1),t("div",{staticClass:"right"},[t("k-button",{attrs:{theme:"negative",icon:"trash"},on:{click:function(i){return e.$refs.deleteDialog.open()}}},[e._v(" Delete ")]),t("k-dialog",{ref:"deleteDialog",attrs:{button:"Delete",theme:"negative",icon:"trash"},on:{submit:function(i){return e.deleteKomment(e.komment.slug,e.komment.id,e.$refs)}}},[t("k-text",[e._v(" Do you really want to delete the comment? This cannot be undone. ")])],1)],1)]),t("div",{staticClass:"text",domProps:{innerHTML:e._s(e.komment.komment)}})]):e._e()])},y=[],b=o(v,g,y,!1,null,null,null,null);const w=b.exports,x={props:{queuedKomments:Array,onSelectKomment:Function,selectedKomment:Object}};var C=function(){var e=this,t=e._self._c;return t("div",{staticClass:"komments-list"},[t("ul",e._l(e.queuedKomments,function(i,l){return t("li",{key:l,staticClass:"list-item",class:{active:e.selectedKomment.id===i.id,isSpam:i.spamlevel>0,isVerified:i.verified===!0},on:{click:function(m){return e.onSelectKomment(i.id)},keypress:function(m){return e.onSelectKomment(i.id)}}},[i.image?t("img",{attrs:{src:i.image}}):e._e(),t("div",{staticClass:"komment-preview"},[t("div",{staticClass:"author"},[t("strong",[e._v(e._s(i.author))])]),t("div",{staticClass:"meta"},[e._v(e._s(i.published)+" - "+e._s(i.title))]),t("div",{staticClass:"status"},[i.status===!1?t("span",{staticClass:"badge",attrs:{alt:"pending",title:"pending"}},[e._v(" pending ")]):i.status===!0?t("span",{staticClass:"badge blue",attrs:{alt:"published",title:"published"}},[e._v(" published ")]):e._e(),i.verified===!0?t("span",{staticClass:"badge green",attrs:{alt:"Verified user",title:"Verified user"}},[e._v(" verified ")]):e._e(),i.spamlevel>0?t("span",{staticClass:"badge red",attrs:{alt:"Possible spam comment",title:"Possible spam comment"}},[e._v(" spam ")]):e._e()])])])}),0)])},K=[],$=o(x,C,K,!1,null,null,null,null);const A=$.exports,M={props:{queuedComments:Number,label:String}};var L=function(){var e=this,t=e._self._c;return t("div",{staticClass:"kommentsPendingCounter"},[t("k-headline",[e._v(e._s(e.label))]),t("div",{staticClass:"count"},[e._v(e._s(e.queuedComments))])],1)},S=[],V=o(M,L,S,!1,null,null,null,null);const D=V.exports,P={props:{}};var F=function(){var e=this,t=e._self._c;return t("div",[t("svg",{attrs:{"data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",width:"997.86122",height:"450.8081",viewBox:"0 0 997.86122 450.8081","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("rect",{attrs:{x:"871.99152",y:"181.55804",width:"30.15944",height:"104.39806",fill:"#f2f2f2"}}),t("polygon",{attrs:{points:"922.068 266.317 848.715 179.052 701.475 180.398 612.156 267.396 613.961 268.556 613.316 268.556 613.316 449.513 921.871 449.513 921.871 268.556 922.068 266.317",fill:"#f2f2f2"}}),t("polygon",{attrs:{points:"848.792 179.238 757.154 286.674 757.154 449.513 921.871 449.513 921.871 266.236 848.792 179.238",fill:"#e6e6e6"}}),t("rect",{attrs:{x:"823.27242",y:"359.46083",width:"33.6394",height:"29.73333",fill:"#3f3d56"}}),t("rect",{attrs:{x:"823.27242",y:"307.99568",width:"33.6394",height:"29.26181",fill:"#3f3d56"}}),t("rect",{attrs:{x:"823.27242",y:"359.46083",width:"33.6394",height:"29.73333",fill:"#fff"}}),t("rect",{attrs:{x:"823.27242",y:"307.99568",width:"33.6394",height:"29.26181",fill:"#fff"}}),t("rect",{attrs:{x:"673.77661",y:"351.57128",width:"33.6394",height:"29.73333",fill:"#fff"}}),t("rect",{attrs:{x:"673.77661",y:"300.10613",width:"33.6394",height:"29.26181",fill:"#fff"}}),t("rect",{attrs:{x:"633.99152",y:"181.55804",width:"30.15944",height:"104.39806",fill:"#f2f2f2"}}),t("polygon",{attrs:{points:"684.068 266.317 610.715 179.052 463.475 180.398 374.156 267.396 375.961 268.556 375.316 268.556 375.316 449.513 683.871 449.513 683.871 268.556 684.068 266.317",fill:"#f2f2f2"}}),t("polygon",{attrs:{points:"610.792 179.238 519.154 286.674 519.154 449.513 683.871 449.513 683.871 266.236 610.792 179.238",fill:"#e6e6e6"}}),t("rect",{attrs:{x:"585.27242",y:"359.46083",width:"33.6394",height:"29.73333",fill:"#3f3d56"}}),t("rect",{attrs:{x:"585.27242",y:"307.99568",width:"33.6394",height:"29.26181",fill:"#3f3d56"}}),t("rect",{attrs:{x:"585.27242",y:"359.46083",width:"33.6394",height:"29.73333",fill:"#fff"}}),t("rect",{attrs:{x:"585.27242",y:"307.99568",width:"33.6394",height:"29.26181",fill:"#fff"}}),t("rect",{attrs:{x:"435.77661",y:"351.57128",width:"33.6394",height:"29.73333",fill:"#fff"}}),t("rect",{attrs:{x:"435.77661",y:"300.10613",width:"33.6394",height:"29.26181",fill:"#fff"}}),t("rect",{attrs:{x:"380.1536",y:"91.46021",width:"40.30032",height:"139.50112",fill:"#f2f2f2"}}),t("polygon",{attrs:{points:"447.068 204.718 349.051 88.112 152.302 89.91 32.951 206.161 35.362 207.711 34.501 207.711 34.501 449.513 446.804 449.513 446.804 207.711 447.068 204.718",fill:"#f2f2f2"}}),t("polygon",{attrs:{points:"349.153 88.36 226.702 231.921 226.702 449.513 446.804 449.513 446.804 204.611 349.153 88.36",fill:"#e6e6e6"}}),t("rect",{attrs:{x:"315.05306",y:"329.18147",width:"44.95039",height:"39.73094",fill:"#3f3d56"}}),t("rect",{attrs:{x:"315.05306",y:"260.41156",width:"44.95039",height:"39.10088",fill:"#3f3d56"}}),t("rect",{attrs:{x:"315.05306",y:"329.18147",width:"44.95039",height:"39.73094",fill:"#fff"}}),t("rect",{attrs:{x:"315.05306",y:"260.41156",width:"44.95039",height:"39.10088",fill:"#fff"}}),t("rect",{attrs:{x:"115.29041",y:"318.63912",width:"44.95039",height:"39.73094",fill:"#fff"}}),t("rect",{attrs:{x:"115.29041",y:"249.8692",width:"44.95039",height:"39.10088",fill:"#fff"}}),t("rect",{attrs:{y:"448.61997",width:"963.95079",height:"2",fill:"#3f3d56"}}),t("ellipse",{attrs:{cx:"151.87223",cy:"352.47204",rx:"29.09932",ry:"59.37437",fill:"#3f3d56"}}),t("path",{attrs:{d:"M255.62882,674.25425c-11.65458-69.92526-.11734-139.59789.00056-140.29293l2.267.384c-.11734.69167-11.58834,69.99825.00056,139.53164Z",transform:"translate(-101.06939 -224.59595)",fill:"#a8a8bf"}}),t("rect",{attrs:{x:"251.0257",y:"571.20214",width:"29.84136",height:"2.29972",transform:"translate(-339.58156 -31.50095) rotate(-28.1416)",fill:"#a8a8bf"}}),t("rect",{attrs:{x:"237.02319",y:"564.48509",width:"2.29972",height:"29.84239",transform:"translate(-486.12468 291.37147) rotate(-61.84204)",fill:"#a8a8bf"}}),t("ellipse",{attrs:{cx:"81.9552",cy:"260.90342",rx:"56.91484",ry:"116.12927",fill:"#a8a8bf"}}),t("path",{attrs:{d:"M189.364,675.40405c-22.76459-136.58529-.22963-272.67316.00056-274.03181l2.267.384c-.22962,1.35528-22.69834,137.0771.00057,273.27052Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"179.27648",y:"475.12522",width:"58.36761",height:"2.29972",transform:"translate(-301.0624 -69.97216) rotate(-28.1416)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"152.98936",y:"460.88882",width:"2.29972",height:"58.36761",transform:"translate(-451.74248 170.111) rotate(-61.84258)",fill:"#3f3d56"}}),t("ellipse",{attrs:{cx:"216.75351",cy:"191.008",rx:"77.88347",ry:"158.91374",fill:"#a8a8bf"}}),t("path",{attrs:{d:"M326.9161,675.40405c-31.1399-186.83717-.3144-372.9922.00056-374.85051l2.267.384c-.3144,1.85494-31.07366,187.64393.00056,374.08922Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"312.69421",y:"401.83114",width:"79.87126",height:"2.29972",transform:"translate(-249.45002 -10.63875) rotate(-28.1416)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"277.14586",y:"381.92603",width:"2.29972",height:"79.87126",transform:"translate(-326.03583 243.55793) rotate(-61.84329)",fill:"#3f3d56"}}),t("ellipse",{attrs:{cx:"871.02934",cy:"352.47204",rx:"29.09932",ry:"59.37437",fill:"#3f3d56"}}),t("path",{attrs:{d:"M969.41153,674.25425c11.65459-69.92526.11734-139.59789-.00056-140.29293l-2.267.384c.11733.69167,11.58833,69.99825-.00056,139.53164Z",transform:"translate(-101.06939 -224.59595)",fill:"#a8a8bf"}}),t("rect",{attrs:{x:"957.94412",y:"557.43132",width:"2.29972",height:"29.84136",transform:"translate(-99.02545 923.51928) rotate(-61.8584)",fill:"#a8a8bf"}}),t("rect",{attrs:{x:"971.94611",y:"578.25643",width:"29.84239",height:"2.29972",transform:"translate(-257.69773 309.6834) rotate(-28.15796)",fill:"#a8a8bf"}}),t("ellipse",{attrs:{cx:"940.94638",cy:"260.90342",rx:"56.91484",ry:"116.12927",fill:"#a8a8bf"}}),t("path",{attrs:{d:"M1035.67632,675.40405c22.76459-136.58529.22962-272.67316-.00056-274.03181l-2.267.384c.22962,1.35528,22.69834,137.0771-.00056,273.27052Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"1015.43021",y:"447.09128",width:"2.29972",height:"58.36761",transform:"translate(16.06635 923.44761) rotate(-61.8584)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"1041.71733",y:"488.92276",width:"58.36761",height:"2.29972",transform:"translate(-205.59609 338.75568) rotate(-28.15742)",fill:"#3f3d56"}}),t("ellipse",{attrs:{cx:"806.14806",cy:"191.008",rx:"77.88347",ry:"158.91374",fill:"#a8a8bf"}}),t("path",{attrs:{d:"M898.12426,675.40405c31.1399-186.83717.31439-372.9922-.00056-374.85051l-2.267.384c.3144,1.85494,31.07365,187.64393-.00056,374.08922Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"871.26065",y:"363.04537",width:"2.29972",height:"79.87126",transform:"translate(4.52428 757.59634) rotate(-61.8584)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"906.809",y:"420.7118",width:"79.87126",height:"2.29972",transform:"translate(-188.10195 272.08136) rotate(-28.15671)",fill:"#3f3d56"}}),t("path",{attrs:{d:"M690.67376,326.06186l9.20569-7.3628c-7.15149-.789-10.0899,3.11127-11.29248,6.19837-5.587-2.32-11.66919.72046-11.66919.72046l18.41889,6.6867A13.93792,13.93792,0,0,0,690.67376,326.06186Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("path",{attrs:{d:"M465.67376,261.06186l9.20569-7.3628c-7.15149-.789-10.0899,3.11127-11.29248,6.19837-5.587-2.32-11.66919.72046-11.66919.72046l18.41889,6.6867A13.93792,13.93792,0,0,0,465.67376,261.06186Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("path",{attrs:{d:"M832.67376,232.06186l9.20569-7.3628c-7.15149-.789-10.0899,3.11127-11.29248,6.19837-5.587-2.32-11.66919.72046-11.66919.72046l18.41889,6.6867A13.93792,13.93792,0,0,0,832.67376,232.06186Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("path",{attrs:{d:"M851.26034,661.648a13.91772,13.91772,0,0,0-6.96955,1.86975A14.98175,14.98175,0,0,0,819.26034,674.648h45.94952A13.99045,13.99045,0,0,0,851.26034,661.648Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("path",{attrs:{d:"M384.26034,661.648a13.91772,13.91772,0,0,0-6.96955,1.86975A14.98175,14.98175,0,0,0,352.26034,674.648h45.94952A13.99045,13.99045,0,0,0,384.26034,661.648Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("path",{attrs:{d:"M623.26034,661.648a13.91772,13.91772,0,0,0-6.96955,1.86975A14.98175,14.98175,0,0,0,591.26034,674.648h45.94952A13.99045,13.99045,0,0,0,623.26034,661.648Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("polygon",{attrs:{points:"471.759 404.228 339.191 404.228 339.191 408.504 359.866 408.504 359.866 449.13 364.142 449.13 364.142 408.504 444.669 408.504 444.669 449.13 448.946 449.13 448.946 408.504 471.759 408.504 471.759 404.228",fill:"#3f3d56"}}),t("rect",{attrs:{x:"339.45191",y:"391.43404",width:"132.56808",height:"4.27639",fill:"#3f3d56"}}),t("rect",{attrs:{x:"339.45191",y:"380.74306",width:"132.56808",height:"4.27639",fill:"#3f3d56"}}),t("rect",{attrs:{x:"339.45191",y:"370.05209",width:"132.56808",height:"4.27639",fill:"#3f3d56"}}),t("polygon",{attrs:{points:"678.759 404.228 546.191 404.228 546.191 408.504 566.866 408.504 566.866 449.13 571.142 449.13 571.142 408.504 651.669 408.504 651.669 449.13 655.946 449.13 655.946 408.504 678.759 408.504 678.759 404.228",fill:"#3f3d56"}}),t("rect",{attrs:{x:"546.45191",y:"391.43404",width:"132.56808",height:"4.27639",fill:"#3f3d56"}}),t("rect",{attrs:{x:"546.45191",y:"380.74306",width:"132.56808",height:"4.27639",fill:"#3f3d56"}}),t("rect",{attrs:{x:"546.45191",y:"370.05209",width:"132.56808",height:"4.27639",fill:"#3f3d56"}})])])},Z=[],R=o(P,F,Z,!1,null,null,null,null);const q=R.exports;panel.plugin("mauricerenck/komments",{components:{"k-komments-view":f,KommentDetails:w,KommentList:A,NoKomments:q},fields:{komments:f,kommentsPending:D}})})(); +(function(){"use strict";function o(s,e,t,i,l,m,d,T){var n=typeof s=="function"?s.options:s;e&&(n.render=e,n.staticRenderFns=t,n._compiled=!0),i&&(n.functional=!0),m&&(n._scopeId="data-v-"+m);var a;if(d?(a=function(r){r=r||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!r&&typeof __VUE_SSR_CONTEXT__<"u"&&(r=__VUE_SSR_CONTEXT__),l&&l.call(this,r),r&&r._registeredComponents&&r._registeredComponents.add(d)},n._ssrRegister=a):l&&(a=T?function(){l.call(this,(n.functional?this.parent:this).$root.$options.shadowRoot)}:l),a)if(n.functional){n._injectStyles=a;var N=n.render;n.render=function(U,c){return a.call(c),N(U,c)}}else{var h=n.beforeCreate;n.beforeCreate=h?[].concat(h,a):[a]}return{exports:s,options:n}}const u={data(){return{selectedKomment:{},kommentList:[]}},props:{title:String,queuedKomments:Array,kirbyVersion:String},created(){this.kommentList=this.queuedKomments,this.kommentList[0]&&this.selectKomment(this.kommentList[0].id)},computed:{kirbyMajorVersion(){return this.kirbyVersion.split(".")[0]}},methods:{kommentApi(){return panel.api?panel.api:this.$api},selectKomment(s){this.selectedKomment=this.queuedKomments.find(e=>e.id===s)},onMarkAsSpam(s){for(let e=0;es.id!==this.selectedKomment.id),this.selectedKomment=this.kommentList[0]}}};var k=function(){var e=this,t=e._self._c;return t("k-inside",[t("div",{staticClass:"k-komments-view",class:{version3:this.kirbyMajorVersion==="3"}},[t("k-header",[e._v("Komments")]),t("div",[e.kommentList.length===0?t("div",{staticClass:"so-empty"},[t("NoKomments"),t("div",[t("k-info-field",{attrs:{theme:"positive",text:"There are no comments waiting for moderation. Have a nice day!"}})],1)],1):t("div",{staticClass:"comments-grid"},[t("k-column",{staticClass:"komment-list",attrs:{width:"1/3"}},[t("KommentList",{attrs:{queuedKomments:e.kommentList,onSelectKomment:e.selectKomment,selectedKomment:this.selectedKomment}})],1),t("k-column",{staticClass:"komment-details",attrs:{width:"2/3"}},[t("KommentDetails",{attrs:{komment:this.selectedKomment,onMarkAsSpam:this.onMarkAsSpam,onMarkAsVerified:this.onMarkAsVerified,onMarkAsPublished:this.onMarkAsPublished,onDelete:this.onDelete,kommentApi:this.kommentApi}})],1)],1)])],1)])},p=[],_=o(u,k,p,!1,null,null,null,null);const f=_.exports,v={props:{komment:Object,onMarkAsSpam:Function,onMarkAsVerified:Function,onMarkAsPublished:Function,onDelete:Function,kommentApi:Function},methods:{markAsSpam(s,e,t){this.komment.spamlevel=null,this.kommentApi().post("komments/spam",{pageSlug:s,kommentId:e,isSpam:t}).then(()=>{this.onMarkAsSpam(t)})},markAsVerified(s,e,t){this.komment.verified=null,this.kommentApi().post("komments/verify",{pageSlug:s,kommentId:e,isVerified:t}).then(()=>{this.onMarkAsVerified(t)})},publish(s,e,t){this.komment.status=null,this.kommentApi().post("komments/publish",{pageSlug:s,kommentId:e,isPublished:t}).then(()=>{this.onMarkAsPublished(t)})},deleteKomment(s,e,t){this.kommentApi().post("komments/delete",{pageSlug:s,kommentId:e}).then(()=>{this.onDelete(),t.deleteDialog.close()})},nl2br(s){return s.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1
$2")}}};var g=function(){var e=this,t=e._self._c;return t("div",{staticClass:"komment-moderation"},[e.komment.id?t("div",[t("div",{staticClass:"metadata"},[t("div",{staticClass:"avatar"},[e.komment.image?t("img",{attrs:{src:e.komment.image}}):e._e()]),t("div",{staticClass:"komment-info"},[t("div",{staticClass:"author-short"},[t("strong",[e._v(e._s(e.komment.author))]),e.komment.authorUrl?t("k-link",{attrs:{to:e.komment.authorUrl,title:e.komment.authorUrl,target:"_blank"}},[t("k-icon",{attrs:{type:"url"}})],1):e._e()],1),t("div",{staticClass:"meta"},[e._v(e._s(e.komment.published))]),t("div",{staticClass:"meta"},[t("k-link",{attrs:{to:e.komment.url,title:e.komment.url}},[e._v(e._s(e.komment.title))])],1)])]),t("div",{staticClass:"actions"},[t("div",{staticClass:"left"},[e.komment.status===!0?t("k-button",{staticClass:"publish",attrs:{theme:"positive",icon:"circle-filled"},on:{click:function(i){return e.publish(e.komment.slug,e.komment.id,!1)}}},[e._v(" Published ")]):e.komment.status===!1&&e.komment.spamlevel===0?t("k-button",{staticClass:"publish",attrs:{disabled:e.komment.spamlevel>0,icon:"circle"},on:{click:function(i){return e.publish(e.komment.slug,e.komment.id,!0)}}},[e._v(" Publish ")]):t("k-button",{attrs:{icon:"protected",disabled:!0}},[e._v(" Publish ")]),e.komment.verified===!0?t("k-button",{attrs:{theme:"positive",icon:"check"},on:{click:function(i){return e.markAsVerified(e.komment.slug,e.komment.id,!1)}}},[e._v(" Verified user ")]):e.komment.verified===!1&&e.komment.spamlevel===0?t("k-button",{attrs:{icon:"check",disabled:e.komment.spamlevel>0},on:{click:function(i){return e.markAsVerified(e.komment.slug,e.komment.id,!0)}}},[e._v(" Verify user ")]):t("k-button",{attrs:{icon:"protected",disabled:!0}},[e._v(" Verify user ")]),e.komment.spamlevel===0?t("k-button",{attrs:{icon:"bolt"},on:{click:function(i){return e.markAsSpam(e.komment.slug,e.komment.id,!0)}}},[e._v(" Flag as spam ")]):e.komment.spamlevel>0?t("k-button",{attrs:{theme:"negative",icon:"bolt"},on:{click:function(i){return e.markAsSpam(e.komment.slug,e.komment.id,!1)}}},[e._v(" Remove from spam ")]):t("k-button",{attrs:{icon:"clock",disabled:!0}},[e._v(" Marked as spam ")])],1),t("div",{staticClass:"right"},[t("k-button",{attrs:{theme:"negative",icon:"trash"},on:{click:function(i){return e.$refs.deleteDialog.open()}}},[e._v(" Delete ")]),t("k-dialog",{ref:"deleteDialog",attrs:{button:"Delete",theme:"negative",icon:"trash"},on:{submit:function(i){return e.deleteKomment(e.komment.slug,e.komment.id,e.$refs)}}},[t("k-text",[e._v(" Do you really want to delete the comment? This cannot be undone. ")])],1)],1)]),t("div",{staticClass:"text",domProps:{innerHTML:e._s(e.komment.komment)}})]):e._e()])},y=[],b=o(v,g,y,!1,null,null,null,null);const w=b.exports,x={props:{queuedKomments:Array,onSelectKomment:Function,selectedKomment:Object}};var C=function(){var e=this,t=e._self._c;return t("div",{staticClass:"komments-list"},[t("ul",e._l(e.queuedKomments,function(i,l){return t("li",{key:l,staticClass:"list-item",class:{active:e.selectedKomment.id===i.id,isSpam:i.spamlevel>0,isVerified:i.verified===!0},on:{click:function(m){return e.onSelectKomment(i.id)},keypress:function(m){return e.onSelectKomment(i.id)}}},[i.image?t("img",{attrs:{src:i.image}}):e._e(),t("div",{staticClass:"komment-preview"},[t("div",{staticClass:"author"},[t("strong",[e._v(e._s(i.author))])]),t("div",{staticClass:"meta"},[e._v(e._s(i.published)+" - "+e._s(i.title))]),t("div",{staticClass:"status"},[i.status===!1?t("span",{staticClass:"badge",attrs:{alt:"pending",title:"pending"}},[e._v(" pending ")]):i.status===!0?t("span",{staticClass:"badge blue",attrs:{alt:"published",title:"published"}},[e._v(" published ")]):e._e(),i.verified===!0?t("span",{staticClass:"badge green",attrs:{alt:"Verified user",title:"Verified user"}},[e._v(" verified ")]):e._e(),i.spamlevel>0?t("span",{staticClass:"badge red",attrs:{alt:"Possible spam comment",title:"Possible spam comment"}},[e._v(" spam ")]):e._e()])])])}),0)])},A=[],K=o(x,C,A,!1,null,null,null,null);const $=K.exports,M={props:{queuedComments:Number,label:String}};var L=function(){var e=this,t=e._self._c;return t("div",{staticClass:"kommentsPendingCounter"},[t("k-headline",[e._v(e._s(e.label))]),t("div",{staticClass:"count"},[e._v(e._s(e.queuedComments))])],1)},S=[],V=o(M,L,S,!1,null,null,null,null);const D=V.exports,P={props:{}};var F=function(){var e=this,t=e._self._c;return t("div",[t("svg",{attrs:{"data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",width:"997.86122",height:"450.8081",viewBox:"0 0 997.86122 450.8081","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("rect",{attrs:{x:"871.99152",y:"181.55804",width:"30.15944",height:"104.39806",fill:"#f2f2f2"}}),t("polygon",{attrs:{points:"922.068 266.317 848.715 179.052 701.475 180.398 612.156 267.396 613.961 268.556 613.316 268.556 613.316 449.513 921.871 449.513 921.871 268.556 922.068 266.317",fill:"#f2f2f2"}}),t("polygon",{attrs:{points:"848.792 179.238 757.154 286.674 757.154 449.513 921.871 449.513 921.871 266.236 848.792 179.238",fill:"#e6e6e6"}}),t("rect",{attrs:{x:"823.27242",y:"359.46083",width:"33.6394",height:"29.73333",fill:"#3f3d56"}}),t("rect",{attrs:{x:"823.27242",y:"307.99568",width:"33.6394",height:"29.26181",fill:"#3f3d56"}}),t("rect",{attrs:{x:"823.27242",y:"359.46083",width:"33.6394",height:"29.73333",fill:"#fff"}}),t("rect",{attrs:{x:"823.27242",y:"307.99568",width:"33.6394",height:"29.26181",fill:"#fff"}}),t("rect",{attrs:{x:"673.77661",y:"351.57128",width:"33.6394",height:"29.73333",fill:"#fff"}}),t("rect",{attrs:{x:"673.77661",y:"300.10613",width:"33.6394",height:"29.26181",fill:"#fff"}}),t("rect",{attrs:{x:"633.99152",y:"181.55804",width:"30.15944",height:"104.39806",fill:"#f2f2f2"}}),t("polygon",{attrs:{points:"684.068 266.317 610.715 179.052 463.475 180.398 374.156 267.396 375.961 268.556 375.316 268.556 375.316 449.513 683.871 449.513 683.871 268.556 684.068 266.317",fill:"#f2f2f2"}}),t("polygon",{attrs:{points:"610.792 179.238 519.154 286.674 519.154 449.513 683.871 449.513 683.871 266.236 610.792 179.238",fill:"#e6e6e6"}}),t("rect",{attrs:{x:"585.27242",y:"359.46083",width:"33.6394",height:"29.73333",fill:"#3f3d56"}}),t("rect",{attrs:{x:"585.27242",y:"307.99568",width:"33.6394",height:"29.26181",fill:"#3f3d56"}}),t("rect",{attrs:{x:"585.27242",y:"359.46083",width:"33.6394",height:"29.73333",fill:"#fff"}}),t("rect",{attrs:{x:"585.27242",y:"307.99568",width:"33.6394",height:"29.26181",fill:"#fff"}}),t("rect",{attrs:{x:"435.77661",y:"351.57128",width:"33.6394",height:"29.73333",fill:"#fff"}}),t("rect",{attrs:{x:"435.77661",y:"300.10613",width:"33.6394",height:"29.26181",fill:"#fff"}}),t("rect",{attrs:{x:"380.1536",y:"91.46021",width:"40.30032",height:"139.50112",fill:"#f2f2f2"}}),t("polygon",{attrs:{points:"447.068 204.718 349.051 88.112 152.302 89.91 32.951 206.161 35.362 207.711 34.501 207.711 34.501 449.513 446.804 449.513 446.804 207.711 447.068 204.718",fill:"#f2f2f2"}}),t("polygon",{attrs:{points:"349.153 88.36 226.702 231.921 226.702 449.513 446.804 449.513 446.804 204.611 349.153 88.36",fill:"#e6e6e6"}}),t("rect",{attrs:{x:"315.05306",y:"329.18147",width:"44.95039",height:"39.73094",fill:"#3f3d56"}}),t("rect",{attrs:{x:"315.05306",y:"260.41156",width:"44.95039",height:"39.10088",fill:"#3f3d56"}}),t("rect",{attrs:{x:"315.05306",y:"329.18147",width:"44.95039",height:"39.73094",fill:"#fff"}}),t("rect",{attrs:{x:"315.05306",y:"260.41156",width:"44.95039",height:"39.10088",fill:"#fff"}}),t("rect",{attrs:{x:"115.29041",y:"318.63912",width:"44.95039",height:"39.73094",fill:"#fff"}}),t("rect",{attrs:{x:"115.29041",y:"249.8692",width:"44.95039",height:"39.10088",fill:"#fff"}}),t("rect",{attrs:{y:"448.61997",width:"963.95079",height:"2",fill:"#3f3d56"}}),t("ellipse",{attrs:{cx:"151.87223",cy:"352.47204",rx:"29.09932",ry:"59.37437",fill:"#3f3d56"}}),t("path",{attrs:{d:"M255.62882,674.25425c-11.65458-69.92526-.11734-139.59789.00056-140.29293l2.267.384c-.11734.69167-11.58834,69.99825.00056,139.53164Z",transform:"translate(-101.06939 -224.59595)",fill:"#a8a8bf"}}),t("rect",{attrs:{x:"251.0257",y:"571.20214",width:"29.84136",height:"2.29972",transform:"translate(-339.58156 -31.50095) rotate(-28.1416)",fill:"#a8a8bf"}}),t("rect",{attrs:{x:"237.02319",y:"564.48509",width:"2.29972",height:"29.84239",transform:"translate(-486.12468 291.37147) rotate(-61.84204)",fill:"#a8a8bf"}}),t("ellipse",{attrs:{cx:"81.9552",cy:"260.90342",rx:"56.91484",ry:"116.12927",fill:"#a8a8bf"}}),t("path",{attrs:{d:"M189.364,675.40405c-22.76459-136.58529-.22963-272.67316.00056-274.03181l2.267.384c-.22962,1.35528-22.69834,137.0771.00057,273.27052Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"179.27648",y:"475.12522",width:"58.36761",height:"2.29972",transform:"translate(-301.0624 -69.97216) rotate(-28.1416)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"152.98936",y:"460.88882",width:"2.29972",height:"58.36761",transform:"translate(-451.74248 170.111) rotate(-61.84258)",fill:"#3f3d56"}}),t("ellipse",{attrs:{cx:"216.75351",cy:"191.008",rx:"77.88347",ry:"158.91374",fill:"#a8a8bf"}}),t("path",{attrs:{d:"M326.9161,675.40405c-31.1399-186.83717-.3144-372.9922.00056-374.85051l2.267.384c-.3144,1.85494-31.07366,187.64393.00056,374.08922Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"312.69421",y:"401.83114",width:"79.87126",height:"2.29972",transform:"translate(-249.45002 -10.63875) rotate(-28.1416)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"277.14586",y:"381.92603",width:"2.29972",height:"79.87126",transform:"translate(-326.03583 243.55793) rotate(-61.84329)",fill:"#3f3d56"}}),t("ellipse",{attrs:{cx:"871.02934",cy:"352.47204",rx:"29.09932",ry:"59.37437",fill:"#3f3d56"}}),t("path",{attrs:{d:"M969.41153,674.25425c11.65459-69.92526.11734-139.59789-.00056-140.29293l-2.267.384c.11733.69167,11.58833,69.99825-.00056,139.53164Z",transform:"translate(-101.06939 -224.59595)",fill:"#a8a8bf"}}),t("rect",{attrs:{x:"957.94412",y:"557.43132",width:"2.29972",height:"29.84136",transform:"translate(-99.02545 923.51928) rotate(-61.8584)",fill:"#a8a8bf"}}),t("rect",{attrs:{x:"971.94611",y:"578.25643",width:"29.84239",height:"2.29972",transform:"translate(-257.69773 309.6834) rotate(-28.15796)",fill:"#a8a8bf"}}),t("ellipse",{attrs:{cx:"940.94638",cy:"260.90342",rx:"56.91484",ry:"116.12927",fill:"#a8a8bf"}}),t("path",{attrs:{d:"M1035.67632,675.40405c22.76459-136.58529.22962-272.67316-.00056-274.03181l-2.267.384c.22962,1.35528,22.69834,137.0771-.00056,273.27052Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"1015.43021",y:"447.09128",width:"2.29972",height:"58.36761",transform:"translate(16.06635 923.44761) rotate(-61.8584)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"1041.71733",y:"488.92276",width:"58.36761",height:"2.29972",transform:"translate(-205.59609 338.75568) rotate(-28.15742)",fill:"#3f3d56"}}),t("ellipse",{attrs:{cx:"806.14806",cy:"191.008",rx:"77.88347",ry:"158.91374",fill:"#a8a8bf"}}),t("path",{attrs:{d:"M898.12426,675.40405c31.1399-186.83717.31439-372.9922-.00056-374.85051l-2.267.384c.3144,1.85494,31.07365,187.64393-.00056,374.08922Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"871.26065",y:"363.04537",width:"2.29972",height:"79.87126",transform:"translate(4.52428 757.59634) rotate(-61.8584)",fill:"#3f3d56"}}),t("rect",{attrs:{x:"906.809",y:"420.7118",width:"79.87126",height:"2.29972",transform:"translate(-188.10195 272.08136) rotate(-28.15671)",fill:"#3f3d56"}}),t("path",{attrs:{d:"M690.67376,326.06186l9.20569-7.3628c-7.15149-.789-10.0899,3.11127-11.29248,6.19837-5.587-2.32-11.66919.72046-11.66919.72046l18.41889,6.6867A13.93792,13.93792,0,0,0,690.67376,326.06186Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("path",{attrs:{d:"M465.67376,261.06186l9.20569-7.3628c-7.15149-.789-10.0899,3.11127-11.29248,6.19837-5.587-2.32-11.66919.72046-11.66919.72046l18.41889,6.6867A13.93792,13.93792,0,0,0,465.67376,261.06186Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("path",{attrs:{d:"M832.67376,232.06186l9.20569-7.3628c-7.15149-.789-10.0899,3.11127-11.29248,6.19837-5.587-2.32-11.66919.72046-11.66919.72046l18.41889,6.6867A13.93792,13.93792,0,0,0,832.67376,232.06186Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("path",{attrs:{d:"M851.26034,661.648a13.91772,13.91772,0,0,0-6.96955,1.86975A14.98175,14.98175,0,0,0,819.26034,674.648h45.94952A13.99045,13.99045,0,0,0,851.26034,661.648Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("path",{attrs:{d:"M384.26034,661.648a13.91772,13.91772,0,0,0-6.96955,1.86975A14.98175,14.98175,0,0,0,352.26034,674.648h45.94952A13.99045,13.99045,0,0,0,384.26034,661.648Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("path",{attrs:{d:"M623.26034,661.648a13.91772,13.91772,0,0,0-6.96955,1.86975A14.98175,14.98175,0,0,0,591.26034,674.648h45.94952A13.99045,13.99045,0,0,0,623.26034,661.648Z",transform:"translate(-101.06939 -224.59595)",fill:"#3f3d56"}}),t("polygon",{attrs:{points:"471.759 404.228 339.191 404.228 339.191 408.504 359.866 408.504 359.866 449.13 364.142 449.13 364.142 408.504 444.669 408.504 444.669 449.13 448.946 449.13 448.946 408.504 471.759 408.504 471.759 404.228",fill:"#3f3d56"}}),t("rect",{attrs:{x:"339.45191",y:"391.43404",width:"132.56808",height:"4.27639",fill:"#3f3d56"}}),t("rect",{attrs:{x:"339.45191",y:"380.74306",width:"132.56808",height:"4.27639",fill:"#3f3d56"}}),t("rect",{attrs:{x:"339.45191",y:"370.05209",width:"132.56808",height:"4.27639",fill:"#3f3d56"}}),t("polygon",{attrs:{points:"678.759 404.228 546.191 404.228 546.191 408.504 566.866 408.504 566.866 449.13 571.142 449.13 571.142 408.504 651.669 408.504 651.669 449.13 655.946 449.13 655.946 408.504 678.759 408.504 678.759 404.228",fill:"#3f3d56"}}),t("rect",{attrs:{x:"546.45191",y:"391.43404",width:"132.56808",height:"4.27639",fill:"#3f3d56"}}),t("rect",{attrs:{x:"546.45191",y:"380.74306",width:"132.56808",height:"4.27639",fill:"#3f3d56"}}),t("rect",{attrs:{x:"546.45191",y:"370.05209",width:"132.56808",height:"4.27639",fill:"#3f3d56"}})])])},Z=[],R=o(P,F,Z,!1,null,null,null,null);const q=R.exports;panel.plugin("mauricerenck/komments",{components:{"k-komments-view":f,KommentDetails:w,KommentList:$,NoKomments:q},fields:{komments:f,kommentsPending:D}})})(); diff --git a/index.php b/index.php index 76ebeab..59c658d 100644 --- a/index.php +++ b/index.php @@ -63,7 +63,6 @@ $newEntry = $kommentReceiver->createKomment($webmention, $spamlevel, $isVerified, $autoPublish); $kommentReceiver->storeData($newEntry, $targetPage); - $kommentModeration->addCookieToModerationList($newEntry['id']); kirby()->trigger('komments.comment.received', []); diff --git a/package-lock.json b/package-lock.json index 71787b0..662e517 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "komments", "version": "1.2.0", "dependencies": { "semver": "^7.3.4", @@ -6276,6 +6277,11 @@ "safer-buffer": "^2.0.2", "tweetnacl": "~0.14.0" }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, "engines": { "node": ">=0.10.0" } diff --git a/site/languages/de.php b/site/languages/de.php new file mode 100644 index 0000000..a763285 --- /dev/null +++ b/site/languages/de.php @@ -0,0 +1,66 @@ + 'de', + 'default' => false, + 'direction' => 'ltr', + 'locale' => [ + 'LC_ALL' => 'de_DE' + ], + 'name' => 'de', + 'translations' => [ + + 'general.more' => 'mehr', + + 'navbar.search' => 'suchen', + 'navbar.noTranslation' => 'Diese Seite wurde leider nicht übersetzt, bitte schau dir das Original an, oder automatische Übersetzung.', + + 'pagination.next' => 'vor', + 'pagination.prev' => 'zurück', + + 'footer.headline.about' => 'Über mich', + 'footer.headline.legal' => 'Rechtliches', + + 'about.stats.headline' => 'Zahlen und Daten', + 'about.book.headline' => 'Zuletzt gelesen', + + 'page.search.search' => 'suchen', + 'page.search.results' => 'Ich habe {results} Beiträge zum Stichwort {query} gefunden.', + + 'article.link.to' => 'Anzeigen', + 'article.read.full.text' => 'Ganzen Text lesen', + 'article.vcard.published' => 'Veröffentlicht von {author} am {date}', + 'article.vcard.more' => 'Mehr über {person}', + 'article.ai.powered' => 'KI unterstützt', + 'article.ai.powered.info' => 'Dieser Artikel wurde mit Hilfe von KI auf Rechtschreibung und Grammatik überprüft.', + + 'widget.top-pages' => 'Beliebte Beiträge im {month}', + 'widget.notes.recent' => 'Aktuelle Notizen', + 'widget.blog.recent' => 'Aktuelle Blogbeiträge', + 'widget.blogroll' => 'Blogroll', + 'widget.follow' => 'Folgen', + + 'book.written.by' => 'von', + + 'now.lastfm.recently' => 'Zuletzt gehört', + 'now.lastfm.by' => 'von', + + 'posts.recent' => 'Aktuelle Beiträge', + 'posts.related' => 'Ähnliche Beiträge', + + 'notes.headline' => 'Notizen', + + 'embed.youtube' => 'Klicken, um das YouTube-Video zu sehen', + 'subnavigation.title' => 'Mehr dazu', + + 'hub.series.headline' => 'In dieser Reihe:', + 'hub.login.headline' => 'Anmelden', + 'hub.login.info' => 'Die Seite ist im vollen Umfang nur angemeldeten Benutzern zugänglich. Du kannst dich mit folgen Methoden anmelden:', + + 'mauricerenck.komments.headline.reposts' => 'Geteilt von diesen fantastischen Menschen:', + 'mauricerenck.komments.headline.likes' => 'Den Like-Button geklickt haben:', + 'mauricerenck.komments.headline.mentions' => 'Erwähnt bei:', + 'mauricerenck.komments.externalReply' => 'Antworten via:', + ], + 'url' => null +]; diff --git a/site/languages/en.php b/site/languages/en.php new file mode 100644 index 0000000..8c5d4e0 --- /dev/null +++ b/site/languages/en.php @@ -0,0 +1,62 @@ + 'en', + 'default' => true, + 'direction' => 'ltr', + 'locale' => [ + 'LC_ALL' => 'en_US' + ], + 'name' => 'en', + 'translations' => [ + + 'general.more' => 'more', + + 'navbar.search' => 'search', + 'navbar.noTranslation' => 'Sorry, this page has no translation, you will see the German version, or you can try this automatic translation.', + + 'pagination.next' => 'next', + 'pagination.prev' => 'prev', + + 'footer.headline.about' => 'About me', + 'footer.headline.legal' => 'Legal', + + 'about.stats.headline' => 'Numbers and facts', + 'about.book.headline' => 'Last read', + + 'page.search.search' => 'search', + 'page.search.results' => 'I found {results} posts about your query {query}.', + + 'article.link.to' => 'Show', + 'article.read.full.text' => 'Read full post', + 'article.vcard.published' => 'Published by {author} on {date}.', + 'article.vcard.more' => 'More about {person}', + 'article.ai.powered' => 'AI powered', + 'article.ai.powered.info' => 'This article was translated with the help of AI.', + + 'widget.top-pages' => 'Most read in {month}', + 'widget.notes.recent' => 'Latest notes', + 'widget.blog.recent' => 'Latest blog posts', + 'widget.blogroll' => 'Blogroll', + 'widget.follow' => 'Follow', + + 'book.written.by' => 'by', + + 'now.lastfm.recently' => 'Recently played', + 'now.lastfm.by' => 'by', + + 'posts.recent' => 'Recent posts', + 'posts.related' => 'Related posts', + + 'notes.headline' => 'Notes', + + 'embed.youtube' => 'Click here to view YouTube video', + 'subnavigation.title' => 'More', + + 'mauricerenck.komments.headline.reposts' => 'Shared by these fabulouse humans:', + 'mauricerenck.komments.headline.likes' => 'Those people hit the like button:', + 'mauricerenck.komments.headline.mentions' => 'Mentioned by:', + 'mauricerenck.komments.externalReply' => 'Answer via:', + ], + 'url' => null +]; diff --git a/site/languages/fr.php b/site/languages/fr.php new file mode 100644 index 0000000..bece0ac --- /dev/null +++ b/site/languages/fr.php @@ -0,0 +1,12 @@ + 'fr', + 'default' => false, + 'direction' => 'ltr', + 'locale' => [ + 'LC_ALL' => 'FR' + ], + 'name' => 'fr', + 'url' => null +]; diff --git a/site/templates/default.php b/site/templates/default.php index 40b4329..cda2523 100644 --- a/site/templates/default.php +++ b/site/templates/default.php @@ -8,7 +8,6 @@

FIELDS

diff --git a/snippets/mention-type-like.php b/snippets/mention-type-like.php index 3c0318e..f1c98d1 100644 --- a/snippets/mention-type-like.php +++ b/snippets/mention-type-like.php @@ -1,4 +1,4 @@ -
+
diff --git a/snippets/mention-type-reply.php b/snippets/mention-type-reply.php index 6e6fec6..ab44de7 100644 --- a/snippets/mention-type-reply.php +++ b/snippets/mention-type-reply.php @@ -1,27 +1,26 @@ -
  • +
  • - -   + verified()->isTrue()) : ?> + authorUrl()->isNotEmpty()): ?> + author(); ?>  + + author(); ?> +
    - quote()->isNotEmpty()) : ?> -
    -

    quote()->html(); ?>

    -
    - - komment()->isNotEmpty()) : ?> + komment()->komment()->isNotEmpty()) : ?>
    - published()->toDate('d.m.Y H:i'); ?> - komment()->kirbytext(); ?> + published()->published()->toDate('d.m.Y H:i'); ?> + komment()->komment()->kirbytext(); ?>
    - +
  • \ No newline at end of file diff --git a/snippets/webmentions-splitted.php b/snippets/webmentions-splitted.php index d1dc739..16dc4ce 100644 --- a/snippets/webmentions-splitted.php +++ b/snippets/webmentions-splitted.php @@ -1,66 +1,66 @@ parseKomments($page->kommentsInbox()); - $kommentList = ['LIKES' => [], 'REPOSTS' => [], 'REPLIES' => [], 'MENTIONS' => []]; - $kommentsInModeration = 0; +$kommentsFrontend = new KommentsFrontend(); +$commentList = $kommentsFrontend->getCommentList($page); - function addReply($komment) - { - snippet('komments/type/reply', ['komment' => $komment]); +function addReply($comment, $comments) +{ + snippet('komments/type/reply', ['komment' => $comment]); - if (count($komment['replies']) > 0) { - echo '
      '; - foreach ($komment['replies'] as $reply) { - addReply($reply); - } - echo '
    '; - } - } + $replies = $comments->filterBy('mentionOf', '==', $comment->id()); - if (count($komments['replies']) > 0) { - foreach ($komments['replies'] as $komment) { - if ($page->hasQueuedKomments($komment['komment']->id(), $komment['komment']->status())) { - $kommentsInModeration++; - } + if ($replies->count() > 0) { + echo '
      '; + foreach ($replies as $reply) { + addReply($reply, $comments); } + echo '
    '; } +} ?>
    +
    + count() > 0) : ?> +
    +
    + + $comment]); + endforeach; ?> +
    + - 0): ?>
    - -
    - 0) : ?> -
    -
    - $komment]); endforeach; ?> -
    - - - 0) : ?> -
    -
    - $komment]); endforeach; ?> -
    - - - 0) : ?> -
    -
    - $komment]); endforeach; ?> -
    - + count() > 0) : ?> +
    +
    + $comment]); + endforeach; ?> +
    + - 0) : ?> -
    -
      - -
    - -
    + count() > 0) : ?> +
    +
    + $comment]); + endforeach; ?> +
    + -
    + count() > 0) : ?> +
    +
      + filterBy('mentionOf', '*=', 'http') as $comment) : addReply($comment, $commentList['comments']); + endforeach; ?> +
    + + count() > 0) : ?> +
    +
      + $comment]); + endforeach; ?> +
    + +
    +
    \ No newline at end of file diff --git a/src/components/KommentDetails.vue b/src/components/KommentDetails.vue index b3ea8f2..06264cc 100644 --- a/src/components/KommentDetails.vue +++ b/src/components/KommentDetails.vue @@ -108,12 +108,13 @@ export default { onMarkAsVerified: Function, onMarkAsPublished: Function, onDelete: Function, + kommentApi: Function, }, methods: { markAsSpam(pageSlug, kommentId, isSpam) { this.komment.spamlevel = null - panel.api + this.kommentApi() .post('komments/spam', { pageSlug: pageSlug, kommentId: kommentId, @@ -125,7 +126,8 @@ export default { }, markAsVerified(pageSlug, kommentId, isVerified) { this.komment.verified = null - panel.api + + this.kommentApi() .post('komments/verify', { pageSlug: pageSlug, kommentId: kommentId, @@ -138,7 +140,7 @@ export default { publish(pageSlug, kommentId, isPublished) { this.komment.status = null - panel.api + this.kommentApi() .post('komments/publish', { pageSlug: pageSlug, kommentId: kommentId, @@ -149,7 +151,7 @@ export default { }) }, deleteKomment(pageSlug, kommentId, ref) { - panel.api + this.kommentApi() .post('komments/delete', { pageSlug: pageSlug, kommentId: kommentId, diff --git a/src/components/views/Komments.vue b/src/components/views/Komments.vue index bc744ff..6a0e7e6 100644 --- a/src/components/views/Komments.vue +++ b/src/components/views/Komments.vue @@ -1,6 +1,11 @@