| 1234567891011121314 |
- from pathlib import Path
- src = Path(r"d:/Projects/Ai-DOP/SourceCode/references/Admin.NET/ai-dop-platform/legacy-demo/frontend/src/views/HomeView.vue")
- dst = Path(r"d:/Projects/Ai-DOP/SourceCode/references/Admin.NET/Web/src/views/dashboard/home.vue")
- dst.parent.mkdir(parents=True, exist_ok=True)
- t = src.read_text(encoding='utf-8')
- t = t.replace("import BrandIcon from '../components/BrandIcon.vue'\n", "")
- t = t.replace('<BrandIcon :size="30" class="title-bar__brand-mark" />', '<div class="title-bar__brand-mark-fallback" aria-hidden="true" />')
- t = t.replace("import { s2HomeKpiList } from '../data/s2Kpis.js'", "import { s2HomeKpiList } from './data/s2Kpis'")
- t = t.replace("from '../data/homeModulesSync.js'", "from './data/homeModulesSync'")
- t = t.replace("const navigateTo = (page) => {\n router.push(`/${page}`)\n}", "const navigateTo = (page) => {\n const routeMap = { s1: '/aidop/s1/001', s2: '/aidop/s2/001', s3: '/aidop/s3/001', s4: '/aidop/s4/001', s5: '/aidop/s5/001', s6: '/aidop/s6/001', s7: '/aidop/s7/001', s8: '/aidop/s8/001', s9: '/aidop/s9/001' }\n router.push(routeMap[page] || '/aidop')\n}")
- if '.title-bar__brand-mark {' in t:
- t = t.replace('.title-bar__brand-mark {', '.title-bar__brand-mark-fallback {\n width: 30px;\n height: 30px;\n border-radius: 8px;\n background: linear-gradient(145deg, #38bdf8, #2563eb);\n box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);\n}\n\n.title-bar__brand-mark {', 1)
- dst.write_text(t, encoding='utf-8')
- print(dst)
|