-
Notifications
You must be signed in to change notification settings - Fork 6
Feat: campaigns #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
TatevikGr
wants to merge
6
commits into
dev
Choose a base branch
from
feat/campaigns
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feat: campaigns #81
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
85c3bb1
Upgrade yarn
tatevikg1 1675d4e
Campaigns
tatevikg1 8c8eba0
RegisterEndpointsPass
tatevikg1 b79f92e
Update client + fetch lists
tatevikg1 d4292ca
resend/requeue/suspend/copy
tatevikg1 e5306f3
Edit campaign view
tatevikg1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| <template> | ||
| <div class="editor-field" :style="{ '--editor-min-height': `300px` }"> | ||
| <label | ||
| v-if="label" | ||
| :for="fieldId" | ||
| class="mb-1 block text-sm font-medium text-slate-700" | ||
| > | ||
| {{ label }} | ||
| </label> | ||
|
|
||
| <ckeditor | ||
| :id="fieldId" | ||
| v-model="localValue" | ||
| :editor="ClassicEditor" | ||
| :config="editorConfig" | ||
| /> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup> | ||
| import { computed } from 'vue' | ||
| import { Ckeditor } from '@ckeditor/ckeditor5-vue' | ||
|
|
||
| import { | ||
| ClassicEditor, | ||
| Essentials, | ||
| Paragraph, | ||
| Bold, | ||
| Italic, | ||
| Heading, | ||
| Link, | ||
| List, | ||
| BlockQuote, | ||
| Table, | ||
| TableToolbar, | ||
| HorizontalLine | ||
| } from 'ckeditor5' | ||
|
|
||
| import 'ckeditor5/ckeditor5.css' | ||
|
|
||
| defineOptions({ | ||
| components: { | ||
| ckeditor: Ckeditor | ||
| } | ||
| }) | ||
|
|
||
| const props = defineProps({ | ||
| modelValue: { | ||
| type: String, | ||
| default: '' | ||
| }, | ||
| label: { | ||
| type: String, | ||
| default: '' | ||
| }, | ||
| id: { | ||
| type: String, | ||
| default: '' | ||
| } | ||
| }) | ||
|
|
||
| const emit = defineEmits(['update:modelValue']) | ||
|
|
||
| const localValue = computed({ | ||
| get: () => props.modelValue, | ||
| set: (value) => emit('update:modelValue', value) | ||
| }) | ||
|
|
||
| const fieldId = props.id || `ckeditor-${crypto.randomUUID()}` | ||
|
|
||
| const editorConfig = { | ||
| licenseKey: 'GPL', | ||
| plugins: [ | ||
| Essentials, | ||
| Paragraph, | ||
| Bold, | ||
| Italic, | ||
| Heading, | ||
| Link, | ||
| List, | ||
| BlockQuote, | ||
| Table, | ||
| TableToolbar, | ||
| HorizontalLine | ||
| ], | ||
| toolbar: [ | ||
| 'undo', | ||
| 'redo', | ||
| '|', | ||
| 'heading', | ||
| '|', | ||
| 'bold', | ||
| 'italic', | ||
| 'link', | ||
| '|', | ||
| 'bulletedList', | ||
| 'numberedList', | ||
| '|', | ||
| 'blockQuote', | ||
| 'insertTable', | ||
| '|', | ||
| 'horizontalLine' | ||
| ] | ||
| } | ||
|
|
||
| </script> | ||
|
|
||
| <style scoped> | ||
| :deep(.ck-editor__editable_inline) { | ||
| min-height: var(--editor-min-height) !important; | ||
| overflow-y: auto; | ||
| } | ||
| </style> | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
For Vue 3.5.x, isuseId()the recommended SSR-safe way to generate stable form control IDs, and what are the browser/security-context limitations ofcrypto.randomUUID()?💡 Result:
Yes, for Vue 3.5.x, useId is the recommended SSR-safe way to generate stable form control IDs. It produces unique-per-app IDs (e.g., "v-1-2-3") that remain consistent between server and client renders, preventing hydration mismatches. This is explicitly stated in the official Vue documentation and Vue 3.5 announcement. crypto.randomUUID has these browser/security-context limitations: - Requires a secure context (HTTPS or localhost); unavailable over plain HTTP (non-localhost), causing errors like "crypto.randomUUID is not a function". - Broad browser support since 2022 (Chrome 92+, Firefox 95+, Safari 15.4+, etc.), but the secure context requirement limits it in development/non-HTTPS environments. - Not SSR-safe, as it generates different random values on server vs. client.
Citations:
🏁 Script executed:
Repository: phpList/web-frontend
Length of output: 46
🏁 Script executed:
Repository: phpList/web-frontend
Length of output: 110
🏁 Script executed:
Repository: phpList/web-frontend
Length of output: 108
🏁 Script executed:
cat -n assets/vue/components/base/CkEditorField.vue | head -100Repository: phpList/web-frontend
Length of output: 2354
🏁 Script executed:
Repository: phpList/web-frontend
Length of output: 141
Use
useId()instead ofcrypto.randomUUID()for SSR-safe ID generation.Line 69 uses
crypto.randomUUID(), which fails in non-HTTPS environments and produces different values on server vs. client (hydration mismatch). Additionally,fieldIdis a constant, so it won't update ifprops.idchanges. Vue 3.5.x providesuseId()specifically for this—it generates stable, consistent IDs across renders.Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents