Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Rename custom wrapper components to be inline with old Buefy <b-*> tags.

Kailash Nadh225a9d7cc660
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 582f4e67..45f5b0cc 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -23,7 +23,7 @@
<div class="col-8 justify-end hstack">
<button type="button" class="ghost small" @click="emitPageRefresh" data-cy="btn-refresh"
:aria-label="$t('globals.buttons.refresh')" :title="$t('globals.buttons.refresh')">
- <oat-icon icon="refresh" />
+ <b-icon icon="refresh" />
</button>
<ot-dropdown v-if="profile.username">
@@ -36,10 +36,10 @@
</button>
<menu popover id="user-menu">
<router-link to="/user/profile" role="menuitem">
- <oat-icon icon="account-outline" /> {{ $t('users.profile') }}
+ <b-icon icon="account-outline" /> {{ $t('users.profile') }}
</router-link>
<button type="button" role="menuitem" class="ghost" @click="doLogout">
- <oat-icon icon="logout-variant" /> {{ $t('users.logout') }}
+ <b-icon icon="logout-variant" /> {{ $t('users.logout') }}
</button>
</menu>
</ot-dropdown>
@@ -83,7 +83,7 @@
</template>
<div v-if="serverConfig.has_legacy_user" role="alert">
- <oat-icon icon="warning-empty" />
+ <b-icon icon="warning-empty" />
Remove the <code>admin_username</code> and <code>admin_password</code> fields from the TOML
configuration file or environment variables. If you are using APIs, create and use new API credentials
before removing them. Visit
@@ -99,7 +99,7 @@
</main>
</template>
- <oat-loading v-if="!$root.isLoaded" active />
+ <b-loading v-if="!$root.isLoaded" active />
</div>
</template>
diff --git a/frontend/src/assets/style.css b/frontend/src/assets/style.css
index 1da2b598..b2292be1 100644
--- a/frontend/src/assets/style.css
+++ b/frontend/src/assets/style.css
@@ -127,7 +127,7 @@ dialog {
&.disabled,
&.draft,
&.optin,
- .oat-tag-input & {
+ .b-taginput & {
background: #eee;
color: #7a7a7a;
}
@@ -397,27 +397,27 @@ ol.no {
padding: 1px var(--space-2);
}
-.oat-data-table {
+.b-table {
font-size: var(--text-7);
}
-.oat-data-table .table {
+.b-table .table {
min-width: 100%;
}
-.oat-data-table thead th {
+.b-table thead th {
background: var(--faint);
border-bottom: 1px solid var(--border);
}
-.oat-data-table thead th,
-.oat-data-table tbody td {
+.b-table thead th,
+.b-table tbody td {
border-color: var(--border);
padding: var(--space-4) var(--space-3);
vertical-align: top;
}
-.oat-data-table th button.ghost {
+.b-table th button.ghost {
color: inherit;
font-size: inherit;
font-weight: inherit;
@@ -425,7 +425,7 @@ ol.no {
padding: 0;
}
-.oat-data-table .actions {
+.b-table .actions {
white-space: nowrap;
a,
@@ -505,7 +505,7 @@ ol.no {
}
td .badge,
-.oat-data-table .badge {
+.b-table .badge {
margin-block: 1px;
}
diff --git a/frontend/src/components/OatAutocomplete.vue b/frontend/src/components/Autocomplete.vue
similarity index 93%
rename from frontend/src/components/OatAutocomplete.vue
rename to frontend/src/components/Autocomplete.vue
index df0c006d..d2a84e78 100644
--- a/frontend/src/components/OatAutocomplete.vue
+++ b/frontend/src/components/Autocomplete.vue
@@ -1,5 +1,5 @@
<template>
- <div class="oat-autocomplete">
+ <div class="b-autocomplete">
<input v-bind="$attrs" :value="value" type="text" :placeholder="placeholder" :disabled="disabled"
:aria-label="placeholder || 'Search'" @input="onInput" @focus="isOpen = true">
<button v-if="clearable && value" type="button" class="ghost small" @click="clear">x</button>
@@ -17,7 +17,7 @@
<script>
export default {
- name: 'OatAutocomplete',
+ name: 'BAutocomplete',
inheritAttrs: false,
props: {
value: {
@@ -70,11 +70,11 @@ export default {
</script>
<style>
-.oat-autocomplete {
+.b-autocomplete {
position: relative;
}
-.oat-autocomplete menu {
+.b-autocomplete menu {
background: var(--background);
border: 1px solid var(--border);
border-radius: var(--radius);
@@ -90,7 +90,7 @@ export default {
z-index: 20;
}
-.oat-autocomplete menu button {
+.b-autocomplete menu button {
justify-content: start;
width: 100%;
}
diff --git a/frontend/src/components/OatBadge.vue b/frontend/src/components/Badge.vue
similarity index 86%
rename from frontend/src/components/OatBadge.vue
rename to frontend/src/components/Badge.vue
index 151ad442..89eebe9c 100644
--- a/frontend/src/components/OatBadge.vue
+++ b/frontend/src/components/Badge.vue
@@ -1,6 +1,7 @@
<template>
<span :class="badgeClass" :data-variant="variant || null">
<slot />
+ <button v-if="closable" type="button" class="ghost small" @click="$emit('close')">x</button>
</span>
</template>
@@ -32,7 +33,7 @@ const variantMap = {
};
export default {
- name: 'OatBadge',
+ name: 'BTag',
props: {
type: {
type: String,
@@ -42,6 +43,10 @@ export default {
type: String,
default: '',
},
+ closable: {
+ type: Boolean,
+ default: false,
+ },
},
computed: {
badgeClass() {
diff --git a/frontend/src/components/CampaignPreview.vue b/frontend/src/components/CampaignPreview.vue
index c77e13fe..08b41dbc 100644
--- a/frontend/src/components/CampaignPreview.vue
+++ b/frontend/src/components/CampaignPreview.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <oat-modal @close="close" :active="isVisible">
+ <b-modal @close="close" :active="isVisible">
<div>
<div class="dialog-card" style="width: auto">
<header class="dialog-head">
@@ -25,7 +25,7 @@
</button>
</footer>
</div>
- </oat-modal>
+ </b-modal>
</div>
</template>
diff --git a/frontend/src/components/OatCheckbox.vue b/frontend/src/components/Checkbox.vue
similarity index 84%
rename from frontend/src/components/OatCheckbox.vue
rename to frontend/src/components/Checkbox.vue
index 5b23c2a4..ac7580e9 100644
--- a/frontend/src/components/OatCheckbox.vue
+++ b/frontend/src/components/Checkbox.vue
@@ -1,13 +1,14 @@
<template>
<label>
- <input type="checkbox" :checked="checked" :disabled="disabled" @change="onChange">
+ <input v-bind="$attrs" type="checkbox" :checked="checked" :disabled="disabled" @change="onChange">
<slot />
</label>
</template>
<script>
export default {
- name: 'OatCheckcard',
+ name: 'BCheckbox',
+ inheritAttrs: false,
props: {
value: {
type: [Array, Boolean],
diff --git a/frontend/src/components/CopyText.vue b/frontend/src/components/CopyText.vue
index 408026ae..7b0ec8de 100644
--- a/frontend/src/components/CopyText.vue
+++ b/frontend/src/components/CopyText.vue
@@ -1,7 +1,7 @@
<template>
<a href="#" class="copy-text" ref="text" @click.prevent="onClick">
<template v-if="!hideText">{{ $props.text }}</template>
- <oat-icon icon="file-multiple-outline" />
+ <b-icon icon="file-multiple-outline" />
</a>
</template>
diff --git a/frontend/src/components/OatDataTable.vue b/frontend/src/components/DataTable.vue
similarity index 96%
rename from frontend/src/components/OatDataTable.vue
rename to frontend/src/components/DataTable.vue
index 27357b83..437194e6 100644
--- a/frontend/src/components/OatDataTable.vue
+++ b/frontend/src/components/DataTable.vue
@@ -1,9 +1,9 @@
<script>
export default {
- name: 'OatDataTable',
+ name: 'BTable',
provide() {
return {
- oatTable: this,
+ bTable: this,
};
},
props: {
@@ -211,7 +211,7 @@ export default {
]) : null;
return h('div', {
- class: 'oat-data-table',
+ class: 'b-table',
attrs: {
'aria-busy': this.loading ? 'true' : null,
'data-spinner': 'large overlay',
@@ -223,7 +223,7 @@ export default {
h('thead', [h('tr', headerCells)]),
h('tbody', bodyRows),
])]),
- this.paginated ? h('oat-pagination', {
+ this.paginated ? h('b-pagination', {
props: { total: this.totalRows, current: this.page, perPage: this.perPage },
on: { change: this.setPage },
}) : null,
@@ -233,7 +233,7 @@ export default {
</script>
<style>
-.oat-data-table {
+.b-table {
overflow-x: auto;
position: relative;
}
@@ -255,15 +255,15 @@ export default {
flex: 0 0 auto;
}
-.oat-data-table table {
+.b-table table {
width: 100%;
}
-.oat-data-table .actions {
+.b-table .actions {
white-space: nowrap;
}
-.oat-data-table tr.details td {
+.b-table tr.details td {
background: var(--muted);
}
</style>
diff --git a/frontend/src/components/OatDateInput.vue b/frontend/src/components/DateInput.vue
similarity index 68%
rename from frontend/src/components/OatDateInput.vue
rename to frontend/src/components/DateInput.vue
index ef2ec01a..346ed371 100644
--- a/frontend/src/components/OatDateInput.vue
+++ b/frontend/src/components/DateInput.vue
@@ -1,6 +1,7 @@
<template>
- <input :type="datetime ? 'datetime-local' : 'date'" :name="name" :required="required" :aria-label="name || 'date'"
- :value="formatted" @input="onInput">
+ <input v-bind="$attrs" :type="datetime ? 'datetime-local' : 'date'" :name="name" :required="required"
+ :disabled="disabled" :aria-label="placeholder || name || 'date'" :placeholder="placeholder" :value="formatted"
+ @input="onInput">
</template>
<script>
@@ -9,7 +10,8 @@ function pad(v) {
}
export default {
- name: 'OatDateInput',
+ name: 'BDatepicker',
+ inheritAttrs: false,
props: {
value: {
type: [Date, String],
@@ -27,6 +29,14 @@ export default {
type: Boolean,
default: false,
},
+ disabled: {
+ type: Boolean,
+ default: false,
+ },
+ placeholder: {
+ type: String,
+ default: '',
+ },
},
computed: {
formatted() {
diff --git a/frontend/src/components/Editor.vue b/frontend/src/components/Editor.vue
index 116c25b5..c2dd110a 100644
--- a/frontend/src/components/Editor.vue
+++ b/frontend/src/components/Editor.vue
@@ -3,15 +3,15 @@
<section class="editor">
<div class="row">
<div class="col-9 flex">
- <oat-field :label="$t('campaigns.format')" class="mr-4 mb-0">
+ <b-field :label="$t('campaigns.format')" class="mr-4 mb-0">
<select aria-label="field" v-model="contentTypeSel" :disabled="disabled" name="content_type">
<option v-for="(name, f) in contentTypes" :key="f" name="format" :value="f" :data-cy="`check-${f}`">
{{ name }}
</option>
</select>
- </oat-field>
+ </b-field>
- <oat-field v-if="self.contentType !== 'visual'" :label="$tc('globals.terms.template')">
+ <b-field v-if="self.contentType !== 'visual'" :label="$tc('globals.terms.template')">
<select aria-label="field" :placeholder="$t('globals.terms.none')" v-model="templateId" name="template"
:disabled="disabled">
<template v-for="t in validTemplates">
@@ -20,14 +20,14 @@
</option>
</template>
</select>
- </oat-field>
+ </b-field>
<div v-else>
<button type="button" v-if="!isVisualTplSelector" @click="onShowVisualTplSelector" class="ghost"
data-cy="btn-select-visual-tpl">
{{ $t('campaigns.importVisualTemplate') }}
</button>
- <oat-field v-else :label="$tc('globals.terms.template')">
+ <b-field v-else :label="$tc('globals.terms.template')">
<select aria-label="field" :placeholder="$t('globals.terms.none')" v-model="visualTemplateId"
@input="() => isVisualTplDisabled = false" name="template" :disabled="disabled"
class="copy-visual-template-list">
@@ -43,7 +43,7 @@
@click="onImportVisualTpl" data-variant="primary" data-cy="btn-save-visual-tpl">
{{ $t('globals.terms.import') }}
</button>
- </oat-field>
+ </b-field>
</div>
</div>
<div class="col-12 align-right">
diff --git a/frontend/src/components/EmptyPlaceholder.vue b/frontend/src/components/EmptyPlaceholder.vue
index c4e22676..823dad2c 100644
--- a/frontend/src/components/EmptyPlaceholder.vue
+++ b/frontend/src/components/EmptyPlaceholder.vue
@@ -2,7 +2,7 @@
<section class="app-section">
<div class="content text-light align-center">
<p>
- <oat-icon :icon="!icon ? 'plus' : icon" />
+ <b-icon :icon="!icon ? 'plus' : icon" />
</p>
<p>{{ !label ? $t('globals.messages.emptyState') : label }}</p>
</div>
diff --git a/frontend/src/components/OatField.vue b/frontend/src/components/Field.vue
similarity index 88%
rename from frontend/src/components/OatField.vue
rename to frontend/src/components/Field.vue
index 6f9e8ddb..3a6af7a9 100644
--- a/frontend/src/components/OatField.vue
+++ b/frontend/src/components/Field.vue
@@ -8,11 +8,11 @@
<script>
export default {
- name: 'OatField',
+ name: 'BField',
data() {
return {
generatedID: '',
- fieldID: `oat-field-${Date.now()}-${Math.floor(Math.random() * 1000).toString().padStart(3, '0')}`,
+ fieldID: `b-field-${Date.now()}-${Math.floor(Math.random() * 1000).toString().padStart(3, '0')}`,
};
},
props: {
diff --git a/frontend/src/components/OatIcon.vue b/frontend/src/components/Icon.vue
similarity index 91%
rename from frontend/src/components/OatIcon.vue
rename to frontend/src/components/Icon.vue
index 0f2f3d61..7327c83b 100644
--- a/frontend/src/components/OatIcon.vue
+++ b/frontend/src/components/Icon.vue
@@ -4,7 +4,7 @@
<script>
export default {
- name: 'OatIcon',
+ name: 'BIcon',
props: {
icon: {
type: String,
diff --git a/frontend/src/components/ListSelector.vue b/frontend/src/components/ListSelector.vue
index 668a1d32..f82f2c47 100644
--- a/frontend/src/components/ListSelector.vue
+++ b/frontend/src/components/ListSelector.vue
@@ -13,11 +13,11 @@
</span>
</div>
- <oat-field :message="message" :label="label + (selectedItems ? ` (${selectedItems.length})` : '')">
- <oat-autocomplete v-model="query" :placeholder="placeholder" clearable dropdown-position="top"
+ <b-field :message="message" :label="label + (selectedItems ? ` (${selectedItems.length})` : '')">
+ <b-autocomplete v-model="query" :placeholder="placeholder" clearable dropdown-position="top"
:disabled="all.length === 0 || $props.disabled" :keep-first="true" :clear-on-select="true" :open-on-focus="true"
:data="filteredLists" @select="selectList" field="name" />
- </oat-field>
+ </b-field>
</div>
</template>
diff --git a/frontend/src/components/OatLoading.vue b/frontend/src/components/Loading.vue
similarity index 76%
rename from frontend/src/components/OatLoading.vue
rename to frontend/src/components/Loading.vue
index ab4e99e1..a31dcb10 100644
--- a/frontend/src/components/OatLoading.vue
+++ b/frontend/src/components/Loading.vue
@@ -1,10 +1,10 @@
<template>
- <div v-if="active" class="oat-loading" :class="{ overlay }" aria-busy="true" data-spinner="large" />
+ <div v-if="active" class="b-loading" :class="{ overlay }" aria-busy="true" data-spinner="large" />
</template>
<script>
export default {
- name: 'OatLoading',
+ name: 'BLoading',
props: {
active: {
type: Boolean,
@@ -24,7 +24,7 @@ export default {
</script>
<style>
-.oat-loading.overlay {
+.b-loading.overlay {
align-items: center;
background: color-mix(in srgb, var(--background) 70%, transparent);
display: flex;
diff --git a/frontend/src/components/OatModal.vue b/frontend/src/components/Modal.vue
similarity index 73%
rename from frontend/src/components/OatModal.vue
rename to frontend/src/components/Modal.vue
index 40c8c72d..5d0b9747 100644
--- a/frontend/src/components/OatModal.vue
+++ b/frontend/src/components/Modal.vue
@@ -1,12 +1,12 @@
<template>
- <dialog ref="dialog" class="oat-modal" :style="contentStyle" @close="onNativeClose" @cancel="onCancel">
+ <dialog ref="dialog" class="b-modal" :style="contentStyle" @close="onNativeClose" @cancel="onCancel">
<slot />
</dialog>
</template>
<script>
export default {
- name: 'OatModal',
+ name: 'BModal',
props: {
active: {
type: Boolean,
@@ -16,6 +16,10 @@ export default {
type: [Number, String],
default: '',
},
+ canCancel: {
+ type: [Boolean, Array],
+ default: true,
+ },
},
computed: {
contentStyle() {
@@ -45,6 +49,9 @@ export default {
},
methods: {
close() {
+ if (this.canCancel === false) {
+ return;
+ }
this.$emit('update:active', false);
this.$emit('close');
},
@@ -62,34 +69,34 @@ export default {
</script>
<style>
-.oat-modal {
+.b-modal {
max-width: min(96vw, 1200px);
width: min(100% - 2rem, 32rem);
}
-.oat-modal>form>.dialog-card,
-.oat-modal>.dialog-card {
+.b-modal>form>.dialog-card,
+.b-modal>.dialog-card {
display: contents;
}
-.oat-modal>form>.dialog-card>header,
-.oat-modal>.dialog-card>header {
+.b-modal>form>.dialog-card>header,
+.b-modal>.dialog-card>header {
background: var(--muted);
padding: var(--space-6);
padding-block-end: var(--space-2);
margin-block-end: var(--space-4);
}
-.oat-modal>form>.dialog-card> :is(div, section),
-.oat-modal>.dialog-card> :is(div, section) {
+.b-modal>form>.dialog-card> :is(div, section),
+.b-modal>.dialog-card> :is(div, section) {
max-height: 70vh;
overflow-y: auto;
padding: var(--space-6);
padding-block-start: 0;
}
-.oat-modal>form>.dialog-card>footer,
-.oat-modal>.dialog-card>footer {
+.b-modal>form>.dialog-card>footer,
+.b-modal>.dialog-card>footer {
display: flex;
gap: var(--space-2);
justify-content: flex-end;
diff --git a/frontend/src/components/Navigation.vue b/frontend/src/components/Navigation.vue
index ce176e07..59a74965 100644
--- a/frontend/src/components/Navigation.vue
+++ b/frontend/src/components/Navigation.vue
@@ -3,7 +3,7 @@
<ul>
<li>
<router-link :to="{ name: 'dashboard' }" :aria-current="activeItem.dashboard ? 'page' : null">
- <oat-icon icon="view-dashboard-variant-outline" />
+ <b-icon icon="view-dashboard-variant-outline" />
{{ $t('menu.dashboard') }}
</router-link>
</li>
@@ -11,7 +11,7 @@
<li>
<details :open="activeGroup.lists" data-cy="lists" @toggle="onToggle($event, 'lists')">
<summary>
- <oat-icon icon="format-list-bulleted-square" />
+ <b-icon icon="format-list-bulleted-square" />
{{ $t('globals.terms.lists') }}
</summary>
<ul>
@@ -32,7 +32,7 @@
<li v-if="$can('subscribers:*')">
<details :open="activeGroup.subscribers" data-cy="subscribers" @toggle="onToggle($event, 'subscribers')">
<summary>
- <oat-icon icon="account-multiple" />
+ <b-icon icon="account-multiple" />
{{ $t('globals.terms.subscribers') }}
</summary>
<ul>
@@ -60,7 +60,7 @@
<li v-if="$can('campaigns:*')">
<details :open="activeGroup.campaigns" data-cy="campaigns" @toggle="onToggle($event, 'campaigns')">
<summary>
- <oat-icon icon="rocket-launch-outline" />
+ <b-icon icon="rocket-launch-outline" />
{{ $t('globals.terms.campaigns') }}
</summary>
<ul>
@@ -100,7 +100,7 @@
<li v-if="$can('users:*', 'roles:*')">
<details :open="activeGroup.users" data-cy="users" @toggle="onToggle($event, 'users')">
<summary>
- <oat-icon icon="account-multiple" />
+ <b-icon icon="account-multiple" />
{{ $t('globals.terms.users') }}
</summary>
<ul>
@@ -128,7 +128,7 @@
<li v-if="$can('settings:*')">
<details :open="activeGroup.settings" data-cy="settings" @toggle="onToggle($event, 'settings')">
<summary>
- <oat-icon icon="cog-outline" />
+ <b-icon icon="cog-outline" />
{{ $t('menu.settings') }}
</summary>
<ul>
diff --git a/frontend/src/components/OatTagInput.vue b/frontend/src/components/OatTagInput.vue
deleted file mode 100644
index 81bf12ca..00000000
--- a/frontend/src/components/OatTagInput.vue
+++ /dev/null
@@ -1,73 +0,0 @@
-<template>
- <div data-field>
- <div class="oat-tag-input">
- <span v-for="(tag, i) in value" :key="`${tag}-${i}`" class="badge">
- {{ tag }}
- <button type="button" class="ghost small" :disabled="disabled" @click="remove(i)">x</button>
- </span>
- <input v-bind="$attrs" v-model="draft" type="text" :name="name" :aria-label="placeholder || name || 'Tags'"
- :placeholder="placeholder" :disabled="disabled" @keydown.enter.prevent="add" @keydown.tab="add"
- @keydown.backspace="onBackspace" @keyup="onKeyup">
- </div>
- </div>
-</template>
-
-<script>
-export default {
- name: 'OatTagInput',
- inheritAttrs: false,
- props: {
- value: {
- type: Array,
- default: () => [],
- },
- name: {
- type: String,
- default: '',
- },
- placeholder: {
- type: String,
- default: '',
- },
- beforeAdding: {
- type: Function,
- default: null,
- },
- disabled: {
- type: Boolean,
- default: false,
- },
- },
- data() {
- return {
- draft: '',
- };
- },
- methods: {
- add() {
- const val = this.draft.replace(/,$/, '').trim();
- if (!val) {
- return;
- }
- if (this.beforeAdding && !this.beforeAdding(val)) {
- return;
- }
- this.$emit('input', [...this.value, val]);
- this.draft = '';
- },
- remove(i) {
- this.$emit('input', this.value.filter((_, n) => n !== i));
- },
- onBackspace() {
- if (!this.draft && this.value.length > 0) {
- this.remove(this.value.length - 1);
- }
- },
- onKeyup(e) {
- if (e.key === ',') {
- this.add();
- }
- },
- },
-};
-</script>
diff --git a/frontend/src/components/OatPagination.vue b/frontend/src/components/Pagination.vue
similarity index 86%
rename from frontend/src/components/OatPagination.vue
rename to frontend/src/components/Pagination.vue
index e32410d1..b968d479 100644
--- a/frontend/src/components/OatPagination.vue
+++ b/frontend/src/components/Pagination.vue
@@ -1,21 +1,21 @@
<template>
- <nav v-if="numPages > 1" class="oat-pagination" :aria-label="$t ? $t('globals.terms.page') : 'Pagination'">
+ <nav v-if="numPages > 1" class="b-pagination" :aria-label="$t ? $t('globals.terms.page') : 'Pagination'">
<button type="button" :disabled="page <= 1" @click="setPage(page - 1)">
- <oat-icon icon="chevron-left" />
+ <b-icon icon="chevron-left" />
</button>
<button v-for="p in pages" :key="p" type="button" :class="{ outline: p !== page }"
:aria-current="p === page ? 'page' : null" @click="setPage(p)">
{{ p }}
</button>
<button type="button" :disabled="page >= numPages" @click="setPage(page + 1)">
- <oat-icon icon="chevron-right" />
+ <b-icon icon="chevron-right" />
</button>
</nav>
</template>
<script>
export default {
- name: 'OatPagination',
+ name: 'BPagination',
props: {
total: {
type: Number,
@@ -61,7 +61,7 @@ export default {
</script>
<style>
-.oat-pagination {
+.b-pagination {
display: flex;
flex-wrap: wrap;
gap: var(--space-2);
diff --git a/frontend/src/components/OatRadio.vue b/frontend/src/components/Radio.vue
similarity index 65%
rename from frontend/src/components/OatRadio.vue
rename to frontend/src/components/Radio.vue
index 6bee2a15..42c9fb45 100644
--- a/frontend/src/components/OatRadio.vue
+++ b/frontend/src/components/Radio.vue
@@ -1,14 +1,15 @@
<template>
<label>
- <input type="radio" :name="name" :value="nativeValue" :checked="value === nativeValue" :disabled="disabled"
- @change="$emit('input', nativeValue)">
+ <input v-bind="$attrs" type="radio" :name="name" :value="nativeValue" :checked="value === nativeValue"
+ :disabled="disabled" @change="$emit('input', nativeValue)">
<slot />
</label>
</template>
<script>
export default {
- name: 'OatRadio',
+ name: 'BRadio',
+ inheritAttrs: false,
props: {
value: {
type: [String, Number, Boolean],
diff --git a/frontend/src/components/RichtextEditor.vue b/frontend/src/components/RichtextEditor.vue
index 3f669f91..7452b05f 100644
--- a/frontend/src/components/RichtextEditor.vue
+++ b/frontend/src/components/RichtextEditor.vue
@@ -2,7 +2,7 @@
<div class="richtext-editor" v-if="isRichtextReady">
<tiny-mce v-model="computedValue" :disabled="disabled" :init="richtextConf" />
- <oat-modal :width="1200" :active.sync="isRichtextSourceVisible">
+ <b-modal :width="1200" :active.sync="isRichtextSourceVisible">
<div>
<section class="dialog-body preview">
<code-editor lang="html" v-model="richTextSourceBody" key="richtext-source" />
@@ -19,9 +19,9 @@
</button>
</footer>
</div>
- </oat-modal>
+ </b-modal>
- <oat-modal :width="750" :active.sync="isInsertHTMLVisible">
+ <b-modal :width="750" :active.sync="isInsertHTMLVisible">
<div>
<section class="dialog-body preview">
<code-editor lang="html" v-model="insertHTMLSnippet" key="richtext-snippet" />
@@ -38,16 +38,16 @@
</button>
</footer>
</div>
- </oat-modal>
+ </b-modal>
<!-- image picker -->
- <oat-modal :active.sync="isMediaVisible" :width="900">
+ <b-modal :active.sync="isMediaVisible" :width="900">
<div class="dialog-card content" style="width: auto">
<section class="dialog-body">
<media is-modal @selected="onMediaSelect" />
</section>
</div>
- </oat-modal>
+ </b-modal>
</div>
</template>
diff --git a/frontend/src/components/SubscriberActivity.vue b/frontend/src/components/SubscriberActivity.vue
index 96cb909b..76597494 100644
--- a/frontend/src/components/SubscriberActivity.vue
+++ b/frontend/src/components/SubscriberActivity.vue
@@ -31,9 +31,9 @@
</div>
<div v-if="activity.campaignViews && activity.campaignViews.length > 0">
- <oat-data-table :data="activity.campaignViews" default-sort="lastViewedAt" default-sort-direction="desc"
+ <b-table :data="activity.campaignViews" default-sort="lastViewedAt" default-sort-direction="desc"
paginated :per-page="10" :pagination-simple="false" class="campaign-views-table">
- <oat-table-column v-slot="props" field="subject" :label="$tc('globals.terms.campaign', 1)" sortable>
+ <b-table-column v-slot="props" field="subject" :label="$tc('globals.terms.campaign', 1)" sortable>
<div v-if="props.row.uuid">
<router-link :to="{ name: 'campaign', params: { id: props.row.id } }">
{{ props.row.name }}
@@ -43,18 +43,18 @@
<div v-else>
<em class="text-light">{{ $t('subscribers.activity.campaignDeleted') }}</em>
</div>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="viewCount" :label="$t('campaigns.views')" sortable numeric>
+ <b-table-column v-slot="props" field="viewCount" :label="$t('campaigns.views')" sortable numeric>
<span class="badge ">{{ props.row.viewCount }}</span>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="lastViewedAt" :label="$t('globals.fields.createdAt')" sortable>
+ <b-table-column v-slot="props" field="lastViewedAt" :label="$t('globals.fields.createdAt')" sortable>
<span v-if="props.row.lastViewedAt">
{{ $utils.niceDate(props.row.lastViewedAt, true) }}
</span>
- </oat-table-column>
- </oat-data-table>
+ </b-table-column>
+ </b-table>
</div>
<div v-else class="align-center text-light p-6">
<p class="mt-2">{{ $t('globals.messages.emptyState') }}</p>
@@ -68,16 +68,16 @@
</div>
<div v-if="activity.linkClicks && activity.linkClicks.length > 0">
- <oat-data-table :data="activity.linkClicks" default-sort="lastClickedAt" default-sort-direction="desc" paginated
+ <b-table :data="activity.linkClicks" default-sort="lastClickedAt" default-sort-direction="desc" paginated
:per-page="10" :pagination-simple="false" class="link-clicks-table">
- <oat-table-column v-slot="props" field="url" :label="$t('globals.terms.url')" cell-class="link-click-url"
+ <b-table-column v-slot="props" field="url" :label="$t('globals.terms.url')" cell-class="link-click-url"
sortable>
<a :href="props.row.url" target="_blank" rel="noopener noreferrer">
{{ props.row.url }}
</a>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="campaignName" :label="$tc('globals.terms.campaign', 1)" sortable>
+ <b-table-column v-slot="props" field="campaignName" :label="$tc('globals.terms.campaign', 1)" sortable>
<div v-if="props.row.campaignUuid">
<router-link :to="{ name: 'campaign', params: { id: props.row.campaignId } }">
{{ props.row.campaignSubject || props.row.campaignName }}
@@ -86,18 +86,18 @@
<div v-else>
&mdash;
</div>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="clickCount" :label="$t('campaigns.clicks')" sortable numeric>
+ <b-table-column v-slot="props" field="clickCount" :label="$t('campaigns.clicks')" sortable numeric>
<span class="badge ">{{ props.row.clickCount }}</span>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="lastClickedAt" :label="$t('globals.fields.createdAt')" sortable>
+ <b-table-column v-slot="props" field="lastClickedAt" :label="$t('globals.fields.createdAt')" sortable>
<span v-if="props.row.lastClickedAt">
{{ $utils.niceDate(props.row.lastClickedAt, true) }}
</span>
- </oat-table-column>
- </oat-data-table>
+ </b-table-column>
+ </b-table>
</div>
<div v-else class="align-center text-light p-6">
<p class="mt-2">{{ $t('globals.messages.emptyState') }}</p>
diff --git a/frontend/src/components/OatSwitch.vue b/frontend/src/components/Switch.vue
similarity index 97%
rename from frontend/src/components/OatSwitch.vue
rename to frontend/src/components/Switch.vue
index 405b94ab..c5241426 100644
--- a/frontend/src/components/OatSwitch.vue
+++ b/frontend/src/components/Switch.vue
@@ -8,7 +8,7 @@
<script>
export default {
- name: 'OatSwitch',
+ name: 'BSwitch',
inheritAttrs: false,
props: {
value: {
diff --git a/frontend/src/components/OatTableColumn.vue b/frontend/src/components/TableColumn.vue
similarity index 85%
rename from frontend/src/components/OatTableColumn.vue
rename to frontend/src/components/TableColumn.vue
index 9fbfb68c..8d3a1cce 100644
--- a/frontend/src/components/OatTableColumn.vue
+++ b/frontend/src/components/TableColumn.vue
@@ -1,7 +1,7 @@
<script>
export default {
- name: 'OatTableColumn',
- inject: ['oatTable'],
+ name: 'BTableColumn',
+ inject: ['bTable'],
props: {
field: {
type: String,
@@ -45,10 +45,10 @@ export default {
},
},
created() {
- this.oatTable.registerColumn(this);
+ this.bTable.registerColumn(this);
},
beforeDestroy() {
- this.oatTable.unregisterColumn(this);
+ this.bTable.unregisterColumn(this);
},
render() {
return null;
diff --git a/frontend/src/components/TagInput.vue b/frontend/src/components/TagInput.vue
new file mode 100644
index 00000000..34c22fd9
--- /dev/null
+++ b/frontend/src/components/TagInput.vue
@@ -0,0 +1,152 @@
+<template>
+ <div data-field>
+ <div class="b-taginput">
+ <span v-for="(tag, i) in value" :key="`${tagLabel(tag)}-${i}`" class="badge">
+ {{ tagLabel(tag) }}
+ <button type="button" class="ghost small" :disabled="disabled" @click="remove(i)">x</button>
+ </span>
+ <input ref="input" v-bind="$attrs" v-model="draft" type="text" :name="name"
+ :aria-label="placeholder || name || 'Tags'" :placeholder="placeholder" :disabled="disabled"
+ @focus="onFocus" @input="$emit('typing', draft)" @keydown.enter.prevent="add"
+ @keydown.tab="add" @keydown.backspace="onBackspace" @keyup="onKeyup">
+ <menu v-if="autocomplete && isOpen && data.length > 0">
+ <li v-for="(item, i) in data" :key="`${tagLabel(item)}-${i}`">
+ <button type="button" class="ghost" @click="addItem(item)">
+ {{ tagLabel(item) }}
+ </button>
+ </li>
+ </menu>
+ </div>
+ </div>
+</template>
+
+<script>
+export default {
+ name: 'BTaginput',
+ inheritAttrs: false,
+ props: {
+ value: {
+ type: Array,
+ default: () => [],
+ },
+ name: {
+ type: String,
+ default: '',
+ },
+ placeholder: {
+ type: String,
+ default: '',
+ },
+ beforeAdding: {
+ type: Function,
+ default: null,
+ },
+ data: {
+ type: Array,
+ default: () => [],
+ },
+ field: {
+ type: String,
+ default: '',
+ },
+ autocomplete: {
+ type: Boolean,
+ default: false,
+ },
+ allowNew: {
+ type: Boolean,
+ default: true,
+ },
+ openOnFocus: {
+ type: Boolean,
+ default: false,
+ },
+ disabled: {
+ type: Boolean,
+ default: false,
+ },
+ },
+ data() {
+ return {
+ draft: '',
+ isOpen: false,
+ };
+ },
+ methods: {
+ tagLabel(tag) {
+ return this.field && tag && typeof tag === 'object' ? tag[this.field] : tag;
+ },
+ add() {
+ const val = this.draft.replace(/,$/, '').trim();
+ if (!val) {
+ return;
+ }
+
+ if (!this.allowNew) {
+ const item = this.data.find((d) => this.tagLabel(d) === val);
+ if (item) {
+ this.addItem(item);
+ }
+ return;
+ }
+
+ this.addItem(val);
+ },
+ addItem(item) {
+ if (this.beforeAdding && !this.beforeAdding(item)) {
+ return;
+ }
+ this.$emit('input', [...this.value, item]);
+ this.draft = '';
+ this.isOpen = false;
+ },
+ remove(i) {
+ this.$emit('input', this.value.filter((_, n) => n !== i));
+ },
+ focus() {
+ this.$refs.input.focus();
+ },
+ onFocus(e) {
+ this.isOpen = this.openOnFocus || this.autocomplete;
+ this.$emit('focus', e);
+ },
+ onBackspace() {
+ if (!this.draft && this.value.length > 0) {
+ this.remove(this.value.length - 1);
+ }
+ },
+ onKeyup(e) {
+ if (e.key === ',') {
+ this.add();
+ }
+ },
+ },
+};
+</script>
+
+<style>
+.b-taginput {
+ position: relative;
+}
+
+.b-taginput menu {
+ background: var(--background);
+ border: 1px solid var(--border);
+ border-radius: var(--radius);
+ box-shadow: var(--shadow);
+ left: 0;
+ list-style: none;
+ margin: var(--space-1) 0 0;
+ max-height: 260px;
+ overflow: auto;
+ padding: var(--space-1);
+ position: absolute;
+ right: 0;
+ z-index: 20;
+}
+
+.b-taginput menu button {
+ justify-content: start;
+ width: 100%;
+}
+</style>
diff --git a/frontend/src/components/OatUpload.vue b/frontend/src/components/Upload.vue
similarity index 88%
rename from frontend/src/components/OatUpload.vue
rename to frontend/src/components/Upload.vue
index 5d981022..83b99003 100644
--- a/frontend/src/components/OatUpload.vue
+++ b/frontend/src/components/Upload.vue
@@ -1,5 +1,5 @@
<template>
- <label class="oat-upload" @dragover.prevent @drop.prevent="onDrop">
+ <label class="b-upload" @dragover.prevent @drop.prevent="onDrop">
<input type="file" :multiple="multiple" :accept="accept || xaccept" :aria-label="label" @change="onChange">
<slot />
</label>
@@ -7,7 +7,7 @@
<script>
export default {
- name: 'OatUpload',
+ name: 'BUpload',
props: {
value: {
type: [Array, File],
@@ -46,7 +46,7 @@ export default {
</script>
<style>
-.oat-upload {
+.b-upload {
border: 1px dashed var(--border);
border-radius: var(--radius);
cursor: pointer;
@@ -54,7 +54,7 @@ export default {
padding: var(--space-4);
}
-.oat-upload input {
+.b-upload input {
display: none;
}
</style>
diff --git a/frontend/src/components/VisualEditor.vue b/frontend/src/components/VisualEditor.vue
index f3a5cf3d..800dd8a1 100644
--- a/frontend/src/components/VisualEditor.vue
+++ b/frontend/src/components/VisualEditor.vue
@@ -4,13 +4,13 @@
title="Visual email editor" />
<!-- image picker -->
- <oat-modal :active.sync="isMediaVisible" :width="900">
+ <b-modal :active.sync="isMediaVisible" :width="900">
<div class="dialog-card content" style="width: auto">
<section class="dialog-body">
<media is-modal @selected="onMediaSelect" />
</section>
</div>
- </oat-modal>
+ </b-modal>
</div>
</template>
diff --git a/frontend/src/main.js b/frontend/src/main.js
index 19e72a08..a2617239 100644
--- a/frontend/src/main.js
+++ b/frontend/src/main.js
@@ -2,21 +2,21 @@ import Vue from 'vue';
import VueI18n from 'vue-i18n';
import App from './App.vue';
-import OatAutocomplete from './components/OatAutocomplete.vue';
-import OatBadge from './components/OatBadge.vue';
-import OatCheckbox from './components/OatCheckbox.vue';
-import OatDataTable from './components/OatDataTable.vue';
-import OatDateInput from './components/OatDateInput.vue';
-import OatField from './components/OatField.vue';
-import OatIcon from './components/OatIcon.vue';
-import OatLoading from './components/OatLoading.vue';
-import OatModal from './components/OatModal.vue';
-import OatPagination from './components/OatPagination.vue';
-import OatRadio from './components/OatRadio.vue';
-import OatSwitch from './components/OatSwitch.vue';
-import OatTableColumn from './components/OatTableColumn.vue';
-import OatTagInput from './components/OatTagInput.vue';
-import OatUpload from './components/OatUpload.vue';
+import BAutocomplete from './components/Autocomplete.vue';
+import BTag from './components/Badge.vue';
+import BCheckbox from './components/Checkbox.vue';
+import BTable from './components/DataTable.vue';
+import BDatepicker from './components/DateInput.vue';
+import BField from './components/Field.vue';
+import BIcon from './components/Icon.vue';
+import BLoading from './components/Loading.vue';
+import BModal from './components/Modal.vue';
+import BPagination from './components/Pagination.vue';
+import BRadio from './components/Radio.vue';
+import BSwitch from './components/Switch.vue';
+import BTableColumn from './components/TableColumn.vue';
+import BTaginput from './components/TagInput.vue';
+import BUpload from './components/Upload.vue';
import router from './router';
import store from './store';
import * as api from './api';
@@ -26,21 +26,22 @@ import Utils from './utils';
Vue.use(VueI18n);
const i18n = new VueI18n();
-Vue.component('OatAutocomplete', OatAutocomplete);
-Vue.component('OatBadge', OatBadge);
-Vue.component('OatCheckbox', OatCheckbox);
-Vue.component('OatDataTable', OatDataTable);
-Vue.component('OatDateInput', OatDateInput);
-Vue.component('OatField', OatField);
-Vue.component('OatIcon', OatIcon);
-Vue.component('OatLoading', OatLoading);
-Vue.component('OatModal', OatModal);
-Vue.component('OatPagination', OatPagination);
-Vue.component('OatRadio', OatRadio);
-Vue.component('OatSwitch', OatSwitch);
-Vue.component('OatTableColumn', OatTableColumn);
-Vue.component('OatTagInput', OatTagInput);
-Vue.component('OatUpload', OatUpload);
+Vue.component('BAutocomplete', BAutocomplete);
+Vue.component('BTag', BTag);
+Vue.component('BCheckbox', BCheckbox);
+Vue.component('BTable', BTable);
+Vue.component('BDatepicker', BDatepicker);
+Vue.component('BDatetimepicker', BDatepicker);
+Vue.component('BField', BField);
+Vue.component('BIcon', BIcon);
+Vue.component('BLoading', BLoading);
+Vue.component('BModal', BModal);
+Vue.component('BPagination', BPagination);
+Vue.component('BRadio', BRadio);
+Vue.component('BSwitch', BSwitch);
+Vue.component('BTableColumn', BTableColumn);
+Vue.component('BTaginput', BTaginput);
+Vue.component('BUpload', BUpload);
Vue.config.ignoredElements = [/^ot-/];
Vue.config.productionTip = false;
diff --git a/frontend/src/views/Bounces.vue b/frontend/src/views/Bounces.vue
index a35cf81d..484d2511 100644
--- a/frontend/src/views/Bounces.vue
+++ b/frontend/src/views/Bounces.vue
@@ -10,7 +10,7 @@
</header>
<div class="card page-content">
- <oat-data-table :data="bounces.results" :hoverable="true" :loading="loading.bounces" default-sort="createdAt"
+ <b-table :data="bounces.results" :hoverable="true" :loading="loading.bounces" default-sort="createdAt"
checkable @check-all="onTableCheck" @check="onTableCheck" :checked-rows.sync="bulk.checked" detailed paginated
backend-pagination @page-change="onPageChange" :current-page="queryParams.page" :per-page="bounces.perPage"
:total="bounces.total" backend-sorting @sort="onSort">
@@ -18,11 +18,11 @@
<div class="actions">
<template v-if="bulk.checked.length > 0">
<a class="a" href="#" @click.prevent="$utils.confirm(null, () => deleteBounces())" data-cy="btn-delete">
- <oat-icon icon="trash-can-outline" /> {{ $t('globals.buttons.delete') }}
+ <b-icon icon="trash-can-outline" /> {{ $t('globals.buttons.delete') }}
</a>
<a class="a" href="#" @click.prevent="$utils.confirm(null, () => blocklistSubscribers())"
data-cy="btn-manage-blocklist">
- <oat-icon icon="account-off-outline" /> {{ $t('import.blocklist') }}
+ <b-icon icon="account-off-outline" /> {{ $t('import.blocklist') }}
</a>
<span>
{{ $t('globals.messages.numSelected', { num: numSelectedBounces }) }}
@@ -36,55 +36,55 @@
</template>
</div>
</template>
- <oat-table-column v-slot="props" field="email" :label="$t('subscribers.email')" :td-attrs="$utils.tdID"
+ <b-table-column v-slot="props" field="email" :label="$t('subscribers.email')" :td-attrs="$utils.tdID"
sortable>
<router-link :to="{ name: 'subscriber', params: { id: props.row.subscriberId } }"
:class="{ 'blocklisted': props.row.subscriberStatus === 'blocklisted' }">
{{ props.row.email }}
- <oat-badge v-if="props.row.subscriberStatus !== 'enabled'" :type="props.row.subscriberStatus"
+ <b-tag v-if="props.row.subscriberStatus !== 'enabled'" :type="props.row.subscriberStatus"
data-cy="blocklisted">
{{ $t(`subscribers.status.${props.row.subscriberStatus}`) }}
- </oat-badge>
+ </b-tag>
</router-link>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="campaign" :label="$tc('globals.terms.campaign')" sortable>
+ <b-table-column v-slot="props" field="campaign" :label="$tc('globals.terms.campaign')" sortable>
<router-link v-if="props.row.campaign"
:to="{ name: 'bounces', query: { campaign_id: props.row.campaign.id } }">
{{ props.row.campaign.name }}
</router-link>
<span v-else>-</span>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="source" :label="$t('bounces.source')" sortable>
+ <b-table-column v-slot="props" field="source" :label="$t('bounces.source')" sortable>
<router-link :to="{ name: 'bounces', query: { source: props.row.source } }">
{{ props.row.source }}
</router-link>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="type" :label="$t('globals.fields.type')" sortable>
+ <b-table-column v-slot="props" field="type" :label="$t('globals.fields.type')" sortable>
<router-link :to="{ name: 'bounces', query: { type: props.row.type } }">
{{ $t(`bounces.${props.row.type}`) }}
</router-link>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="created_at" :label="$t('globals.fields.createdAt')" sortable>
+ <b-table-column v-slot="props" field="created_at" :label="$t('globals.fields.createdAt')" sortable>
{{ $utils.niceDate(props.row.createdAt, true) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" cell-class="actions" align="right">
+ <b-table-column v-slot="props" cell-class="actions" align="right">
<div>
<a v-if="!props.row.isDefault" href="#" @click.prevent="$utils.confirm(null, () => deleteBounce(props.row))"
data-cy="btn-delete" :aria-label="$t('globals.buttons.delete')">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
</a>
<span v-else class="a text-lighter">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
</span>
</div>
- </oat-table-column>
+ </b-table-column>
<template #detail="props">
<pre class="text-7">{{ props.row.meta }}</pre>
@@ -93,7 +93,7 @@
<template #empty v-if="!loading.templates">
<empty-placeholder />
</template>
- </oat-data-table>
+ </b-table>
</div>
</section>
</template>
diff --git a/frontend/src/views/Campaign.vue b/frontend/src/views/Campaign.vue
index 6c404181..e9085586 100644
--- a/frontend/src/views/Campaign.vue
+++ b/frontend/src/views/Campaign.vue
@@ -3,12 +3,12 @@
<header class="row page-header">
<div class="col-8">
<p v-if="isEditing && data.status" class="hstack">
- <oat-badge v-if="isEditing" :type="data.status">
+ <b-tag v-if="isEditing" :type="data.status">
{{ $t(`campaigns.status.${data.status}`) }}
- </oat-badge>
- <oat-badge v-if="data.type === 'optin'" :type="data.type">
+ </b-tag>
+ <b-tag v-if="data.type === 'optin'" :type="data.type">
{{ $t('lists.optin') }}
- </oat-badge>
+ </b-tag>
<span v-if="isEditing" class="text-lighter text-7 " :data-campaign-id="data.id">
{{ $t('globals.fields.id') }}: <copy-text :text="`${data.id}`" />
{{ $t('globals.fields.uuid') }}: <copy-text :text="data.uuid" />
@@ -24,32 +24,32 @@
<div class="col-4 col-end align-right">
<div v-if="canManage || canSend" class="hstack justify-end">
- <oat-field v-if="isEditing && canEdit">
- <oat-field v-if="canManage">
+ <b-field v-if="isEditing && canEdit">
+ <b-field v-if="canManage">
<button type="button" @click="() => onSubmit('update')" :loading="loading.campaigns"
data-variant="primary" data-cy="btn-save" aria-keyshortcuts="ctrl+s">
<span class="has-kbd">{{ $t('globals.buttons.saveChanges') }} <span class="kbd">Ctrl+S</span></span>
</button>
- </oat-field>
- <oat-field v-if="canSend && canStart">
+ </b-field>
+ <b-field v-if="canSend && canStart">
<button type="button" @click="startCampaign" :loading="loading.campaigns" data-variant="primary"
icon-left="rocket-launch-outline" data-cy="btn-start">
{{ $t('campaigns.start') }}
</button>
- </oat-field>
- <oat-field v-if="canSend && canSchedule">
+ </b-field>
+ <b-field v-if="canSend && canSchedule">
<button type="button" @click="startCampaign" :loading="loading.campaigns" data-variant="primary"
icon-left="clock-start" data-cy="btn-schedule">
{{ $t('campaigns.schedule') }}
</button>
- </oat-field>
- <oat-field v-if="canSend && canUnSchedule">
+ </b-field>
+ <b-field v-if="canSend && canUnSchedule">
<button type="button" class="outline" @click="$utils.confirm(null, unscheduleCampaign)"
:loading="loading.campaigns" icon-left="clock-start" data-cy="btn-unschedule">
{{ $t('campaigns.unSchedule') }}
</button>
- </oat-field>
- </oat-field>
+ </b-field>
+ </b-field>
</div>
</div>
</header>
@@ -79,27 +79,27 @@
<div class="row">
<div class="col-7">
<form @submit.prevent="() => onSubmit(isNew ? 'create' : 'update')">
- <oat-field :label="$t('globals.fields.name')">
+ <b-field :label="$t('globals.fields.name')">
<input aria-label="field" :maxlength="200" :ref="'focus'" v-model="form.name" name="name"
:disabled="!canEdit" :placeholder="$t('globals.fields.name')" required>
- </oat-field>
+ </b-field>
- <oat-field :label="$t('campaigns.subject')">
+ <b-field :label="$t('campaigns.subject')">
<input aria-label="field" :maxlength="5000" v-model="form.subject" name="subject"
:disabled="!canEdit" :placeholder="$t('campaigns.subject')" required>
- </oat-field>
+ </b-field>
- <oat-field :label="$t('campaigns.fromAddress')">
+ <b-field :label="$t('campaigns.fromAddress')">
<input aria-label="field" :maxlength="200" v-model="form.fromEmail" name="from_email"
:disabled="!canEdit" :placeholder="$t('campaigns.fromAddressPlaceholder')" required>
- </oat-field>
+ </b-field>
<list-selector v-model="form.lists" :selected="form.lists" :all="lists.results" :disabled="!canEdit"
:label="$t('globals.terms.lists')" :placeholder="$t('campaigns.sendToLists')" />
<div class="row">
<div class="col-6">
- <oat-field :label="$tc('globals.terms.messenger')">
+ <b-field :label="$tc('globals.terms.messenger')">
<select aria-label="field" :placeholder="$tc('globals.terms.messenger')"
v-model="form.messenger" name="messenger" :disabled="!canEdit" required>
<template v-if="emailMessengers.length > 1">
@@ -114,10 +114,10 @@
</template>
<option v-for="m in otherMessengers" :value="m" :key="m">{{ m }}</option>
</select>
- </oat-field>
+ </b-field>
</div>
<div class="col-6">
- <oat-field :label="$t('campaigns.format')" class="mr-4 mb-0">
+ <b-field :label="$t('campaigns.format')" class="mr-4 mb-0">
<select aria-label="field" v-model="form.content.contentType" :disabled="!canEdit || isEditing"
value="richtext">
<option v-for="(name, f) in contentTypes" :key="f" name="format" :value="f"
@@ -125,52 +125,52 @@
{{ name }}
</option>
</select>
- </oat-field>
+ </b-field>
</div>
</div>
- <oat-field :label="$t('globals.terms.tags')">
- <oat-tag-input v-model="form.tags" name="tags" :disabled="!canEdit"
+ <b-field :label="$t('globals.terms.tags')">
+ <b-taginput v-model="form.tags" name="tags" :disabled="!canEdit"
:placeholder="$t('globals.terms.tags')" />
- </oat-field>
+ </b-field>
<hr />
<div class="row">
<div class="col-4">
- <oat-field :label="$t('campaigns.sendLater')" data-cy="btn-send-later">
- <oat-switch v-model="form.sendLater" :disabled="!canEdit" />
- </oat-field>
+ <b-field :label="$t('campaigns.sendLater')" data-cy="btn-send-later">
+ <b-switch v-model="form.sendLater" :disabled="!canEdit" />
+ </b-field>
</div>
<div class="col-12">
<br />
- <oat-field v-if="form.sendLater" data-cy="send_at"
+ <b-field v-if="form.sendLater" data-cy="send_at"
:message="form.sendAtDate ? $utils.duration(Date(), form.sendAtDate) : ''">
- <oat-date-input datetime v-model="form.sendAtDate" :disabled="!canEdit" required editable
+ <b-datetimepicker datetime v-model="form.sendAtDate" :disabled="!canEdit" required editable
mobile-native :placeholder="$t('campaigns.dateAndTime')" horizontal-time-picker />
- </oat-field>
+ </b-field>
</div>
</div>
<div>
<p class="align-right">
<a href="#" @click.prevent="onShowHeaders" data-cy="btn-headers">
- <oat-icon icon="plus" />{{ $t('settings.smtp.setCustomHeaders') }}
+ <b-icon icon="plus" />{{ $t('settings.smtp.setCustomHeaders') }}
</a>
</p>
- <oat-field v-if="form.headersStr !== '[]' || isHeadersVisible"
+ <b-field v-if="form.headersStr !== '[]' || isHeadersVisible"
:message="$t('campaigns.customHeadersHelp')">
<textarea aria-label="field" v-model="form.headersStr" name="headers"
placeholder="[{&quot;X-Custom&quot;: &quot;value&quot;}, {&quot;X-Custom2&quot;: &quot;value&quot;}]"
:disabled="!canEdit" />
- </oat-field>
+ </b-field>
</div>
<hr />
- <oat-field v-if="isNew">
+ <b-field v-if="isNew">
<button type="submit" data-variant="primary" :loading="loading.campaigns" data-cy="btn-continue">
{{ $t('campaigns.continue') }}
</button>
- </oat-field>
+ </b-field>
</form>
</div>
<div v-if="canManage" class="col-4 offset-1">
@@ -179,16 +179,16 @@
<h3>
{{ $t('campaigns.sendTest') }}
</h3>
- <oat-field :message="$t('campaigns.sendTestHelp')">
- <oat-tag-input v-model="form.testEmails" :before-adding="$utils.validateEmail" :disabled="isNew"
+ <b-field :message="$t('campaigns.sendTestHelp')">
+ <b-taginput v-model="form.testEmails" :before-adding="$utils.validateEmail" :disabled="isNew"
icon="email-outline" :placeholder="$t('campaigns.testEmails')" />
- </oat-field>
- <oat-field>
+ </b-field>
+ <b-field>
<button type="button" @click="() => onSubmit('test')" :loading="loading.campaigns" :disabled="isNew"
data-variant="primary" icon-left="email-outline">
{{ $t('campaigns.send') }}
</button>
- </oat-field>
+ </b-field>
</div>
</div>
</div>
@@ -203,26 +203,26 @@
<div class="col-6">
<p v-if="!isAttachFieldVisible" class="text-light text-7">
<a href="#" @click.prevent="onShowAttachField()" data-cy="btn-attach">
- <oat-icon icon="file-upload-outline" />
+ <b-icon icon="file-upload-outline" />
{{ $t('campaigns.addAttachments') }}
</a>
</p>
- <oat-field v-if="isAttachFieldVisible" :label="$t('campaigns.attachments')" data-cy="media">
- <oat-tag-input v-model="form.media" name="media" ref="media" field="filename" @focus="onOpenAttach"
+ <b-field v-if="isAttachFieldVisible" :label="$t('campaigns.attachments')" data-cy="media">
+ <b-taginput v-model="form.media" name="media" ref="media" field="filename" @focus="onOpenAttach"
:disabled="!canEdit" />
- </oat-field>
+ </b-field>
</div>
<div class="col-12 align-right">
<a href="https://listmonk.app/docs/templating/#template-expressions" target="_blank"
rel="noopener noreferer">
- <oat-icon icon="code" /> {{ $t('campaigns.templatingRef') }}</a>
+ <b-icon icon="code" /> {{ $t('campaigns.templatingRef') }}</a>
<span v-if="canEdit && form.content.contentType !== 'plain'" class="text-light text-7 ml-6">
<a v-if="form.altbody === null" href="#" @click.prevent="onAddAltBody">
- <oat-icon icon="text" /> {{ $t('campaigns.addAltText') }}
+ <b-icon icon="text" /> {{ $t('campaigns.addAltText') }}
</a>
<a v-else href="#" @click.prevent="$utils.confirm(null, onRemoveAltBody)">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
{{ $t('campaigns.removeAltText') }}
</a>
</span>
@@ -236,9 +236,9 @@
<section role="tabpanel">
<section class="wrap">
- <oat-field :label="$t('globals.terms.attribs')" :message="$t('campaigns.attribsHelp')">
+ <b-field :label="$t('globals.terms.attribs')" :message="$t('campaigns.attribsHelp')">
<textarea aria-label="field" v-model="form.attribsStr" :disabled="!canEdit" rows="15" />
- </oat-field>
+ </b-field>
</section>
</section><!-- attribs -->
@@ -246,37 +246,37 @@
<section class="wrap">
<div class="row">
<div class="col-4">
- <oat-field :label="$t('campaigns.archiveEnable')" data-cy="btn-archive"
+ <b-field :label="$t('campaigns.archiveEnable')" data-cy="btn-archive"
:message="$t('campaigns.archiveHelp')">
<div class="row">
<div class="col-12">
- <oat-switch data-cy="btn-archive" v-model="form.archive" :disabled="!canArchive" />
+ <b-switch data-cy="btn-archive" v-model="form.archive" :disabled="!canArchive" />
</div>
<div class="col-12">
<a :href="`${serverConfig.root_url}/archive/${data.uuid}`" target="_blank"
rel="noopener noreferer" :class="{ 'text-lighter': !form.archive }"
aria-label="$t('campaigns.archive')">
- <oat-icon icon="link-variant" />
+ <b-icon icon="link-variant" />
</a>
</div>
</div>
- </oat-field>
+ </b-field>
</div>
<div class="col-8">
- <oat-field>
- <oat-field v-if="!canEdit && canArchive">
+ <b-field>
+ <b-field v-if="!canEdit && canArchive">
<button type="button" @click="onUpdateCampaignArchive" :loading="loading.campaigns"
data-variant="primary" data-cy="btn-save">
{{ $t('globals.buttons.saveChanges') }}
</button>
- </oat-field>
- </oat-field>
+ </b-field>
+ </b-field>
</div>
</div>
<div class="row">
<div class="col-6">
- <oat-field :label="$tc('globals.terms.template')">
+ <b-field :label="$tc('globals.terms.template')">
<select aria-label="field" :placeholder="$tc('globals.terms.template')"
v-model="form.archiveTemplateId" name="template"
:disabled="!canArchive || !form.archive || form.content.contentType === 'visual'" required>
@@ -286,44 +286,44 @@
</option>
</template>
</select>
- </oat-field>
+ </b-field>
</div>
<div class="col-6">
- <oat-field>
- <oat-field v-if="form.archive && (!this.form.archiveMetaStr || this.form.archiveMetaStr === '{}')">
- <a class="button " href="#" @click.prevent="onFillArchiveMeta" aria-label="{}"><oat-icon
+ <b-field>
+ <b-field v-if="form.archive && (!this.form.archiveMetaStr || this.form.archiveMetaStr === '{}')">
+ <a class="button " href="#" @click.prevent="onFillArchiveMeta" aria-label="{}"><b-icon
icon="code" /></a>
- </oat-field>
- <oat-field v-if="form.archive">
+ </b-field>
+ <b-field v-if="form.archive">
<button type="button" @click="onToggleArchivePreview" data-variant="primary" data-cy="btn-preview">
{{ $t('campaigns.preview') }}
</button>
- </oat-field>
- </oat-field>
+ </b-field>
+ </b-field>
</div>
</div>
- <oat-field>
- <oat-field :label="$t('campaigns.archiveSlug')" :message="$t('campaigns.archiveSlugHelp')">
+ <b-field>
+ <b-field :label="$t('campaigns.archiveSlug')" :message="$t('campaigns.archiveSlugHelp')">
<input aria-label="field" :maxlength="200" :ref="'focus'" v-model="form.archiveSlug" name="archive_slug"
data-cy="archive-slug" :disabled="!canArchive || !form.archive">
- </oat-field>
- </oat-field>
- <oat-field :label="$t('campaigns.archiveMeta')" :message="$t('campaigns.archiveMetaHelp')">
+ </b-field>
+ </b-field>
+ <b-field :label="$t('campaigns.archiveMeta')" :message="$t('campaigns.archiveMetaHelp')">
<textarea aria-label="field" v-model="form.archiveMetaStr" name="archive_meta" data-cy="archive-meta"
:disabled="!canArchive || !form.archive" rows="20" />
- </oat-field>
+ </b-field>
</section>
</section><!-- archive -->
</ot-tabs>
- <oat-modal :active.sync="isAttachModalOpen" :width="900">
+ <b-modal :active.sync="isAttachModalOpen" :width="900">
<div class="dialog-card content" style="width: auto">
<section class="dialog-body">
<media is-modal @selected="onAttachSelect" />
</section>
</div>
- </oat-modal>
+ </b-modal>
<campaign-preview v-if="isPreviewingArchive" @close="onToggleArchivePreview" type="campaign" :id="data.id"
:archive-meta="form.archiveMetaStr" :title="data.title" :content-type="data.contentType"
diff --git a/frontend/src/views/CampaignAnalytics.vue b/frontend/src/views/CampaignAnalytics.vue
index 6262c908..805b333e 100644
--- a/frontend/src/views/CampaignAnalytics.vue
+++ b/frontend/src/views/CampaignAnalytics.vue
@@ -22,25 +22,25 @@
<form @submit.prevent="onSubmit">
<div class="row">
<div class="col-6">
- <oat-field :label="$t('globals.terms.campaigns')">
- <oat-tag-input v-model="form.campaigns" :data="queriedCampaigns" name="campaigns"
+ <b-field :label="$t('globals.terms.campaigns')">
+ <b-taginput v-model="form.campaigns" :data="queriedCampaigns" name="campaigns"
:placeholder="$t('globals.terms.campaigns')" autocomplete :allow-new="false" :open-on-focus="true"
:before-adding="isCampaignSelected" @typing="queryCampaigns" @focus="queryCampaigns" field="name"
:loading="isSearchLoading" />
- </oat-field>
+ </b-field>
</div>
<div class="col-5">
<div class="row">
<div class="col-6">
- <oat-field data-cy="from" :label="$t('analytics.fromDate')">
- <oat-date-input datetime v-model="form.from" @input="onFromDateChange" />
- </oat-field>
+ <b-field data-cy="from" :label="$t('analytics.fromDate')">
+ <b-datetimepicker datetime v-model="form.from" @input="onFromDateChange" />
+ </b-field>
</div>
<div class="col-6">
- <oat-field data-cy="to" :label="$t('analytics.toDate')">
- <oat-date-input datetime v-model="form.to" @input="onToDateChange" />
- </oat-field>
+ <b-field data-cy="to" :label="$t('analytics.toDate')">
+ <b-datetimepicker datetime v-model="form.to" @input="onToDateChange" />
+ </b-field>
</div>
</div><!-- row -->
</div><!-- row -->
@@ -48,7 +48,7 @@
<div class="col-1">
<button type="submit" data-variant="primary" :disabled="form.campaigns.length === 0" data-cy="btn-search"
aria-label="Search">
- <oat-icon icon="magnify" />
+ <b-icon icon="magnify" />
</button>
</div>
</div><!-- row -->
diff --git a/frontend/src/views/Campaigns.vue b/frontend/src/views/Campaigns.vue
index 3281a789..b2d2fd32 100644
--- a/frontend/src/views/Campaigns.vue
+++ b/frontend/src/views/Campaigns.vue
@@ -8,18 +8,18 @@
</h1>
</div>
<div class="col-4 col-end align-right">
- <oat-field v-if="$can('campaigns:manage')">
+ <b-field v-if="$can('campaigns:manage')">
<button type="button" :to="{ name: 'campaign', params: { id: 'new' } }" tag="router-link" class="btn-new"
data-variant="primary" data-cy="btn-new">
- <oat-icon icon="plus" />
+ <b-icon icon="plus" />
{{ $t('globals.buttons.new') }}
</button>
- </oat-field>
+ </b-field>
</div>
</header>
<div class="card page-content">
- <oat-data-table :data="campaigns.results" :loading="loading.campaigns" :row-class="highlightedRow"
+ <b-table :data="campaigns.results" :loading="loading.campaigns" :row-class="highlightedRow"
@check-all="onTableCheck" @check="onTableCheck" :checked-rows.sync="bulk.checked" paginated backend-pagination
@page-change="onPageChange" :current-page="queryParams.page" :per-page="campaigns.perPage"
:total="campaigns.total" checkable backend-sorting @sort="onSort">
@@ -31,7 +31,7 @@
<input aria-label="Search" v-model="queryParams.query" name="query"
:placeholder="$t('campaigns.queryPlaceholder')" ref="query">
<button type="submit" data-variant="primary" aria-label="Search">
- <oat-icon icon="magnify" />
+ <b-icon icon="magnify" />
</button>
</fieldset>
</form>
@@ -40,7 +40,7 @@
<div class="actions" v-if="bulk.checked.length > 0">
<a class="a" href="#" @click.prevent="deleteCampaigns" data-cy="btn-delete-campaigns">
- <oat-icon icon="trash-can-outline" /> Delete
+ <b-icon icon="trash-can-outline" /> Delete
</a>
<span class="a">
{{ $tc('globals.messages.numSelected', numSelectedCampaigns, { num: numSelectedCampaigns }) }}
@@ -54,22 +54,22 @@
</div>
</template>
- <oat-table-column v-slot="props" cell-class="status" field="status" :label="$t('globals.fields.status')"
+ <b-table-column v-slot="props" cell-class="status" field="status" :label="$t('globals.fields.status')"
width="10%" sortable :td-attrs="$utils.tdID" header-class="cy-status">
<div>
<p>
<router-link :to="{ name: 'campaign', params: { id: props.row.id } }">
- <oat-badge :type="props.row.status">
+ <b-tag :type="props.row.status">
{{ $t(`campaigns.status.${props.row.status}`) }}
- </oat-badge>
+ </b-tag>
<span class="spinner" v-if="isRunning(props.row.id)">
- <oat-loading :is-full-page="false" active />
+ <b-loading :is-full-page="false" active />
</span>
</router-link>
</p>
<p v-if="isSheduled(props.row)">
<span class="text-light text-7 scheduled">
- <oat-icon icon="alarm" />
+ <b-icon icon="alarm" />
<span v-if="!isDone(props.row) && !isRunning(props.row)">
{{ $utils.duration(new Date(), props.row.sendAt, true) }}
<br />
@@ -78,14 +78,14 @@
</span>
</p>
</div>
- </oat-table-column>
- <oat-table-column v-slot="props" field="name" :label="$t('globals.fields.name')" width="25%" sortable
+ </b-table-column>
+ <b-table-column v-slot="props" field="name" :label="$t('globals.fields.name')" width="25%" sortable
header-class="cy-name">
<div>
<p>
- <oat-badge v-if="props.row.type === 'optin'" type="optin">
+ <b-tag v-if="props.row.type === 'optin'" type="optin">
{{ $t('lists.optin') }}
- </oat-badge>
+ </b-tag>
<router-link :to="{ name: 'campaign', params: { id: props.row.id } }">
{{ props.row.name }}
<copy-text :text="props.row.name" hide-text />
@@ -100,8 +100,8 @@
</span>
</span>
</div>
- </oat-table-column>
- <oat-table-column v-slot="props" cell-class="lists" field="lists" :label="$t('globals.terms.lists')"
+ </b-table-column>
+ <b-table-column v-slot="props" cell-class="lists" field="lists" :label="$t('globals.terms.lists')"
width="15%">
<ul>
<li v-for="l in props.row.lists" :key="l.id">
@@ -110,8 +110,8 @@
</router-link>
</li>
</ul>
- </oat-table-column>
- <oat-table-column v-slot="props" field="created_at" :label="$t('campaigns.timestamps')" width="19%" sortable
+ </b-table-column>
+ <b-table-column v-slot="props" field="created_at" :label="$t('campaigns.timestamps')" width="19%" sortable
header-class="cy-timestamp">
<div class="field-list timestamps" :set="stats = getCampaignStats(props.row)">
<p>
@@ -127,13 +127,13 @@
<span>{{ $utils.niceDate(stats.updatedAt, true) }}</span>
</p>
<p v-if="stats.startedAt && stats.updatedAt" class="capitalize">
- <label for="#"><oat-icon icon="alarm" /></label>
+ <label for="#"><b-icon icon="alarm" /></label>
<span>{{ $utils.duration(stats.startedAt, stats.updatedAt) }}</span>
</p>
</div>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="stats" :label="$t('campaigns.stats')" width="15%">
+ <b-table-column v-slot="props" field="stats" :label="$t('campaigns.stats')" width="15%">
<div class="field-list stats" :set="stats = getCampaignStats(props.row)">
<p>
<label for="#">{{ $t('campaigns.views') }}</label>
@@ -159,7 +159,7 @@
</span>
</p>
<p v-if="stats.rate">
- <label for="#"><oat-icon icon="speedometer" /></label>
+ <label for="#"><b-icon icon="speedometer" /></label>
<span class="send-rate">
{{ stats.rate.toFixed(0) }} / {{ $t('campaigns.rateMinuteShort') }}
@@ -170,7 +170,7 @@
<label for="#">
{{ $t('campaigns.progress') }}
<span class="spinner">
- <oat-loading :is-full-page="false" active />
+ <b-loading :is-full-page="false" active />
</span>
</label>
<span>
@@ -178,9 +178,9 @@
</span>
</p>
</div>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" cell-class="actions" width="15%" align="right">
+ <b-table-column v-slot="props" cell-class="actions" width="15%" align="right">
<div>
<!-- start / pause / resume / scheduled -->
<template v-if="$can('campaigns:send')">
@@ -188,7 +188,7 @@
@click.prevent="$utils.confirm(null, () => changeCampaignStatus(props.row, 'running'))"
data-cy="btn-start" :aria-label="$t('campaigns.start')">
- <oat-icon icon="rocket-launch-outline" />
+ <b-icon icon="rocket-launch-outline" />
</a>
@@ -196,7 +196,7 @@
@click.prevent="$utils.confirm(null, () => changeCampaignStatus(props.row, 'paused'))"
data-cy="btn-pause" :aria-label="$t('campaigns.pause')">
- <oat-icon icon="pause-circle-outline" />
+ <b-icon icon="pause-circle-outline" />
</a>
@@ -204,7 +204,7 @@
@click.prevent="$utils.confirm(null, () => changeCampaignStatus(props.row, 'running'))"
data-cy="btn-resume" :aria-label="$t('campaigns.send')">
- <oat-icon icon="rocket-launch-outline" />
+ <b-icon icon="rocket-launch-outline" />
</a>
@@ -212,32 +212,32 @@
@click.prevent="$utils.confirm($t('campaigns.confirmSchedule'), () => changeCampaignStatus(props.row, 'scheduled'))"
data-cy="btn-schedule" :aria-label="$t('campaigns.schedule')">
- <oat-icon icon="clock-start" />
+ <b-icon icon="clock-start" />
</a>
<!-- placeholder for finished campaigns -->
<a v-if="!canCancel(props.row) && !canSchedule(props.row) && !canStart(props.row)" href="#" data-disabled
aria-label=" ">
- <oat-icon icon="rocket-launch-outline" />
+ <b-icon icon="rocket-launch-outline" />
</a>
<a v-if="canCancel(props.row)" href="#"
@click.prevent="$utils.confirm(null, () => changeCampaignStatus(props.row, 'cancelled'))"
data-cy="btn-cancel" :aria-label="$t('globals.buttons.cancel')">
- <oat-icon icon="cancel" />
+ <b-icon icon="cancel" />
</a>
<a v-else href="#" data-disabled aria-label=" ">
- <oat-icon icon="cancel" />
+ <b-icon icon="cancel" />
</a>
</template>
<a href="#" @click.prevent="previewCampaign(props.row)" data-cy="btn-preview"
:aria-label="$t('campaigns.preview')">
- <oat-icon icon="file-find-outline" />
+ <b-icon icon="file-find-outline" />
</a>
<a v-if="$can('campaigns:manage')" href="#" @click.prevent="$utils.prompt($t('globals.buttons.clone'),
@@ -247,25 +247,25 @@
},
(name) => cloneCampaign(name, props.row))" data-cy="btn-clone" :aria-label="$t('globals.buttons.clone')">
- <oat-icon icon="file-multiple-outline" />
+ <b-icon icon="file-multiple-outline" />
</a>
<router-link v-if="$can('campaigns:get_analytics')"
:to="{ name: 'campaignAnalytics', query: { id: props.row.id } }">
- <oat-icon icon="chart-bar" />
+ <b-icon icon="chart-bar" />
</router-link>
<a v-if="$can('campaigns:manage')" href="#"
@click.prevent="$utils.confirm($t('campaigns.confirmDelete', { name: props.row.name }), () => deleteCampaign(props.row))"
data-cy="btn-delete" :aria-label="$t('globals.buttons.delete')">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
</a>
</div>
- </oat-table-column>
+ </b-table-column>
<template #empty v-if="!loading.campaigns">
<empty-placeholder />
</template>
- </oat-data-table>
+ </b-table>
<campaign-preview v-if="previewItem" type="campaign" :id="previewItem.id" :title="previewItem.name"
@close="closePreview" />
diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue
index fd87aa30..6a08cab0 100644
--- a/frontend/src/views/Dashboard.vue
+++ b/frontend/src/views/Dashboard.vue
@@ -6,7 +6,7 @@
</div>
<div class="col-4 col-end align-right">
<button type="button" class="outline small" @click="fetchData">
- <oat-icon icon="refresh" />
+ <b-icon icon="refresh" />
{{ $t('globals.buttons.refresh') }}
</button>
</div>
@@ -20,7 +20,7 @@
<header>
<small class="text-light">{{ $tc('globals.terms.list', 2) }}</small>
<div class="stat-value">
- <oat-icon icon="format-list-bulleted-square" />
+ <b-icon icon="format-list-bulleted-square" />
{{ nice(counts.lists.total) }}
</div>
<small class="text-light hstack gap-2">
@@ -37,7 +37,7 @@
<header>
<small class="text-light">{{ $tc('globals.terms.subscriber', 2) }}</small>
<div class="stat-value">
- <oat-icon icon="account-multiple" />
+ <b-icon icon="account-multiple" />
{{ nice(counts.subscribers.total) }}
</div>
<small class="text-light hstack gap-2">
@@ -56,7 +56,7 @@
<header>
<small class="text-light">{{ $tc('globals.terms.campaign', 2) }}</small>
<div class="stat-value">
- <oat-icon icon="rocket-launch-outline" />
+ <b-icon icon="rocket-launch-outline" />
{{ nice(counts.campaigns.total) }}
</div>
<small class="text-light hstack gap-2">
@@ -74,7 +74,7 @@
<header>
<small class="text-light">{{ $t('dashboard.messagesSent') }}</small>
<div class="stat-value">
- <oat-icon icon="email-outline" />
+ <b-icon icon="email-outline" />
{{ nice(counts.messages) }}
</div>
<small class="text-light">
@@ -182,7 +182,7 @@
<div v-if="settings['app.cache_slow_queries']" role="alert" class="mt-6">
*{{ $t('globals.messages.slowQueriesCached') }}
<a href="https://listmonk.app/docs/maintenance/performance/" target="_blank" rel="noopener noreferer">
- <oat-icon icon="link-variant" /> {{ $t('globals.buttons.learnMore') }}
+ <b-icon icon="link-variant" /> {{ $t('globals.buttons.learnMore') }}
</a>
</div>
</div>
diff --git a/frontend/src/views/Forms.vue b/frontend/src/views/Forms.vue
index 61d84c69..dcfd5ad6 100644
--- a/frontend/src/views/Forms.vue
+++ b/frontend/src/views/Forms.vue
@@ -19,9 +19,9 @@
<ul class="no" data-cy="lists">
<li v-for="(l, i) in publicLists" :key="l.id">
- <oat-checkbox v-model="checked" :native-value="i">
+ <b-checkbox v-model="checked" :native-value="i">
{{ l.name }}
- </oat-checkbox>
+ </b-checkbox>
</li>
</ul>
@@ -43,14 +43,14 @@
</p>
<ul v-if="redirectURLs.length > 0" class="no" data-cy="redirect-urls">
<li>
- <oat-radio v-model="selectedRedirectURL" native-value="">
+ <b-radio v-model="selectedRedirectURL" native-value="">
{{ $t('globals.terms.none') }}
- </oat-radio>
+ </b-radio>
</li>
<li v-for="url in redirectURLs" :key="url">
- <oat-radio v-model="selectedRedirectURL" :native-value="url">
+ <b-radio v-model="selectedRedirectURL" :native-value="url">
{{ url }}
- </oat-radio>
+ </b-radio>
</li>
</ul>
</div>
diff --git a/frontend/src/views/Import.vue b/frontend/src/views/Import.vue
index 127ab5ca..f8b6121b 100644
--- a/frontend/src/views/Import.vue
+++ b/frontend/src/views/Import.vue
@@ -14,64 +14,64 @@
<div>
<div class="row">
<div class="col-12">
- <oat-field :label="$t('import.mode')" :addons="false">
+ <b-field :label="$t('import.mode')" :addons="false">
<div>
- <oat-radio v-model="form.mode" name="mode" native-value="subscribe" data-cy="check-subscribe">
+ <b-radio v-model="form.mode" name="mode" native-value="subscribe" data-cy="check-subscribe">
{{ $t('import.subscribe') }}
- </oat-radio>
+ </b-radio>
<br />
- <oat-radio v-model="form.mode" name="mode" native-value="blocklist" data-cy="check-blocklist">
+ <b-radio v-model="form.mode" name="mode" native-value="blocklist" data-cy="check-blocklist">
{{ $t('import.blocklist') }}
- </oat-radio>
+ </b-radio>
</div>
- </oat-field>
+ </b-field>
</div>
<div class="col-12">
- <oat-field :label="$t('globals.fields.status')" :addons="false">
+ <b-field :label="$t('globals.fields.status')" :addons="false">
<template v-if="form.mode === 'subscribe'">
- <oat-radio v-model="form.subStatus" name="subStatus" native-value="unconfirmed"
+ <b-radio v-model="form.subStatus" name="subStatus" native-value="unconfirmed"
data-cy="check-unconfirmed">
{{ $t('subscribers.status.unconfirmed') }}
- </oat-radio>
- <oat-radio v-model="form.subStatus" name="subStatus" native-value="confirmed"
+ </b-radio>
+ <b-radio v-model="form.subStatus" name="subStatus" native-value="confirmed"
data-cy="check-confirmed">
{{ $t('subscribers.status.confirmed') }}
- </oat-radio>
+ </b-radio>
</template>
- <oat-radio v-else v-model="form.subStatus" name="subStatus" native-value="unsubscribed"
+ <b-radio v-else v-model="form.subStatus" name="subStatus" native-value="unsubscribed"
data-cy="check-unsubscribed">
{{ $t('subscribers.status.unsubscribed') }}
- </oat-radio>
- </oat-field>
+ </b-radio>
+ </b-field>
</div>
<div class="col-12">
- <oat-field :label="$t('import.csvDelim')" :message="$t('import.csvDelimHelp')" class="delimiter">
+ <b-field :label="$t('import.csvDelim')" :message="$t('import.csvDelimHelp')" class="delimiter">
<input aria-label="field" v-model="form.delim" name="delim" placeholder="," maxlength="1" required>
- </oat-field>
+ </b-field>
</div>
</div>
<div class="row">
<div class="col-4">
- <oat-field v-if="form.mode === 'subscribe'" :label="$t('import.overwriteUserInfo')"
+ <b-field v-if="form.mode === 'subscribe'" :label="$t('import.overwriteUserInfo')"
:message="$t('import.overwriteUserInfoHelp')">
<div>
- <oat-switch v-model="form.overwriteUserInfo" name="overwriteUserInfo"
+ <b-switch v-model="form.overwriteUserInfo" name="overwriteUserInfo"
data-cy="overwrite-user-info" />
</div>
- </oat-field>
+ </b-field>
</div>
<div class="col-12">
- <oat-field v-if="form.mode === 'subscribe'" :label="$t('import.overwriteSubStatus')"
+ <b-field v-if="form.mode === 'subscribe'" :label="$t('import.overwriteSubStatus')"
:message="$t('import.overwriteSubStatusHelp')">
<div>
- <oat-switch v-model="form.overwriteSubStatus" name="overwriteSubStatus"
+ <b-switch v-model="form.overwriteSubStatus" name="overwriteSubStatus"
data-cy="overwrite-sub-status" />
</div>
- </oat-field>
+ </b-field>
</div>
</div>
@@ -80,16 +80,16 @@
:selected="form.lists" :all="lists.results" />
<hr />
- <oat-field :label="$t('import.csvFile')">
- <oat-upload v-model="form.file">
+ <b-field :label="$t('import.csvFile')">
+ <b-upload v-model="form.file">
<div class="align-center app-section">
<p>
- <oat-icon icon="file-upload-outline" />
+ <b-icon icon="file-upload-outline" />
</p>
<p>{{ $t('import.csvFileHelp') }}</p>
</div>
- </oat-upload>
- </oat-field>
+ </b-upload>
+ </b-field>
<div class="hstack" v-if="form.file">
<span closable @close="clearFile">
{{ form.file.name }}
diff --git a/frontend/src/views/ListForm.vue b/frontend/src/views/ListForm.vue
index 7d4b86ed..102e07ca 100644
--- a/frontend/src/views/ListForm.vue
+++ b/frontend/src/views/ListForm.vue
@@ -6,9 +6,9 @@
{{ $t('globals.fields.id') }}: <copy-text :text="`${data.id}`" />
{{ $t('globals.fields.uuid') }}: <copy-text :text="data.uuid" />
</p>
- <oat-badge v-if="isEditing" :type="data.type" class="float-right">
+ <b-tag v-if="isEditing" :type="data.type" class="float-right">
{{ $t(`lists.types.${data.type}`) }}
- </oat-badge>
+ </b-tag>
<h4 v-if="isEditing">
{{ data.name }}
</h4>
@@ -17,12 +17,12 @@
</h4>
</header>
<section class="dialog-body">
- <oat-field :label="$t('globals.fields.name')">
+ <b-field :label="$t('globals.fields.name')">
<input aria-label="field" :maxlength="200" :ref="'focus'" v-model="form.name" name="name"
:placeholder="$t('globals.fields.name')" required>
- </oat-field>
+ </b-field>
- <oat-field :label="$t('lists.type')" :message="$t('lists.typeHelp')">
+ <b-field :label="$t('lists.type')" :message="$t('lists.typeHelp')">
<select aria-label="field" v-model="form.type" name="type" :placeholder="$t('lists.typeHelp')" required>
<option value="private">
{{ $t('lists.types.private') }}
@@ -31,9 +31,9 @@
{{ $t('lists.types.public') }}
</option>
</select>
- </oat-field>
+ </b-field>
- <oat-field :label="$t('lists.optin')" :message="$t('lists.optinHelp')">
+ <b-field :label="$t('lists.optin')" :message="$t('lists.optinHelp')">
<select aria-label="field" v-model="form.optin" name="optin" placeholder="Opt-in type" required>
<option value="single">
{{ $t('lists.optins.single') }}
@@ -42,20 +42,20 @@
{{ $t('lists.optins.double') }}
</option>
</select>
- </oat-field>
+ </b-field>
- <oat-field :label="$t('globals.terms.tags')">
- <oat-tag-input v-model="form.tags" name="tags" :placeholder="$t('globals.terms.tags')" />
- </oat-field>
+ <b-field :label="$t('globals.terms.tags')">
+ <b-taginput v-model="form.tags" name="tags" :placeholder="$t('globals.terms.tags')" />
+ </b-field>
- <oat-field :label="$t('globals.fields.description')">
+ <b-field :label="$t('globals.fields.description')">
<textarea aria-label="field" :maxlength="2000" v-model="form.description" name="description"
:placeholder="$t('globals.fields.description')" />
- </oat-field>
+ </b-field>
- <oat-field :message="$t('lists.archivedHelp')" :label="$t('lists.archived')">
- <oat-switch v-model="isArchived" name="status" />
- </oat-field>
+ <b-field :message="$t('lists.archivedHelp')" :label="$t('lists.archived')">
+ <b-switch v-model="isArchived" name="status" />
+ </b-field>
</section>
<footer class="dialog-foot align-right">
<button type="button" class="outline" @click="$parent.close()">
diff --git a/frontend/src/views/Lists.vue b/frontend/src/views/Lists.vue
index adca1df5..e021213a 100644
--- a/frontend/src/views/Lists.vue
+++ b/frontend/src/views/Lists.vue
@@ -18,17 +18,17 @@
</div>
</div>
<div class="col-4 col-end align-right">
- <oat-field v-if="$can('lists:manage_all')">
+ <b-field v-if="$can('lists:manage_all')">
<button type="button" data-variant="primary" class="btn-new" @click="showNewForm" data-cy="btn-new">
- <oat-icon icon="plus" />
+ <b-icon icon="plus" />
{{ $t('globals.buttons.new') }}
</button>
- </oat-field>
+ </b-field>
</div>
</header>
<div class="card page-content">
- <oat-data-table :data="lists.results" :loading="loading.listsFull" @check-all="onTableCheck" @check="onTableCheck"
+ <b-table :data="lists.results" :loading="loading.listsFull" @check-all="onTableCheck" @check="onTableCheck"
:checked-rows.sync="bulk.checked" default-sort="createdAt" paginated backend-pagination
@page-change="onPageChange" :current-page="queryParams.page" :per-page="lists.perPage" :total="lists.total"
checkable backend-sorting @sort="onSort">
@@ -40,7 +40,7 @@
<input aria-label="Search" v-model="queryParams.query" name="query" ref="query" data-cy="query"
placeholder="Search">
<button type="submit" data-variant="primary" data-cy="btn-query" aria-label="Search">
- <oat-icon icon="magnify" />
+ <b-icon icon="magnify" />
</button>
</fieldset>
</form>
@@ -48,7 +48,7 @@
</div>
<div class="actions" v-if="bulk.checked.length > 0">
<a class="a" href="#" @click.prevent="deleteLists" data-cy="btn-delete-lists">
- <oat-icon icon="trash-can-outline" /> {{ $t('globals.buttons.delete') }}
+ <b-icon icon="trash-can-outline" /> {{ $t('globals.buttons.delete') }}
</a>
<span class="a">
{{ $tc('globals.messages.numSelected', numSelectedLists, { num: numSelectedLists }) }}
@@ -62,7 +62,7 @@
</div>
</template>
- <oat-table-column v-slot="props" field="name" :label="$t('globals.fields.name')" header-class="cy-name" sortable
+ <b-table-column v-slot="props" field="name" :label="$t('globals.fields.name')" header-class="cy-name" sortable
width="25%" paginated backend-pagination :td-attrs="$utils.tdID" @page-change="onPageChange">
<div>
<a :href="`/lists/${props.row.id}`" @click.prevent="showEditForm(props.row)">
@@ -74,33 +74,33 @@
</span>
</span>
</div>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="type" :label="$t('globals.fields.type')" header-class="cy-type" sortable
+ <b-table-column v-slot="props" field="type" :label="$t('globals.fields.type')" header-class="cy-type" sortable
width="15%">
<div class="hstack">
- <oat-badge :type="props.row.type" :data-cy="`type-${props.row.type}`">
+ <b-tag :type="props.row.type" :data-cy="`type-${props.row.type}`">
{{ $t(`lists.types.${props.row.type}`) }}
- </oat-badge>
+ </b-tag>
{{ ' ' }}
- <oat-badge :type="props.row.optin" :data-cy="`optin-${props.row.optin}`">
- <oat-icon :icon="props.row.optin === 'double' ? 'account-check-outline' : 'account-off-outline'" />
+ <b-tag :type="props.row.optin" :data-cy="`optin-${props.row.optin}`">
+ <b-icon :icon="props.row.optin === 'double' ? 'account-check-outline' : 'account-off-outline'" />
{{ ' ' }}
{{ $t(`lists.optins.${props.row.optin}`) }}
- </oat-badge>{{ ' ' }}
+ </b-tag>{{ ' ' }}
<a v-if="props.row.optin === 'double'" class="text-7 send-optin" href="#"
@click="$utils.confirm(null, () => createOptinCampaign(props.row))" data-cy="btn-send-optin-campaign">
- <oat-icon icon="rocket-launch-outline" />
+ <b-icon icon="rocket-launch-outline" />
{{ $t('lists.sendOptinCampaign') }}
</a>
</div>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="subscriber_count" :label="$t('globals.terms.subscribers')"
+ <b-table-column v-slot="props" field="subscriber_count" :label="$t('globals.terms.subscribers')"
header-class="cy-subscribers" numeric sortable centered>
<template v-if="$can('subscribers:get_all', 'subscribers:get')">
<router-link :to="`/subscribers/lists/${props.row.id}`">
@@ -111,9 +111,9 @@
<template v-else>
{{ $utils.formatNumber(props.row.subscriberCount) }}
</template>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="subscriber_counts" header-class="cy-subscribers" width="10%">
+ <b-table-column v-slot="props" field="subscriber_counts" header-class="cy-subscribers" width="10%">
<div class="field-list stats">
<p v-for="(count, status) in filterStatuses(props.row)" :key="status">
<label for="#">{{ $tc(`subscribers.status.${status}`, count) }}</label>
@@ -122,60 +122,60 @@
</router-link>
</p>
</div>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="created_at" :label="$t('globals.fields.createdAt')"
+ <b-table-column v-slot="props" field="created_at" :label="$t('globals.fields.createdAt')"
header-class="cy-created_at" sortable>
{{ $utils.niceDate(props.row.createdAt) }}
- </oat-table-column>
- <oat-table-column v-slot="props" field="updated_at" :label="$t('globals.fields.updatedAt')"
+ </b-table-column>
+ <b-table-column v-slot="props" field="updated_at" :label="$t('globals.fields.updatedAt')"
header-class="cy-updated_at" sortable>
{{ $utils.niceDate(props.row.updatedAt) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" cell-class="actions" align="right">
+ <b-table-column v-slot="props" cell-class="actions" align="right">
<div>
<router-link v-if="$can('campaigns:manage')" :to="`/campaigns/new?list_id=${props.row.id}`"
data-cy="btn-campaign">
- <oat-icon icon="rocket-launch-outline" />
+ <b-icon icon="rocket-launch-outline" />
</router-link>
<a v-if="$can('lists:manage') || $canList(props.row.id, 'list:manage')" href="#"
@click.prevent="showEditForm(props.row)" data-cy="btn-edit" :aria-label="$t('globals.buttons.edit')">
- <oat-icon icon="pencil-outline" />
+ <b-icon icon="pencil-outline" />
</a>
<router-link v-if="$can('subscribers:import')" :to="{ name: 'import', query: { list_id: props.row.id } }"
data-cy="btn-import">
- <oat-icon icon="file-upload-outline" />
+ <b-icon icon="file-upload-outline" />
</router-link>
<a v-if="$can('lists:manage') || $canList(props.row.id, 'list:manage')" href="#"
@click.prevent="deleteList(props.row)" data-cy="btn-delete" :aria-label="$t('globals.buttons.delete')">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
</a>
</div>
- </oat-table-column>
+ </b-table-column>
<template #empty v-if="!loading.listsFull">
<empty-placeholder />
</template>
- </oat-data-table>
+ </b-table>
<!-- Add / edit form modal -->
- <oat-modal :active.sync="isFormVisible" :width="600" @close="onFormClose">
+ <b-modal :active.sync="isFormVisible" :width="600" @close="onFormClose">
<list-form :data="curItem" :is-editing="isEditing" @finished="formFinished" />
- </oat-modal>
+ </b-modal>
<p v-if="settings['app.cache_slow_queries']" class="text-light text-7">
*{{ $t('globals.messages.slowQueriesCached') }}
<a href="https://listmonk.app/docs/maintenance/performance/" target="_blank" rel="noopener noreferer"
class="text-light text-7">
- <oat-icon icon="link-variant" /> {{ $t('globals.buttons.learnMore') }}
+ <b-icon icon="link-variant" /> {{ $t('globals.buttons.learnMore') }}
</a>
</p>
</div>
diff --git a/frontend/src/views/Maintenance.vue b/frontend/src/views/Maintenance.vue
index 7074a596..a27e3a83 100644
--- a/frontend/src/views/Maintenance.vue
+++ b/frontend/src/views/Maintenance.vue
@@ -18,7 +18,7 @@
</h4><br />
<div class="row">
<div class="col-4">
- <oat-field label="Data" :message="$t('maintenance.orphanHelp')">
+ <b-field label="Data" :message="$t('maintenance.orphanHelp')">
<select aria-label="field" v-model="subscriberType">
<option value="orphan">
{{ $t('dashboard.orphanSubs') }}
@@ -27,16 +27,16 @@
{{ $t('subscribers.status.blocklisted') }}
</option>
</select>
- </oat-field>
+ </b-field>
</div>
<div class="col-5" />
<div class="col-12">
<br />
- <oat-field>
+ <b-field>
<button type="button" data-variant="danger" :loading="loading.maintenance" @click="deleteSubscribers">
{{ $t('globals.buttons.delete') }}
</button>
- </oat-field>
+ </b-field>
</div>
</div>
</div><!-- subscribers -->
@@ -47,27 +47,27 @@
</h4><br />
<div class="row">
<div class="col-4">
- <oat-field label="Data">
+ <b-field label="Data">
<select aria-label="field" v-model="subscriptionType">
<option value="optin">
{{ $t('maintenance.maintenance.unconfirmedOptins') }}
</option>
</select>
- </oat-field>
+ </b-field>
</div>
<div class="col-4">
- <oat-field :label="$t('maintenance.olderThan')">
- <oat-date-input v-model="subscriptionDate" required />
- </oat-field>
+ <b-field :label="$t('maintenance.olderThan')">
+ <b-datepicker v-model="subscriptionDate" required />
+ </b-field>
</div>
<div class="col-1" />
<div class="col-12">
<br />
- <oat-field>
+ <b-field>
<button type="button" data-variant="danger" :loading="loading.maintenance" @click="deleteSubscriptions">
{{ $t('globals.buttons.delete') }}
</button>
- </oat-field>
+ </b-field>
</div>
</div>
</div><!-- subscriptions -->
@@ -78,7 +78,7 @@
</h4><br />
<div class="row">
<div class="col-4">
- <oat-field label="Data">
+ <b-field label="Data">
<select aria-label="field" v-model="analyticsType">
<option selected value="all">
{{ $t('globals.terms.all') }}
@@ -90,21 +90,21 @@
{{ $t('dashboard.linkClicks') }}
</option>
</select>
- </oat-field>
+ </b-field>
</div>
<div class="col-4">
- <oat-field :label="$t('maintenance.olderThan')">
- <oat-date-input v-model="analyticsDate" required />
- </oat-field>
+ <b-field :label="$t('maintenance.olderThan')">
+ <b-datepicker v-model="analyticsDate" required />
+ </b-field>
</div>
<div class="col-1" />
<div class="col-12">
<br />
- <oat-field>
+ <b-field>
<button type="button" data-variant="danger" :loading="loading.maintenance" @click="deleteAnalytics">
{{ $t('globals.buttons.delete') }}
</button>
- </oat-field>
+ </b-field>
</div>
</div>
@@ -115,7 +115,7 @@
<br />
<div class="row">
<div class="col-4">
- <oat-field label="Data">
+ <b-field label="Data">
<select aria-label="field" v-model="exportType">
<option value="views">
{{ $t('dashboard.campaignViews') }}
@@ -124,21 +124,21 @@
{{ $t('dashboard.linkClicks') }}
</option>
</select>
- </oat-field>
+ </b-field>
</div>
<div class="col-4">
- <oat-field :label="$t('analytics.fromDate')">
- <oat-date-input v-model="exportDate" required />
- </oat-field>
+ <b-field :label="$t('analytics.fromDate')">
+ <b-datepicker v-model="exportDate" required />
+ </b-field>
</div>
<div class="col-1" />
<div class="col-12">
<br />
- <oat-field>
+ <b-field>
<button type="button" data-variant="primary" tag="a" :href="exportURL">
{{ $t('subscribers.export') }}
</button>
- </oat-field>
+ </b-field>
</div>
</div>
</div><!-- analytics -->
@@ -154,15 +154,15 @@
<br />
<div class="row">
<div class="col-2">
- <oat-field :label="$t('globals.buttons.enabled')">
- <oat-switch v-model="dbSettings.vacuum" />
- </oat-field>
+ <b-field :label="$t('globals.buttons.enabled')">
+ <b-switch v-model="dbSettings.vacuum" />
+ </b-field>
</div>
<div class="col-4" :class="{ disabled: !dbSettings.vacuum }">
- <oat-field :label="$t('settings.maintenance.cron')">
+ <b-field :label="$t('settings.maintenance.cron')">
<input aria-label="field" v-model="dbSettings.vacuum_cron_interval" placeholder="0 2 * * *"
:disabled="!dbSettings.vacuum" pattern="((\*|[0-9,\-\/]+)\s+){4}(\*|[0-9,\-\/]+)">
- </oat-field>
+ </b-field>
</div>
<div class="col-3" />
<div class="col-3">
diff --git a/frontend/src/views/Media.vue b/frontend/src/views/Media.vue
index e7c6ab36..aa4594fc 100644
--- a/frontend/src/views/Media.vue
+++ b/frontend/src/views/Media.vue
@@ -20,7 +20,7 @@
<input aria-label="Search" v-model="queryParams.query" name="query" ref="query" data-cy="query"
placeholder="Search">
<button type="submit" data-variant="primary" data-cy="btn-query" aria-label="Search">
- <oat-icon icon="magnify" />
+ <b-icon icon="magnify" />
</button>
</fieldset>
</form>
@@ -35,16 +35,16 @@
<div>
<form @submit.prevent="onSubmit" class="mb-6" data-cy="upload">
<div>
- <oat-field :label="$t('media.upload')">
- <oat-upload v-model="form.files" multiple xaccept=".png,.jpg,.jpeg,.gif,.svg">
+ <b-field :label="$t('media.upload')">
+ <b-upload v-model="form.files" multiple xaccept=".png,.jpg,.jpeg,.gif,.svg">
<div class="align-center app-section">
<p>
- <oat-icon icon="file-upload-outline" />
+ <b-icon icon="file-upload-outline" />
</p>
<p>{{ $t('media.uploadHelp') }}</p>
</div>
- </oat-upload>
- </oat-field>
+ </b-upload>
+ </b-field>
<div class="hstack" v-if="form.files.length > 0">
<span v-for="(f, i) in form.files" :key="i" closable @close="removeUploadFile(i)">
{{ f.name }}
@@ -62,7 +62,7 @@
<!-- Pagination -->
<div v-if="media.total > media.perPage" class="pagination-wrapper mt-5">
- <oat-pagination :total="media.total" :current.sync="media.page" :per-page="media.perPage"
+ <b-pagination :total="media.total" :current.sync="media.page" :per-page="media.perPage"
@change="onPageChange" />
</div>
@@ -83,7 +83,7 @@
<div class="actions">
<a href="#" @click.prevent="$utils.confirm(null, () => onDeleteMedia(item.id))" data-cy="btn-delete"
:aria-label="$t('globals.buttons.delete')" class="delete-btn">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
</a>
</div>
</div>
@@ -101,7 +101,7 @@
<!-- Pagination -->
<div v-if="media.total > media.perPage" class="pagination-wrapper mt-5">
- <oat-pagination :total="media.total" :current.sync="media.page" :per-page="media.perPage"
+ <b-pagination :total="media.total" :current.sync="media.page" :per-page="media.perPage"
@change="onPageChange" />
</div>
</section>
diff --git a/frontend/src/views/RoleForm.vue b/frontend/src/views/RoleForm.vue
index 0432ef82..77864275 100644
--- a/frontend/src/views/RoleForm.vue
+++ b/frontend/src/views/RoleForm.vue
@@ -14,10 +14,10 @@
</header>
<section class="dialog-body">
- <oat-field :label="$t('globals.fields.name')">
+ <b-field :label="$t('globals.fields.name')">
<input aria-label="field" :disabled="disabled" :maxlength="200" v-model="form.name" name="name" ref="focus"
required>
- </oat-field>
+ </b-field>
<div v-if="type === 'list'" class="card">
<h5>{{ $t('users.listPerms') }}</h5>
@@ -42,36 +42,36 @@
<span
v-if="form.lists.length > 0 && (form.permissions['lists:get_all'] || form.permissions['lists:manage_all'])"
class="text-danger text-6">
- <oat-icon icon="warning-empty" />
+ <b-icon icon="warning-empty" />
{{ $t('users.listPermsWarning') }}
</span>
</div>
- <oat-data-table :data="form.lists">
- <oat-table-column v-slot="props" field="name" :label="$tc('globals.terms.list')">
+ <b-table :data="form.lists">
+ <b-table-column v-slot="props" field="name" :label="$tc('globals.terms.list')">
<router-link :to="`/lists/${props.row.id}`" target="_blank">
{{ props.row.name }}
</router-link>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="permissions" :label="$t('users.perms')" width="40%">
- <oat-checkbox v-model="props.row.permissions" native-value="list:get">
+ <b-table-column v-slot="props" field="permissions" :label="$t('users.perms')" width="40%">
+ <b-checkbox v-model="props.row.permissions" native-value="list:get">
{{ $t('globals.buttons.view') }}
- </oat-checkbox>
- <oat-checkbox v-model="props.row.permissions" native-value="list:manage">
+ </b-checkbox>
+ <b-checkbox v-model="props.row.permissions" native-value="list:manage">
{{ $t('globals.buttons.manage') }}
- </oat-checkbox>
- </oat-table-column>
+ </b-checkbox>
+ </b-table-column>
- <oat-table-column v-slot="props" width="10%">
+ <b-table-column v-slot="props" width="10%">
<a href="#" @click.prevent="onDeleteListPerm(props.row.id)" data-cy="btn-delete"
:aria-label="$t('globals.buttons.delete')">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
</a>
- </oat-table-column>
- </oat-data-table>
+ </b-table-column>
+ </b-table>
</div>
<template v-if="type === 'user'">
@@ -86,27 +86,27 @@
</div>
</div>
- <oat-data-table :data="serverConfig.permissions">
- <oat-table-column v-slot="props" field="group" :label="$t('users.roleGroup')">
+ <b-table :data="serverConfig.permissions">
+ <b-table-column v-slot="props" field="group" :label="$t('users.roleGroup')">
{{ $tc(`globals.terms.${props.row.group}`) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="permissions" label="Permissions">
+ <b-table-column v-slot="props" field="permissions" label="Permissions">
<div v-for="p in props.row.permissions" :key="p">
- <oat-checkbox v-model="form.permissions" :native-value="p" :disabled="disabled">
+ <b-checkbox v-model="form.permissions" :native-value="p" :disabled="disabled">
{{ p }}
<a v-if="p === 'subscribers:sql_query'"
href="https://listmonk.app/docs/roles-and-permissions/#subscriberssql_query" target="_blank"
rel="noopener noreferrer" aria-label="Warning: high risk permission">
- <oat-icon icon="warning-empty" data-variant="danger" />
+ <b-icon icon="warning-empty" data-variant="danger" />
</a>
- </oat-checkbox>
+ </b-checkbox>
</div>
- </oat-table-column>
- </oat-data-table>
+ </b-table-column>
+ </b-table>
</template>
<a href="https://listmonk.app/docs/roles-and-permissions" target="_blank" rel="noopener noreferrer">
- <oat-icon icon="link-variant" /> {{ $t('globals.buttons.learnMore') }}
+ <b-icon icon="link-variant" /> {{ $t('globals.buttons.learnMore') }}
</a>
</section>
diff --git a/frontend/src/views/Roles.vue b/frontend/src/views/Roles.vue
index 71c76bef..a5b9dcf3 100644
--- a/frontend/src/views/Roles.vue
+++ b/frontend/src/views/Roles.vue
@@ -8,36 +8,36 @@
</h1>
</div>
<div class="col-4 col-end align-right">
- <oat-field v-if="$can('users:manage')">
+ <b-field v-if="$can('users:manage')">
<button type="button" data-variant="primary" class="btn-new" @click="showNewForm('user')" data-cy="btn-new">
- <oat-icon icon="plus" />
+ <b-icon icon="plus" />
{{ $t('globals.buttons.new') }}
</button>
- </oat-field>
+ </b-field>
</div>
</header>
<div class="card page-content">
- <oat-data-table :data="roles" :loading="isLoading()">
- <oat-table-column v-slot="props" field="role" :label="$tc('users.role')" sortable>
+ <b-table :data="roles" :loading="isLoading()">
+ <b-table-column v-slot="props" field="role" :label="$tc('users.role')" sortable>
<a href="#" @click.prevent="showEditForm(props.row, 'user')">
- <oat-badge v-if="props.row.id === 1" type="enabled">
+ <b-tag v-if="props.row.id === 1" type="enabled">
{{ props.row.name }}
- </oat-badge>
+ </b-tag>
<template v-else>{{ props.row.name }}</template>
</a>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="created_at" :label="$t('globals.fields.createdAt')"
+ <b-table-column v-slot="props" field="created_at" :label="$t('globals.fields.createdAt')"
header-class="cy-created_at" sortable>
{{ $utils.niceDate(props.row.createdAt) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="updated_at" :label="$t('globals.fields.updatedAt')"
+ <b-table-column v-slot="props" field="updated_at" :label="$t('globals.fields.updatedAt')"
header-class="cy-updated_at" sortable>
{{ $utils.niceDate(props.row.updatedAt) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" cell-class="actions align-right">
+ <b-table-column v-slot="props" cell-class="actions align-right">
<template v-if="$can('roles:manage')">
<a href="#" @click.prevent="$utils.prompt($t('globals.buttons.clone'),
{
@@ -46,7 +46,7 @@
},
(name) => onCloneRole(name, props.row))" data-cy="btn-clone" :aria-label="$t('globals.buttons.clone')">
- <oat-icon icon="file-multiple-outline" />
+ <b-icon icon="file-multiple-outline" />
</a>
@@ -54,29 +54,29 @@
<a href="#" @click.prevent="showEditForm(props.row, 'user')" data-cy="btn-edit"
:aria-label="$t('globals.buttons.edit')">
- <oat-icon icon="pencil-outline" />
+ <b-icon icon="pencil-outline" />
</a>
<a href="#" @click.prevent="onDeleteRole(props.row)" data-cy="btn-delete"
:aria-label="$t('globals.buttons.delete')">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
</a>
</template>
</template>
- </oat-table-column>
+ </b-table-column>
<template #empty v-if="!isLoading()">
<empty-placeholder />
</template>
- </oat-data-table>
+ </b-table>
<!-- Add / edit form modal -->
- <oat-modal :active.sync="isFormVisible" :width="700" @close="onFormClose">
+ <b-modal :active.sync="isFormVisible" :width="700" @close="onFormClose">
<role-form :data="curItem" :type="curType" :is-editing="isEditing" @finished="formFinished" />
- </oat-modal>
+ </b-modal>
</div>
</section>
</template>
diff --git a/frontend/src/views/Settings.vue b/frontend/src/views/Settings.vue
index 66c0f8fd..f92575f9 100644
--- a/frontend/src/views/Settings.vue
+++ b/frontend/src/views/Settings.vue
@@ -9,13 +9,13 @@
</h1>
</div>
<div class="col-4 col-end align-right">
- <oat-field v-if="$can('settings:manage')">
+ <b-field v-if="$can('settings:manage')">
<button :disabled="!hasFormChanged" data-variant="primary" type="submit" class="isSaveEnabled"
data-cy="btn-save">
- <oat-icon icon="content-save-outline" />
+ <b-icon icon="content-save-outline" />
{{ $t('globals.buttons.save') }}
</button>
- </oat-field>
+ </b-field>
</div>
</header>
diff --git a/frontend/src/views/SubscriberBulkList.vue b/frontend/src/views/SubscriberBulkList.vue
index b6069954..0b007199 100644
--- a/frontend/src/views/SubscriberBulkList.vue
+++ b/frontend/src/views/SubscriberBulkList.vue
@@ -8,28 +8,28 @@
</header>
<section class="dialog-body">
- <oat-field label="Action">
+ <b-field label="Action">
<div>
- <oat-radio v-model="form.action" name="action" native-value="add" data-cy="check-list-add">
+ <b-radio v-model="form.action" name="action" native-value="add" data-cy="check-list-add">
{{ $t('globals.buttons.add') }}
- </oat-radio>
- <oat-radio v-model="form.action" name="action" native-value="remove" data-cy="check-list-remove">
+ </b-radio>
+ <b-radio v-model="form.action" name="action" native-value="remove" data-cy="check-list-remove">
{{ $t('globals.buttons.remove') }}
- </oat-radio>
- <oat-radio v-model="form.action" name="action" native-value="unsubscribe" data-cy="check-list-unsubscribe">
+ </b-radio>
+ <b-radio v-model="form.action" name="action" native-value="unsubscribe" data-cy="check-list-unsubscribe">
{{ $t('subscribers.markUnsubscribed') }}
- </oat-radio>
+ </b-radio>
</div>
- </oat-field>
+ </b-field>
<list-selector label="Target lists" placeholder="Lists to apply to" v-model="form.lists" :selected="form.lists"
:all="lists.results" />
- <oat-field :message="$t('subscribers.preconfirmHelp')">
- <oat-checkbox v-model="form.preconfirm" data-cy="preconfirm" :native-value="true" :disabled="!hasOptinList">
+ <b-field :message="$t('subscribers.preconfirmHelp')">
+ <b-checkbox v-model="form.preconfirm" data-cy="preconfirm" :native-value="true" :disabled="!hasOptinList">
{{ $t('subscribers.preconfirm') }}
- </oat-checkbox>
- </oat-field>
+ </b-checkbox>
+ </b-field>
</section>
<footer class="dialog-foot align-right">
diff --git a/frontend/src/views/SubscriberForm.vue b/frontend/src/views/SubscriberForm.vue
index 32310fa9..e83b40c3 100644
--- a/frontend/src/views/SubscriberForm.vue
+++ b/frontend/src/views/SubscriberForm.vue
@@ -2,9 +2,9 @@
<form @submit.prevent="onSubmit">
<div class="dialog-card content" style="width: auto">
<header class="dialog-head">
- <oat-badge v-if="isEditing" :type="data.status" class="float-right">
+ <b-tag v-if="isEditing" :type="data.status" class="float-right">
{{ $t(`subscribers.status.${data.status}`) }}
- </oat-badge>
+ </b-tag>
<h4 v-if="isEditing">
{{ data.name }}
</h4>
@@ -19,20 +19,20 @@
</header>
<section class="dialog-body">
- <oat-field :label="$t('subscribers.email')">
+ <b-field :label="$t('subscribers.email')">
<input aria-label="field" :maxlength="200" v-model="form.email" name="email" :ref="'focus'"
:placeholder="$t('subscribers.email')" required>
- </oat-field>
+ </b-field>
<div class="row">
<div class="col-8">
- <oat-field :label="$t('globals.fields.name')">
+ <b-field :label="$t('globals.fields.name')">
<input aria-label="field" :maxlength="200" v-model="form.name" name="name"
:placeholder="$t('globals.fields.name')">
- </oat-field>
+ </b-field>
</div>
<div class="col-4">
- <oat-field :label="$t('globals.fields.status')" :message="$t('subscribers.blocklistedHelp')">
+ <b-field :label="$t('globals.fields.status')" :message="$t('subscribers.blocklistedHelp')">
<select aria-label="field" v-model="form.status" name="status" :placeholder="$t('globals.fields.status')"
required>
<option value="enabled">
@@ -42,7 +42,7 @@
{{ $t('subscribers.status.blocklisted') }}
</option>
</select>
- </oat-field>
+ </b-field>
</div>
</div>
@@ -63,15 +63,15 @@
:message="$t('subscribers.listsHelp')" v-model="form.lists" :selected="form.lists" :all="lists.results" />
<div class="row">
<div class="col-7">
- <oat-field :message="$t('subscribers.preconfirmHelp')">
- <oat-checkbox v-model="form.preconfirm" :native-value="true" :disabled="!hasOptinList">
+ <b-field :message="$t('subscribers.preconfirmHelp')">
+ <b-checkbox v-model="form.preconfirm" :native-value="true" :disabled="!hasOptinList">
{{ $t('subscribers.preconfirm') }}
- </oat-checkbox>
- </oat-field>
+ </b-checkbox>
+ </b-field>
</div>
<div v-if="$can('subscribers:manage') && isEditing" class="col-5 align-right">
<a href="#" @click.prevent="sendOptinConfirmation" :class="{ 'disabled': !hasOptinList }">
- <oat-icon icon="email-outline" />
+ <b-icon icon="email-outline" />
{{ $t('subscribers.sendOptinConfirm') }}</a>
</div>
</div>
@@ -79,74 +79,74 @@
<section role="tabpanel">
<template v-if="data.lists">
- <oat-data-table :data="data.lists" default-sort="createdAt" class="subscriptions">
- <oat-table-column v-slot="props" field="name" :label="$tc('globals.terms.list', 1)">
+ <b-table :data="data.lists" default-sort="createdAt" class="subscriptions">
+ <b-table-column v-slot="props" field="name" :label="$tc('globals.terms.list', 1)">
<div>
<router-link v-if="!props.row.restricted" :to="`/lists/${props.row.id}`">
{{ props.row.name }}
</router-link>
<span v-else class="text-lighter text-7 ">{{ props.row.name }}</span>
<br />
- <oat-badge :type="props.row.optin" :data-cy="`optin-${props.row.optin}`">
- <oat-icon
+ <b-tag :type="props.row.optin" :data-cy="`optin-${props.row.optin}`">
+ <b-icon
:icon="props.row.optin === 'double' ? 'account-check-outline' : 'account-off-outline'" />
{{ ' ' }}
{{ $t(`lists.optins.${props.row.optin}`) }}
- </oat-badge>{{ ' ' }}
+ </b-tag>{{ ' ' }}
</div>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="status" cell-class="status"
+ <b-table-column v-slot="props" field="status" cell-class="status"
:label="$t('globals.fields.status')">
- <oat-badge :type="`status-${props.row.subscriptionStatus}`">
+ <b-tag :type="`status-${props.row.subscriptionStatus}`">
{{ $t(`subscribers.status.${props.row.subscriptionStatus}`) }}
- </oat-badge>
+ </b-tag>
<template v-if="props.row.optin === 'double' && props.row.subscriptionMeta.optinIp">
<br /><span class="text-7">{{ props.row.subscriptionMeta.optinIp }}</span>
</template>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="createdAt" :label="$t('globals.fields.createdAt')">
+ <b-table-column v-slot="props" field="createdAt" :label="$t('globals.fields.createdAt')">
{{ $utils.niceDate(props.row.subscriptionCreatedAt, true) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="updatedAt" :label="$t('globals.fields.updatedAt')">
+ <b-table-column v-slot="props" field="updatedAt" :label="$t('globals.fields.updatedAt')">
{{ $utils.niceDate(props.row.subscriptionCreatedAt, true) }}
- </oat-table-column>
- </oat-data-table>
+ </b-table-column>
+ </b-table>
</template>
</section><!-- subscriptions -->
<section role="tabpanel" class="bounces">
<a href="#" class="text-6 align-right" disabed="true" @click.prevent="deleteBounces" v-if="isBounceVisible">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
{{ $t('globals.buttons.delete') }}
</a>
- <oat-data-table :data="bounces" default-sort="createdAt" class="bounces">
- <oat-table-column field="campaign" :label="$tc('globals.terms.campaign', 1)" v-slot="props">
+ <b-table :data="bounces" default-sort="createdAt" class="bounces">
+ <b-table-column field="campaign" :label="$tc('globals.terms.campaign', 1)" v-slot="props">
<div v-if="props.row.campaign">
<router-link :to="{ name: 'bounces', query: { campaign_id: props.row.campaign.id } }">
{{ props.row.campaign.name }}
</router-link>
</div>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column field="createdAt" :label="$t('globals.fields.createdAt')" v-slot="props">
+ <b-table-column field="createdAt" :label="$t('globals.fields.createdAt')" v-slot="props">
{{ $utils.niceDate(props.row.createdAt, true) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column field="action" :label="$t('globals.fields.type')" v-slot="props">
+ <b-table-column field="action" :label="$t('globals.fields.type')" v-slot="props">
<span class="align-right">
<a href="#" @click.prevent="toggleMeta(props.row.id)">
{{ props.row.source }}
- <oat-icon :icon="visibleMeta[props.row.id] ? 'arrow-up' : 'arrow-down'" />
+ <b-icon :icon="visibleMeta[props.row.id] ? 'arrow-up' : 'arrow-down'" />
</a>
</span>
<span class="clearfix" />
<pre v-if="visibleMeta[props.row.id]">{{ props.row.meta }}</pre>
- </oat-table-column>
- </oat-data-table>
+ </b-table-column>
+ </b-table>
</section><!-- bounces -->
<section role="tabpanel" class="activity">
@@ -154,15 +154,15 @@
</section><!-- activity -->
</ot-tabs>
- <oat-field :message="$t('subscribers.attribsHelp') + ' ' + egAttribs" class="mt-6">
+ <b-field :message="$t('subscribers.attribsHelp') + ' ' + egAttribs" class="mt-6">
<div>
<h5>{{ $t('globals.terms.attribs') }}</h5>
<textarea aria-label="field" v-model="form.strAttribs" name="attribs" />
<a href="https://listmonk.app/docs/concepts" target="_blank" rel="noopener noreferrer" class="text-7">
- {{ $t('globals.buttons.learnMore') }} <oat-icon icon="link-variant" />
+ {{ $t('globals.buttons.learnMore') }} <b-icon icon="link-variant" />
</a>
</div>
- </oat-field>
+ </b-field>
</section>
<footer class="dialog-foot align-right">
<button type="button" class="outline" @click="$parent.close()">
diff --git a/frontend/src/views/Subscribers.vue b/frontend/src/views/Subscribers.vue
index 5ac10870..7929b693 100644
--- a/frontend/src/views/Subscribers.vue
+++ b/frontend/src/views/Subscribers.vue
@@ -15,12 +15,12 @@
</h1>
</div>
<div class="col-4 col-end align-right">
- <oat-field v-if="$can('subscribers:manage')">
+ <b-field v-if="$can('subscribers:manage')">
<button type="button" data-variant="primary" @click="showNewForm" data-cy="btn-new" class="btn-new">
- <oat-icon icon="plus" />
+ <b-icon icon="plus" />
{{ $t('globals.buttons.new') }}
</button>
- </oat-field>
+ </b-field>
</div>
</header>
@@ -36,7 +36,7 @@
data-cy="search">
<button type="submit" data-variant="primary" :disabled="isSearchAdvanced" data-cy="btn-search"
aria-label="Search">
- <oat-icon icon="magnify" />
+ <b-icon icon="magnify" />
</button>
</fieldset>
@@ -66,7 +66,7 @@
</form>
<div v-if="!isSearchAdvanced" class="toggle-advanced">
<a href="#" @click.prevent="toggleAdvancedSearch" data-cy="btn-advanced-search">
- <oat-icon icon="cog-outline" />
+ <b-icon icon="cog-outline" />
{{ $t('subscribers.advancedQuery') }}
</a>
</div>
@@ -75,25 +75,25 @@
</section><!-- control -->
<br />
- <oat-data-table :data="subscribers.results ?? []" :loading="loading.subscribers" @check-all="onTableCheck"
+ <b-table :data="subscribers.results ?? []" :loading="loading.subscribers" @check-all="onTableCheck"
@check="onTableCheck" :checked-rows.sync="bulk.checked" paginated backend-pagination @page-change="onPageChange"
:current-page="queryParams.page" :per-page="subscribers.perPage" :total="subscribers.total" checkable
backend-sorting @sort="onSort">
<template #top-left>
<div class="actions">
<a class="a" href="#" @click.prevent="exportSubscribers" data-cy="btn-export-subscribers">
- <oat-icon icon="cloud-download-outline" />
+ <b-icon icon="cloud-download-outline" />
{{ $t('subscribers.export') }}
</a>
<template v-if="bulk.checked.length > 0">
<a class="a" href="#" @click.prevent="showBulkListForm" data-cy="btn-manage-lists">
- <oat-icon icon="format-list-bulleted-square" /> Manage lists
+ <b-icon icon="format-list-bulleted-square" /> Manage lists
</a>
<a class="a" href="#" @click.prevent="deleteSubscribers" data-cy="btn-delete-subscribers">
- <oat-icon icon="trash-can-outline" /> Delete
+ <b-icon icon="trash-can-outline" /> Delete
</a>
<a class="a" href="#" @click.prevent="blocklistSubscribers" data-cy="btn-manage-blocklist">
- <oat-icon icon="account-off-outline" /> Blocklist
+ <b-icon icon="account-off-outline" /> Blocklist
</a>
<span class="a">
{{ $t('globals.messages.numSelected', { num: numSelectedSubscribers }) }}
@@ -108,91 +108,91 @@
</div>
</template>
- <oat-table-column v-slot="props" field="email" :label="$t('subscribers.email')" header-class="cy-email" sortable
+ <b-table-column v-slot="props" field="email" :label="$t('subscribers.email')" header-class="cy-email" sortable
:td-attrs="$utils.tdID">
<a :href="`/subscribers/${props.row.id}`" @click.prevent="showEditForm(props.row)"
:class="{ 'blocklisted': props.row.status === 'blocklisted' }">
{{ props.row.email }}
<copy-text :text="`${props.row.email}`" hide-text />
</a>
- <oat-badge v-if="props.row.status !== 'enabled'" :type="props.row.status" data-cy="blocklisted">
+ <b-tag v-if="props.row.status !== 'enabled'" :type="props.row.status" data-cy="blocklisted">
{{ $t(`subscribers.status.${props.row.status}`) }}
- </oat-badge>
+ </b-tag>
<span class="badge-list hstack gap-1">
<template v-for="l in (props.row.lists || [])">
<router-link :to="`/subscribers/lists/${l.id}`" :key="l.id" style="padding-right:0.5em;">
- <oat-badge :type="l.subscriptionStatus" :key="l.id">
+ <b-tag :type="l.subscriptionStatus" :key="l.id">
{{ l.name }}
<sup v-if="l.optin === 'double' || l.subscriptionStatus == 'unsubscribed'">
{{ $t(`subscribers.status.${l.subscriptionStatus}`) }}
</sup>
- </oat-badge>
+ </b-tag>
</router-link>
</template>
</span>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="name" :label="$t('globals.fields.name')" header-class="cy-name"
+ <b-table-column v-slot="props" field="name" :label="$t('globals.fields.name')" header-class="cy-name"
sortable>
<a :href="`/subscribers/${props.row.id}`" @click.prevent="showEditForm(props.row)"
:class="{ 'blocklisted': props.row.status === 'blocklisted' }">
{{ props.row.name }}
<copy-text :text="`${props.row.name}`" hide-text />
</a>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="lists" :label="$t('globals.terms.lists')" header-class="cy-lists"
+ <b-table-column v-slot="props" field="lists" :label="$t('globals.terms.lists')" header-class="cy-lists"
centered>
{{ listCount(props.row.lists || []) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="created_at" :label="$t('globals.fields.createdAt')"
+ <b-table-column v-slot="props" field="created_at" :label="$t('globals.fields.createdAt')"
header-class="cy-created_at" sortable>
{{ $utils.niceDate(props.row.createdAt) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="updated_at" :label="$t('globals.fields.updatedAt')"
+ <b-table-column v-slot="props" field="updated_at" :label="$t('globals.fields.updatedAt')"
header-class="cy-updated_at" sortable>
{{ $utils.niceDate(props.row.updatedAt) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" cell-class="actions" align="right">
+ <b-table-column v-slot="props" cell-class="actions" align="right">
<div>
<a :href="`/api/subscribers/${props.row.id}/export`" data-cy="btn-download"
:aria-label="$t('subscribers.downloadData')">
- <oat-icon icon="cloud-download-outline" />
+ <b-icon icon="cloud-download-outline" />
</a>
<a v-if="$can('subscribers:manage')" :href="`/subscribers/${props.row.id}`"
@click.prevent="showEditForm(props.row)" data-cy="btn-edit" :aria-label="$t('globals.buttons.edit')">
- <oat-icon icon="pencil-outline" />
+ <b-icon icon="pencil-outline" />
</a>
<a v-if="$can('subscribers:manage')" href="#" @click.prevent="deleteSubscriber(props.row)"
data-cy="btn-delete" :aria-label="$t('globals.buttons.delete')">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
</a>
</div>
- </oat-table-column>
+ </b-table-column>
<template #empty v-if="!loading.subscribers">
<empty-placeholder />
</template>
- </oat-data-table>
+ </b-table>
<!-- Manage list modal -->
- <oat-modal :active.sync="isBulkListFormVisible" :width="500" class="has-overflow">
+ <b-modal :active.sync="isBulkListFormVisible" :width="500" class="has-overflow">
<subscriber-bulk-list :num-subscribers="this.numSelectedSubscribers" @finished="bulkChangeLists" />
- </oat-modal>
+ </b-modal>
<!-- Add / edit form modal -->
- <oat-modal :active.sync="isFormVisible" :width="850" @close="onFormClose">
+ <b-modal :active.sync="isFormVisible" :width="850" @close="onFormClose">
<subscriber-form :data="curItem" :is-editing="isEditing" @finished="querySubscribers" />
- </oat-modal>
+ </b-modal>
</div>
</section>
</template>
diff --git a/frontend/src/views/TemplateForm.vue b/frontend/src/views/TemplateForm.vue
index 3b96ad7f..f7ba7401 100644
--- a/frontend/src/views/TemplateForm.vue
+++ b/frontend/src/views/TemplateForm.vue
@@ -20,13 +20,13 @@
<section class="dialog-body mb-0 pb-0">
<div class="row">
<div class="col-9">
- <oat-field :label="$t('globals.fields.name')">
+ <b-field :label="$t('globals.fields.name')">
<input aria-label="field" :maxlength="200" :ref="'focus'" v-model="form.name" name="name"
:placeholder="$t('globals.fields.name')" required>
- </oat-field>
+ </b-field>
</div>
<div class="col-3">
- <oat-field :label="$t('globals.fields.type')">
+ <b-field :label="$t('globals.fields.type')">
<select aria-label="field" v-model="form.type" :disabled="isEditing">
<option value="campaign">
{{ $tc('templates.typeCampaignHTML') }}
@@ -38,27 +38,27 @@
{{ $tc('templates.typeTransactional') }}
</option>
</select>
- </oat-field>
+ </b-field>
</div>
</div>
<div class="row" v-if="form.type === 'tx'">
<div class="col-12">
- <oat-field :label="$t('templates.subject')">
+ <b-field :label="$t('templates.subject')">
<input aria-label="field" :maxlength="200" :ref="'focus'" v-model="form.subject" name="name"
:placeholder="$t('templates.subject')" required>
- </oat-field>
+ </b-field>
</div>
</div>
<template v-if="form.body !== null">
- <oat-field v-if="form.type === 'campaign_visual'" class="mb-1">
+ <b-field v-if="form.type === 'campaign_visual'" class="mb-1">
<visual-editor v-if="form.type === 'campaign_visual'" name="body" :source="form.bodySource"
@change="onChangeVisualEditor" height="70vh" />
- </oat-field>
+ </b-field>
- <oat-field v-else :label="$t('templates.rawHTML')">
+ <b-field v-else :label="$t('templates.rawHTML')">
<code-editor lang="html" v-model="form.body" name="body" />
- </oat-field>
+ </b-field>
</template>
<p class="text-7">
diff --git a/frontend/src/views/Templates.vue b/frontend/src/views/Templates.vue
index f788abcd..5184d07c 100644
--- a/frontend/src/views/Templates.vue
+++ b/frontend/src/views/Templates.vue
@@ -8,18 +8,18 @@
</h1>
</div>
<div class="col-4 col-end align-right">
- <oat-field v-if="$can('templates:manage')">
+ <b-field v-if="$can('templates:manage')">
<button type="button" data-variant="primary" class="btn-new" @click="showNewForm">
- <oat-icon icon="plus" />
+ <b-icon icon="plus" />
{{ $t('globals.buttons.new') }}
</button>
- </oat-field>
+ </b-field>
</div>
</header>
<div class="card page-content">
- <oat-data-table :data="templates" :hoverable="true" :loading="loading.templates" default-sort="createdAt">
- <oat-table-column v-slot="props" field="name" :label="$t('globals.fields.name')" :td-attrs="$utils.tdID"
+ <b-table :data="templates" :hoverable="true" :loading="loading.templates" default-sort="createdAt">
+ <b-table-column v-slot="props" field="name" :label="$t('globals.fields.name')" :td-attrs="$utils.tdID"
sortable>
<a href="#" @click.prevent="showEditForm(props.row)">
{{ props.row.name }}
@@ -31,87 +31,87 @@
<p class="text-light text-7" v-if="props.row.type === 'tx'">
{{ props.row.subject }}
</p>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="type" :label="$t('globals.fields.type')" sortable>
- <oat-badge v-if="props.row.type === 'campaign'" :type="props.row.type" :data-cy="`type-${props.row.type}`">
+ <b-table-column v-slot="props" field="type" :label="$t('globals.fields.type')" sortable>
+ <b-tag v-if="props.row.type === 'campaign'" :type="props.row.type" :data-cy="`type-${props.row.type}`">
{{ $tc('templates.typeCampaignHTML') }}
- </oat-badge>
- <oat-badge v-else-if="props.row.type === 'campaign_visual'" :type="props.row.type"
+ </b-tag>
+ <b-tag v-else-if="props.row.type === 'campaign_visual'" :type="props.row.type"
:data-cy="`type-${props.row.type}`">
{{ $tc('templates.typeCampaignVisual') }}
- </oat-badge>
- <oat-badge v-else :type="props.row.type" :data-cy="`type-${props.row.type}`">
+ </b-tag>
+ <b-tag v-else :type="props.row.type" :data-cy="`type-${props.row.type}`">
{{ $tc('templates.typeTransactional') }}
- </oat-badge>
- </oat-table-column>
+ </b-tag>
+ </b-table-column>
- <oat-table-column v-slot="props" field="id" :label="$t('globals.fields.id')" sortable>
+ <b-table-column v-slot="props" field="id" :label="$t('globals.fields.id')" sortable>
{{ props.row.id }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="createdAt" :label="$t('globals.fields.createdAt')" sortable>
+ <b-table-column v-slot="props" field="createdAt" :label="$t('globals.fields.createdAt')" sortable>
{{ $utils.niceDate(props.row.createdAt) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="updatedAt" :label="$t('globals.fields.updatedAt')" sortable>
+ <b-table-column v-slot="props" field="updatedAt" :label="$t('globals.fields.updatedAt')" sortable>
{{ $utils.niceDate(props.row.updatedAt) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" cell-class="actions" align="right">
+ <b-table-column v-slot="props" cell-class="actions" align="right">
<div>
<a href="#" @click.prevent="previewTemplate(props.row)" data-cy="btn-preview"
:aria-label="$t('templates.preview')">
- <oat-icon icon="file-find-outline" />
+ <b-icon icon="file-find-outline" />
</a>
<a href="#" @click.prevent="showEditForm(props.row)" data-cy="btn-edit"
:aria-label="$t('globals.buttons.edit')">
- <oat-icon icon="pencil-outline" />
+ <b-icon icon="pencil-outline" />
</a>
<a href="#" @click.prevent="$utils.prompt(`Clone template`,
{ placeholder: 'Name', value: `Copy of ${props.row.name}` },
(name) => cloneTemplate(name, props.row))" data-cy="btn-clone" :aria-label="$t('globals.buttons.clone')">
- <oat-icon icon="file-multiple-outline" />
+ <b-icon icon="file-multiple-outline" />
</a>
<a v-if="!props.row.isDefault && props.row.type === 'campaign'" href="#"
@click.prevent="$utils.confirm(null, () => makeTemplateDefault(props.row))" data-cy="btn-set-default"
:aria-label="$t('templates.makeDefault')">
- <oat-icon icon="check-circle-outline" />
+ <b-icon icon="check-circle-outline" />
</a>
<span v-else class="a text-lighter">
- <oat-icon icon="check-circle-outline" />
+ <b-icon icon="check-circle-outline" />
</span>
<a v-if="!props.row.isDefault" href="#"
@click.prevent="$utils.confirm(null, () => deleteTemplate(props.row))" data-cy="btn-delete"
:aria-label="$t('globals.buttons.delete')">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
</a>
<span v-else class="a text-lighter">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
</span>
</div>
- </oat-table-column>
+ </b-table-column>
<template #empty v-if="!loading.templates">
<empty-placeholder />
</template>
- </oat-data-table>
+ </b-table>
<!-- Add / edit form modal -->
- <oat-modal :active.sync="isFormVisible" :width="1200" :can-cancel="false" class="template-modal">
+ <b-modal :active.sync="isFormVisible" :width="1200" :can-cancel="false" class="template-modal">
<template-form :data="curItem" :is-editing="isEditing" @finished="formFinished" />
- </oat-modal>
+ </b-modal>
<campaign-preview v-if="previewItem" type="template" :id="previewItem.id" :template-type="previewItem.type"
:title="previewItem.name" @close="closePreview" />
diff --git a/frontend/src/views/UserForm.vue b/frontend/src/views/UserForm.vue
index 87623ab3..5502d416 100644
--- a/frontend/src/views/UserForm.vue
+++ b/frontend/src/views/UserForm.vue
@@ -15,19 +15,19 @@
<section class="dialog-body">
<div class="row">
<div class="col-6">
- <oat-field class="mb-6">
- <oat-radio v-model="form.type" name="type" native-value="user" :disabled="isEditing">
- <oat-icon icon="account-outline" />
+ <b-field class="mb-6">
+ <b-radio v-model="form.type" name="type" native-value="user" :disabled="isEditing">
+ <b-icon icon="account-outline" />
{{ $t('users.type.user') }}
- </oat-radio>
- <oat-radio v-model="form.type" name="type" native-value="api" :disabled="isEditing">
- <oat-icon icon="code" />
+ </b-radio>
+ <b-radio v-model="form.type" name="type" native-value="api" :disabled="isEditing">
+ <b-icon icon="code" />
{{ $t('users.type.api') }}
- </oat-radio>
- </oat-field>
+ </b-radio>
+ </b-field>
</div>
<div class="col-6">
- <oat-field :label="$t('globals.fields.status')">
+ <b-field :label="$t('globals.fields.status')">
<select aria-label="field" v-model="form.status" name="status" required>
<option value="enabled">
{{ $t('users.status.enabled') }}
@@ -36,48 +36,48 @@
{{ $t('users.status.disabled') }}
</option>
</select>
- </oat-field>
+ </b-field>
</div>
</div>
- <oat-field :label="$t('users.username')">
+ <b-field :label="$t('users.username')">
<input aria-label="field" :maxlength="200" v-model="form.username" name="username" ref="focus"
:placeholder="$t('users.username')" required :message="$t('users.usernameHelp')" autocomplete="off"
pattern="[a-zA-Z0-9_\-\.@]+$">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('globals.fields.name')">
+ <b-field :label="$t('globals.fields.name')">
<input aria-label="field" :maxlength="200" v-model="form.name" name="name"
:placeholder="$t('globals.fields.name')">
- </oat-field>
+ </b-field>
- <oat-field v-if="form.type !== 'api'" :label="$t('subscribers.email')">
+ <b-field v-if="form.type !== 'api'" :label="$t('subscribers.email')">
<input aria-label="field" :maxlength="200" v-model="form.email" name="email"
:placeholder="$t('subscribers.email')" required>
- </oat-field>
+ </b-field>
<template v-if="form.type !== 'api'">
<div class="card">
- <oat-field>
- <oat-checkbox v-model="form.passwordLogin" :native-value="true" name="password_login">
+ <b-field>
+ <b-checkbox v-model="form.passwordLogin" :native-value="true" name="password_login">
{{ $t('users.passwordEnable') }}
- </oat-checkbox>
- </oat-field>
+ </b-checkbox>
+ </b-field>
<div class="row">
<div class="col-6">
- <oat-field :label="$t('users.password')">
+ <b-field :label="$t('users.password')">
<input aria-label="field" :disabled="!form.passwordLogin" minlength="8" :maxlength="200"
v-model="form.password" type="password" name="password" :placeholder="$t('users.password')"
:required="form.passwordLogin && !isEditing">
- </oat-field>
+ </b-field>
</div>
<div class="col-6">
- <oat-field :label="$t('users.passwordRepeat')">
+ <b-field :label="$t('users.passwordRepeat')">
<input aria-label="field" :disabled="!form.passwordLogin" minlength="8" :maxlength="200"
v-model="form.password2" type="password" name="password2"
:required="form.passwordLogin && !isEditing && form.password">
- </oat-field>
+ </b-field>
</div>
</div>
</div>
@@ -87,24 +87,24 @@
<div class="card">
<div class="row">
<div class="col-6">
- <oat-field :label="$tc('users.userRole')">
+ <b-field :label="$tc('users.userRole')">
<select aria-label="field" v-model="form.userRoleId" name="user_role" required>
<option v-for="r in userRoles" :value="r.id" :key="r.id">
{{ r.name }}
</option>
</select>
- </oat-field>
+ </b-field>
</div>
<div class="col-6">
- <oat-field :label="$tc('users.listRole', 0)">
+ <b-field :label="$tc('users.listRole', 0)">
<select aria-label="field" v-model="form.listRoleId" name="list_role">
<option value="">&mdash; {{ $t("globals.terms.none") }} &mdash;</option>
<option v-for="r in listRoles" :value="r.id" :key="r.id">
{{ r.name }}
</option>
</select>
- </oat-field>
+ </b-field>
</div>
</div>
</div>
diff --git a/frontend/src/views/UserProfile.vue b/frontend/src/views/UserProfile.vue
index c3aabd8f..19916fc0 100644
--- a/frontend/src/views/UserProfile.vue
+++ b/frontend/src/views/UserProfile.vue
@@ -11,36 +11,36 @@
<div class="card page-content" :aria-busy="loading.users ? 'true' : null" data-spinner="large overlay">
<form @submit.prevent="onSubmit">
- <oat-field v-if="data.type !== 'api'" :label="$t('subscribers.email')">
+ <b-field v-if="data.type !== 'api'" :label="$t('subscribers.email')">
<input aria-label="field" :maxlength="200" v-model="form.email" name="email"
:placeholder="$t('subscribers.email')" :disabled="!data.passwordLogin" required>
- </oat-field>
+ </b-field>
- <oat-field :label="$t('globals.fields.name')">
+ <b-field :label="$t('globals.fields.name')">
<input aria-label="field" :maxlength="200" v-model="form.name" name="name"
:placeholder="$t('globals.fields.name')">
- </oat-field>
+ </b-field>
<div v-if="data.passwordLogin" class="row">
<div class="col-6">
- <oat-field :label="$t('users.password')">
+ <b-field :label="$t('users.password')">
<input aria-label="field" minlength="8" :maxlength="200" v-model="form.password" type="password"
name="password" :placeholder="$t('users.password')">
- </oat-field>
+ </b-field>
</div>
<div class="col-6">
- <oat-field :label="$t('users.passwordRepeat')">
+ <b-field :label="$t('users.passwordRepeat')">
<input aria-label="field" minlength="8" :maxlength="200" v-model="form.password2" type="password"
name="password2">
- </oat-field>
+ </b-field>
</div>
</div>
- <oat-field>
+ <b-field>
<button data-variant="primary" type="submit" data-cy="btn-save">
{{ $t('globals.buttons.save') }}
</button>
- </oat-field>
+ </b-field>
</form>
<br /><br />
@@ -54,7 +54,7 @@
<h3 class="mb-0">{{ $t('users.twoFA') }}</h3>
</div>
<div class="col-2">
- <oat-switch v-if="!isTotpVisible" v-model="twofaEnabled" @input="onToggleEnableTotp" />
+ <b-switch v-if="!isTotpVisible" v-model="twofaEnabled" @input="onToggleEnableTotp" />
</div>
</div>
@@ -76,10 +76,10 @@
<br /><br />
<form @submit.prevent="confirmTOTP">
- <oat-field :label="$t('users.totpCode')">
+ <b-field :label="$t('users.totpCode')">
<input aria-label="field" ref="totpCodeInput" v-model="totpCode" maxlength="6" pattern="[0-9]{6}"
placeholder="000000" required>
- </oat-field>
+ </b-field>
<div class="hstack">
<button data-variant="primary" type="submit">
{{ $t('globals.buttons.enable') }}
@@ -98,11 +98,11 @@
<div class="row">
<div class="col-12">
<h3>
- <oat-icon icon="check-circle-outline" data-variant="primary" /> {{ $t('users.twoFAEnabled') }}
+ <b-icon icon="check-circle-outline" data-variant="primary" /> {{ $t('users.twoFAEnabled') }}
</h3>
</div>
<div class="col-2">
- <oat-switch v-if="!showDisableTOTP" v-model="twofaEnabled" @input="toggleDisableTOTP" />
+ <b-switch v-if="!showDisableTOTP" v-model="twofaEnabled" @input="toggleDisableTOTP" />
</div>
</div>
@@ -110,10 +110,10 @@
<!-- Disable TOTP Flow -->
<form v-if="showDisableTOTP" class="disable-totp mt-5" @submit.prevent="confirmDisableTOTP">
- <oat-field :label="$t('users.password')">
+ <b-field :label="$t('users.password')">
<input aria-label="field" ref="disablePasswordInput" v-model="disableTOTPPassword" type="password"
minlength="8" required>
- </oat-field>
+ </b-field>
<div class="hstack">
<button data-variant="danger" type="submit">
{{ $t('globals.buttons.disable') }}
diff --git a/frontend/src/views/Users.vue b/frontend/src/views/Users.vue
index 8fea246b..646418db 100644
--- a/frontend/src/views/Users.vue
+++ b/frontend/src/views/Users.vue
@@ -8,17 +8,17 @@
</h1>
</div>
<div class="col-4 col-end align-right">
- <oat-field v-if="$can('users:manage')">
+ <b-field v-if="$can('users:manage')">
<button type="button" data-variant="primary" class="btn-new" @click="showNewForm" data-cy="btn-new">
- <oat-icon icon="plus" />
+ <b-icon icon="plus" />
{{ $t('globals.buttons.new') }}
</button>
- </oat-field>
+ </b-field>
</div>
</header>
<div class="card page-content">
- <oat-data-table :data="users" :loading="loading.users" checkable :checked-rows.sync="checked"
+ <b-table :data="users" :loading="loading.users" checkable :checked-rows.sync="checked"
default-sort="createdAt" backend-sorting @sort="onSort" @check-all="onTableCheck" @check="onTableCheck">
<template #top-left>
<div class="row">
@@ -28,7 +28,7 @@
<input aria-label="Search" v-model="queryParams.query" name="query" ref="query" data-cy="query"
placeholder="Search">
<button type="submit" data-variant="primary" data-cy="btn-query" aria-label="Search">
- <oat-icon icon="magnify" />
+ <b-icon icon="magnify" />
</button>
</fieldset>
</form>
@@ -36,41 +36,41 @@
</div>
</template>
- <oat-table-column v-slot="props" field="username" :label="$t('users.username')" header-class="cy-username"
+ <b-table-column v-slot="props" field="username" :label="$t('users.username')" header-class="cy-username"
sortable :td-attrs="$utils.tdID">
<a :href="`/users/${props.row.id}`" @click.prevent="showEditForm(props.row)"
:class="{ 'text-light': props.row.status === 'disabled' }">
{{ props.row.username }}
</a>
- <oat-badge v-if="props.row.status === 'disabled'" type="disabled">
+ <b-tag v-if="props.row.status === 'disabled'" type="disabled">
{{ $t(`users.status.${props.row.status}`) }}
- </oat-badge>
- <oat-badge v-if="props.row.type === 'api'" type="api">
- <oat-icon icon="code" />
+ </b-tag>
+ <b-tag v-if="props.row.type === 'api'" type="api">
+ <b-icon icon="code" />
{{ $t(`users.type.${props.row.type}`) }}
- </oat-badge>
+ </b-tag>
<div class="text-light text-7 mt-2">
{{ props.row.name }}
</div>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="status" :label="$tc('users.role')" header-class="cy-status" sortable
+ <b-table-column v-slot="props" field="status" :label="$tc('users.role')" header-class="cy-status" sortable
:td-attrs="$utils.tdID">
<router-link :to="{ name: 'userRoles' }">
- <oat-badge v-if="props.row.userRole" :type="props.row.userRole.id === 1 ? 'enabled' : 'primary'">
- <oat-icon icon="account-outline" />
+ <b-tag v-if="props.row.userRole" :type="props.row.userRole.id === 1 ? 'enabled' : 'primary'">
+ <b-icon icon="account-outline" />
{{ props.row.userRole.name }}
- </oat-badge>
+ </b-tag>
</router-link>
<router-link :to="{ name: 'listRoles' }">
<span v-if="props.row.listRole" class="badge secondary">
- <oat-icon icon="newspaper-variant-outline" />
+ <b-icon icon="newspaper-variant-outline" />
{{ props.row.listRole.name }}
</span>
</router-link>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="name" :label="$t('subscribers.email')" header-class="cy-name" sortable
+ <b-table-column v-slot="props" field="name" :label="$t('subscribers.email')" header-class="cy-name" sortable
:td-attrs="$utils.tdID">
<div>
<a v-if="props.row.email" :href="`/users/${props.row.id}`" @click.prevent="showEditForm(props.row)"
@@ -81,50 +81,50 @@
—
</template>
</div>
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="created_at" :label="$t('globals.fields.createdAt')"
+ <b-table-column v-slot="props" field="created_at" :label="$t('globals.fields.createdAt')"
header-class="cy-created_at" sortable>
{{ $utils.niceDate(props.row.createdAt) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="updated_at" :label="$t('globals.fields.updatedAt')"
+ <b-table-column v-slot="props" field="updated_at" :label="$t('globals.fields.updatedAt')"
header-class="cy-updated_at" sortable>
{{ $utils.niceDate(props.row.updatedAt) }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" field="last_login" :label="$t('users.lastLogin')" header-class="cy-updated_at"
+ <b-table-column v-slot="props" field="last_login" :label="$t('users.lastLogin')" header-class="cy-updated_at"
sortable>
{{ props.row.loggedinAt ? $utils.niceDate(props.row.loggedinAt, true) : '—' }}
- </oat-table-column>
+ </b-table-column>
- <oat-table-column v-slot="props" cell-class="actions" align="right">
+ <b-table-column v-slot="props" cell-class="actions" align="right">
<div>
<a v-if="$can('users:manage')" href="#" @click.prevent="showEditForm(props.row)" data-cy="btn-edit"
:aria-label="$t('globals.buttons.edit')">
- <oat-icon icon="pencil-outline" />
+ <b-icon icon="pencil-outline" />
</a>
<a v-if="$can('users:manage')" href="#" @click.prevent="deleteUser(props.row)" data-cy="btn-delete"
:aria-label="$t('globals.buttons.delete')">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
</a>
</div>
- </oat-table-column>
+ </b-table-column>
<template #empty v-if="!loading.users">
<empty-placeholder />
</template>
- </oat-data-table>
+ </b-table>
<!-- Add / edit form modal -->
- <oat-modal :active.sync="isFormVisible" :width="600" @close="onFormClose">
+ <b-modal :active.sync="isFormVisible" :width="600" @close="onFormClose">
<user-form :data="curItem" :is-editing="isEditing" @finished="formFinished" />
- </oat-modal>
+ </b-modal>
</div>
</section>
</template>
diff --git a/frontend/src/views/settings/appearance.vue b/frontend/src/views/settings/appearance.vue
index b54cfac0..d9df64ef 100644
--- a/frontend/src/views/settings/appearance.vue
+++ b/frontend/src/views/settings/appearance.vue
@@ -15,14 +15,14 @@
{{ $t('settings.appearance.adminHelp') }}
</div>
- <oat-field :label="$t('settings.appearance.customCSS')">
+ <b-field :label="$t('settings.appearance.customCSS')">
<code-editor lang="css" v-model="data['appearance.admin.custom_css']" name="body" key="editor-admin-css" />
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.appearance.customJS')">
+ <b-field :label="$t('settings.appearance.customJS')">
<code-editor lang="javascript" v-model="data['appearance.admin.custom_js']" name="body"
key="editor-admin-js" />
- </oat-field>
+ </b-field>
</div>
<div role="tabpanel">
@@ -30,14 +30,14 @@
{{ $t('settings.appearance.publicHelp') }}
</div>
- <oat-field :label="$t('settings.appearance.customCSS')">
+ <b-field :label="$t('settings.appearance.customCSS')">
<code-editor lang="css" v-model="data['appearance.public.custom_css']" name="body" key="editor-public-css" />
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.appearance.customJS')">
+ <b-field :label="$t('settings.appearance.customJS')">
<code-editor lang="javascript" v-model="data['appearance.public.custom_js']" name="body"
key="editor-public-js" />
- </oat-field>
+ </b-field>
</div>
</ot-tabs>
</div>
diff --git a/frontend/src/views/settings/bounces.vue b/frontend/src/views/settings/bounces.vue
index bdd1a145..4b53734d 100644
--- a/frontend/src/views/settings/bounces.vue
+++ b/frontend/src/views/settings/bounces.vue
@@ -2,11 +2,11 @@
<div>
<div class="row mb-6">
<div class="col-4">
- <oat-field data-cy="btn-enable-bounce">
- <oat-switch v-model="data['bounce.enabled']" name="bounce.enabled">
+ <b-field data-cy="btn-enable-bounce">
+ <b-switch v-model="data['bounce.enabled']" name="bounce.enabled">
{{ $t('settings.bounces.enable') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<div class="col-8">
<div v-for="typ in bounceTypes" :key="typ" class="row">
@@ -14,14 +14,14 @@
{{ $t(`bounces.${typ}`) }}
</div>
<div class="col-4" :class="{ disabled: !data['bounce.enabled'] }">
- <oat-field :label="$t('settings.bounces.count')" :message="$t('settings.bounces.countHelp')"
+ <b-field :label="$t('settings.bounces.count')" :message="$t('settings.bounces.countHelp')"
data-cy="btn-bounce-count">
<input aria-label="field" type="number" v-model.number="data['bounce.actions'][typ]['count']"
name="bounce.count" placeholder="3" min="1" max="1000">
- </oat-field>
+ </b-field>
</div>
<div class="col-4" :class="{ disabled: !data['bounce.enabled'] }">
- <oat-field :label="$t('settings.bounces.action')">
+ <b-field :label="$t('settings.bounces.action')">
<select aria-label="field" name="bounce.action" v-model="data['bounce.actions'][typ]['action']">
<option value="none">
{{ $t('globals.terms.none') }}
@@ -36,146 +36,146 @@
{{ $t('globals.buttons.delete') }}
</option>
</select>
- </oat-field>
+ </b-field>
</div>
</div>
</div>
</div><!-- row -->
<div class="mb-6">
- <oat-field data-cy="btn-enable-bounce-webhook">
- <oat-switch v-model="data['bounce.webhooks_enabled']" :disabled="!data['bounce.enabled']"
+ <b-field data-cy="btn-enable-bounce-webhook">
+ <b-switch v-model="data['bounce.webhooks_enabled']" :disabled="!data['bounce.enabled']"
name="webhooks_enabled" :native-value="true" data-cy="btn-enable-bounce-webhook">
{{ $t('settings.bounces.enableWebhooks') }}
- </oat-switch>
+ </b-switch>
<p class="text-light text-7">
<a href="https://listmonk.app/docs/bounces" target="_blank" rel="noopener noreferer">{{
$t('globals.buttons.learnMore') }} &rarr;</a>
</p>
- </oat-field>
+ </b-field>
<div class="card" v-if="data['bounce.webhooks_enabled']">
<div class="row">
<div class="col-12">
- <oat-field>
- <oat-switch v-model="data['bounce.ses_enabled']" name="ses_enabled" :native-value="true"
+ <b-field>
+ <b-switch v-model="data['bounce.ses_enabled']" name="ses_enabled" :native-value="true"
data-cy="btn-enable-bounce-ses">
{{ $t('settings.bounces.enableSES') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
</div>
<div class="row">
<div class="col-3">
- <oat-field>
- <oat-switch v-model="data['bounce.azure'].enabled" name="azure_enabled" :native-value="true"
+ <b-field>
+ <b-switch v-model="data['bounce.azure'].enabled" name="azure_enabled" :native-value="true"
data-cy="btn-enable-bounce-azure">
{{ $t('settings.bounces.enableAzure') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<div class="col-4">
- <oat-field :label="$t('settings.bounces.azureSharedSecret')"
+ <b-field :label="$t('settings.bounces.azureSharedSecret')"
:message="$t('settings.bounces.azureSharedSecretHelp')">
<input aria-label="field" v-model="data['bounce.azure'].shared_secret" type="password"
:disabled="!data['bounce.azure'].enabled" name="azure_shared_secret"
data-cy="bounce-azure-shared-secret">
- </oat-field>
+ </b-field>
</div>
<div class="col-5">
- <oat-field :label="$t('settings.bounces.azureSharedSecretHeader')"
+ <b-field :label="$t('settings.bounces.azureSharedSecretHeader')"
:message="$t('settings.bounces.azureSharedSecretHeaderHelp')">
<input aria-label="field" v-model="data['bounce.azure'].shared_secret_header" type="text"
:disabled="!data['bounce.azure'].enabled" name="azure_shared_secret_header"
data-cy="bounce-azure-shared-secret-header">
- </oat-field>
+ </b-field>
</div>
</div>
<div class="row">
<div class="col-3">
- <oat-field>
- <oat-switch v-model="data['bounce.sendgrid_enabled']" name="sendgrid_enabled" :native-value="true"
+ <b-field>
+ <b-switch v-model="data['bounce.sendgrid_enabled']" name="sendgrid_enabled" :native-value="true"
data-cy="btn-enable-bounce-sendgrid">
{{ $t('settings.bounces.enableSendgrid') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<div class="col-9">
- <oat-field :label="$t('settings.bounces.sendgridKey')" :message="$t('globals.messages.passwordChange')">
+ <b-field :label="$t('settings.bounces.sendgridKey')" :message="$t('globals.messages.passwordChange')">
<input aria-label="field" v-model="data['bounce.sendgrid_key']" type="password"
:disabled="!data['bounce.sendgrid_enabled']" name="sendgrid_enabled" :native-value="true"
data-cy="btn-enable-bounce-sendgrid">
- </oat-field>
+ </b-field>
</div>
</div>
<div class="row">
<div class="col-3">
- <oat-field>
- <oat-switch v-model="data['bounce.postmark'].enabled" name="postmark_enabled" :native-value="true"
+ <b-field>
+ <b-switch v-model="data['bounce.postmark'].enabled" name="postmark_enabled" :native-value="true"
data-cy="btn-enable-bounce-postmark">
{{ $t('settings.bounces.enablePostmark') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<div class="col-4">
- <oat-field :label="$t('settings.bounces.postmarkUsername')"
+ <b-field :label="$t('settings.bounces.postmarkUsername')"
:message="$t('settings.bounces.postmarkUsernameHelp')">
<input aria-label="field" v-model="data['bounce.postmark'].username" type="text"
:disabled="!data['bounce.postmark'].enabled" name="postmark_username"
data-cy="btn-enable-bounce-postmark">
- </oat-field>
+ </b-field>
</div>
<div class="col-5">
- <oat-field :label="$t('settings.bounces.postmarkPassword')"
+ <b-field :label="$t('settings.bounces.postmarkPassword')"
:message="$t('globals.messages.passwordChange')">
<input aria-label="field" v-model="data['bounce.postmark'].password" type="password"
:disabled="!data['bounce.postmark'].enabled" name="postmark_password"
data-cy="btn-enable-bounce-postmark">
- </oat-field>
+ </b-field>
</div>
</div>
<div class="row">
<div class="col-3">
- <oat-field>
- <oat-switch v-model="data['bounce.forwardemail'].enabled" name="forwardemail_enabled" :native-value="true"
+ <b-field>
+ <b-switch v-model="data['bounce.forwardemail'].enabled" name="forwardemail_enabled" :native-value="true"
data-cy="btn-enable-bounce-forwardemail">
{{ $t('settings.bounces.enableForwardemail') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<div class="col-9">
- <oat-field :label="$t('settings.bounces.forwardemailKey')" :message="$t('globals.messages.passwordChange')">
+ <b-field :label="$t('settings.bounces.forwardemailKey')" :message="$t('globals.messages.passwordChange')">
<input aria-label="field" v-model="data['bounce.forwardemail'].key" type="password"
:disabled="!data['bounce.forwardemail'].enabled" name="forwardemail_enabled" :native-value="true"
data-cy="btn-enable-bounce-forwardemail">
- </oat-field>
+ </b-field>
</div>
</div>
<div class="row">
<div class="col-3">
- <oat-field>
- <oat-switch v-model="data['bounce.lettermint'].enabled" name="lettermint_enabled" :native-value="true"
+ <b-field>
+ <b-switch v-model="data['bounce.lettermint'].enabled" name="lettermint_enabled" :native-value="true"
data-cy="btn-enable-bounce-lettermint">
{{ $t('settings.bounces.enableLettermint') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<div class="col-9">
- <oat-field :label="$t('settings.bounces.lettermintKey')" :message="$t('globals.messages.passwordChange')">
+ <b-field :label="$t('settings.bounces.lettermintKey')" :message="$t('globals.messages.passwordChange')">
<input aria-label="field" v-model="data['bounce.lettermint'].key" type="password"
:disabled="!data['bounce.lettermint'].enabled" name="lettermint_key" data-cy="bounce-lettermint-key">
- </oat-field>
+ </b-field>
</div>
</div>
</div>
</div>
<!-- bounce mailcard -->
- <oat-field>
- <oat-switch v-if="data['bounce.mailcardes']" v-model="data['bounce.mailcardes'][0].enabled"
+ <b-field>
+ <b-switch v-if="data['bounce.mailcardes']" v-model="data['bounce.mailcardes'][0].enabled"
:disabled="!data['bounce.enabled']" name="enabled" :native-value="true" data-cy="btn-enable-bounce-mailcard">
{{ $t('settings.bounces.enableMailcard') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
<template v-if="data['bounce.enabled'] && data['bounce.mailcardes'][0].enabled">
<div class="card" v-for="(item, n) in data['bounce.mailcardes']" :key="n">
@@ -183,31 +183,31 @@
<div class="col-12" :class="{ disabled: !item.enabled }">
<div class="row">
<div class="col-3">
- <oat-field :label="$t('settings.bounces.type')">
+ <b-field :label="$t('settings.bounces.type')">
<select aria-label="field" v-model="item.type" name="type">
<option value="pop">
POP
</option>
</select>
- </oat-field>
+ </b-field>
</div>
<div class="col-6">
- <oat-field :label="$t('settings.mailserver.host')" :message="$t('settings.mailserver.hostHelp')">
+ <b-field :label="$t('settings.mailserver.host')" :message="$t('settings.mailserver.hostHelp')">
<input aria-label="field" v-model="item.host" name="host" placeholder="bounce.yourmailserver.net"
:maxlength="200">
- </oat-field>
+ </b-field>
</div>
<div class="col-3">
- <oat-field :label="$t('settings.mailserver.port')" :message="$t('settings.mailserver.portHelp')">
+ <b-field :label="$t('settings.mailserver.port')" :message="$t('settings.mailserver.portHelp')">
<input aria-label="field" type="number" v-model.number="item.port" name="port" placeholder="25"
min="1" max="65535">
- </oat-field>
+ </b-field>
</div>
</div><!-- host -->
<div class="row">
<div class="col-3">
- <oat-field :label="$t('settings.mailserver.authProtocol')">
+ <b-field :label="$t('settings.mailserver.authProtocol')">
<select aria-label="field" v-model="item.auth_protocol" name="auth_protocol">
<option value="none">
none
@@ -227,47 +227,47 @@
</option>
</template>
</select>
- </oat-field>
+ </b-field>
</div>
<div class="col-9">
- <oat-field>
- <oat-field :label="$t('settings.mailserver.username')">
+ <b-field>
+ <b-field :label="$t('settings.mailserver.username')">
<input aria-label="field" v-model="item.username" :disabled="item.auth_protocol === 'none'"
name="username" placeholder="mysmtp" :maxlength="200">
- </oat-field>
- <oat-field :label="$t('settings.mailserver.password')"
+ </b-field>
+ <b-field :label="$t('settings.mailserver.password')"
:message="$t('settings.mailserver.passwordHelp')">
<input aria-label="field" v-model="item.password" :disabled="item.auth_protocol === 'none'"
name="password" type="password" :placeholder="$t('settings.mailserver.passwordHelp')"
:maxlength="200">
- </oat-field>
- </oat-field>
+ </b-field>
+ </b-field>
</div>
</div><!-- auth -->
<div class="row">
<div class="col-6">
- <oat-field>
- <oat-field :message="$t('settings.mailserver.tlsHelp')">
- <oat-switch v-model="item.tls_enabled" name="item.tls_enabled">
+ <b-field>
+ <b-field :message="$t('settings.mailserver.tlsHelp')">
+ <b-switch v-model="item.tls_enabled" name="item.tls_enabled">
{{ $t('settings.mailserver.tls') }}
- </oat-switch>
- </oat-field>
- <oat-field :message="$t('settings.mailserver.skipTLSHelp')">
- <oat-switch v-model="item.tls_skip_verify" :disabled="!item.tls_enabled"
+ </b-switch>
+ </b-field>
+ <b-field :message="$t('settings.mailserver.skipTLSHelp')">
+ <b-switch v-model="item.tls_skip_verify" :disabled="!item.tls_enabled"
name="item.tls_skip_verify">
{{ $t('settings.mailserver.skipTLS') }}
- </oat-switch>
- </oat-field>
- </oat-field>
+ </b-switch>
+ </b-field>
+ </b-field>
</div>
<div class="col-2" />
<div class="col-4">
- <oat-field :label="$t('settings.bounces.scanInterval')"
+ <b-field :label="$t('settings.bounces.scanInterval')"
:message="$t('settings.bounces.scanIntervalHelp')">
<input aria-label="field" v-model="item.scan_interval" name="scan_interval" placeholder="15m"
:pattern="regDuration" :maxlength="10">
- </oat-field>
+ </b-field>
</div>
</div><!-- TLS -->
</div>
diff --git a/frontend/src/views/settings/general.vue b/frontend/src/views/settings/general.vue
index 46413334..7226bd5d 100644
--- a/frontend/src/views/settings/general.vue
+++ b/frontend/src/views/settings/general.vue
@@ -1,33 +1,33 @@
<template>
<div class="items">
- <oat-field :label="$t('settings.general.siteName')">
+ <b-field :label="$t('settings.general.siteName')">
<input aria-label="field" v-model="data['app.site_name']" name="app.site_name"
:label="$t('settings.general.siteName')" :maxlength="300" required>
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.general.rootURL')" :message="$t('settings.general.rootURLHelp')">
+ <b-field :label="$t('settings.general.rootURL')" :message="$t('settings.general.rootURLHelp')">
<input aria-label="field" v-model="data['app.root_url']" name="app.root_url"
placeholder="https://listmonk.yoursite.com" :maxlength="300" required type="url" pattern="https?://.*">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.general.logoURL')" :message="$t('settings.general.logoURLHelp')">
+ <b-field :label="$t('settings.general.logoURL')" :message="$t('settings.general.logoURLHelp')">
<input aria-label="field" v-model="data['app.logo_url']" name="app.logo_url"
placeholder="https://listmonk.yoursite.com/logo.png" :maxlength="300" type="url" pattern="https?://.*">
- </oat-field>
- <oat-field :label="$t('settings.general.faviconURL')" :message="$t('settings.general.faviconURLHelp')">
+ </b-field>
+ <b-field :label="$t('settings.general.faviconURL')" :message="$t('settings.general.faviconURLHelp')">
<input aria-label="field" v-model="data['app.favicon_url']" name="app.favicon_url"
placeholder="https://listmonk.yoursite.com/favicon.png" :maxlength="300" type="url" pattern="https?://.*">
- </oat-field>
+ </b-field>
<hr />
- <oat-field :label="$t('settings.general.fromEmail')" :message="$t('settings.general.fromEmailHelp')">
+ <b-field :label="$t('settings.general.fromEmail')" :message="$t('settings.general.fromEmailHelp')">
<input aria-label="field" v-model="data['app.from_email']" name="app.from_email"
placeholder="Listmonk <[email protected]>" pattern="((.+?)\s)?<(.+?)@(.+?)>" :maxlength="300" />
- </oat-field>
- <oat-field :label="$t('settings.general.adminNotifEmails')" :message="$t('settings.general.adminNotifEmailsHelp')">
- <oat-tag-input v-model="data['app.notify_emails']" name="app.notify_emails"
+ </b-field>
+ <b-field :label="$t('settings.general.adminNotifEmails')" :message="$t('settings.general.adminNotifEmailsHelp')">
+ <b-taginput v-model="data['app.notify_emails']" name="app.notify_emails"
:before-adding="(v) => v.match(/(.+?)@(.+?)/)" placeholder="[email protected]" />
- </oat-field>
+ </b-field>
<hr />
@@ -35,21 +35,21 @@
<h2 class="text-4 mb-5">
{{ $tc('globals.terms.subscriptions', 2) }}
</h2>
- <oat-field :message="$t('settings.general.enablePublicSubPageHelp')">
- <oat-switch v-model="data['app.enable_public_subscription_page']" name="app.enable_public_subscription_page">
+ <b-field :message="$t('settings.general.enablePublicSubPageHelp')">
+ <b-switch v-model="data['app.enable_public_subscription_page']" name="app.enable_public_subscription_page">
{{ $t('settings.general.enablePublicSubPage') }}
- </oat-switch>
- </oat-field>
- <oat-field :message="$t('settings.general.sendOptinConfirmHelp')">
- <oat-switch v-model="data['app.send_optin_confirmation']" name="app.send_optin_confirmation">
+ </b-switch>
+ </b-field>
+ <b-field :message="$t('settings.general.sendOptinConfirmHelp')">
+ <b-switch v-model="data['app.send_optin_confirmation']" name="app.send_optin_confirmation">
{{ $t('settings.general.sendOptinConfirm') }}
- </oat-switch>
- </oat-field>
- <oat-field :message="$t('settings.general.showOptinPageHelp')">
- <oat-switch v-model="data['app.show_optin_page']" name="app.show_optin_page">
+ </b-switch>
+ </b-field>
+ <b-field :message="$t('settings.general.showOptinPageHelp')">
+ <b-switch v-model="data['app.show_optin_page']" name="app.show_optin_page">
{{ $t('settings.general.showOptinPage') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<hr />
@@ -57,28 +57,28 @@
<h2 class="text-4 mb-5">
{{ $t('campaigns.archive') }}
</h2>
- <oat-field :message="$t('settings.general.enablePublicArchiveHelp')">
- <oat-switch v-model="data['app.enable_public_archive']" name="app.enable_public_archive">
+ <b-field :message="$t('settings.general.enablePublicArchiveHelp')">
+ <b-switch v-model="data['app.enable_public_archive']" name="app.enable_public_archive">
{{ $t('settings.general.enablePublicArchive') }}
- </oat-switch>
- </oat-field>
- <oat-field :message="$t('settings.general.enablePublicArchiveRSSContentHelp')">
- <oat-switch v-model="data['app.enable_public_archive_rss_content']"
+ </b-switch>
+ </b-field>
+ <b-field :message="$t('settings.general.enablePublicArchiveRSSContentHelp')">
+ <b-switch v-model="data['app.enable_public_archive_rss_content']"
name="app.enable_public_archive_rss_content">
{{ $t('settings.general.enablePublicArchiveRSSContent') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<hr />
- <oat-field :message="$t('settings.general.checkUpdatesHelp')">
- <oat-switch v-model="data['app.check_updates']" name="app.check_updates">
+ <b-field :message="$t('settings.general.checkUpdatesHelp')">
+ <b-switch v-model="data['app.check_updates']" name="app.check_updates">
{{ $t('settings.general.checkUpdates') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
<hr />
- <oat-field :label="$t('settings.general.language')">
+ <b-field :label="$t('settings.general.language')">
<select aria-label="field" v-model="data['app.lang']" name="app.lang">
<option v-for="l in serverConfig.langs" :key="l.code" :value="l.code">
{{ l.name }}
@@ -88,7 +88,7 @@
<a href="https://listmonk.app/docs/i18n/#additional-language-packs" target="_blank" rel="noopener noreferer">{{
$t('globals.buttons.more') }} &rarr;</a>
</p>
- </oat-field>
+ </b-field>
</div>
</template>
diff --git a/frontend/src/views/settings/media.vue b/frontend/src/views/settings/media.vue
index 8114f7ac..22bcbc98 100644
--- a/frontend/src/views/settings/media.vue
+++ b/frontend/src/views/settings/media.vue
@@ -2,7 +2,7 @@
<div class="items">
<div class="row">
<div class="col-2">
- <oat-field :label="$t('settings.media.provider')">
+ <b-field :label="$t('settings.media.provider')">
<select aria-label="field" v-model="data['upload.provider']" name="upload.provider">
<option value="filesystem">
filesystem
@@ -11,45 +11,45 @@
s3
</option>
</select>
- </oat-field>
+ </b-field>
</div>
<div class="col-10">
- <oat-field :label="$t('settings.media.upload.extensions')">
- <oat-tag-input v-model="data['upload.extensions']" name="tags" placeholder="jpg, png, gif .." />
- </oat-field>
+ <b-field :label="$t('settings.media.upload.extensions')">
+ <b-taginput v-model="data['upload.extensions']" name="tags" placeholder="jpg, png, gif .." />
+ </b-field>
</div>
</div>
<hr />
<div v-if="data['upload.provider'] === 'filesystem'">
- <oat-field :label="$t('settings.media.upload.path')" :message="$t('settings.media.upload.pathHelp')">
+ <b-field :label="$t('settings.media.upload.path')" :message="$t('settings.media.upload.pathHelp')">
<input aria-label="field" v-model="data['upload.filesystem.upload_path']" name="app.upload_path"
placeholder="/home/listmonk/uploads" :maxlength="200" required>
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.media.upload.uri')" :message="$t('settings.media.upload.uriHelp')">
+ <b-field :label="$t('settings.media.upload.uri')" :message="$t('settings.media.upload.uriHelp')">
<input aria-label="field" v-model="data['upload.filesystem.upload_uri']" name="app.upload_uri"
placeholder="/uploads" :maxlength="200" required pattern="^\/(.+?)">
- </oat-field>
+ </b-field>
</div><!-- filesystem -->
<div v-if="data['upload.provider'] === 's3'">
- <oat-field :label="$t('settings.media.s3.region')">
+ <b-field :label="$t('settings.media.s3.region')">
<input aria-label="field" v-model="data['upload.s3.aws_default_region']" @input="onS3URLChange"
name="upload.s3.aws_default_region" :maxlength="200" placeholder="ap-south-1">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.media.s3.key')">
+ <b-field :label="$t('settings.media.s3.key')">
<input aria-label="field" v-model="data['upload.s3.aws_access_key_id']" name="upload.s3.aws_access_key_id"
:maxlength="200">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.media.s3.secret')" message="Enter a value to change.">
+ <b-field :label="$t('settings.media.s3.secret')" message="Enter a value to change.">
<input aria-label="field" v-model="data['upload.s3.aws_secret_access_key']"
name="upload.s3.aws_secret_access_key" type="password" :maxlength="200">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.media.s3.bucketType')">
+ <b-field :label="$t('settings.media.s3.bucketType')">
<select aria-label="field" v-model="data['upload.s3.bucket_type']" name="upload.s3.bucket_type">
<option value="private">
{{ $t('settings.media.s3.bucketTypePrivate') }}
@@ -58,32 +58,32 @@
{{ $t('settings.media.s3.bucketTypePublic') }}
</option>
</select>
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.media.s3.bucket')">
+ <b-field :label="$t('settings.media.s3.bucket')">
<input aria-label="field" v-model="data['upload.s3.bucket']" @input="onS3URLChange" name="upload.s3.bucket"
:maxlength="200" placeholder="">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.media.s3.bucketPath')" :message="$t('settings.media.s3.bucketPathHelp')">
+ <b-field :label="$t('settings.media.s3.bucketPath')" :message="$t('settings.media.s3.bucketPathHelp')">
<input aria-label="field" v-model="data['upload.s3.bucket_path']" name="upload.s3.bucket_path" :maxlength="200"
placeholder="/">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.media.s3.uploadExpiry')" :message="$t('settings.media.s3.uploadExpiryHelp')">
+ <b-field :label="$t('settings.media.s3.uploadExpiry')" :message="$t('settings.media.s3.uploadExpiryHelp')">
<input aria-label="field" v-model="data['upload.s3.expiry']" name="upload.s3.expiry" placeholder="14d"
:pattern="regDuration" :maxlength="10">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.media.s3.url')" :message="$t('settings.media.s3.urlHelp')">
+ <b-field :label="$t('settings.media.s3.url')" :message="$t('settings.media.s3.urlHelp')">
<input aria-label="field" v-model="data['upload.s3.url']" name="upload.s3.url" required
placeholder="https://s3.$region.amazonaws.com" :maxlength="200" type="url" pattern="https?://.*">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.media.s3.publicURL')" :message="$t('settings.media.s3.publicURLHelp')">
+ <b-field :label="$t('settings.media.s3.publicURL')" :message="$t('settings.media.s3.publicURLHelp')">
<input aria-label="field" v-model="data['upload.s3.public_url']" name="upload.s3.public_url"
placeholder="https://files.yourdomain.com" :maxlength="200" type="string" pattern="(https?://.*|/.+)">
- </oat-field>
+ </b-field>
</div><!-- s3 -->
</div>
</template>
diff --git a/frontend/src/views/settings/messengers.vue b/frontend/src/views/settings/messengers.vue
index d65afa8a..1ffb0396 100644
--- a/frontend/src/views/settings/messengers.vue
+++ b/frontend/src/views/settings/messengers.vue
@@ -2,55 +2,55 @@
<div>
<div class="items messengers">
<div class="card" v-for="(item, n) in data.messengers" :key="n">
- <oat-field>
- <oat-switch v-model="item.enabled" name="enabled" :native-value="true">
+ <b-field>
+ <b-switch v-model="item.enabled" name="enabled" :native-value="true">
{{ $t('globals.buttons.enabled') }}
- </oat-switch>
- </oat-field>
- <oat-field>
+ </b-switch>
+ </b-field>
+ <b-field>
<a @click.prevent="$utils.confirm(null, () => removeMessenger(n))" href="#">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
{{ $t('globals.buttons.delete') }}
</a>
- </oat-field>
+ </b-field>
<div :class="{ disabled: !item.enabled }">
- <oat-field :label="$t('globals.fields.name')" :message="$t('settings.messengers.nameHelp')">
+ <b-field :label="$t('globals.fields.name')" :message="$t('settings.messengers.nameHelp')">
<input aria-label="field" v-model="item.name" name="name" placeholder="mymessenger" :maxlength="200">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.messengers.url')" :message="$t('settings.messengers.urlHelp')">
+ <b-field :label="$t('settings.messengers.url')" :message="$t('settings.messengers.urlHelp')">
<input aria-label="field" v-model="item.root_url" name="root_url"
placeholder="https://postback.messenger.net/path" :maxlength="200" type="url" pattern="https?://.*">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.messengers.username')">
+ <b-field :label="$t('settings.messengers.username')">
<input aria-label="field" v-model="item.username" name="username" :maxlength="200">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.messengers.password')" :message="$t('globals.messages.passwordChange')">
+ <b-field :label="$t('settings.messengers.password')" :message="$t('globals.messages.passwordChange')">
<input aria-label="field" v-model="item.password" name="password" type="password"
:placeholder="$t('globals.messages.passwordChange')" :maxlength="200">
- </oat-field>
+ </b-field>
<div class="row">
<div class="col-4">
- <oat-field :label="$t('settings.messengers.maxConns')" :message="$t('settings.messengers.maxConnsHelp')">
+ <b-field :label="$t('settings.messengers.maxConns')" :message="$t('settings.messengers.maxConnsHelp')">
<input aria-label="field" type="number" v-model.number="item.max_conns" name="max_conns"
placeholder="25" min="1" max="65535">
- </oat-field>
+ </b-field>
</div>
<div class="col-4">
- <oat-field :label="$t('settings.messengers.retries')" :message="$t('settings.messengers.retriesHelp')">
+ <b-field :label="$t('settings.messengers.retries')" :message="$t('settings.messengers.retriesHelp')">
<input aria-label="field" type="number" v-model.number="item.max_msg_retries" name="max_msg_retries"
placeholder="2" min="1" max="1000">
- </oat-field>
+ </b-field>
</div>
<div class="col-4">
- <oat-field :label="$t('settings.messengers.timeout')" :message="$t('settings.messengers.timeoutHelp')">
+ <b-field :label="$t('settings.messengers.timeout')" :message="$t('settings.messengers.timeoutHelp')">
<input aria-label="field" v-model="item.timeout" name="timeout" placeholder="5s" :pattern="regDuration"
:maxlength="10">
- </oat-field>
+ </b-field>
</div>
</div>
</div>
diff --git a/frontend/src/views/settings/performance.vue b/frontend/src/views/settings/performance.vue
index fb59d4ff..a046e841 100644
--- a/frontend/src/views/settings/performance.vue
+++ b/frontend/src/views/settings/performance.vue
@@ -1,52 +1,52 @@
<template>
<div class="items">
- <oat-field :label="$t('settings.performance.concurrency')" :message="$t('settings.performance.concurrencyHelp')">
+ <b-field :label="$t('settings.performance.concurrency')" :message="$t('settings.performance.concurrencyHelp')">
<input aria-label="field" type="number" v-model.number="data['app.concurrency']" name="app.concurrency"
placeholder="5" min="1" max="10000">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.performance.messageRate')" :message="$t('settings.performance.messageRateHelp')">
+ <b-field :label="$t('settings.performance.messageRate')" :message="$t('settings.performance.messageRateHelp')">
<input aria-label="field" type="number" v-model.number="data['app.message_rate']" name="app.message_rate"
placeholder="5" min="1" max="100000">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.performance.batchSize')" :message="$t('settings.performance.batchSizeHelp')">
+ <b-field :label="$t('settings.performance.batchSize')" :message="$t('settings.performance.batchSizeHelp')">
<input aria-label="field" type="number" v-model.number="data['app.batch_size']" name="app.batch_size"
placeholder="1000" min="1" max="100000">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.performance.maxErrThreshold')"
+ <b-field :label="$t('settings.performance.maxErrThreshold')"
:message="$t('settings.performance.maxErrThresholdHelp')">
<input aria-label="field" type="number" v-model.number="data['app.max_send_errors']" name="app.max_send_errors"
placeholder="1999" min="0" max="100000">
- </oat-field>
+ </b-field>
<div>
<div class="row">
<div class="col-6">
- <oat-field :message="$t('settings.performance.slidingWindowHelp')">
- <oat-switch v-model="data['app.message_sliding_window']" name="app.message_sliding_window">
+ <b-field :message="$t('settings.performance.slidingWindowHelp')">
+ <b-switch v-model="data['app.message_sliding_window']" name="app.message_sliding_window">
{{ $t('settings.performance.slidingWindow') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<div class="col-3" :class="{ disabled: !data['app.message_sliding_window'] }">
- <oat-field :label="$t('settings.performance.slidingWindowRate')"
+ <b-field :label="$t('settings.performance.slidingWindowRate')"
:message="$t('settings.performance.slidingWindowRateHelp')">
<input aria-label="field" type="number" v-model.number="data['app.message_sliding_window_rate']"
name="sliding_window_rate" :disabled="!data['app.message_sliding_window']" placeholder="25" min="1"
max="10000000">
- </oat-field>
+ </b-field>
</div>
<div class="col-3" :class="{ disabled: !data['app.message_sliding_window'] }">
- <oat-field :label="$t('settings.performance.slidingWindowDuration')"
+ <b-field :label="$t('settings.performance.slidingWindowDuration')"
:message="$t('settings.performance.slidingWindowDurationHelp')">
<input aria-label="field" v-model="data['app.message_sliding_window_duration']"
name="sliding_window_duration" :disabled="!data['app.message_sliding_window']" placeholder="1h"
:pattern="regDuration" :maxlength="10">
- </oat-field>
+ </b-field>
</div>
</div>
</div><!-- sliding window -->
@@ -55,22 +55,22 @@
<hr />
<div class="row">
<div class="col-4">
- <oat-field :message="$t('settings.performance.cacheSlowQueriesHelp')">
- <oat-switch v-model="data['app.cache_slow_queries']" name="app.cache_slow_queries">
+ <b-field :message="$t('settings.performance.cacheSlowQueriesHelp')">
+ <b-switch v-model="data['app.cache_slow_queries']" name="app.cache_slow_queries">
{{ $t('settings.performance.cacheSlowQueries') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<div class="col-4" :class="{ disabled: !data['app.cache_slow_queries'] }">
- <oat-field :label="$t('settings.maintenance.cron')">
+ <b-field :label="$t('settings.maintenance.cron')">
<input aria-label="field" v-model="data['app.cache_slow_queries_interval']"
:disabled="!data['app.cache_slow_queries']" placeholder="0 3 * * *">
- </oat-field>
+ </b-field>
</div>
<div class="col-4">
<br /><br />
<a href="https://listmonk.app/docs/maintenance/performance/" target="_blank" rel="noopener noreferer">
- <oat-icon icon="link-variant" /> {{ $t('globals.buttons.learnMore') }}
+ <b-icon icon="link-variant" /> {{ $t('globals.buttons.learnMore') }}
</a>
</div>
</div>
diff --git a/frontend/src/views/settings/privacy.vue b/frontend/src/views/settings/privacy.vue
index ee69360b..8ce96e37 100644
--- a/frontend/src/views/settings/privacy.vue
+++ b/frontend/src/views/settings/privacy.vue
@@ -2,57 +2,57 @@
<div class="items">
<div class="row">
<div class="col-6">
- <oat-field :message="$t('settings.privacy.disableTrackingHelp')">
- <oat-switch v-model="data['privacy.disable_tracking']" name="privacy.disable_tracking">
+ <b-field :message="$t('settings.privacy.disableTrackingHelp')">
+ <b-switch v-model="data['privacy.disable_tracking']" name="privacy.disable_tracking">
{{ $t('settings.privacy.disableTracking') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<div class="col-6" :class="{ disabled: data['privacy.disable_tracking'] }">
- <oat-field :message="$t('settings.privacy.individualSubTrackingHelp')">
- <oat-switch v-model="data['privacy.individual_tracking']" :disabled="data['privacy.disable_tracking']"
+ <b-field :message="$t('settings.privacy.individualSubTrackingHelp')">
+ <b-switch v-model="data['privacy.individual_tracking']" :disabled="data['privacy.disable_tracking']"
name="privacy.individual_tracking">
{{ $t('settings.privacy.individualSubTracking') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
</div>
- <oat-field :message="$t('settings.privacy.listUnsubHeaderHelp')">
- <oat-switch v-model="data['privacy.unsubscribe_header']" name="privacy.unsubscribe_header">
+ <b-field :message="$t('settings.privacy.listUnsubHeaderHelp')">
+ <b-switch v-model="data['privacy.unsubscribe_header']" name="privacy.unsubscribe_header">
{{ $t('settings.privacy.listUnsubHeader') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
- <oat-field :message="$t('settings.privacy.allowBlocklistHelp')">
- <oat-switch v-model="data['privacy.allow_blocklist']" name="privacy.allow_blocklist">
+ <b-field :message="$t('settings.privacy.allowBlocklistHelp')">
+ <b-switch v-model="data['privacy.allow_blocklist']" name="privacy.allow_blocklist">
{{ $t('settings.privacy.allowBlocklist') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
- <oat-field :message="$t('settings.privacy.allowPrefsHelp')">
- <oat-switch v-model="data['privacy.allow_preferences']" name="privacy.allow_blocklist">
+ <b-field :message="$t('settings.privacy.allowPrefsHelp')">
+ <b-switch v-model="data['privacy.allow_preferences']" name="privacy.allow_blocklist">
{{ $t('settings.privacy.allowPrefs') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
- <oat-field :message="$t('settings.privacy.allowExportHelp')">
- <oat-switch v-model="data['privacy.allow_export']" name="privacy.allow_export">
+ <b-field :message="$t('settings.privacy.allowExportHelp')">
+ <b-switch v-model="data['privacy.allow_export']" name="privacy.allow_export">
{{ $t('settings.privacy.allowExport') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
- <oat-field :message="$t('settings.privacy.allowWipeHelp')">
- <oat-switch v-model="data['privacy.allow_wipe']" name="privacy.allow_wipe">
+ <b-field :message="$t('settings.privacy.allowWipeHelp')">
+ <b-switch v-model="data['privacy.allow_wipe']" name="privacy.allow_wipe">
{{ $t('settings.privacy.allowWipe') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
- <oat-field :message="$t('settings.privacy.recordOptinIPHelp')">
- <oat-switch v-model="data['privacy.record_optin_ip']" name="privacy.record_optin_ip">
+ <b-field :message="$t('settings.privacy.recordOptinIPHelp')">
+ <b-switch v-model="data['privacy.record_optin_ip']" name="privacy.record_optin_ip">
{{ $t('settings.privacy.recordOptinIP') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
<hr />
@@ -67,14 +67,14 @@
</div>
<div role="tabpanel">
- <oat-field :message="$t('settings.privacy.domainBlocklistHelp')">
+ <b-field :message="$t('settings.privacy.domainBlocklistHelp')">
<textarea aria-label="field" v-model="data['privacy.domain_blocklist']" name="privacy.domain_blocklist" />
- </oat-field>
+ </b-field>
</div>
<div role="tabpanel">
- <oat-field :message="$t('settings.privacy.domainAllowlistHelp')">
+ <b-field :message="$t('settings.privacy.domainAllowlistHelp')">
<textarea aria-label="field" v-model="data['privacy.domain_allowlist']" name="privacy.domain_allowlist" />
- </oat-field>
+ </b-field>
</div>
</ot-tabs>
</div>
diff --git a/frontend/src/views/settings/security.vue b/frontend/src/views/settings/security.vue
index 64334caa..45fdad93 100644
--- a/frontend/src/views/settings/security.vue
+++ b/frontend/src/views/settings/security.vue
@@ -2,14 +2,14 @@
<div class="items">
<div class="row">
<div class="col-3">
- <oat-field :message="$t('settings.security.OIDCHelp')">
- <oat-switch v-model="data['security.oidc']['enabled']" name="security.oidc">
+ <b-field :message="$t('settings.security.OIDCHelp')">
+ <b-switch v-model="data['security.oidc']['enabled']" name="security.oidc">
{{ $t('settings.security.enableOIDC') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<div class="col-9">
- <oat-field :label="$t('settings.security.OIDCURL')">
+ <b-field :label="$t('settings.security.OIDCURL')">
<div>
<input aria-label="field" v-model="data['security.oidc']['provider_url']" name="oidc.provider_url"
placeholder="https://login.yoursite.com" :disabled="!data['security.oidc']['enabled']" :maxlength="300"
@@ -21,33 +21,33 @@
<a href="#" @click.prevent="() => setProvider('apple')">Apple</a>
</div>
</div>
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.security.OIDCName')">
+ <b-field :label="$t('settings.security.OIDCName')">
<input aria-label="field" v-model="data['security.oidc']['provider_name']" name="oidc.provider_name"
ref="provider_name" :disabled="!data['security.oidc']['enabled']" :maxlength="200">
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.security.OIDCClientID')">
+ <b-field :label="$t('settings.security.OIDCClientID')">
<input aria-label="field" v-model="data['security.oidc']['client_id']" name="oidc.client_id" ref="client_id"
:disabled="!data['security.oidc']['enabled']" :maxlength="200" required>
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.security.OIDCClientSecret')">
+ <b-field :label="$t('settings.security.OIDCClientSecret')">
<input aria-label="field" v-model="data['security.oidc']['client_secret']" name="oidc.client_secret"
type="password" :disabled="!data['security.oidc']['enabled']" :maxlength="200" required>
- </oat-field>
+ </b-field>
<hr />
- <oat-field :message="$t('settings.security.OIDCAutoCreateUsersHelp')">
- <oat-switch v-model="data['security.oidc']['auto_create_users']" :disabled="!data['security.oidc']['enabled']"
+ <b-field :message="$t('settings.security.OIDCAutoCreateUsersHelp')">
+ <b-switch v-model="data['security.oidc']['auto_create_users']" :disabled="!data['security.oidc']['enabled']"
name="oidc.auto_create_users">
{{ $t('settings.security.OIDCAutoCreateUsers') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
- <oat-field :label="$t('settings.security.OIDCDefaultUserRole')"
+ <b-field :label="$t('settings.security.OIDCDefaultUserRole')"
:message="$t('settings.security.OIDCDefaultRoleHelp')">
<select aria-label="field" v-model="data['security.oidc']['default_user_role_id']"
:disabled="!data['security.oidc']['enabled'] || !data['security.oidc']['auto_create_users']"
@@ -56,9 +56,9 @@
{{ role.name }}
</option>
</select>
- </oat-field>
+ </b-field>
- <oat-field :label="$t('settings.security.OIDCDefaultListRole')"
+ <b-field :label="$t('settings.security.OIDCDefaultListRole')"
:message="$t('settings.security.OIDCDefaultRoleHelp')">
<select aria-label="field" v-model="data['security.oidc']['default_list_role_id']"
:disabled="!data['security.oidc']['enabled'] || !data['security.oidc']['auto_create_users']"
@@ -68,15 +68,15 @@
{{ role.name }}
</option>
</select>
- </oat-field>
+ </b-field>
<hr />
- <oat-field :label="$t('settings.security.OIDCRedirectURL')">
+ <b-field :label="$t('settings.security.OIDCRedirectURL')">
<code><copy-text :text="`${serverConfig.root_url}/auth/oidc`" /></code>
- </oat-field>
+ </b-field>
<p v-if="data['security.oidc']['enabled'] && !isURLOk" class="text-danger">
- <oat-icon icon="warning-empty" />
+ <b-icon icon="warning-empty" />
{{ $t('settings.security.OIDCRedirectWarning') }}
</p>
</div>
@@ -85,11 +85,11 @@
<hr />
<div class="row">
<div class="col-3">
- <oat-field :message="$t('settings.security.enableCaptchaHelp')">
- <oat-switch v-model="captchaEnabled" name="security.captcha">
+ <b-field :message="$t('settings.security.enableCaptchaHelp')">
+ <b-switch v-model="captchaEnabled" name="security.captcha">
{{ $t('settings.security.enableCaptcha') }}
- </oat-switch>
- </oat-field>
+ </b-switch>
+ </b-field>
</div>
<div class="col-9" v-if="captchaEnabled">
<fieldset>
@@ -106,21 +106,21 @@
<!-- captcha settings -->
<div v-if="selectedProvider === 'altcha'">
- <oat-field :label="$t('settings.security.altchaComplexity')"
+ <b-field :label="$t('settings.security.altchaComplexity')"
:message="$t('settings.security.altchaComplexityHelp')">
<input aria-label="field" v-model.number="data['security.captcha']['altcha']['complexity']"
name="altcha_complexity" type="number" min="1000" max="1000000" required>
- </oat-field>
+ </b-field>
</div>
<div v-if="selectedProvider === 'hcaptcha'">
- <oat-field :label="$t('settings.security.captchaKey')" :message="$t('settings.security.captchaKeyHelp')">
+ <b-field :label="$t('settings.security.captchaKey')" :message="$t('settings.security.captchaKeyHelp')">
<input aria-label="field" v-model="data['security.captcha']['hcaptcha']['key']" name="hcaptcha_key"
:maxlength="200" required>
- </oat-field>
- <oat-field :label="$t('settings.security.captchaSecret')">
+ </b-field>
+ <b-field :label="$t('settings.security.captchaSecret')">
<input aria-label="field" v-model="data['security.captcha']['hcaptcha']['secret']" name="hcaptcha_secret"
type="password" :maxlength="200" required>
- </oat-field>
+ </b-field>
</div>
</div>
</div><!-- captcha -->
@@ -131,10 +131,10 @@
<div class="row">
<div class="col-12">
<h3><strong>{{ $t('settings.security.trustedURLs') }} / CORS</strong></h3><br />
- <oat-field :message="$t('settings.security.trustedURLsHelp')">
+ <b-field :message="$t('settings.security.trustedURLsHelp')">
<textarea aria-label="field" v-model="trustedURLs" name="trusted_urls" rows="5"
placeholder="https://example.com" />
- </oat-field>
+ </b-field>
</div>
</div><!-- cors -->
</div>
diff --git a/frontend/src/views/settings/smtp.vue b/frontend/src/views/settings/smtp.vue
index 89ae28bb..95303ebe 100644
--- a/frontend/src/views/settings/smtp.vue
+++ b/frontend/src/views/settings/smtp.vue
@@ -4,38 +4,38 @@
<div class="card" v-for="(item, n) in form.smtp" :key="n">
<div class="row">
<div class="col-2">
- <oat-field>
- <oat-switch v-model="item.enabled" name="enabled" :native-value="true" data-cy="btn-enable-smtp">
+ <b-field>
+ <b-switch v-model="item.enabled" name="enabled" :native-value="true" data-cy="btn-enable-smtp">
{{ $t('globals.buttons.enabled') }}
- </oat-switch>
- </oat-field>
- <oat-field v-if="form.smtp.length > 1">
+ </b-switch>
+ </b-field>
+ <b-field v-if="form.smtp.length > 1">
<a @click.prevent="$utils.confirm(null, () => removeSMTP(n))" href="#" data-cy="btn-delete-smtp">
- <oat-icon icon="trash-can-outline" />
+ <b-icon icon="trash-can-outline" />
{{ $t('globals.buttons.delete') }}
</a>
- </oat-field>
+ </b-field>
</div><!-- first col-12 -->
<div class="col-10" :class="{ disabled: !item.enabled }">
<div class="row">
<div class="col-9">
- <oat-field :label="$t('settings.mailserver.host')" :message="$t('settings.mailserver.hostHelp')">
+ <b-field :label="$t('settings.mailserver.host')" :message="$t('settings.mailserver.hostHelp')">
<input aria-label="field" v-model="item.host" name="host" placeholder="smtp.yourmailserver.net"
:maxlength="200">
- </oat-field>
+ </b-field>
</div>
<div class="col-3">
- <oat-field :label="$t('settings.mailserver.port')" :message="$t('settings.mailserver.portHelp')">
+ <b-field :label="$t('settings.mailserver.port')" :message="$t('settings.mailserver.portHelp')">
<input aria-label="field" type="number" v-model.number="item.port" name="port" placeholder="25"
min="1" max="65535">
- </oat-field>
+ </b-field>
</div>
</div><!-- host -->
<div class="row">
<div class="col-3">
- <oat-field :label="$t('settings.mailserver.authProtocol')">
+ <b-field :label="$t('settings.mailserver.authProtocol')">
<select aria-label="field" v-model="item.auth_protocol" name="auth_protocol">
<option value="login">
LOGIN
@@ -50,21 +50,21 @@
None
</option>
</select>
- </oat-field>
+ </b-field>
</div>
<div class="col-9">
- <oat-field>
- <oat-field :label="$t('settings.mailserver.username')">
+ <b-field>
+ <b-field :label="$t('settings.mailserver.username')">
<input aria-label="field" v-model="item.username" :disabled="item.auth_protocol === 'none'"
name="username" placeholder="mysmtp" :maxlength="200">
- </oat-field>
- <oat-field :label="$t('settings.mailserver.password')"
+ </b-field>
+ <b-field :label="$t('settings.mailserver.password')"
:message="$t('settings.mailserver.passwordHelp')">
<input aria-label="field" v-model="item.password" :disabled="item.auth_protocol === 'none'"
name="password" type="password" :placeholder="$t('settings.mailserver.passwordHelp')"
:maxlength="200">
- </oat-field>
- </oat-field>
+ </b-field>
+ </b-field>
</div>
</div><!-- auth -->
<div class="spaced-links text-7">
@@ -82,14 +82,14 @@
<div class="row">
<div class="col-6">
- <oat-field :label="$t('settings.smtp.heloHost')" :message="$t('settings.smtp.heloHostHelp')">
+ <b-field :label="$t('settings.smtp.heloHost')" :message="$t('settings.smtp.heloHostHelp')">
<input aria-label="field" v-model="item.hello_hostname" name="hello_hostname" placeholder=""
:maxlength="200">
- </oat-field>
+ </b-field>
</div>
<div class="col-6">
- <oat-field>
- <oat-field :label="$t('settings.mailserver.tls')" :message="$t('settings.mailserver.tlsHelp')">
+ <b-field>
+ <b-field :label="$t('settings.mailserver.tls')" :message="$t('settings.mailserver.tlsHelp')">
<select aria-label="field" v-model="item.tls_type" name="items.tls_type">
<option value="none">
{{ $t('globals.states.off') }}
@@ -101,70 +101,70 @@
SSL/TLS
</option>
</select>
- </oat-field>
- <oat-field :message="$t('settings.mailserver.skipTLSHelp')">
- <oat-switch v-model="item.tls_skip_verify" :disabled="item.tls_type === 'none'"
+ </b-field>
+ <b-field :message="$t('settings.mailserver.skipTLSHelp')">
+ <b-switch v-model="item.tls_skip_verify" :disabled="item.tls_type === 'none'"
name="item.tls_skip_verify">
{{ $t('settings.mailserver.skipTLS') }}
- </oat-switch>
- </oat-field>
- </oat-field>
+ </b-switch>
+ </b-field>
+ </b-field>
</div>
</div><!-- TLS -->
<hr />
<div class="row">
<div class="col-4">
- <oat-field :label="$t('settings.mailserver.maxConns')"
+ <b-field :label="$t('settings.mailserver.maxConns')"
:message="$t('settings.mailserver.maxConnsHelp')">
<input aria-label="field" type="number" v-model.number="item.max_conns" name="max_conns"
placeholder="25" min="1" max="65535">
- </oat-field>
+ </b-field>
</div>
<div class="col-4">
- <oat-field :label="$t('settings.mailserver.idleTimeout')"
+ <b-field :label="$t('settings.mailserver.idleTimeout')"
:message="$t('settings.mailserver.idleTimeoutHelp')">
<input aria-label="field" v-model="item.idle_timeout" name="idle_timeout" placeholder="15s"
:pattern="regDuration" :maxlength="10">
- </oat-field>
+ </b-field>
</div>
<div class="col-4">
- <oat-field :label="$t('settings.mailserver.waitTimeout')"
+ <b-field :label="$t('settings.mailserver.waitTimeout')"
:message="$t('settings.mailserver.waitTimeoutHelp')">
<input aria-label="field" v-model="item.wait_timeout" name="wait_timeout" placeholder="5s"
:pattern="regDuration" :maxlength="10">
- </oat-field>
+ </b-field>
</div>
</div>
<div class="row">
<div class="col-4">
- <oat-field :label="$t('settings.smtp.retries')" :message="$t('settings.smtp.retriesHelp')">
+ <b-field :label="$t('settings.smtp.retries')" :message="$t('settings.smtp.retriesHelp')">
<input aria-label="field" type="number" v-model.number="item.max_msg_retries" name="max_msg_retries"
placeholder="2" min="1" max="1000">
- </oat-field>
+ </b-field>
</div>
<div class="col-4">
- <oat-field :label="$t('settings.smtp.retryDelay')" :message="$t('settings.smtp.retryDelayHelp')">
+ <b-field :label="$t('settings.smtp.retryDelay')" :message="$t('settings.smtp.retryDelayHelp')">
<input aria-label="field" v-model="item.msg_retry_delay" name="msg_retry_delay" placeholder="0s"
:pattern="regDuration" :maxlength="10">
- </oat-field>
+ </b-field>
</div>
</div>
<hr />
<div class="row">
<div class="col-6">
- <oat-field :label="$t('globals.fields.name')" :message="$t('settings.mailserver.nameHelp')">
+ <b-field :label="$t('globals.fields.name')" :message="$t('settings.mailserver.nameHelp')">
<input aria-label="field" v-model="item.name" name="name" placeholder="email-primary"
:maxlength="100">
- </oat-field>
+ </b-field>
</div>
<div class="col-6">
- <oat-field :label="$t('settings.smtp.fromAddresses')" :message="$t('settings.smtp.fromAddressesHelp')">
- <oat-tag-input v-model="item.from_addresses" name="from_addresses"
+ <b-field :label="$t('settings.smtp.fromAddresses')" :message="$t('settings.smtp.fromAddressesHelp')">
+ <b-taginput v-model="item.from_addresses" name="from_addresses"
:before-adding="validateFromAddress" placeholder="[email protected], anothersite.com" />
- </oat-field>
+ </b-field>
</div>
</div>
@@ -172,13 +172,13 @@
<div class="col-12">
<p v-if="item.email_headers.length === 0 && !item.showHeaders">
<a href="#" @click.prevent="() => showSMTPHeaders(n)">
- <oat-icon icon="plus" />{{ $t('settings.smtp.setCustomHeaders') }}</a>
+ <b-icon icon="plus" />{{ $t('settings.smtp.setCustomHeaders') }}</a>
</p>
- <oat-field v-if="item.email_headers.length > 0 || item.showHeaders"
+ <b-field v-if="item.email_headers.length > 0 || item.showHeaders"
:message="$t('settings.smtp.customHeadersHelp')">
<textarea aria-label="field" v-model="item.strEmailHeaders" name="email_headers"
placeholder="[{&quot;X-Custom&quot;: &quot;value&quot;}, {&quot;X-Custom2&quot;: &quot;value&quot;}]" />
- </oat-field>
+ </b-field>
</div>
</div>
<hr />
@@ -192,10 +192,10 @@
{{ settings['app.from_email'] }}
</div>
<div class="col-4">
- <oat-field :label="$t('settings.smtp.toEmail')">
+ <b-field :label="$t('settings.smtp.toEmail')">
<input aria-label="field" type="email" required v-model="testEmail" :ref="'testEmailTo'"
placeholder="[email protected]">
- </oat-field>
+ </b-field>
</div>
</template>
<div class="col-3 align-right">
@@ -204,7 +204,7 @@
{{ $t('settings.smtp.sendTest') }}
</button>
<a href="#" v-else data-variant="primary" @click.prevent="showTestForm(n)">
- <oat-icon icon="rocket-launch-outline" /> {{ $t('settings.smtp.testConnection') }}
+ <b-icon icon="rocket-launch-outline" /> {{ $t('settings.smtp.testConnection') }}
</a>
</div>
<div class="row">
@@ -212,9 +212,9 @@
</div>
</div>
<div v-if="errMsg && smtpTestItem === n">
- <oat-field class="mt-4">
+ <b-field class="mt-4">
<textarea aria-label="field" v-model="errMsg" readonly />
- </oat-field>
+ </b-field>
</div>
</form><!-- smtp test -->
</div>