Migrate media thread views to composition API

This commit is contained in:
N-Pex 2025-06-10 13:35:51 +02:00
parent 77eebafb79
commit 44578048aa
22 changed files with 1144 additions and 598 deletions

View file

@ -41,27 +41,6 @@ app.use(analytics);
app.use(VueClipboard);
app.use(audioPlayer);
// Add bubble functionality to custom events.
// From here: https://stackoverflow.com/questions/41993508/vuejs-bubbling-custom-events
app.use((instance) => {
instance.$bubble = function $bubble(eventName, ...args) {
// Emit the event on all parent components
let component = this;
let arg = args.at(0);
let stop = false;
if (arg) {
// Add a "stopPropagation" function so that we can do v-on:<eventname>.stop="..."
arg.stopPropagation = () => {
stop = true;
}
}
do {
component.$emit(eventName, ... args);
component = component.$parent;
} while (!stop && component);
};
});
// Register a global custom directive called `v-blur` that prevents focus
app.directive('blur', {
mounted: function (el) {
@ -182,6 +161,9 @@ app.use(i18n);
app.$i18n = i18n;
app.config.globalProperties.$i18n = i18n;
app.provide("globalT", i18n.global.t);
app.provide("globalSanitize", app.config.globalProperties.$sanitize);
app.use(matrix, { store: store, i18n: i18n });
// Set $matrix inside data store