diff --git a/app/abilities/quickpost-message.js b/app/abilities/quickpost-message.js
deleted file mode 100644
index 5d6cdb029..000000000
--- a/app/abilities/quickpost-message.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { Ability } from 'ember-can';
-
-export default class QuickpostMessage extends Ability {
- get canShow() {
- return this.session.hasPermission('quickpost-message.read');
- }
-
- get canDestroy() {
- return this.session.hasPermission('quickpost-message.destroy');
- }
-}
diff --git a/app/components/quick-post-notification-button.hbs b/app/components/quick-post-notification-button.hbs
deleted file mode 100644
index 508aa76ec..000000000
--- a/app/components/quick-post-notification-button.hbs
+++ /dev/null
@@ -1,17 +0,0 @@
-{{#if notification.isSupported}}
- {{#if notification.isEnabled}}
- {{#if notification.isSoundEnabled}}
-
- {{else}}
-
- {{/if}}
- {{else}}
-
- {{/if}}
-{{/if}}
\ No newline at end of file
diff --git a/app/components/quick-post-notification-button.js b/app/components/quick-post-notification-button.js
deleted file mode 100644
index 6be36ae2b..000000000
--- a/app/components/quick-post-notification-button.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import { inject as service } from '@ember/service';
-import Component from '@ember/component';
-
-export default Component.extend({
- session: service(),
- notification: service(),
- actions: {
- sendTest() {
- this.notification.new(
- 'Test',
- 'Dit is een test bericht',
- '/images/alphalogonotext.png'
- );
- },
- activate() {
- this.notification.getPermission();
- },
- disable() {
- this.notification.turnOff();
- this.send('sendTest');
- },
- soundOn() {
- this.notification.toggleSound();
- this.send('sendTest');
- },
- },
-});
diff --git a/app/components/quick-post.hbs b/app/components/quick-post.hbs
deleted file mode 100644
index 40ffd9576..000000000
--- a/app/components/quick-post.hbs
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{this.currentCharacterCount}}
- /
- {{this.maxCharacters}}
-
-
-
-
-
-
-
-
-
-
- {{#each this.emoticons as |emoticon|}}
-
- {{emoticon}}
-
- {{/each}}
-
-
-
-
-
-
-
-
- {{#each this.sortedMessages as |message index|}}
-
-
-
-
-
-
-
-
-
-
- {{message.author.fullNameWithNickname}}
-
-
-
-
- {{#if (can 'destroy quickpost-messages')}}
-
- {{/if}}
- {{moment-format message.createdAt 'dddd D MMMM HH:mm'}}
-
-
-
- {{linkify message.message '_blank' urlLength=30}}
-
-
-
- {{/each}}
-
- {{#if this.showLoaderButton}}
-
-
-
- {{/if}}
-
-
\ No newline at end of file
diff --git a/app/components/quick-post.js b/app/components/quick-post.js
deleted file mode 100644
index eaaf3bbd6..000000000
--- a/app/components/quick-post.js
+++ /dev/null
@@ -1,183 +0,0 @@
-import { inject as service } from '@ember/service';
-import { htmlSafe } from '@ember/template';
-import Component from '@glimmer/component';
-import { tracked } from '@glimmer/tracking';
-import { action } from '@ember/object';
-import { WelcomeTextLines, SuggestedEmojis } from 'amber-ui/constants';
-import { convertToUnicode } from 'amber-ui/helpers/convert-to-unicode';
-
-export default class QuickPost extends Component {
- @service session;
- @service store;
- @service messageBus;
- @service notification;
- @service abilities;
-
- @tracked newQpMessage = '';
- @tracked page = 1;
- @tracked totalPages = 1;
- @tracked messages = [];
- maxCharacters = 400;
- emoticons = SuggestedEmojis;
-
- get sortedMessages() {
- return this.messages
- .map((message) => message) // turn the RecordArray into a js array to allow sorting
- .sort((a, b) => -('' + a.createdAt).localeCompare(b.createdAt));
- }
-
- get currentCharacterCount() {
- return this.newQpMessage.length;
- }
-
- constructor() {
- super(...arguments);
- if (this.abilities.can('show quickpost-messages')) {
- this.loadMessages(1);
- this.subscribeToQuickpostMessagesMessageBus();
- }
- }
-
- get characterCountPercentage() {
- return Math.round((this.currentCharacterCount / this.maxCharacters) * 100);
- }
-
- get progressBarClass() {
- const count = this.currentCharacterCount;
- const max = this.maxCharacters;
- if (count > max) {
- return 'danger';
- } else if (count > 0.8 * max) {
- return 'warning';
- }
- return 'primary';
- }
-
- get progressBarStyle() {
- return htmlSafe(`width: ${this.characterCountPercentage}%`);
- }
-
- get tooMuchText() {
- return this.currentCharacterCount > this.maxCharacters;
- }
-
- get welcomeText() {
- return WelcomeTextLines[
- Math.floor(Math.random() * WelcomeTextLines.length)
- ];
- }
-
- get showLoaderButton() {
- return this.page < this.totalPages;
- }
-
- @action
- loadMore() {
- return this.loadMessages(this.page + 1);
- }
-
- @action
- koeAan(message) {
- // The best easter egg
- if (message === 'KOE AAN!!') {
- const notificationSound = new Audio('/sounds/cow.ogg');
- this.notification.set('notificationSound', notificationSound);
- if (this.notification.isSoundEnabled) {
- notificationSound.play();
- }
- }
- }
-
- @action
- appendSmileyToText(emoticon) {
- const currentText = this.newQpMessage;
- this.newQpMessage = htmlSafe((currentText || '') + emoticon);
- this.element.querySelector('#qp-inputfield').focus();
- }
-
- @action
- destroyMessage(message) {
- const answer = confirm(
- 'Weet je zeker dat je dit bericht wilt verwijderen?'
- ); // eslint-disable-line no-alert
- if (answer) {
- message.destroyRecord().then(() => {
- this.messages = [];
- this.loadMessages(1);
- });
- }
- }
-
- @action
- saveMessage() {
- const message = this.newQpMessage;
- if (message && message.length > 0 && !this.tooMuchText) {
- message.trim().replace(/(\r\n|\n|\r)/gm, '');
- const unicodeMessage = convertToUnicode(message);
-
- this.store
- .createRecord('quickpost-message', { message: unicodeMessage })
- .save();
- this.koeAan(unicodeMessage);
- this.newQpMessage = '';
- }
- }
-
- @action
- async loadMessages(page) {
- const pageParams = {};
- pageParams['page[size]'] = 15;
- pageParams['page[number]'] = page;
- pageParams.sort = '-created_at';
- const result = await this.store.query('quickpost-message', pageParams);
- this.totalPages = result.get('meta.page_count');
- this.messages = this.store.peekAll('quickpost-message');
- this.page = page;
- }
-
- @action
- subscribeToQuickpostMessagesMessageBus() {
- const channel = '/quickpost_messages';
- this.messageBus.subscribe(
- channel,
- (data) => {
- const json = JSON.parse(data);
- const quickpostMessageData = {
- data: {
- type: 'quickpost-message',
- id: json.id,
- attributes: {
- message: json.message,
- createdAt: new Date(json.created_at),
- },
- relationships: {
- author: {
- data: {
- type: 'user',
- id: json.author_id,
- },
- },
- },
- },
- };
- const quickpost = this.store.push(quickpostMessageData);
- this.notify(quickpost);
- },
- null
- );
- }
-
- @action
- notify(quickpost) {
- if (
- this.notification.isEnabled &&
- quickpost.get('author.id') !== this.session.currentUser.id
- ) {
- this.notification.new(
- quickpost.get('author.fullName'),
- quickpost.get('message'),
- quickpost.get('author.avatarThumbUrlOrDefault')
- );
- }
- }
-}
diff --git a/app/models/quickpost-message.js b/app/models/quickpost-message.js
deleted file mode 100644
index a3fb39461..000000000
--- a/app/models/quickpost-message.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import Model, { belongsTo, attr } from '@ember-data/model';
-
-export default class QuickpostMessage extends Model {
- @attr message;
- @attr('date') createdAt;
-
- // Relationships
- @belongsTo('user') author;
-}
diff --git a/app/router.js b/app/router.js
index f2b523945..3e38ba3d9 100644
--- a/app/router.js
+++ b/app/router.js
@@ -203,8 +203,6 @@ Router.map(function () {
this.route('profile');
- this.route('quickpost');
-
this.route('sog', function () {
this.route('name-trainer');
});
diff --git a/app/routes/books.js b/app/routes/books.js
index 3c248ede0..ee68bcf6c 100644
--- a/app/routes/books.js
+++ b/app/routes/books.js
@@ -1,6 +1,6 @@
-import { ApplicationRoute } from 'amber-ui/routes/application/application';
+import { AuthenticatedRoute } from 'amber-ui/routes/application/application';
-export default class BooksRoute extends ApplicationRoute {
+export default class BooksRoute extends AuthenticatedRoute {
queryParams = {};
breadcrumb = { title: 'Boeken' };
diff --git a/app/routes/debit/collections.js b/app/routes/debit/collections.js
index b34645c7c..15a3631f3 100644
--- a/app/routes/debit/collections.js
+++ b/app/routes/debit/collections.js
@@ -1,6 +1,6 @@
-import { ApplicationRoute } from 'amber-ui/routes/application/application';
+import { AuthenticatedRoute } from 'amber-ui/routes/application/application';
-export default class CollectionsRoute extends ApplicationRoute {
+export default class CollectionsRoute extends AuthenticatedRoute {
queryParams = {};
breadcrumb = { title: "Incasso's" };
diff --git a/app/routes/debit/mandates.js b/app/routes/debit/mandates.js
index 11aab8217..dd69b0d44 100644
--- a/app/routes/debit/mandates.js
+++ b/app/routes/debit/mandates.js
@@ -1,6 +1,6 @@
-import { ApplicationRoute } from 'amber-ui/routes/application/application';
+import { AuthenticatedRoute } from 'amber-ui/routes/application/application';
-export default class MandatesRoute extends ApplicationRoute {
+export default class MandatesRoute extends AuthenticatedRoute {
queryParams = {};
breadcrumb = { title: 'Incasso mandaten' };
diff --git a/app/routes/debit/transactions.js b/app/routes/debit/transactions.js
index 78ca2bfdb..9b29941dc 100644
--- a/app/routes/debit/transactions.js
+++ b/app/routes/debit/transactions.js
@@ -1,6 +1,6 @@
-import { ApplicationRoute } from 'amber-ui/routes/application/application';
+import { AuthenticatedRoute } from 'amber-ui/routes/application/application';
-export default class TransactionsRoute extends ApplicationRoute {
+export default class TransactionsRoute extends AuthenticatedRoute {
queryParams = {};
breadcrumb = { title: 'Transacties' };
diff --git a/app/routes/forum.js b/app/routes/forum.js
index 5e68c11dd..567744680 100644
--- a/app/routes/forum.js
+++ b/app/routes/forum.js
@@ -1,6 +1,6 @@
-import { ApplicationRoute } from 'amber-ui/routes/application/application';
+import { AuthenticatedRoute } from 'amber-ui/routes/application/application';
-export default class ForumRoute extends ApplicationRoute {
+export default class ForumRoute extends AuthenticatedRoute {
queryParams = {};
breadcrumb = { title: 'Forum' };
diff --git a/app/routes/forum/categories/category/index.js b/app/routes/forum/categories/category/index.js
index d1bbbb0fb..744ea4a25 100644
--- a/app/routes/forum/categories/category/index.js
+++ b/app/routes/forum/categories/category/index.js
@@ -1,6 +1,7 @@
-import { ApplicationRoute } from 'amber-ui/routes/application/application';
+import { AuthenticatedRoute } from 'amber-ui/routes/application/application';
-export default class CategoryIndexRoute extends ApplicationRoute {
+
+export default class CategoryIndexRoute extends AuthenticatedRoute {
beforeModel() {
this.transitionTo('forum.categories.category.threads');
}
diff --git a/app/routes/forum/categories/category/threads/thread/index.js b/app/routes/forum/categories/category/threads/thread/index.js
index 8a9c7636b..c9bf8a5a5 100644
--- a/app/routes/forum/categories/category/threads/thread/index.js
+++ b/app/routes/forum/categories/category/threads/thread/index.js
@@ -1,6 +1,6 @@
-import { ApplicationRoute } from 'amber-ui/routes/application/application';
+import { AuthenticatedRoute } from 'amber-ui/routes/application/application';
-export default class ThreadIndexRoute extends ApplicationRoute {
+export default class ThreadIndexRoute extends AuthenticatedRoute {
beforeModel() {
this.transitionTo('forum.categories.category.threads.thread.posts');
}
diff --git a/app/routes/groups.js b/app/routes/groups.js
index c4e1147b4..12a24e2a6 100644
--- a/app/routes/groups.js
+++ b/app/routes/groups.js
@@ -1,6 +1,6 @@
-import { ApplicationRoute } from 'amber-ui/routes/application/application';
+import { AuthenticatedRoute } from 'amber-ui/routes/application/application';
-export default class GroupsRoute extends ApplicationRoute {
+export default class GroupsRoute extends AuthenticatedRoute {
queryParams = {};
breadcrumb = { title: 'Groepen' };
diff --git a/app/routes/polls.js b/app/routes/polls.js
index 2786f429d..68205df06 100644
--- a/app/routes/polls.js
+++ b/app/routes/polls.js
@@ -1,6 +1,6 @@
-import { ApplicationRoute } from 'amber-ui/routes/application/application';
+import { AuthenticatedRoute } from 'amber-ui/routes/application/application';
-export default class PollsRoute extends ApplicationRoute {
+export default class PollsRoute extends AuthenticatedRoute {
queryParams = {};
breadcrumb = { title: 'Polls' };
diff --git a/app/routes/quickpost.js b/app/routes/quickpost.js
deleted file mode 100644
index 170104311..000000000
--- a/app/routes/quickpost.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import { AuthenticatedRoute } from 'amber-ui/routes/application/application';
-
-export default class QuickpostRoute extends AuthenticatedRoute {
- breadcrumb = { title: 'Quickpost' };
-
- canAccess() {
- return this.abilities.can('show quickpost-messages');
- }
-}
diff --git a/app/routes/sog/index.js b/app/routes/sog/index.js
index e404adb55..5dfdca975 100644
--- a/app/routes/sog/index.js
+++ b/app/routes/sog/index.js
@@ -1,6 +1,6 @@
-import { ApplicationRoute } from 'amber-ui/routes/application/application';
+import { AuthenticatedRoute } from 'amber-ui/routes/application/application';
-export default class SogIndexRoute extends ApplicationRoute {
+export default class SogIndexRoute extends AuthenticatedRoute {
breadcrumb = { title: 'SOG' };
canAccess() {
diff --git a/app/styles/app.scss b/app/styles/app.scss
index d1288923e..ada214e29 100644
--- a/app/styles/app.scss
+++ b/app/styles/app.scss
@@ -30,7 +30,6 @@
@import 'components/public/index/photo-albums';
@import 'components/public/index/sponsor-banner';
@import 'components/public/index/youtube-videos';
-@import 'components/quickpost';
@import 'components/sidebar';
@import 'components/social-media-buttons';
@import 'components/tools/board-room-presence';
diff --git a/app/styles/components/quickpost.scss b/app/styles/components/quickpost.scss
deleted file mode 100644
index 109749853..000000000
--- a/app/styles/components/quickpost.scss
+++ /dev/null
@@ -1,93 +0,0 @@
-.quickpost {
- .progress {
- max-height: 4px;
-
- .progress-bar {
- transition: background-color 0.3s ease-in-out, width 0.3s ease-in-out;
- }
- }
-}
-
-.qp-scroll-container {
- flex: 1;
- height: 100%;
- overflow-x: hidden; //when word breaks fail then still don't do horizontal scroll.
- overflow-y: scroll;
-}
-
-.btn-read-more {
- margin: 0.6rem 0;
-}
-
-.full-page-qp {
- display: flex;
- right: 0;
- flex-flow: column;
- padding-right: 20px;
- padding-left: 20px;
- height: 100%;
-}
-
-.qp-inputfield {
- margin: 0;
- outline: none;
- border: 0;
- padding: 0;
- overflow: hidden;
- word-break: break-word;
- word-wrap: break-word;
- hyphens: auto;
- overflow-wrap: break-word;
- resize: none;
-}
-
-.emoticon-toggle {
- flex: 1;
- margin: 0;
- outline: none;
- padding: 0;
- width: 32px;
- color: $brand-primary-dark;
- font-size: $font-size-lg;
-}
-
-.text-emoticon-row {
- display: flex;
- padding-right: 0;
-}
-
-.emoticon-holder {
- padding: 10px;
- width: 15rem;
-
- .emoticon {
- text-align: center;
- }
-}
-
-.qp-message {
- &:hover .qp-destroy-icon {
- display: inline;
- }
-}
-
-.qp-destroy-icon {
- display: none;
-}
-
-.emoticon {
- cursor: pointer;
- padding: 2px 0;
- width: 20%;
- min-width: 20%;
- font-size: $font-size-lg;
-}
-
-.qp-characters-indicator {
- transition: opacity 0.3s ease-in-out;
- opacity: 1;
-
- &.hidden {
- opacity: 0;
- }
-}
diff --git a/app/templates/quickpost.hbs b/app/templates/quickpost.hbs
deleted file mode 100644
index 243cc0039..000000000
--- a/app/templates/quickpost.hbs
+++ /dev/null
@@ -1 +0,0 @@
-