/
uzer_007
/
Rixea
Обзор
Документация
Войти
/
uzer_007
/
Rixea
Код
Запросы
0
Задачи
Вики
Пакеты
5
Релизы
2
CI/CD
Аналитика
Безопасность
master
web_src/js/features/code-frequency.ts
27 строк
1 KB
uzer_007
feat: первая версия Rixea
02 авг 2026, 22:16
02 авг 2026, 22:16
d4f7504
Код
Авторство
О чём код?
import {createApp} from 'vue'; export async function initRepoCodeFrequency() { const el = document.querySelector('#repo-code-frequency-chart'); if (!el) return; const {default: RepoCodeFrequency} = await import('../components/RepoCodeFrequency.vue'); try { const View = createApp(RepoCodeFrequency, { locale: { title: el.getAttribute('data-locale-title'), additionsLabel: el.getAttribute('data-locale-additions-label'), deletionsLabel: el.getAttribute('data-locale-deletions-label'), emptyInfo: el.getAttribute('data-locale-empty-info'), errorInfo: el.getAttribute('data-locale-error-info'), retry: el.getAttribute('data-locale-retry'), loadingTitle: el.getAttribute('data-locale-loading-title'), loadingTitleFailed: el.getAttribute('data-locale-loading-title-failed'), loadingInfo: el.getAttribute('data-locale-loading-info'), }, }); View.mount(el); } catch (err) { console.error('RepoCodeFrequency failed to load', err); el.textContent = el.getAttribute('data-locale-component-failed-to-load'); } }