Refactor: Remove unused components (Main, CubeCSS, etc.), utils (DeepCube, Matrix4), dependencies (matrix-js, utils), and untrack dist folder
All checks were successful
Deploy to Production / deploy (push) Successful in 9s
All checks were successful
Deploy to Production / deploy (push) Successful in 9s
This commit is contained in:
@@ -1,137 +0,0 @@
|
||||
|
||||
<script setup>
|
||||
import { useDebug } from '../composables/useDebug'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const { settings } = useDebug()
|
||||
const isOpen = ref(true)
|
||||
|
||||
const toggle = () => isOpen.value = !isOpen.value
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="debug-panel" :class="{ open: isOpen }">
|
||||
<div class="header" @click="toggle">
|
||||
<span>🛠️ Debug Config</span>
|
||||
<span>{{ isOpen ? '▼' : '▲' }}</span>
|
||||
</div>
|
||||
|
||||
<div v-if="isOpen" class="content">
|
||||
<div class="section">
|
||||
<h3>View Rotation</h3>
|
||||
<label>
|
||||
<input type="checkbox" v-model="settings.viewRotation.invertX"> Invert X (Up/Down)
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" v-model="settings.viewRotation.invertY"> Invert Y (Left/Right)
|
||||
</label>
|
||||
<label>
|
||||
Speed: <input type="number" step="0.1" v-model="settings.viewRotation.speed">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h3>Drag Mappings (Sign)</h3>
|
||||
<p class="hint">Adjust signs (-1 or 1) to correct drag direction</p>
|
||||
|
||||
<div class="face-group" v-for="(val, face) in settings.dragMapping" :key="face">
|
||||
<strong>{{ face.toUpperCase() }}</strong>
|
||||
<div class="controls">
|
||||
<label>X: <input type="number" :step="2" :min="-1" :max="1" v-model="settings.dragMapping[face].x"></label>
|
||||
<label>Y: <input type="number" :step="2" :min="-1" :max="1" v-model="settings.dragMapping[face].y"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h3>Physics</h3>
|
||||
<label>
|
||||
<input type="checkbox" v-model="settings.physics.enabled"> Inertia & Snap
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.debug-panel {
|
||||
position: fixed;
|
||||
top: 70px;
|
||||
right: 20px;
|
||||
width: 250px;
|
||||
background: rgba(0, 0, 0, 0.85);
|
||||
color: #fff;
|
||||
border-radius: 8px;
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
z-index: 9999;
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.5);
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 10px;
|
||||
background: #333;
|
||||
border-radius: 8px 8px 0 0;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-weight: bold;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 10px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 15px;
|
||||
border-bottom: 1px solid #444;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0 0 8px 0;
|
||||
color: #aaa;
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input[type="number"] {
|
||||
width: 40px;
|
||||
background: #222;
|
||||
border: 1px solid #444;
|
||||
color: #fff;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.face-group {
|
||||
margin-bottom: 8px;
|
||||
background: #222;
|
||||
padding: 5px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.controls {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.hint {
|
||||
font-size: 10px;
|
||||
color: #888;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
@@ -7,9 +7,6 @@ const version = __APP_VERSION__;
|
||||
<footer class="app-footer glass-panel">
|
||||
<div class="footer-content">
|
||||
<p>© {{ currentYear }} Rubic Cube. Wersja {{ version }}</p>
|
||||
<div class="social-links">
|
||||
<!-- Placeholder for social links if needed -->
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</template>
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useInteractionLogger } from '../composables/useInteractionLogger'
|
||||
|
||||
const { logs, isRecording, clearLogs, getRecentLogsForAnalysis } = useInteractionLogger()
|
||||
const isOpen = ref(true)
|
||||
const copied = ref(false)
|
||||
|
||||
const toggle = () => isOpen.value = !isOpen.value
|
||||
|
||||
const copyReport = async () => {
|
||||
const report = getRecentLogsForAnalysis(50)
|
||||
const context = `
|
||||
### User Interaction Report
|
||||
Please analyze the following interaction logs to identify the issue.
|
||||
Focus on: Drag direction, Active Layer, Rotation Mapping, and State changes.
|
||||
|
||||
\`\`\`json
|
||||
${report}
|
||||
\`\`\`
|
||||
`
|
||||
|
||||
try {
|
||||
await navigator.clipboard.writeText(context)
|
||||
copied.value = true
|
||||
setTimeout(() => copied.value = false, 2000)
|
||||
} catch (err) {
|
||||
console.error('Failed to copy logs', err)
|
||||
alert('Failed to copy to clipboard. Check console.')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="interaction-replay">
|
||||
<div class="header" @click="toggle" :class="{ recording: isRecording }">
|
||||
<span class="indicator">●</span>
|
||||
<span>Logger ({{ logs.length }})</span>
|
||||
</div>
|
||||
|
||||
<div v-if="isOpen" class="panel">
|
||||
<div class="actions">
|
||||
<button @click="copyReport" :class="{ success: copied }">
|
||||
{{ copied ? 'Copied!' : '📋 Copy Report for AI' }}
|
||||
</button>
|
||||
<button @click="clearLogs" class="secondary">Clear</button>
|
||||
<label>
|
||||
<input type="checkbox" v-model="isRecording"> Rec
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="log-list">
|
||||
<div v-for="log in logs.slice().reverse()" :key="log.id" class="log-item">
|
||||
<span class="time">{{ new Date(log.timestamp).toISOString().substr(14, 9) }}</span>
|
||||
<span class="type" :class="log.type">{{ log.type }}</span>
|
||||
<pre class="data">{{ log.data }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.interaction-replay {
|
||||
position: fixed;
|
||||
bottom: 50px;
|
||||
right: 10px;
|
||||
z-index: 10000;
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: #222;
|
||||
color: #fff;
|
||||
padding: 8px 12px;
|
||||
border-radius: 20px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
|
||||
border: 1px solid #444;
|
||||
}
|
||||
|
||||
.header.recording .indicator {
|
||||
color: #ff4444;
|
||||
animation: pulse 1.5s infinite;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% { opacity: 1; }
|
||||
50% { opacity: 0.5; }
|
||||
100% { opacity: 1; }
|
||||
}
|
||||
|
||||
.panel {
|
||||
position: absolute;
|
||||
bottom: 40px;
|
||||
right: 0;
|
||||
width: 350px;
|
||||
height: 400px;
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
border-radius: 8px;
|
||||
border: 1px solid #444;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.actions {
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #444;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
background: #1a1a1a;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
padding: 6px;
|
||||
background: #007acc;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button.success {
|
||||
background: #28a745;
|
||||
}
|
||||
|
||||
button.secondary {
|
||||
background: #444;
|
||||
flex: 0 0 60px;
|
||||
}
|
||||
|
||||
label {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.log-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.log-item {
|
||||
margin-bottom: 8px;
|
||||
border-bottom: 1px solid #333;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
.time {
|
||||
color: #666;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.type {
|
||||
font-weight: bold;
|
||||
padding: 2px 4px;
|
||||
border-radius: 2px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.type.drag-start { color: #4fc3f7; }
|
||||
.type.drag-update { color: #ffd54f; }
|
||||
.type.drag-end { color: #81c784; }
|
||||
.type.rotation { color: #ba68c8; }
|
||||
|
||||
.data {
|
||||
margin: 4px 0 0 0;
|
||||
color: #aaa;
|
||||
font-size: 10px;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
@@ -1,112 +0,0 @@
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import { useRenderer } from '../composables/useRenderer'
|
||||
import { useCube } from '../composables/useCube'
|
||||
import CubeCSS from './renderers/CubeCSS.vue'
|
||||
import CubeSVG from './renderers/CubeSVG.vue'
|
||||
import CubeCanvas from './renderers/CubeCanvas.vue'
|
||||
import CubeRubiksJS from './renderers/CubeRubiksJS.vue'
|
||||
|
||||
const { activeRenderer, RENDERERS } = useRenderer()
|
||||
const { cubeState } = useCube()
|
||||
|
||||
const currentRendererComponent = computed(() => {
|
||||
switch (activeRenderer.value) {
|
||||
case RENDERERS.CSS:
|
||||
return CubeCSS
|
||||
case RENDERERS.SVG:
|
||||
return CubeSVG
|
||||
case RENDERERS.CANVAS:
|
||||
return CubeCanvas
|
||||
case RENDERERS.RUBIKS_JS:
|
||||
return CubeRubiksJS
|
||||
default:
|
||||
return CubeCSS
|
||||
}
|
||||
})
|
||||
|
||||
const formattedState = computed(() => {
|
||||
if (!cubeState.value) return '{}'
|
||||
|
||||
// Custom formatter to keep faces compact
|
||||
const s = cubeState.value
|
||||
const faces = Object.keys(s)
|
||||
|
||||
// Helper to shorten colors
|
||||
const shortColor = (c) => c && typeof c === 'string' ? c[0].toUpperCase() : '-'
|
||||
|
||||
let out = '{\n'
|
||||
faces.forEach((face, i) => {
|
||||
const matrix = s[face]
|
||||
// Format as ["WWW", "WWW", "WWW"]
|
||||
const rows = matrix.map(row => `"${row.map(shortColor).join('')}"`).join(', ')
|
||||
out += ` "${face}": [ ${rows} ]`
|
||||
if (i < faces.length - 1) out += ','
|
||||
out += '\n'
|
||||
})
|
||||
out += '}'
|
||||
return out
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="renderer-container">
|
||||
<component :is="currentRendererComponent" />
|
||||
</div>
|
||||
|
||||
<div class="state-panel">
|
||||
<h3>Cube State</h3>
|
||||
<pre>{{ formattedState }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
gap: 2rem;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 2rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.renderer-container {
|
||||
flex: 2;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.state-panel {
|
||||
flex: 1;
|
||||
max-width: 400px;
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
padding: 1rem;
|
||||
border-radius: 8px;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
font-family: monospace;
|
||||
font-size: 0.8rem;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.2rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 0;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user