feat: PC 화면 해상도 변경 — 설정에서 창 크기 프리셋 선택
CI / build (push) Failing after 14m21s

- electron/preload.cjs: contextBridge 로 window.desktop.setWindowSize 노출
- main.cjs: preload 연결 + ipcMain 'window:setSize'/'getSize' 핸들러
- SettingsView: PC(window.desktop 존재 시)에서 해상도 선택 추가
  (1024×720 ~ 1920×1080), 선택 시 창 크기 변경+가운데 정렬

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-27 23:57:41 +09:00
parent f34980048b
commit e4e1be49ca
3 changed files with 58 additions and 1 deletions
+34
View File
@@ -15,6 +15,22 @@ const THEMES = [
const appVersion = typeof __APP_VERSION__ !== 'undefined' ? __APP_VERSION__ : '-'
const clearing = ref(false)
// PC(데스크톱) 전용: 창 해상도 변경 (Electron preload 의 window.desktop 존재 시에만)
const isDesktop = typeof window !== 'undefined' && !!window.desktop
const RESOLUTIONS = [
{ label: '1024 × 720', w: 1024, h: 720 },
{ label: '1280 × 800', w: 1280, h: 800 },
{ label: '1366 × 768', w: 1366, h: 768 },
{ label: '1600 × 900', w: 1600, h: 900 },
{ label: '1920 × 1080', w: 1920, h: 1080 },
]
function onResolution(e) {
const v = e.target.value
if (!v) return
const [w, h] = v.split('x').map(Number)
window.desktop?.setWindowSize(w, h)
}
async function clearAppData() {
if (clearing.value) return
const ok = await dialog.confirm(
@@ -62,6 +78,20 @@ async function clearAppData() {
</div>
</section>
<!-- PC(데스크톱) 전용: 해상도 -->
<section v-if="isDesktop" class="card">
<div class="row">
<div class="row-main">
<span class="row-label">화면 해상도</span>
<span class="row-sub">데스크톱 크기를 선택한 크기로 변경</span>
</div>
<select class="res-select" @change="onResolution">
<option value="">선택</option>
<option v-for="r in RESOLUTIONS" :key="r.label" :value="`${r.w}x${r.h}`">{{ r.label }}</option>
</select>
</div>
</section>
<section class="card">
<RouterLink to="/settings/account" class="row row-link">
<div class="row-main">
@@ -164,6 +194,10 @@ async function clearAppData() {
overflow: hidden;
flex-shrink: 0;
}
.res-select {
flex: none;
max-width: 150px;
}
.seg-btn {
padding: 0.4rem 0.7rem;
border: 0;