优化暗黑模式
This commit is contained in:
parent
0dc0e7226e
commit
22e718423e
@ -79,6 +79,7 @@
|
|||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import JSPDF from "jspdf";
|
import JSPDF from "jspdf";
|
||||||
|
import {mapState} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Flow",
|
name: "Flow",
|
||||||
@ -115,7 +116,7 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
let route = this.readOnly ? 'viewer' : 'index';
|
let route = this.readOnly ? 'viewer' : 'index';
|
||||||
let theme = $A.dark.isDarkEnabled() ? 'dark' : 'light'
|
let theme = this.themeIsDark ? 'dark' : 'light'
|
||||||
this.url = $A.originUrl('js/grapheditor/' + route + '.html?lang=' + language + '&theme=' + theme);
|
this.url = $A.originUrl('js/grapheditor/' + route + '.html?lang=' + language + '&theme=' + theme);
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -144,6 +145,9 @@
|
|||||||
}, '*')
|
}, '*')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['themeIsDark'])
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatZoom(val) {
|
formatZoom(val) {
|
||||||
return val + '%';
|
return val + '%';
|
||||||
|
@ -82,7 +82,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userToken', 'userInfo']),
|
...mapState(['userToken', 'userInfo', 'themeIsDark']),
|
||||||
|
|
||||||
fileType() {
|
fileType() {
|
||||||
return this.getType(this.value.type);
|
return this.getType(this.value.type);
|
||||||
@ -159,7 +159,7 @@ export default {
|
|||||||
"name": this.userInfo.nickname
|
"name": this.userInfo.nickname
|
||||||
},
|
},
|
||||||
"customization": {
|
"customization": {
|
||||||
"uiTheme": $A.dark.isDarkEnabled() ? "theme-dark" : "theme-classic-light",
|
"uiTheme": this.themeIsDark ? "theme-dark" : "theme-classic-light",
|
||||||
},
|
},
|
||||||
"callbackUrl": 'http://nginx/api/file/content/office?id=' + fileKey + '&token=' + this.userToken,
|
"callbackUrl": 'http://nginx/api/file/content/office?id=' + fileKey + '&token=' + this.userToken,
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@
|
|||||||
$A(this.$refs.myTextarea).show();
|
$A(this.$refs.myTextarea).show();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userToken']),
|
...mapState(['userToken', 'themeIsDark']),
|
||||||
|
|
||||||
headers() {
|
headers() {
|
||||||
return {
|
return {
|
||||||
@ -250,7 +250,7 @@
|
|||||||
resize: !isFull,
|
resize: !isFull,
|
||||||
convert_urls:false,
|
convert_urls:false,
|
||||||
toolbar_mode: 'sliding',
|
toolbar_mode: 'sliding',
|
||||||
content_css: $A.dark.isDarkEnabled() ? 'dark' : 'default',
|
content_css: this.themeIsDark ? 'dark' : 'default',
|
||||||
setup: (editor) => {
|
setup: (editor) => {
|
||||||
editor.ui.registry.addMenuButton('uploadImages', {
|
editor.ui.registry.addMenuButton('uploadImages', {
|
||||||
text: this.$L('图片'),
|
text: this.$L('图片'),
|
||||||
|
@ -218,6 +218,7 @@ import DrawerOverlay from "../components/DrawerOverlay";
|
|||||||
import DragBallComponent from "../components/DragBallComponent";
|
import DragBallComponent from "../components/DragBallComponent";
|
||||||
import TaskAdd from "./manage/components/TaskAdd";
|
import TaskAdd from "./manage/components/TaskAdd";
|
||||||
import {Store} from "le5le-store";
|
import {Store} from "le5le-store";
|
||||||
|
import state from "../store/state";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -481,6 +482,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this.$store.state.themeMode = mode;
|
this.$store.state.themeMode = mode;
|
||||||
|
this.$store.state.themeIsDark = $A.dark.isDarkEnabled();
|
||||||
$A.setStorage("cacheThemeMode", mode);
|
$A.setStorage("cacheThemeMode", mode);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {mapState} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TaskPriority",
|
name: "TaskPriority",
|
||||||
props: {
|
props: {
|
||||||
@ -22,10 +24,20 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(['themeIsDark']),
|
||||||
|
|
||||||
myStyle() {
|
myStyle() {
|
||||||
const {color, background, backgroundColor} = this;
|
const {color, background, backgroundColor, themeIsDark} = this;
|
||||||
|
if (themeIsDark) {
|
||||||
|
return {
|
||||||
|
color: backgroundColor || background,
|
||||||
|
borderColor: backgroundColor || background,
|
||||||
|
backgroundColor: 'transparent',
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
color: color,
|
color: color,
|
||||||
|
borderColor: backgroundColor || background,
|
||||||
backgroundColor: backgroundColor || background,
|
backgroundColor: backgroundColor || background,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
resources/assets/js/store/state.js
vendored
1
resources/assets/js/store/state.js
vendored
@ -125,5 +125,6 @@ switch (state.themeMode) {
|
|||||||
$A.dark.autoDarkMode()
|
$A.dark.autoDarkMode()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
state.themeIsDark = $A.dark.isDarkEnabled();
|
||||||
|
|
||||||
export default state
|
export default state
|
||||||
|
55
resources/assets/sass/dark.scss
vendored
55
resources/assets/sass/dark.scss
vendored
@ -17,6 +17,11 @@ body.dark-mode-reverse {
|
|||||||
box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
|
box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ivu-message-notice-content {
|
||||||
|
box-shadow: 0 1px 6px rgba(255, 255, 255, 0.2);
|
||||||
|
border: 1px solid #e3e8ed;
|
||||||
|
}
|
||||||
|
|
||||||
.ivu-tooltip-inner,
|
.ivu-tooltip-inner,
|
||||||
.ivu-poptip-inner {
|
.ivu-poptip-inner {
|
||||||
border: 1px solid #e3e8ed;
|
border: 1px solid #e3e8ed;
|
||||||
@ -83,6 +88,48 @@ body.dark-mode-reverse {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.project-column {
|
||||||
|
> ul {
|
||||||
|
> li {
|
||||||
|
.column-task {
|
||||||
|
.task-item {
|
||||||
|
.task-progress {
|
||||||
|
.task-time {
|
||||||
|
&.overdue {
|
||||||
|
color: #ed4014;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
&.today {
|
||||||
|
color: #ff9900;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.project-table {
|
||||||
|
.project-table-body {
|
||||||
|
.task-row {
|
||||||
|
> div {
|
||||||
|
&.row-time {
|
||||||
|
.task-time {
|
||||||
|
&.overdue {
|
||||||
|
color: #ed4014;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
&.today {
|
||||||
|
color: #ff9900;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-wrapper {
|
.dialog-wrapper {
|
||||||
@ -109,6 +156,14 @@ body.dark-mode-reverse {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-login {
|
||||||
|
.login-body {
|
||||||
|
.login-box {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.page-manage {
|
.page-manage {
|
||||||
.manage-box-menu {
|
.manage-box-menu {
|
||||||
.manage-box-dropdown {
|
.manage-box-dropdown {
|
||||||
|
@ -489,21 +489,26 @@
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
color: #777777;
|
color: #777777;
|
||||||
background-color: #EAEDF2;
|
background-color: #EAEDF2;
|
||||||
padding: 1px 4px;
|
border: 1px solid #EAEDF2;
|
||||||
|
padding: 0 3px;
|
||||||
margin-left: 18px;
|
margin-left: 18px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
&.overdue,
|
||||||
|
&.today {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
&.overdue {
|
&.overdue {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #ffffff;
|
|
||||||
background-color: #ed4014;
|
background-color: #ed4014;
|
||||||
|
border-color: #ed4014;
|
||||||
}
|
}
|
||||||
&.today {
|
&.today {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #ffffff;
|
|
||||||
background-color: #ff9900;
|
background-color: #ff9900;
|
||||||
|
border-color: #ff9900;
|
||||||
}
|
}
|
||||||
.taskfont {
|
.taskfont {
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
@ -813,17 +818,20 @@
|
|||||||
&.overdue,
|
&.overdue,
|
||||||
&.today {
|
&.today {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
padding: 1px 5px;
|
padding: 0 4px;
|
||||||
|
border: 1px solid transparent;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
&.overdue {
|
&.overdue {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
background-color: #ed4014;
|
background-color: #ed4014;
|
||||||
|
border-color: #ed4014;
|
||||||
}
|
}
|
||||||
&.today {
|
&.today {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
background-color: #ff9900;
|
background-color: #ff9900;
|
||||||
|
border-color: #ff9900;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
.task-priority {
|
.task-priority {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 2px 6px;
|
padding: 2px 5px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user