Skip to content

Commit

Permalink
后续更新将更新版本号,设置一些样式以及bug修复
Browse files Browse the repository at this point in the history
  • Loading branch information
ChingCdesu committed May 19, 2021
1 parent 031e891 commit 3af397b
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 47 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "downloader",
"version": "0.0.1",
"version": "0.1.0",
"main": "dist/main/index.js",
"author": "_ChingC",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions src/common/utils/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { app } from 'electron'
export default new Store({
name: 'store',
migrations: {
'0.0.1': store => {
'0.1.0': store => {
store.set('debugPhase', true)
store.set('phase', '0.0.1')
store.set('phase', '0.1.0')
}
},
defaults: {
Expand Down
19 changes: 9 additions & 10 deletions src/render/components/Player.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@
<font-awesome-icon
class="control-btn"
:icon="['fas', 'volume-up']"
v-if="this.volume >= 50 && !this.mute"
v-if="this.volume >= 50"
@click="this.doMute"
/>
<font-awesome-icon
class="control-btn"
:icon="['fas', 'volume-down']"
v-if="this.volume < 50 && this.volume > 0 && !this.mute"
v-if="this.volume < 50 && this.volume > 0"
@click="this.doMute"
/>
<font-awesome-icon
class="control-btn"
:icon="['fas', 'volume-mute']"
v-if="this.volume === 0 || this.mute"
v-if="this.volume === 0"
@click="this.unmute"
/>
</div>
Expand Down Expand Up @@ -131,7 +131,6 @@ export default {
const player = PlayerSingleton.instance;
let volume = player.getVolume();
let storedVolume = volume;
let mute = volume === 0;
player.walkSync = (it: PlayListItem) => {
// @ts-ignore: 这里必须为this.item,函数触发的时候已经渲染完了
this.item = it;
Expand All @@ -140,7 +139,6 @@ export default {
player,
item,
volume,
mute,
storedVolume,
};
},
Expand Down Expand Up @@ -171,7 +169,8 @@ export default {
this.player.nextSong();
},
changeVolume(volume: number) {
this.storedVolume = volume;
if (volume !== 0)
this.storedVolume = volume;
this.player.setVolume(volume);
},
secondToTime(sec: number): string {
Expand All @@ -182,14 +181,13 @@ export default {
.padStart(2, "0")}`;
},
doMute() {
this.mute = true;
this.storedVolume = this.volume;
this.volume = 0;
this.player.setVolume(0);
// this.player.setVolume(0);
},
unmute() {
this.mute = false;
this.volume = this.storedVolume;
this.player.setVolume(this.volume);
// this.player.setVolume(this.volume);
},
},
};
Expand Down Expand Up @@ -238,6 +236,7 @@ export default {
align-items: center;
.volume-icon {
width: 40px;
text-align: left;
}
.volume-bar {
flex: 1;
Expand Down
6 changes: 3 additions & 3 deletions src/render/components/SongCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -318,16 +318,16 @@ export default {
// @ts-ignore
this.$notify({
title: "文件已存在",
message: `${fileName} 已存在于 ${path},下载将不会创建`,
type: "warning",
message: `${fileName} 已存在于 ${path},将不会下载该铺面`,
type: "warning"
});
}
})
.catch((err) => {
// @ts-ignore
this.$notify({
title: "出现错误",
message: `下载将不会创建。${err}`,
message: `不会下载该文件。原因是:${err}`,
type: "error",
});
});
Expand Down
85 changes: 54 additions & 31 deletions src/render/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,41 @@
* 全局样式
*/

html,
body {
width: 100%;
height: 100%;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-ms-overflow-style: scrollbar;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
@-ms-viewport {
width: device-width;
}
body {
margin: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
font-variant: tabular-nums;
line-height: 1.5715;
background-color: #fff;
font-feature-settings: 'tnum';
}
html,
body {
width: 100%;
height: 100%;
}

*,
*::before,
*::after {
box-sizing: border-box;
}

html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-ms-overflow-style: scrollbar;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

@-ms-viewport {
width: device-width;
}

body {
margin: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
font-variant: tabular-nums;
line-height: 1.5715;
background-color: #fff;
font-feature-settings: 'tnum';
}

:root {
--color-primary: #FF6C60;
Expand Down Expand Up @@ -93,4 +97,23 @@

::-webkit-scrollbar {
display: none;
}

.el-notification {
background-color: hsla(200, 10%, 20%, .5);
backdrop-filter: blur(5px);
border: 1px solid #f9c052;
.el-notification__title,
.el-notification__content {
color: #fff;
}

.el-notification__content {
word-break: break-all;
line-height: 1.5;
font-size: 12px;
}
.el-notification__closeBtn{
color: rgba(255, 255, 255, .7);
}
}

0 comments on commit 3af397b

Please sign in to comment.