Compare commits
2 Commits
cal/server
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d22c9e24f4 | ||
|
|
e31197f649 |
@ -76,10 +76,10 @@ const installing = ref(false)
|
|||||||
const onInstall = ref(() => {})
|
const onInstall = ref(() => {})
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
show: (instanceVal, projectVal, projectVersions, callback) => {
|
show: (instanceVal, projectVal, projectVersions, selected, callback) => {
|
||||||
instance.value = instanceVal
|
instance.value = instanceVal
|
||||||
versions.value = projectVersions
|
versions.value = projectVersions
|
||||||
selectedVersion.value = projectVersions[0]
|
selectedVersion.value = selected ?? projectVersions[0]
|
||||||
|
|
||||||
project.value = projectVal
|
project.value = projectVal
|
||||||
|
|
||||||
|
|||||||
@ -29,8 +29,8 @@ export const useInstall = defineStore('installStore', {
|
|||||||
setIncompatibilityWarningModal(ref) {
|
setIncompatibilityWarningModal(ref) {
|
||||||
this.incompatibilityWarningModal = ref
|
this.incompatibilityWarningModal = ref
|
||||||
},
|
},
|
||||||
showIncompatibilityWarningModal(instance, project, versions, onInstall) {
|
showIncompatibilityWarningModal(instance, project, versions, selected, onInstall) {
|
||||||
this.incompatibilityWarningModal.show(instance, project, versions, onInstall)
|
this.incompatibilityWarningModal.show(instance, project, versions, selected, onInstall)
|
||||||
},
|
},
|
||||||
setModInstallModal(ref) {
|
setModInstallModal(ref) {
|
||||||
this.modInstallModal = ref
|
this.modInstallModal = ref
|
||||||
@ -133,7 +133,13 @@ export const install = async (
|
|||||||
callback(version.id)
|
callback(version.id)
|
||||||
} else {
|
} else {
|
||||||
const install = useInstall()
|
const install = useInstall()
|
||||||
install.showIncompatibilityWarningModal(instance, project, projectVersions, callback)
|
install.showIncompatibilityWarningModal(
|
||||||
|
instance,
|
||||||
|
project,
|
||||||
|
projectVersions,
|
||||||
|
version,
|
||||||
|
callback,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const versions = (await get_version_many(project.versions).catch(handleError)).sort(
|
const versions = (await get_version_many(project.versions).catch(handleError)).sort(
|
||||||
|
|||||||
@ -143,8 +143,13 @@ export default defineNuxtConfig({
|
|||||||
state.lastGenerated &&
|
state.lastGenerated &&
|
||||||
new Date(state.lastGenerated).getTime() + TTL > new Date().getTime() &&
|
new Date(state.lastGenerated).getTime() + TTL > new Date().getTime() &&
|
||||||
// ...but only if the API URL is the same
|
// ...but only if the API URL is the same
|
||||||
state.apiUrl === API_URL
|
state.apiUrl === API_URL &&
|
||||||
|
// ...and if no errors were caught during the last generation
|
||||||
|
(state.errors ?? []).length === 0
|
||||||
) {
|
) {
|
||||||
|
console.log(
|
||||||
|
"Tags already recently generated. Delete apps/frontend/generated/state.json to force regeneration.",
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user