Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 674b9e7c87 | |||
| 4a76c09f3a | |||
| 48aec4e144 | |||
| 21eadb3b20 |
@@ -534,6 +534,7 @@ function renderStep3() {
|
|||||||
section.innerHTML =
|
section.innerHTML =
|
||||||
'<h2>' + escapeHtml(tt('step3.heading')) + '</h2>' +
|
'<h2>' + escapeHtml(tt('step3.heading')) + '</h2>' +
|
||||||
'<p class="formMessage">' + escapeHtml(tt('step3.message')) + '</p>' +
|
'<p class="formMessage">' + escapeHtml(tt('step3.message')) + '</p>' +
|
||||||
|
'<p class="formMessage">' + escapeHtml(tt('step3.applyNotice')) + '</p>' +
|
||||||
(state.resourcepackPath
|
(state.resourcepackPath
|
||||||
? '<p class="formMessage"><code>' + escapeHtml(state.resourcepackPath) + '</code></p>'
|
? '<p class="formMessage"><code>' + escapeHtml(state.resourcepackPath) + '</code></p>'
|
||||||
: '') +
|
: '') +
|
||||||
|
|||||||
@@ -96,6 +96,20 @@ function clearPage() {
|
|||||||
pageHost.innerHTML = ''
|
pageHost.innerHTML = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 첫 진입 안내 페이지: 마인크래프트 런처를 끄고 시작하도록 안내.
|
||||||
|
function renderIntro() {
|
||||||
|
setActiveStep(1)
|
||||||
|
clearPage()
|
||||||
|
var section = document.createElement('section')
|
||||||
|
section.className = 'page'
|
||||||
|
section.innerHTML =
|
||||||
|
'<h2>' + tt('intro.heading') + '</h2>' +
|
||||||
|
'<p class="formMessage">' + tt('intro.message') + '</p>' +
|
||||||
|
'<div class="actionRow"><button class="primaryBtn" id="introNext">' + tt('common.next') + '</button></div>'
|
||||||
|
pageHost.appendChild(section)
|
||||||
|
section.querySelector('#introNext').addEventListener('click', renderStep1)
|
||||||
|
}
|
||||||
|
|
||||||
function renderStep1() {
|
function renderStep1() {
|
||||||
setActiveStep(1)
|
setActiveStep(1)
|
||||||
clearPage()
|
clearPage()
|
||||||
@@ -972,5 +986,5 @@ function escapeHtml(s) {
|
|||||||
I18N = (await installerApi.loadLocale()) || {}
|
I18N = (await installerApi.loadLocale()) || {}
|
||||||
} catch (_) { I18N = {} }
|
} catch (_) { I18N = {} }
|
||||||
applyStaticI18n()
|
applyStaticI18n()
|
||||||
renderStep1()
|
renderIntro()
|
||||||
})()
|
})()
|
||||||
|
|||||||
@@ -181,12 +181,15 @@ main {
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 1.65;
|
line-height: 1.65;
|
||||||
|
/* 약관 본문은 더 진한 순백으로(제목/굵은글씨/목록). */
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
.agreementBody h1, .agreementBody h2, .agreementBody h3 { margin: 12px 0 6px; }
|
.agreementBody h1, .agreementBody h2, .agreementBody h3 { margin: 12px 0 6px; }
|
||||||
.agreementBody h1 { font-size: 17px; }
|
.agreementBody h1 { font-size: 17px; }
|
||||||
.agreementBody h2 { font-size: 15px; }
|
.agreementBody h2 { font-size: 15px; }
|
||||||
.agreementBody h3 { font-size: 14px; }
|
.agreementBody h3 { font-size: 14px; }
|
||||||
.agreementBody p { margin: 6px 0; }
|
/* 본문 문단은 기존 회색(--text-muted) 대신 이전 흰색 톤(#e6edf3)으로 올린다. */
|
||||||
|
.agreementBody p { margin: 6px 0; color: #e6edf3; }
|
||||||
.agreementBody ul, .agreementBody ol { margin: 6px 0; padding-left: 22px; }
|
.agreementBody ul, .agreementBody ol { margin: 6px 0; padding-left: 22px; }
|
||||||
.agreementBody li { margin: 2px 0; }
|
.agreementBody li { margin: 2px 0; }
|
||||||
.agreementBody code { background: rgba(255,255,255,0.08); padding: 1px 4px; border-radius: 3px; font-family: 'Consolas', monospace; }
|
.agreementBody code { background: rgba(255,255,255,0.08); padding: 1px 4px; border-radius: 3px; font-family: 'Consolas', monospace; }
|
||||||
|
|||||||
@@ -63,7 +63,8 @@
|
|||||||
},
|
},
|
||||||
"step3": {
|
"step3": {
|
||||||
"heading": "완료",
|
"heading": "완료",
|
||||||
"message": "리소스팩 설치를 완료했습니다."
|
"message": "사용자 동의하에 리소스팩이 설치되었습니다.",
|
||||||
|
"applyNotice": "리소스팩은 직접 적용해주세요."
|
||||||
},
|
},
|
||||||
"install": {
|
"install": {
|
||||||
"errorMessage": "설치 중 오류가 발생했습니다: {{message}}",
|
"errorMessage": "설치 중 오류가 발생했습니다: {{message}}",
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
{
|
{
|
||||||
|
"intro": {
|
||||||
|
"heading": "시작하기 전에",
|
||||||
|
"message": "마인크래프트 런처를 끄고 시작해주세요."
|
||||||
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"back": "이전",
|
"back": "이전",
|
||||||
"next": "다음",
|
"next": "다음",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "minecraft-music-quiz-installer",
|
"name": "minecraft-music-quiz-installer",
|
||||||
"version": "0.3.10",
|
"version": "0.3.12",
|
||||||
"description": "마인크래프트 음악퀴즈 간편설치기 + 관리 사이트",
|
"description": "마인크래프트 음악퀴즈 간편설치기 + 관리 사이트",
|
||||||
"main": "dist/installer/main.js",
|
"main": "dist/installer/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -21,16 +21,18 @@ function aliasListSnbt(aliases: string[]): string {
|
|||||||
return `[${parts.join(',')}]`
|
return `[${parts.join(',')}]`
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 한 곡(MusicListEntry) → `{title:"...", author:"...", alias:[...], description:"...", volume:1.0}` SNBT. */
|
/** 한 곡(MusicListEntry) → `{volume:0.5, title:"...", author:"...", alias:[...], description:"...", video:"..."}` SNBT. */
|
||||||
function entrySnbt(entry: MusicListEntry): string {
|
function entrySnbt(entry: MusicListEntry): string {
|
||||||
const title = escapeSnbtString(entry.title ?? '')
|
const title = escapeSnbtString(entry.title ?? '')
|
||||||
// launcher 의 artist → 데이터팩 SNBT 의 author. 빈 값은 빈 문자열로 그대로 둔다.
|
// launcher 의 artist → 데이터팩 SNBT 의 author. 빈 값은 빈 문자열로 그대로 둔다.
|
||||||
const author = escapeSnbtString(entry.artist ?? '')
|
const author = escapeSnbtString(entry.artist ?? '')
|
||||||
const alias = aliasListSnbt(entry.aliases ?? [])
|
const alias = aliasListSnbt(entry.aliases ?? [])
|
||||||
const description = escapeSnbtString(entry.description ?? '')
|
const description = escapeSnbtString(entry.description ?? '')
|
||||||
// launcher 가 생성하는 항목에는 volume 기본값 1.0 을 항상 넣는다.
|
// video = 곡의 유튜브 영상 주소(MusicListEntry.url).
|
||||||
|
const video = escapeSnbtString(entry.url ?? '')
|
||||||
|
// launcher 가 생성하는 항목에는 volume 기본값 0.5 를 항상 넣는다.
|
||||||
// 운영자는 생성된 mcfunction 에서 곡별로 직접 값을 바꿔 사용한다.
|
// 운영자는 생성된 mcfunction 에서 곡별로 직접 값을 바꿔 사용한다.
|
||||||
return `{title:"${title}", author:"${author}", alias:${alias}, description:"${description}", volume:1.0}`
|
return `{volume:0.5, title:"${title}", author:"${author}", alias:${alias}, description:"${description}", video:"${video}"}`
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,11 +43,11 @@ function entrySnbt(entry: MusicListEntry): string {
|
|||||||
export function buildSongsMcfunction(list: PackList): string {
|
export function buildSongsMcfunction(list: PackList): string {
|
||||||
const lines: string[] = []
|
const lines: string[] = []
|
||||||
lines.push('# 곡 한 개 = 한 줄.')
|
lines.push('# 곡 한 개 = 한 줄.')
|
||||||
lines.push('# 필수 — title, author, alias, description')
|
lines.push('# 필수 — title, author, alias, description, video')
|
||||||
lines.push('# 선택 — volume (이 곡만의 /playsound 음량. 미지정시 init/config.mcfunction')
|
lines.push('# 선택 — volume (이 곡만의 /playsound 음량. 미지정시 init/config.mcfunction')
|
||||||
lines.push('# 의 audio.volume 사용)')
|
lines.push('# 의 audio.volume 사용)')
|
||||||
lines.push('# 곡 순서가 리소스팩의 track_NN / cover_NN 인덱스와 1:1 매칭된다.')
|
lines.push('# 곡 순서가 리소스팩의 track_NN / cover_NN 인덱스와 1:1 매칭된다.')
|
||||||
lines.push('# 예) {title:"Quiet Song", author:"...", alias:[...], description:"...", volume:1.0}')
|
lines.push('# 예) {volume:0.5, title:"Quiet Song", author:"...", alias:[...], description:"...", video:"..."}')
|
||||||
lines.push('data modify storage mq:main songs set value []')
|
lines.push('data modify storage mq:main songs set value []')
|
||||||
for (const entry of list.music) {
|
for (const entry of list.music) {
|
||||||
lines.push(`data modify storage mq:main songs append value ${entrySnbt(entry)}`)
|
lines.push(`data modify storage mq:main songs append value ${entrySnbt(entry)}`)
|
||||||
|
|||||||
Reference in New Issue
Block a user