Compare commits

..

2 Commits

Author SHA1 Message Date
Ramon Wenger 80dca6def3 Add ordering meta info to some models
Otherwise graphene complains when using those in Connections
2024-05-23 12:20:34 +02:00
Ramon Wenger e96bea0fc3 Add django-redis 2024-05-23 12:18:35 +02:00
4 changed files with 9 additions and 11 deletions

View File

@ -38,7 +38,6 @@ describe('Instruments on Module page', () => {
value: {
description:
'<p>Ein Interview dient dazu, durch Befragung Informationen zu ermitteln. Bei journalistischen Interviews werden oft Expertinnen und Experten befragt, aber auch Personen.</p>',
slug: 'interview',
},
},
],

View File

@ -100,7 +100,7 @@
</template>
<script setup lang="ts">
import { inject, onMounted, ref, computed, onUnmounted } from 'vue';
import { defineAsyncComponent, inject, onMounted, ref, computed, onUnmounted } from 'vue';
import { useMutation } from '@vue/apollo-composable';
import AddContentButton from '@/components/AddContentButton.vue';
@ -109,7 +109,6 @@ import UserWidget from '@/components/UserWidget.vue';
import VisibilityAction from '@/components/visibility/VisibilityAction.vue';
import PopoverLink from '@/components/ui/PopoverLink.vue';
import CopyLink from '@/components/CopyLink.vue';
import ContentComponent from '@/components/content-blocks/ContentComponent.vue';
import { useRoute, useRouter } from 'vue-router';
import { hidden } from '@/helpers/visibility';
import { insertAtIndex, removeAtIndex } from '@/graphql/immutable-operations';
@ -145,6 +144,8 @@ export interface Props {
editMode?: boolean;
}
const ContentComponent = defineAsyncComponent(() => import('@/components/content-blocks/ContentComponent.vue'));
const { me, schoolClass } = getMe();
const contentBlockDiv = ref<HTMLElement | null>(null);

View File

@ -58,9 +58,9 @@ export interface Props {
saved: boolean;
placeholder: string;
action: string;
readOnly?: boolean;
spellcheck?: boolean;
spellcheckLoading?: boolean;
readOnly: boolean;
spellcheck: boolean;
spellcheckLoading: boolean;
sharedMsg: string;
}

View File

@ -48,11 +48,7 @@ const editText = ref(props.inputText);
const emit = defineEmits(['input']);
const containsEmoji = (text: string) => {
if (!text) {
return false
}
const lastCharacter = Array.from(text)[Array.from(text).length - 1];
if (lastCharacter && lastCharacter.charCodeAt(0)> 55000) //fix for the hand symbol 🖐
return true
const emojiRegex = /\p{Emoji}/u;
@ -63,9 +59,11 @@ watch(
() => props.inputText,
(newValue) => {
// TODO: Lorenz this is an ugly fix!
console.log(newValue)
if (containsEmoji(newValue)) {
console.log("emoji found", newValue)
editText.value = newValue;
emit('input', editText.value);
}
}
);