Files
pages/apps/app-frontend/src/composables/useMemorySlider.js
Cal H. 4ad6daa45c fix: DI nonsense (#4174)
* fix: DI nonsense

* fix: lint

* fix: client try di issue

* fix: injects outside of context

* fix: use .catch

* refactor: convert projects.vue to composition API.

* fix: moderation checklist notif pos change watcher

* fix: lint issues
2025-08-15 18:02:55 +00:00

22 lines
406 B
JavaScript

import { computed, ref } from 'vue'
import { get_max_memory } from '@/helpers/jre.js'
export default async function () {
const maxMemory = ref(Math.floor((await get_max_memory()) / 1024))
const snapPoints = computed(() => {
let points = []
let memory = 2048
while (memory <= maxMemory.value) {
points.push(memory)
memory *= 2
}
return points
})
return { maxMemory, snapPoints }
}