diff --git a/app/javascript/dashboard/components/helpCenter/Portal/Switch/Index.vue b/app/javascript/dashboard/components/helpCenter/Portal/Switch/Index.vue new file mode 100644 index 000000000..5519e897d --- /dev/null +++ b/app/javascript/dashboard/components/helpCenter/Portal/Switch/Index.vue @@ -0,0 +1,164 @@ + + + + + diff --git a/app/javascript/dashboard/components/helpCenter/Portal/Switch/Switch.stories.js b/app/javascript/dashboard/components/helpCenter/Portal/Switch/Switch.stories.js new file mode 100644 index 000000000..690eab642 --- /dev/null +++ b/app/javascript/dashboard/components/helpCenter/Portal/Switch/Switch.stories.js @@ -0,0 +1,68 @@ +import PortalSwitch from './Index.vue'; + +export default { + title: 'Components/Help Center/Portal Switch', + component: PortalSwitch, + argTypes: { + active: { + defaultValue: false, + control: { + type: 'boolean', + }, + }, + }, +}; + +const Template = (args, { argTypes }) => ({ + props: Object.keys(argTypes), + components: { PortalSwitch }, + template: + '{{label}}', +}); + +export const Primary = Template.bind({}); + +Primary.args = { + active: false, + portal: { + id: 1, + color: null, + custom_domain: 'doc', + articles_count: 123, + header_text: null, + homepage_link: null, + name: 'Chatwoot Docs', + page_title: null, + slug: 'first_portal', + archived: false, + config: { + allowed_locales: [ + { + code: 'en', + name: 'English', + articles_count: 123, + }, + { + code: 'fr', + name: 'Français', + articles_count: 123, + }, + { + code: 'de', + name: 'Deutsch', + articles_count: 32, + }, + { + code: 'es', + name: 'Español', + articles_count: 12, + }, + { + code: 'it', + name: 'Italiano', + articles_count: 8, + }, + ], + }, + }, +}; diff --git a/app/javascript/dashboard/i18n/locale/en/helpCenter.json b/app/javascript/dashboard/i18n/locale/en/helpCenter.json index 9fe1ed65c..39ad4067a 100644 --- a/app/javascript/dashboard/i18n/locale/en/helpCenter.json +++ b/app/javascript/dashboard/i18n/locale/en/helpCenter.json @@ -26,6 +26,12 @@ "SAVING": "Draft saving...", "SAVED": "Draft saved" }, + "PORTAL": { + "ACTIVE_BADGE": "active", + "CHOOSE_LOCALE_LABEL": "Choose a locale", + "ARTICLES_LABEL": "articles", + "ADD_NEW_LOCALE": "Add a new locale" + }, "TABLE": { "LOADING_MESSAGE": "Loading articles...", "404": "No articles matches your search 🔍",