-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
231 lines (216 loc) · 10.2 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<html lang="zh-TW">
<head>
<meta charset="UTF-8">
<meta name="google-site-verification" content="MglRn-PHcNotrvvimYsiL8v-4mcCyfhzCua9k1f65pM" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>大濕之音</title>
<script src="./dist/index.bundle.js?v1.14.240206"></script>
<link rel="manifest" href="./manifest.json">
<link rel="icon" href="./images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="./images/favicon.ico" type="image/x-icon">
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@4.x/css/materialdesignicons.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://xiaoan.tocas-ui.com/ts.xiaoan.min.css">
<style>
:root{
--title-bar: 56px;
}
html, body, #app{
width: 100%;
height: 100%;
margin: 0px;
background-color: #272727;
color: #FFFFFF;
}
body{
overscroll-behavior: none;
}
.button{
margin: 2px;
}
.audio-play-queue-bar-to-fixed{
position: fixed;
width: 100%;
z-index: 2;
background-color: #272727;
max-height: calc(100% - var(--title-bar));
display: flex;
flex-direction: column;
}
.drop-down-button{
position: relative !important;
left: 50%;
transform: translateX(-50%);
}
.drop-down-button-to-fixed{
position: fixed !important;
top: var(--title-bar);
z-index: 2;
}
.audio-play-queue-bar-go-to-fixed-animation{
animation: 0.5s;
animation-name: go-to-fixed;
}
.audio-play-queue-bar-go-out-fixed-animation{
animation: 0.5s;
animation-name: go-out-fixed;
}
@keyframes go-to-fixed {
0%{
transform: translateY(-100%);
}
100%{
transform: translateY(0);
}
}
@keyframes go-out-fixed {
0%{
position: fixed;
width: 100%;
z-index: 2;
background-color: #272727;
overflow-y: scroll;
max-height: calc(100% - var(--title-bar));
transform: translateY(0);
}
100%{
position: fixed;
width: 100%;
z-index: 2;
background-color: #272727;
overflow-y: scroll;
max-height: calc(100% - var(--title-bar));
transform: translateY(-100%);
}
}
[hidden]{
display:none !important;
}
</style>
<!-- <script src="./game.js"></script> -->
</head>
<body>
<div id="app">
<v-app>
<v-app-bar color="#666666" dark app>
<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
<v-btn icon @click="location.href = 'https://jack850628.github.io/'" v-bind="attrs" v-on="on">
<v-icon>mdi-arrow-left</v-icon>
</v-btn>
</template>
<span>其他APP</span>
</v-tooltip>
<w-icon id="title-icon"></w-icon>
<v-toolbar-title>大濕之音</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn dark depressed @click="goToCollection()">
大濕之音集合
</v-btn>
<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
<v-btn icon @click="install" v-bind="attrs" v-on="on" v-show="deferredPrompt != null">
<v-icon>mdi-download</v-icon>
</v-btn>
</template>
<span>安裝</span>
</v-tooltip>
<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
<v-btn icon @click="about = true" v-bind="attrs" v-on="on">
<v-icon>mdi-information-outline</v-icon>
</v-btn>
</template>
<span>關於</span>
</v-tooltip>
</v-app-bar>
<v-main>
<div id="audio-play-queue-bar" :class="{'audio-play-queue-bar-to-fixed': audioPlayQueueBarToFixed, 'audio-play-queue-bar-go-to-fixed-animation': audioPlayQueueBarToFixed, 'audio-play-queue-bar-go-out-fixed-animation': !audioPlayQueueBarToFixed}" :style="{'margin-bottom': -audioPlayQueueBarHeight}">
<play-controller v-model="audioPlayQueue" @change-volume="setVolume">
<v-btn dark elevation="3" @click="createSoundImage = true">
<v-icon>mdi-image-plus</v-icon>
<span>建立有聲圖</span>
</v-btn>
<v-btn dark elevation="3" @click="shareButton">
<v-icon>mdi-share</v-icon>
<span>分享</span>
</v-btn>
</play-controller>
<v-btn dark elevation="3" :class="{'drop-down-button': true, 'drop-down-button-to-fixed': !audioPlayQueueBarToFixed}" @click="dropDownAudioPlayQueueBar" v-show="audioPlayQueueBarInvisible || audioPlayQueueBarToFixed">
<v-icon v-if="audioPlayQueueBarToFixed">mdi-chevron-up</v-icon>
<v-icon v-else="audioPlayQueueBarToFixed">mdi-chevron-down</v-icon>
</v-btn>
</div>
<div :style="{'margin-top': audioPlayQueueBarHeight}">
<p>提示:對清單中的按鈕,點一下可以預覽,點兩下可以加入至播放序列,按右鍵可以下載語音。</p>
<v-text-field dark v-model="searchString" label="搜尋"></v-text-field>
<div style="margin-bottom: 10px;">
<p style="margin-bottom: 1px;" v-show="searchString">收尋結果:</p>
<v-btn dark elevation="3" class="button text-truncate" style="max-width: 300px;" v-for="(item, k) in searchResultButtons" :key="k" @click="preview(item)" @contextmenu="!item.second? contextMenu($event, item): ()=>{}">{{item.name}}</v-btn>
</div>
<v-expansion-panels dark focusable>
<v-expansion-panel v-for="(audioGroup, i) in audios" :key="i">
<v-expansion-panel-header>{{audioGroup.name}}</v-expansion-panel-header>
<v-expansion-panel-content>
<v-btn elevation="3" class="button text-truncate" style="max-width: 300px;" v-for="(item, k) in audioGroup.datas" :key="k" @click="preview(item)" @contextmenu="!item.second? contextMenu($event, item): ()=>{}">{{item.name}}</v-btn>
</v-expansion-panel-content>
</v-expansion-panel>
</v-expansion-panels>
</div>
<v-menu v-model="showMenu" :position-x="menuX" :position-y="menuY" absolute offset-y>
<v-list>
<v-list-item @click="contextMenuItemClick($event, 0)">
<v-list-item-title v-text="'下載語音'"></v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
<v-dialog v-model="share" width="600">
<v-card>
<v-card-title>
分享
</v-card-title>
<v-text-field id="shareLink" v-model="shareLink" label="分享連結"></v-text-field>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn text @click="copyLink">
<v-icon>mdi-content-copy</v-icon>
<span>複製</span>
</v-btn>
<v-btn text @click="shareToCollection()">
<span>加入至大濕之音集合</span>
</v-btn>
<v-btn color="primary" text @click="share = false">
關閉
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="createSoundImage" width="600">
<v-card>
<v-card-title>
建立有聲圖
</v-card-title>
<div style="display: flex; justify-content: center;">
<v-img :src="`https://i.imgur.com/${image}`"></v-img>
</div>
<v-text-field v-model="imageSourceLink" label="圖片連結(只允許imgur.com的連結)" :rules="[(value) => imageSourceLinkError || true]"></v-text-field>
<v-text-field v-model="soundImageTitle" label="圖片標題(只允許50個字)" :rules="[(value) => soundImageTitleError || true]"></v-text-field>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn text @click="goToSoundImage" :disabled="imageSourceLinkError != null || soundImageTitleError != null">
完成
</v-btn>
<v-btn color="primary" text @click="createSoundImage = false">
取消
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<about v-model="about"></about>
</v-main>
<!-- <v-footer app>
</v-footer> -->
</v-app>
</div>
</body>
</html>