Skip to content

Commit 86eabc3

Browse files
committed
feat: restructure controller layout for single-screen view and bump version to v16
1 parent 97ef77e commit 86eabc3

2 files changed

Lines changed: 78 additions & 53 deletions

File tree

src/lib/mobileCompanionUrl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const configuredMobileCompanionOrigin =
33

44
export const MOBILE_COMPANION_ORIGIN =
55
configuredMobileCompanionOrigin || "https://nnnsmm.github.io/Launcherg-Mod/";
6-
export const MOBILE_COMPANION_CLIENT_VERSION = "mobile-pwa-v15";
6+
export const MOBILE_COMPANION_CLIENT_VERSION = "mobile-pwa-v16";
77
export const SKYWAY_CONNECT_ENDPOINT = "https://launcherg.ryoha.moe/connect";
88

99
export type MobileCompanionUrlParams = {

src/views/MobileCompanion.svelte

Lines changed: 77 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,54 +1219,60 @@
12191219
<section class="content controller-content" class:controller-mode={true} class:hidden={activeView !== 'controller'}>
12201220
{#if canControl && selectedGame}
12211221
<section class="controller-panel">
1222-
<button
1223-
type="button"
1224-
class="reconnect-small-button"
1225-
on:click={() => window.location.reload()}
1226-
>
1227-
<span class="i-material-symbols:refresh-rounded text-[15px]" />
1228-
<span>再接続</span>
1229-
</button>
1230-
<div class="controller-kicker">Now Playing</div>
1231-
<div class="controller-game">{selectedGame.title}</div>
1232-
<div class="controller-status">
1233-
{connectionState === "connected" ? "PC接続中" : "PC未接続"} / {isPaused ? "Pause中" : "記録中"} / {formatPlayTime(selectedGame.totalPlayTimeSeconds)}
1222+
<div class="controller-header">
1223+
<div class="controller-header-text">
1224+
<div class="controller-kicker">Now Playing</div>
1225+
<div class="controller-game">{selectedGame.title}</div>
1226+
<div class="controller-status">
1227+
{connectionState === "connected" ? "PC接続中" : "PC未接続"} / {isPaused ? "Pause中" : "記録中"} / {formatPlayTime(selectedGame.totalPlayTimeSeconds)}
1228+
</div>
1229+
</div>
1230+
<button
1231+
type="button"
1232+
class="reconnect-small-button"
1233+
on:click={() => window.location.reload()}
1234+
>
1235+
<span class="i-material-symbols:refresh-rounded text-[15px]" />
1236+
<span>再接続</span>
1237+
</button>
12341238
</div>
12351239

1236-
<button
1237-
type="button"
1238-
class:paused-action={isPaused}
1239-
class="pause-button"
1240-
disabled={connectionState !== "connected" || isTogglingPause}
1241-
on:click={togglePause}
1242-
>
1243-
<span
1244-
class={`${isPaused
1245-
? "i-material-symbols:play-arrow-rounded"
1246-
: "i-material-symbols:pause-rounded"} text-[30px]`}
1247-
/>
1248-
<span>{isPaused ? "記録再開" : "Pause"}</span>
1249-
</button>
1240+
<div class="controller-actions">
1241+
<button
1242+
type="button"
1243+
class:paused-action={isPaused}
1244+
class="pause-button"
1245+
disabled={connectionState !== "connected" || isTogglingPause}
1246+
on:click={togglePause}
1247+
>
1248+
<span
1249+
class={`${isPaused
1250+
? "i-material-symbols:play-arrow-rounded"
1251+
: "i-material-symbols:pause-rounded"} text-[30px]`}
1252+
/>
1253+
<span>{isPaused ? "記録再開" : "Pause"}</span>
1254+
</button>
12501255

1251-
<button
1252-
type="button"
1253-
class="shutter-button"
1254-
disabled={connectionState !== "connected" || isSendingScreenshot}
1255-
on:click={() => takeScreenshot()}
1256-
>
1257-
<span class="i-material-symbols:photo-camera-outline-rounded text-[36px]" />
1258-
<span>{isSendingScreenshot ? "撮影中" : "スクショ"}</span>
1259-
</button>
1256+
<button
1257+
type="button"
1258+
class="shutter-button"
1259+
disabled={connectionState !== "connected" || isSendingScreenshot}
1260+
on:click={() => takeScreenshot()}
1261+
>
1262+
<span class="i-material-symbols:photo-camera-outline-rounded text-[28px]" />
1263+
<span>{isSendingScreenshot ? "撮影中" : "スクショ"}</span>
1264+
</button>
12601265

1261-
<button
1262-
type="button"
1263-
class="textless-button"
1264-
disabled={connectionState !== "connected" || isSendingScreenshot}
1265-
on:click={() => takeScreenshot(true)}
1266-
>
1267-
<span class="i-material-symbols:visibility-off-outline-rounded text-[22px]" />
1268-
<span>文字消しスクショ</span>
1269-
</button>
1266+
<button
1267+
type="button"
1268+
class="textless-button"
1269+
disabled={connectionState !== "connected" || isSendingScreenshot}
1270+
on:click={() => takeScreenshot(true)}
1271+
>
1272+
<span class="i-material-symbols:visibility-off-outline-rounded text-[22px]" />
1273+
<span>文字消し</span>
1274+
</button>
1275+
</div>
12701276

12711277
<section class="memo-preview" style="flex: 1; display: flex; flex-direction: column; min-height: 0;">
12721278
<div class="section-head">
@@ -1428,6 +1434,8 @@
14281434
}
14291435
14301436
.content.controller-mode {
1437+
display: flex;
1438+
flex-direction: column;
14311439
padding-bottom: 24px;
14321440
}
14331441
@@ -1685,6 +1693,24 @@
16851693
font-weight: 700;
16861694
}
16871695
1696+
.controller-header {
1697+
display: flex;
1698+
justify-content: space-between;
1699+
align-items: flex-start;
1700+
gap: 12px;
1701+
}
1702+
1703+
.controller-header-text {
1704+
min-width: 0;
1705+
}
1706+
1707+
.controller-actions {
1708+
display: grid;
1709+
grid-template-columns: 1fr 1fr;
1710+
gap: 10px;
1711+
margin-top: 16px;
1712+
}
1713+
16881714
.reconnect-small-button {
16891715
display: inline-flex;
16901716
align-items: center;
@@ -1796,7 +1822,6 @@
17961822
17971823
.textless-button {
17981824
width: 100%;
1799-
margin-top: 10px;
18001825
}
18011826
18021827
.secondary-full-action {
@@ -1901,15 +1926,16 @@
19011926
}
19021927
19031928
.controller-panel {
1904-
min-height: calc(100vh - 190px);
19051929
display: flex;
19061930
flex-direction: column;
1931+
flex: 1;
1932+
min-height: 0;
19071933
}
19081934
19091935
.pause-button {
1910-
min-height: 64px;
1936+
grid-column: span 2;
1937+
min-height: 56px;
19111938
width: 100%;
1912-
margin-top: 16px;
19131939
display: flex;
19141940
align-items: center;
19151941
justify-content: center;
@@ -1923,18 +1949,17 @@
19231949
}
19241950
19251951
.shutter-button {
1926-
min-height: 152px;
1952+
min-height: 72px;
19271953
width: 100%;
1928-
margin-top: 22px;
19291954
display: flex;
19301955
align-items: center;
19311956
justify-content: center;
1932-
gap: 12px;
1957+
gap: 8px;
19331958
border: 0;
19341959
border-radius: 8px;
19351960
background: #5ec98e;
19361961
color: #101410;
1937-
font-size: 23px;
1962+
font-size: 16px;
19381963
font-weight: 950;
19391964
}
19401965

0 commit comments

Comments
 (0)