You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/web_src/js/modules/stores.ts

17 lines
399 B
TypeScript

import {reactive} from 'vue';
import type {Reactive} from 'vue';
const {pageData} = window.config;
let diffTreeStoreReactive: Reactive<Record<string, any>>;
export function diffTreeStore() {
if (!diffTreeStoreReactive) {
diffTreeStoreReactive = reactive({
files: pageData.DiffFiles,
fileTreeIsVisible: false,
selectedItem: '',
});
}
return diffTreeStoreReactive;
}