diff --git a/app/controllers/user_notifications_controller.rb b/app/controllers/user_notifications_controller.rb index 0f1ffa0eb..127d35289 100644 --- a/app/controllers/user_notifications_controller.rb +++ b/app/controllers/user_notifications_controller.rb @@ -8,7 +8,7 @@ class UserNotificationsController < ApplicationController notifications = load_notifications case params[:tab] - when 'all' + when 'read' notifications = notifications.where.not(read_at: nil) when 'unread' notifications = notifications.where(read_at: nil) diff --git a/app/javascript/packs/vue/design_system/breadcrumbs.js b/app/javascript/packs/vue/design_system/breadcrumbs.js new file mode 100644 index 000000000..207ba469a --- /dev/null +++ b/app/javascript/packs/vue/design_system/breadcrumbs.js @@ -0,0 +1,22 @@ +import { createApp } from 'vue/dist/vue.esm-bundler.js'; +import Breadcrumbs from '../../../vue/shared/breadcrumbs.vue'; +import { mountWithTurbolinks } from '../helpers/turbolinks.js'; + +const app = createApp({ + computed: { + breadcrumbs() { + return [ + { name: 'Home', url: '/' }, + { name: 'Very very very long name ', url: '' }, + { name: 'Data', url: '' }, + { name: 'Very very very very very very very very very very long name ', url: '' }, + { name: 'Very very very very very very very long name ', url: '' }, + { name: 'Very very very very very long name ', url: '' }, + { name: 'Very very very very long name ', url: '' } + ]; + } + } +}); +app.component('Breadcrumbs', Breadcrumbs); +app.config.globalProperties.i18n = window.I18n; +mountWithTurbolinks(app, '#breadcrumbs'); diff --git a/app/javascript/vue/navigation/notifications/notification_item.vue b/app/javascript/vue/navigation/notifications/notification_item.vue index 1b33f05d8..9ab899648 100644 --- a/app/javascript/vue/navigation/notifications/notification_item.vue +++ b/app/javascript/vue/navigation/notifications/notification_item.vue @@ -16,24 +16,23 @@
- +
; diff --git a/app/views/design_elements/_breadcrumbs.html.erb b/app/views/design_elements/_breadcrumbs.html.erb new file mode 100644 index 000000000..dc24c31d1 --- /dev/null +++ b/app/views/design_elements/_breadcrumbs.html.erb @@ -0,0 +1,8 @@ +
+

breadcrumbs

+ +
+ +<%= javascript_include_tag 'vue_design_system_breadcrumbs' %> diff --git a/app/views/design_elements/index.html.erb b/app/views/design_elements/index.html.erb index 523cfe07e..5f9585a19 100644 --- a/app/views/design_elements/index.html.erb +++ b/app/views/design_elements/index.html.erb @@ -14,6 +14,8 @@ <%= render partial: 'select' %> +<%= render partial: 'breadcrumbs' %> + <%= render partial: 'modals' %> <%= render partial: 'icons', locals: {icons_list: icons_list} %> diff --git a/config/webpack/webpack.config.js b/config/webpack/webpack.config.js index 6cdd886b8..07ac593cd 100644 --- a/config/webpack/webpack.config.js +++ b/config/webpack/webpack.config.js @@ -54,6 +54,7 @@ const entryList = { vue_experiments_list: './app/javascript/packs/vue/experiments_list.js', vue_my_modules_list: './app/javascript/packs/vue/my_modules_list.js', vue_design_system_select: './app/javascript/packs/vue/design_system/select.js', + vue_design_system_breadcrumbs: './app/javascript/packs/vue/design_system/breadcrumbs.js', vue_protocols_list: './app/javascript/packs/vue/protocols_list.js', vue_repositories_table: './app/javascript/packs/vue/repositories_table.js', vue_import_repository_modal: './app/javascript/packs/vue/import_repository_modal.js',