mirror of
https://github.com/modrinth/code.git
synced 2026-08-31 03:55:59 +00:00
chore: get rid of debug logs on prod
This commit is contained in:
@@ -143,6 +143,7 @@ import {
|
||||
Input,
|
||||
NewModal,
|
||||
Textarea,
|
||||
useDebugLogger,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
import { computed, defineAsyncComponent, h } from 'vue'
|
||||
@@ -163,6 +164,7 @@ interface ShowOptions {
|
||||
const { addNotification } = injectNotificationManager()
|
||||
const { formatMessage } = useVIntl()
|
||||
const router = useRouter()
|
||||
const debug = useDebugLogger('ProjectCreateModal')
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
@@ -453,7 +455,7 @@ async function createProject() {
|
||||
},
|
||||
})) as Labrinth.Projects.v3.Project
|
||||
createdProjectId = result.id
|
||||
console.log(createdProjectId)
|
||||
debug(createdProjectId)
|
||||
}
|
||||
|
||||
modal.value?.hide()
|
||||
|
||||
+1
-1
@@ -516,7 +516,7 @@ const selectedRewardOption = computed(() => {
|
||||
})
|
||||
|
||||
const selectedMethodDetails = computed(() => {
|
||||
console.log(rewardOptions.value, selectedGiftCardId.value)
|
||||
debug(rewardOptions.value, selectedGiftCardId.value)
|
||||
if (!selectedGiftCardId.value) return null
|
||||
const option = rewardOptions.value.find((opt) => opt.value === selectedGiftCardId.value)
|
||||
debug('Selected method details:', option?.methodDetails)
|
||||
|
||||
@@ -1105,7 +1105,7 @@ if (!persistedState) {
|
||||
if (thread.value === undefined) return
|
||||
if (currentStage.value === initialAutoStage) {
|
||||
const firstValid = findFirstValidStage()
|
||||
console.log('[DEBUG settle]', {
|
||||
debug('settle', {
|
||||
initialAutoStage,
|
||||
currentStage: currentStage.value,
|
||||
firstValid,
|
||||
@@ -1118,7 +1118,7 @@ if (!persistedState) {
|
||||
markStageVisited(currentStageObj.value.id)
|
||||
}
|
||||
} else {
|
||||
console.log('[DEBUG settle] currentStage already changed before settle', {
|
||||
debug('settle: currentStage already changed before settle', {
|
||||
initialAutoStage,
|
||||
currentStage: currentStage.value,
|
||||
})
|
||||
@@ -1143,7 +1143,7 @@ const projectUrlType = computed(() =>
|
||||
let lastSyncedStageTarget: string | null = null
|
||||
function syncStageUrl(stage: StageNode | undefined) {
|
||||
const navigate = stage?._navigate
|
||||
console.log('[DEBUG syncStageUrl]', { stageId: stage?.id, navigate, lastSyncedStageTarget })
|
||||
debug('syncStageUrl', { stageId: stage?.id, navigate, lastSyncedStageTarget })
|
||||
if (navigate === undefined) return
|
||||
const target = `/${projectUrlType.value}/${projectV2.value.slug}${navigate}`
|
||||
if (target === lastSyncedStageTarget) return
|
||||
|
||||
@@ -42,10 +42,13 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useDebugLogger } from '@modrinth/ui'
|
||||
import * as THREE from 'three'
|
||||
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
|
||||
import { onMounted, onUnmounted, ref } from 'vue'
|
||||
|
||||
const debug = useDebugLogger('Globe')
|
||||
|
||||
const container = ref(null)
|
||||
const showLabels = ref(false)
|
||||
|
||||
@@ -87,7 +90,7 @@ const isLocationVisible = (location) => {
|
||||
}
|
||||
|
||||
const toggleLocationClicked = (location) => {
|
||||
console.log('clicked', location.name)
|
||||
debug('clicked', location.name)
|
||||
locations.value.find((loc) => loc.name === location.name).clicked = !location.clicked
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user