Skip to content

A full-featured download manager.

refactor: style code format

Dr_rOota4fb082088f3
diff --git a/src/renderer/components/About/AboutPanel.vue b/src/renderer/components/About/AboutPanel.vue
index e565a57f..7814c269 100644
--- a/src/renderer/components/About/AboutPanel.vue
+++ b/src/renderer/components/About/AboutPanel.vue
@@ -54,12 +54,12 @@
</script>
<style lang="scss">
- .app-about-dialog {
- max-width: 632px;
- min-width: 380px;
- .el-dialog__header {
- padding-top: 0;
- padding-bottom: 0;
- }
+.app-about-dialog {
+ max-width: 632px;
+ min-width: 380px;
+ .el-dialog__header {
+ padding-top: 0;
+ padding-bottom: 0;
}
+}
</style>
diff --git a/src/renderer/components/About/AppInfo.vue b/src/renderer/components/About/AppInfo.vue
index 2d18ddb7..45d977f7 100644
--- a/src/renderer/components/About/AppInfo.vue
+++ b/src/renderer/components/About/AppInfo.vue
@@ -49,45 +49,45 @@
</script>
<style lang="scss">
- .app-info {
- position: relative;
- margin: 8px 0;
- .app-version span {
- display: inline-block;
- vertical-align: bottom;
- font-size: $--font-size-large;
- margin-left: 20px;
- color: $--app-version-color;
- line-height: 18px;
- }
- .app-icon {
- position: absolute;
- top: 0;
- right: 0;
- background: transparent url('~@/assets/app-icon.png') center center no-repeat;
- background-size: 128px 128px;
- width: 128px;
- height: 128px;
+.app-info {
+ position: relative;
+ margin: 8px 0;
+ .app-version span {
+ display: inline-block;
+ vertical-align: bottom;
+ font-size: $--font-size-large;
+ margin-left: 20px;
+ color: $--app-version-color;
+ line-height: 18px;
+ }
+ .app-icon {
+ position: absolute;
+ top: 0;
+ right: 0;
+ background: transparent url('~@/assets/app-icon.png') center center no-repeat;
+ background-size: 128px 128px;
+ width: 128px;
+ height: 128px;
+ }
+ .engine-info {
+ margin: 50px 35% 0 8px;
+ h4 {
+ font-size: $--font-size-base;
+ font-weight: normal;
+ color: $--app-engine-title-color;
}
- .engine-info {
- margin: 50px 35% 0 8px;
- h4 {
- font-size: $--font-size-base;
- font-weight: normal;
- color: $--app-engine-title-color;
- }
- ul {
- font-size: 12px;
- color: $--app-engine-info-color;
- list-style: none;
- padding: 0;
- line-height: 20px;
- @include clearfix();
- li {
- float: left;
- width: 50%;
- }
+ ul {
+ font-size: 12px;
+ color: $--app-engine-info-color;
+ list-style: none;
+ padding: 0;
+ line-height: 20px;
+ @include clearfix();
+ li {
+ float: left;
+ width: 50%;
}
}
}
+}
</style>
diff --git a/src/renderer/components/About/Copyright.vue b/src/renderer/components/About/Copyright.vue
index 62849ca8..00231af6 100644
--- a/src/renderer/components/About/Copyright.vue
+++ b/src/renderer/components/About/Copyright.vue
@@ -29,22 +29,22 @@
</script>
<style lang="scss">
- .copyright {
- width: 100%;
- font-size: $--font-size-small;
- a {
- color: $--app-copyright-color;
- text-decoration: none;
- }
- }
- .copyright-left {
- text-align: left;
+.copyright {
+ width: 100%;
+ font-size: $--font-size-small;
+ a {
+ color: $--app-copyright-color;
+ text-decoration: none;
}
+}
+.copyright-left {
+ text-align: left;
+}
- .copyright-right {
- text-align: right;
- a {
- margin-left: 30px;
- }
+.copyright-right {
+ text-align: right;
+ a {
+ margin-left: 30px;
}
+}
</style>
diff --git a/src/renderer/components/Aside/Index.vue b/src/renderer/components/Aside/Index.vue
index bcb7cf0b..99259452 100644
--- a/src/renderer/components/Aside/Index.vue
+++ b/src/renderer/components/Aside/Index.vue
@@ -64,40 +64,40 @@
</script>
<style lang="scss">
- .aside-inner {
- display: flex;
- height: 100%;
- flex-flow: column;
- }
- .logo-mini {
- margin-top: 40px;
- }
- .menu {
- list-style: none;
- padding: 0;
- margin: 0 auto;
- user-select: none;
- cursor: default;
- > li {
- width: 32px;
- height: 32px;
- margin-top: 24px;
- cursor: pointer;
- border-radius: 16px;
- transition: background-color 0.25s;
- &:hover {
- background-color: rgba(255, 255, 255, 0.15);
- }
+.aside-inner {
+ display: flex;
+ height: 100%;
+ flex-flow: column;
+}
+.logo-mini {
+ margin-top: 40px;
+}
+.menu {
+ list-style: none;
+ padding: 0;
+ margin: 0 auto;
+ user-select: none;
+ cursor: default;
+ > li {
+ width: 32px;
+ height: 32px;
+ margin-top: 24px;
+ cursor: pointer;
+ border-radius: 16px;
+ transition: background-color 0.25s;
+ &:hover {
+ background-color: rgba(255, 255, 255, 0.15);
}
- svg {
- padding: 6px;
- color: #fff;
- }
- }
- .top-menu {
- flex: 1;
}
- .bottom-menu {
- margin-bottom: 24px;
+ svg {
+ padding: 6px;
+ color: #fff;
}
+}
+.top-menu {
+ flex: 1;
+}
+.bottom-menu {
+ margin-bottom: 24px;
+}
</style>
diff --git a/src/renderer/components/Logo/LogoMini.vue b/src/renderer/components/Logo/LogoMini.vue
index bedcf210..52dcf305 100644
--- a/src/renderer/components/Logo/LogoMini.vue
+++ b/src/renderer/components/Logo/LogoMini.vue
@@ -10,11 +10,7 @@
<script>
export default {
- name: 'mo-logo-mini',
- components: {
- },
- methods: {
- }
+ name: 'mo-logo-mini'
}
</script>
diff --git a/src/renderer/components/Native/SelectDirectory.vue b/src/renderer/components/Native/SelectDirectory.vue
index dc87fedc..16e1dcc4 100644
--- a/src/renderer/components/Native/SelectDirectory.vue
+++ b/src/renderer/components/Native/SelectDirectory.vue
@@ -32,6 +32,3 @@
}
}
</script>
-
-<style lang="scss">
-</style>
diff --git a/src/renderer/components/Native/ShowInFolder.vue b/src/renderer/components/Native/ShowInFolder.vue
index cb129666..56846c23 100644
--- a/src/renderer/components/Native/ShowInFolder.vue
+++ b/src/renderer/components/Native/ShowInFolder.vue
@@ -31,6 +31,3 @@
}
}
</script>
-
-<style lang="scss">
-</style>
diff --git a/src/renderer/components/Preference/Basic.vue b/src/renderer/components/Preference/Basic.vue
index 1d570237..0543fe1b 100644
--- a/src/renderer/components/Preference/Basic.vue
+++ b/src/renderer/components/Preference/Basic.vue
@@ -505,6 +505,3 @@
}
}
</script>
-
-<style lang="scss">
-</style>
diff --git a/src/renderer/components/Preference/Index.vue b/src/renderer/components/Preference/Index.vue
index 78c97bb7..c4b63a76 100644
--- a/src/renderer/components/Preference/Index.vue
+++ b/src/renderer/components/Preference/Index.vue
@@ -17,59 +17,59 @@
</script>
<style lang="scss">
- .form-preference {
- padding: 16px 7% 64px 0;
- .el-switch__label {
- font-weight: normal;
+.form-preference {
+ padding: 16px 7% 64px 0;
+ .el-switch__label {
+ font-weight: normal;
+ color: $--color-text-regular;
+ &.is-active {
color: $--color-text-regular;
- &.is-active {
- color: $--color-text-regular;
- }
}
- .el-checkbox__input.is-checked + .el-checkbox__label {
+ }
+ .el-checkbox__input.is-checked + .el-checkbox__label {
+ color: $--color-text-regular;
+ }
+ .el-form-item {
+ a {
color: $--color-text-regular;
- }
- .el-form-item {
- a {
- color: $--color-text-regular;
- text-decoration: none;
- &:hover {
- color: $--color-text-primary;
- text-decoration: underline;
- }
- &:active {
- color: $--color-text-primary;
- }
+ text-decoration: none;
+ &:hover {
+ color: $--color-text-primary;
+ text-decoration: underline;
}
- }
- .el-form-item.el-form-item--mini {
- margin-bottom: 32px;
- }
- .el-form-item__content {
- color: $--color-text-regular;
- }
- .form-item-sub {
- margin-bottom: 8px;
- &:last-of-type {
- margin-bottom: 0;
+ &:active {
+ color: $--color-text-primary;
}
}
}
- .form-actions {
- position: sticky;
- bottom: 0;
- left: auto;
- z-index: 10;
- width: -webkit-fill-available;
- box-sizing: border-box;
- padding: 24px 36px 24px 0;
+ .el-form-item.el-form-item--mini {
+ margin-bottom: 32px;
}
- .action-link {
- cursor: pointer;
- color: $--link-color;
- &:hover {
- color: $--link-hover-color;
- text-decoration: underline;
+ .el-form-item__content {
+ color: $--color-text-regular;
+ }
+ .form-item-sub {
+ margin-bottom: 8px;
+ &:last-of-type {
+ margin-bottom: 0;
}
}
+}
+.form-actions {
+ position: sticky;
+ bottom: 0;
+ left: auto;
+ z-index: 10;
+ width: -webkit-fill-available;
+ box-sizing: border-box;
+ padding: 24px 36px 24px 0;
+}
+.action-link {
+ cursor: pointer;
+ color: $--link-color;
+ &:hover {
+ color: $--link-hover-color;
+ text-decoration: underline;
+ }
+}
</style>
diff --git a/src/renderer/components/Preference/ThemeSwitcher.vue b/src/renderer/components/Preference/ThemeSwitcher.vue
index 21638227..0e4e5b07 100644
--- a/src/renderer/components/Preference/ThemeSwitcher.vue
+++ b/src/renderer/components/Preference/ThemeSwitcher.vue
@@ -19,8 +19,6 @@
export default {
name: 'mo-theme-switcher',
- components: {
- },
props: {
value: {
type: String,
diff --git a/src/renderer/components/Speedometer/Speedometer.vue b/src/renderer/components/Speedometer/Speedometer.vue
index 1fdd8e54..69a641f6 100644
--- a/src/renderer/components/Speedometer/Speedometer.vue
+++ b/src/renderer/components/Speedometer/Speedometer.vue
@@ -10,7 +10,7 @@
<em>{{ engineMode }}</em>
</div>
<div class="value" v-if="stat.numActive > 0">
- <em >{{ stat.uploadSpeed | bytesToSize }}/s</em>
+ <em>{{ stat.uploadSpeed | bytesToSize }}/s</em>
<span>{{ stat.downloadSpeed | bytesToSize }}/s</span>
</div>
</div>
@@ -18,15 +18,11 @@
<script>
import { mapState, mapActions } from 'vuex'
+ import { bytesToSize } from '@shared/utils'
import '@/components/Icons/speedometer'
- import {
- bytesToSize
- } from '@shared/utils'
export default {
name: 'mo-speedometer',
- components: {
- },
computed: {
...mapState('app', [
'stat'
diff --git a/src/renderer/components/Subnav/PreferenceSubnav.vue b/src/renderer/components/Subnav/PreferenceSubnav.vue
index a6c1a4b7..19d65e1f 100644
--- a/src/renderer/components/Subnav/PreferenceSubnav.vue
+++ b/src/renderer/components/Subnav/PreferenceSubnav.vue
@@ -62,6 +62,3 @@
}
}
</script>
-
-<style lang="scss">
-</style>
diff --git a/src/renderer/components/Subnav/TaskSubnav.vue b/src/renderer/components/Subnav/TaskSubnav.vue
index 8a493b26..8a24e570 100644
--- a/src/renderer/components/Subnav/TaskSubnav.vue
+++ b/src/renderer/components/Subnav/TaskSubnav.vue
@@ -62,6 +62,3 @@
}
}
</script>
-
-<style lang="scss">
-</style>
diff --git a/src/renderer/components/Task/Index.vue b/src/renderer/components/Task/Index.vue
index d2a6d2e2..febf3bc9 100644
--- a/src/renderer/components/Task/Index.vue
+++ b/src/renderer/components/Task/Index.vue
@@ -410,6 +410,3 @@
}
}
</script>
-
-<style lang="scss">
-</style>
diff --git a/src/renderer/components/Task/TaskActions.vue b/src/renderer/components/Task/TaskActions.vue
index dfaada42..743ecda0 100644
--- a/src/renderer/components/Task/TaskActions.vue
+++ b/src/renderer/components/Task/TaskActions.vue
@@ -160,31 +160,31 @@
</script>
<style lang="scss">
- .task-actions {
- position: absolute;
- top: 44px;
- right: 0;
- height: 24px;
- padding: 0;
- overflow: hidden;
- user-select: none;
- cursor: default;
- text-align: right;
- color: $--task-action-color;
- transition: all 0.25s;
- .task-action {
- display: inline-block;
- padding: 5px;
- margin: 0 4px;
- font-size: 0;
- cursor: pointer;
- outline: none;
- &:hover {
- color: $--task-action-hover-color;
- }
- &.disabled {
- color: $--task-action-disabled-color;
- }
+.task-actions {
+ position: absolute;
+ top: 44px;
+ right: 0;
+ height: 24px;
+ padding: 0;
+ overflow: hidden;
+ user-select: none;
+ cursor: default;
+ text-align: right;
+ color: $--task-action-color;
+ transition: all 0.25s;
+ .task-action {
+ display: inline-block;
+ padding: 5px;
+ margin: 0 4px;
+ font-size: 0;
+ cursor: pointer;
+ outline: none;
+ &:hover {
+ color: $--task-action-hover-color;
+ }
+ &.disabled {
+ color: $--task-action-disabled-color;
}
}
+}
</style>
diff --git a/src/renderer/components/Task/TaskItem.vue b/src/renderer/components/Task/TaskItem.vue
index 6a335a6a..fe3b9583 100644
--- a/src/renderer/components/Task/TaskItem.vue
+++ b/src/renderer/components/Task/TaskItem.vue
@@ -75,41 +75,41 @@
</script>
<style lang="scss">
- .task-item {
- position: relative;
- min-height: 88px;
- padding: 16px 12px;
- background-color: $--task-item-background;
- border: 1px solid $--task-item-border-color;
- border-radius: 6px;
- margin-bottom: 16px;
- transition: $--border-transition-base;
- &:hover {
- border-color: $--task-item-hover-border-color;
- }
- .task-item-actions {
- position: absolute;
- top: 16px;
- right: 12px;
- }
- }
- .selected .task-item {
+.task-item {
+ position: relative;
+ min-height: 78px;
+ padding: 16px 12px;
+ background-color: $--task-item-background;
+ border: 1px solid $--task-item-border-color;
+ border-radius: 6px;
+ margin-bottom: 16px;
+ transition: $--border-transition-base;
+ &:hover {
border-color: $--task-item-hover-border-color;
}
- .task-name {
- color: #505753;
- margin-bottom: 1.5rem;
- margin-right: 220px;
- word-break: break-all;
- min-height: 26px;
- &> span {
- font-size: 14px;
- line-height: 26px;
- overflow : hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- }
+ .task-item-actions {
+ position: absolute;
+ top: 16px;
+ right: 12px;
+ }
+}
+.selected .task-item {
+ border-color: $--task-item-hover-border-color;
+}
+.task-name {
+ color: #505753;
+ margin-bottom: 1.5rem;
+ margin-right: 220px;
+ word-break: break-all;
+ min-height: 26px;
+ &> span {
+ font-size: 14px;
+ line-height: 26px;
+ overflow : hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
}
+}
</style>
diff --git a/src/renderer/components/Task/TaskList.vue b/src/renderer/components/Task/TaskList.vue
index cf92f6f1..279cea4a 100644
--- a/src/renderer/components/Task/TaskList.vue
+++ b/src/renderer/components/Task/TaskList.vue
@@ -68,24 +68,24 @@
</script>
<style lang="scss">
- .task-list {
- padding: 16px 0 64px 0;
- min-height: 100%;
- box-sizing: border-box;
- }
- .no-task {
- display: flex;
- height: 100%;
- text-align: center;
- align-items: center;
- justify-content: center;
- font-size: 14px;
- color: #555;
- user-select: none;
- }
- .no-task-inner {
- width: 100%;
- padding-top: 360px;
- background: transparent url('~@/assets/no-task.svg') top center no-repeat;
- }
+.task-list {
+ padding: 16px 0 64px 0;
+ min-height: 100%;
+ box-sizing: border-box;
+}
+.no-task {
+ display: flex;
+ height: 100%;
+ text-align: center;
+ align-items: center;
+ justify-content: center;
+ font-size: 14px;
+ color: #555;
+ user-select: none;
+}
+.no-task-inner {
+ width: 100%;
+ padding-top: 360px;
+ background: transparent url('~@/assets/no-task.svg') top center no-repeat;
+}
</style>