Skip to content

Commit bc815fc

Browse files
authored
🔀 Merge pull request #89 from AyakaLab/nekomeowww/dev
🐛 Compatible with safari, fixed user loading error
2 parents 75d26e4 + f6295d8 commit bc815fc

File tree

10 files changed

+43
-36
lines changed

10 files changed

+43
-36
lines changed

src/assets/music/FlowerDance.jpg

-186 KB
Binary file not shown.

src/assets/music/FlowerDance.mp3

-6.38 MB
Binary file not shown.

src/components/Header.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ export default {
349349
.link {
350350
margin-left: .75rem;
351351
font-size: 1.2rem;
352+
color: white;
352353
img {
353354
height: 3rem;
354355
}

src/components/Layout/AppStyle.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
text-align: left;
1616
}
1717
}
18+
1819
/deep/ .v-autocomplete:not(.v-input--is-disabled).v-select.v-text-field input {
1920
color: white;
2021
}

src/components/Layout/Space.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Layout/Space.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default {
4444
height: 100%;
4545
display: flex;
4646
flex-direction: column;
47-
background: #0000;
47+
background: #0000 !important;
4848
}
4949
.slot-shell {
5050
margin-top: 73px;

src/components/User/UserInfo.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ export default {
3838
introduction () {
3939
return this.user.introduction
4040
}
41+
},
42+
created () {
43+
console.log(this.user)
4144
}
4245
}
4346
</script>

src/pages/Music.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export default {
153153
border-radius: 100%/100%;
154154
background: #FF92BC;
155155
filter: blur(30px);
156-
-webkit-filter: blur(200px);
156+
-webkit-filter: blur(30px);
157157
opacity: 0.7;
158158
top: -10%;
159159
}

src/pages/Music/_id.vue

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@
176176
import spaceLayout from '@/components/Layout/Space'
177177
import miniAvatar from '@/components/User/MiniAvatar'
178178
179-
import mp3 from '@/assets/music/FlowerDance.mp3'
180-
import album from '@/assets/music/FlowerDance.jpg'
181179
import api from '@/api/api'
182180
import decode from '@/util/decode'
183181
import { mapState } from 'vuex'
@@ -210,14 +208,6 @@ export default {
210208
owned: false,
211209
showDialog: false,
212210
loading: true,
213-
audioList: {
214-
flowerdance: {
215-
name: 'Flower Dance',
216-
artist: 'DJ OKAWARI',
217-
url: mp3,
218-
cover: album
219-
}
220-
},
221211
users: [
222212
{
223213
avatar: 'https://picsum.photos/510/300?random'
@@ -375,7 +365,7 @@ export default {
375365
const reader = new FileReader()
376366
reader.readAsArrayBuffer(new Blob([music.data], { type: music.type }))
377367
reader.onload = (event) => {
378-
const url = window.webkitURL.createObjectURL(new Blob([event.target.result]))
368+
const url = window.webkitURL.createObjectURL(new Blob([event.target.result], { type: music.type }))
379369
resolve(url)
380370
}
381371
} catch (e) {
@@ -640,6 +630,9 @@ export default {
640630
color: white;
641631
line-height: 20px;
642632
margin: 8px 0 0;
633+
&:hover {
634+
color: #E56D9B;
635+
}
643636
}
644637
}
645638

src/pages/User/_id.vue

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -147,33 +147,42 @@ export default {
147147
...mapState(['wallet', 'isMe', 'username', 'userAvatar', 'userIntroduction', 'userType', 'userPage']),
148148
user () {
149149
let introduction = ''
150-
if (this.isMe) {
151-
if (this.userIntroduction === '') {
152-
introduction = 'No Introduction Yet'
153-
} else {
154-
introduction = this.userIntroduction
155-
}
156-
return { nickname: this.username, avatar: this.userAvatar, introduction: introduction, type: this.userType }
150+
if (this.userPage.introduction === '') {
151+
introduction = 'No Introduction Yet'
157152
} else {
158-
if (this.userPage.introduction === '') {
159-
introduction = 'No Introduction Yet'
160-
} else {
161-
introduction = this.userPage.introduction
162-
}
163-
return { nickname: this.userPage.nickname, avatar: this.userPage.avatar, introduction: introduction, type: this.userPage.type }
153+
introduction = this.userPage.introduction
164154
}
155+
return { nickname: this.userPage.nickname, avatar: this.userPage.avatar, introduction: introduction, type: this.userPage.type }
156+
}
157+
},
158+
watch: {
159+
async $route (val) {
160+
window.location.reload()
161+
await this.setUserPage({ wallet: val.params.id })
162+
let introduction = ''
163+
if (this.userPage.introduction === '') {
164+
introduction = 'No Introduction Yet'
165+
} else {
166+
introduction = this.userPage.introduction
167+
}
168+
this.user = { nickname: this.userPage.nickname, avatar: this.userPage.avatar, introduction: introduction, type: this.userPage.type }
169+
},
170+
username (val) {
171+
if (this.wallet === this.$route.params.id) {
172+
console.log('isMe')
173+
this.setIsMe(true)
174+
document.title = val + '\'s Profile - ArcLight'
175+
} else {
176+
document.title = this.userPage.nickname + '\'s Profile - ArcLight'
177+
}
178+
},
179+
userPage (val) {
180+
document.title = val.nickname + '\'s Profile - ArcLight'
165181
}
166182
},
167183
mounted () {
168184
this.setUserPage({ wallet: this.$route.params.id })
169-
if (this.wallet === this.$route.params.id) {
170-
console.log('isMe')
171-
this.setIsMe(true)
172-
document.title = this.username + '\'s Profile - ArcLight'
173-
} else {
174-
document.title = this.userPage.nickname + '\'s Profile - ArcLight'
175-
}
176-
185+
document.title = 'Profile - ArcLight'
177186
// 假数据 循环 变多
178187
// const followers = []
179188
// for (let i = 0; i < 3; i++) {

0 commit comments

Comments
 (0)