[Claude Code Desktop 자동 설치 환경]
- setup/CLAUDE.md: 트리거 키워드 + 설치 패키지 설명
- setup/.claude/skills/guardia-install/SKILL.md: 6단계 설치 오케스트레이터
Phase 0: 의도 파악 → Phase 1: OS 감지 → Phase 2: 사전 확인
Phase 3: 설치 실행 → Phase 4: 라이선스 발급 → Phase 5: 검증 → Phase 6: 완료보고
[통합 자동 설치 스크립트]
- setup/install_auto.sh: Linux 통합 (OS 자동 감지 ubuntu/centos/rhel)
- --license trial30|trial7|<key> 파라미터
- 설치 완료 후 GUARDiA 자동 실행 + 브라우저 자동 열기
- --test 검증 모드
- setup/install_auto.ps1: Windows 통합 (ASCII 전용, PS 5.1 호환)
- 설치 후 NSSM 서비스 자동 시작 + 브라우저 자동 열기
- -Test 파라미터로 검증 전용 실행
[라이선스 엔진 개선]
- core/license.py: generate_trial_key(days=None) 파라미터 추가
- TRIAL_DURATION_DAYS = TRIAL_DURATION_DAYS 환경변수로 조정 가능
- routers/license.py: TrialRequest.days 필드 + 30일 체험판 지원
POST /api/license/trial {"days": 30} 로 30일 발급
사용자 경험:
1. setup/ 폴더를 새 PC에 복사
2. Claude Code Desktop 열고 해당 폴더 open
3. "GUARDiA 시스템 1달 사용자로 설치해 줘" 입력
4. 자동으로 OS 감지 → 설치 → 30일 라이선스 → 브라우저 열림
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
94 lines
3.4 KiB
JavaScript
94 lines
3.4 KiB
JavaScript
import { g as getDocument, a as getWindow } from '../shared/ssr-window.esm.mjs';
|
|
import { e as elementChildren } from '../shared/utils.mjs';
|
|
|
|
function HashNavigation(_ref) {
|
|
let {
|
|
swiper,
|
|
extendParams,
|
|
emit,
|
|
on
|
|
} = _ref;
|
|
let initialized = false;
|
|
const document = getDocument();
|
|
const window = getWindow();
|
|
extendParams({
|
|
hashNavigation: {
|
|
enabled: false,
|
|
replaceState: false,
|
|
watchState: false,
|
|
getSlideIndex(_s, hash) {
|
|
if (swiper.virtual && swiper.params.virtual.enabled) {
|
|
const slideWithHash = swiper.slides.find(slideEl => slideEl.getAttribute('data-hash') === hash);
|
|
if (!slideWithHash) return 0;
|
|
const index = parseInt(slideWithHash.getAttribute('data-swiper-slide-index'), 10);
|
|
return index;
|
|
}
|
|
return swiper.getSlideIndex(elementChildren(swiper.slidesEl, `.${swiper.params.slideClass}[data-hash="${hash}"], swiper-slide[data-hash="${hash}"]`)[0]);
|
|
}
|
|
}
|
|
});
|
|
const onHashChange = () => {
|
|
emit('hashChange');
|
|
const newHash = document.location.hash.replace('#', '');
|
|
const activeSlideEl = swiper.virtual && swiper.params.virtual.enabled ? swiper.slidesEl.querySelector(`[data-swiper-slide-index="${swiper.activeIndex}"]`) : swiper.slides[swiper.activeIndex];
|
|
const activeSlideHash = activeSlideEl ? activeSlideEl.getAttribute('data-hash') : '';
|
|
if (newHash !== activeSlideHash) {
|
|
const newIndex = swiper.params.hashNavigation.getSlideIndex(swiper, newHash);
|
|
if (typeof newIndex === 'undefined' || Number.isNaN(newIndex)) return;
|
|
swiper.slideTo(newIndex);
|
|
}
|
|
};
|
|
const setHash = () => {
|
|
if (!initialized || !swiper.params.hashNavigation.enabled) return;
|
|
const activeSlideEl = swiper.virtual && swiper.params.virtual.enabled ? swiper.slidesEl.querySelector(`[data-swiper-slide-index="${swiper.activeIndex}"]`) : swiper.slides[swiper.activeIndex];
|
|
const activeSlideHash = activeSlideEl ? activeSlideEl.getAttribute('data-hash') || activeSlideEl.getAttribute('data-history') : '';
|
|
if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) {
|
|
window.history.replaceState(null, null, `#${activeSlideHash}` || '');
|
|
emit('hashSet');
|
|
} else {
|
|
document.location.hash = activeSlideHash || '';
|
|
emit('hashSet');
|
|
}
|
|
};
|
|
const init = () => {
|
|
if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return;
|
|
initialized = true;
|
|
const hash = document.location.hash.replace('#', '');
|
|
if (hash) {
|
|
const speed = 0;
|
|
const index = swiper.params.hashNavigation.getSlideIndex(swiper, hash);
|
|
swiper.slideTo(index || 0, speed, swiper.params.runCallbacksOnInit, true);
|
|
}
|
|
if (swiper.params.hashNavigation.watchState) {
|
|
window.addEventListener('hashchange', onHashChange);
|
|
}
|
|
};
|
|
const destroy = () => {
|
|
if (swiper.params.hashNavigation.watchState) {
|
|
window.removeEventListener('hashchange', onHashChange);
|
|
}
|
|
};
|
|
on('init', () => {
|
|
if (swiper.params.hashNavigation.enabled) {
|
|
init();
|
|
}
|
|
});
|
|
on('destroy', () => {
|
|
if (swiper.params.hashNavigation.enabled) {
|
|
destroy();
|
|
}
|
|
});
|
|
on('transitionEnd _freeModeNoMomentumRelease', () => {
|
|
if (initialized) {
|
|
setHash();
|
|
}
|
|
});
|
|
on('slideChange', () => {
|
|
if (initialized && swiper.params.cssMode) {
|
|
setHash();
|
|
}
|
|
});
|
|
}
|
|
|
|
export { HashNavigation as default };
|