diff --git a/app/javascript/packs/vue/open_locally_menu.js b/app/javascript/packs/vue/open_locally_menu.js new file mode 100644 index 000000000..d7e6d6c2b --- /dev/null +++ b/app/javascript/packs/vue/open_locally_menu.js @@ -0,0 +1,8 @@ +import { createApp } from 'vue/dist/vue.esm-bundler.js'; +import OpenLocallyMenu from '../../vue/shared/content/attachments/open_locally_menu.vue'; +import { mountWithTurbolinks } from './helpers/turbolinks.js'; + +const app = createApp({}); +app.component('OpenLocallyMenu', OpenLocallyMenu); +app.config.globalProperties.i18n = window.I18n; +mountWithTurbolinks(app, '#openLocallyMenu'); diff --git a/app/javascript/vue/shared/content/attachments/open_locally_menu.vue b/app/javascript/vue/shared/content/attachments/open_locally_menu.vue new file mode 100644 index 000000000..d1beba9b1 --- /dev/null +++ b/app/javascript/vue/shared/content/attachments/open_locally_menu.vue @@ -0,0 +1,67 @@ + +
+ + + diff --git a/app/views/shared/file_preview/_content.html.erb b/app/views/shared/file_preview/_content.html.erb index 36fbbf188..31fd8e0d8 100644 --- a/app/views/shared/file_preview/_content.html.erb +++ b/app/views/shared/file_preview/_content.html.erb @@ -3,13 +3,9 @@