-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
95 lines (92 loc) · 4.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>osuStreamCompanion</title>
<link href="./main.css" rel="stylesheet">
<script src="/lib/reconnecting-websocket.js"></script>
<script src="/lib/consts.js"></script>
<script src="/lib/utils.js"></script>
</head>
<body>
<div id="app" v-cloak class="app">
<div class="outer left">
<table class="stats">
<tr v-for="(count, type) in stats" :key="type"
:hidden="type === 'sliderbreak' && count === 0">
<th :class="['stat-type', `stat-type-${type}`]" scope="row">{{ type }}</th>
<td class="stat-count">{{ count }}</td>
</tr>
</table>
</div>
<Background class="box">
<div class="inner">
<div class="title">
<h1 class="title">
<Marquee>{{artistTitle || "\xa0"}}</Marquee>
</h1>
</div>
<div class="mapinfo">
<p class="mapper info">
mapper <strong>{{getToken('creator')}}</strong>
</p>
<p class="difficulty info">
difficulty <strong>{{getToken('mStars', 2)}}⭐ [{{getToken('diffName') + (getToken('gameMode') === 'OsuMania' ? " (" + getToken('cs') + "K)" : "")}}]</strong>
</p>
<p class="mods" v-if="getToken('mods')">
mods <strong>{{ getToken('mods') }}</strong>
</p>
</div>
<div class="progress">
<div class="progress-left">
{{ formatDur((getToken('time') || 0).clamp(0, getToken('totaltime') / 1000)) }}
</div>
<div class="progress-bar">
<div class="progress-bar-inner" :style="{ width: `${(getToken('time') / (getToken('totaltime') / 1000)).clamp(0, 1) * 100}%` }"> </div>
</div>
<div class="progress-right">
{{ formatDur(getToken('totaltime') / 1000) }}
</div>
</div>
</div>
</Background>
<div class="outer right">
<template v-if="showAutomationNotice && isPlayingOrWatching">
<div v-if="getToken('mods').match(/\b(RL|AP)\b/)" class="notice">
娱乐模式<br>不计分
</div>
<div v-else-if="getToken('mods').match(/\b(AU|CN)\b/)" class="notice">
自动演示<br>不计分
</div>
</template>
<table class="right-table" :class="{ live: isPlayingOrWatching }">
<tr>
<th>bpm</th>
<td><strong>{{ bpm }}</strong></td></tr>
</tr>
<tr v-show="getToken('gameMode') !== 'OsuMania' || isPlayingOrWatching">
<th>combo</th>
<td v-if="getToken('gameMode') === 'OsuMania'"><strong>{{getToken('currentMaxCombo')}}</strong></td>
<td v-else>
<template v-if="isPlayingOrWatching"><strong>{{getToken('currentMaxCombo')}}</strong> / </template>
{{getToken('maxCombo')}}
</td>
</tr>
<tr>
<th>pp</th>
<td>
<template v-if="isPlayingOrWatching"><strong>{{getToken('ppIfMapEndsNow', 1)}}</strong> / </template>
{{getToken(getToken('gameMode') === 'OsuMania' ? 'mania_1_000_000PP' : 'osu_SSPP', 1)}}
</td>
</tr>
<tr v-if="isPlayingOrWatching">
<th>grade</th>
<td><img v-if="grade" class="grade" :src="`assets/grade-${(grade).toLowerCase()}.svg`"></td>
</tr>
</table>
</div>
</div>
<script src="./main.js" type="module"></script>
</body>
</html>