-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65a9101
commit a8c83fb
Showing
16 changed files
with
298 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,27 @@ | ||
<template> | ||
<div | ||
class="statusBar" | ||
:style="styleNow" | ||
v-on:dblclick="minify" | ||
v-on:contextmenu="switchListen" | ||
v-on:mousedown="startDrag" | ||
></div> | ||
<div> | ||
<StatusBarV3 v-if="type === 2"></StatusBarV3> | ||
<StatusBarV2 v-else-if="type === 1"></StatusBarV2> | ||
<StatusBarV1 v-else-if="type === 0"></StatusBarV1> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import WindowController from "./WindowController"; | ||
import { MessageType, WinOpt } from "../tools/enums"; | ||
import { ipcRenderer as ipc } from "electron"; | ||
import { WindowWrapper } from "../tools/windows"; | ||
import StatusBarV3 from "./StatusBarV3"; | ||
import { RuleName } from "../tools/rule"; | ||
import StatusBarV2 from "./StatusBarV2"; | ||
import StatusBarV1 from "./StatusBarV1"; | ||
export default { | ||
mixins: [WindowController], | ||
components: { StatusBarV3, StatusBarV2, StatusBarV1 }, | ||
data: function() { | ||
return { | ||
colorNow: "white" | ||
type: this.$controller.get(RuleName.titleBar) | ||
}; | ||
}, | ||
computed: { | ||
styleNow() { | ||
return `background: ${this.colorNow}; `; | ||
} | ||
}, | ||
methods: { | ||
switchColor(color) { | ||
this.colorNow = color; | ||
}, | ||
switchListen() { | ||
this.$controller.action.callback("listenClipboard"); | ||
} | ||
}, | ||
mounted: function() { | ||
ipc.on(MessageType.WindowOpt.toString(), (event, arg) => { | ||
switch (arg.type) { | ||
case WinOpt.ChangeColor: | ||
this.switchColor(arg.args); | ||
break; | ||
case WinOpt.EndDrag: | ||
this.endDrag(); | ||
break; | ||
} | ||
}); | ||
this.$controller.setCurrentColor(); | ||
} | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
.statusBar { | ||
width: 100%; | ||
height: 15px; | ||
} | ||
.dragButton { | ||
-webkit-app-region: drag; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<template> | ||
<div | ||
class="statusBar" | ||
:style="styleNow" | ||
v-on:dblclick="minify" | ||
v-on:mousedown="bindDrag" | ||
v-on:contextmenu="switchListen" | ||
></div> | ||
</template> | ||
|
||
<script> | ||
import WindowController from "./WindowController"; | ||
import { MessageType, WinOpt } from "../tools/enums"; | ||
import { ipcRenderer as ipc } from "electron"; | ||
export default { | ||
name: "StatusBarV1", | ||
mixins: [WindowController], | ||
data: function() { | ||
return { | ||
colorNow: "white" | ||
}; | ||
}, | ||
computed: { | ||
styleNow() { | ||
return `height: 15px;background: ${this.colorNow};`; | ||
} | ||
}, | ||
methods: { | ||
switchColor(color) { | ||
this.colorNow = color; | ||
}, | ||
switchListen() { | ||
this.$controller.action.callback("listenClipboard"); | ||
} | ||
}, | ||
mounted: function() { | ||
ipc.on(MessageType.WindowOpt.toString(), (event, arg) => { | ||
switch (arg.type) { | ||
case WinOpt.ChangeColor: | ||
this.switchColor(arg.args); | ||
break; | ||
} | ||
}); | ||
this.$controller.setCurrentColor(); | ||
} | ||
}; | ||
</script> | ||
|
||
<style scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<template> | ||
<div | ||
class="statusBar" | ||
:style="styleNow" | ||
v-on:dblclick="minify" | ||
v-on:contextmenu="switchListen" | ||
> | ||
<i class="el-icon-rank dragButton"></i> | ||
<i class="el-icon-rank dragButton" style="float:left;"></i> | ||
<i class="el-icon-rank dragButton" style="float:right;"></i> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import WindowController from "./WindowController"; | ||
import { MessageType, WinOpt } from "../tools/enums"; | ||
import { ipcRenderer as ipc } from "electron"; | ||
export default { | ||
name: "StatusBarV2", | ||
mixins: [WindowController], | ||
data: function() { | ||
return { | ||
colorNow: "white" | ||
}; | ||
}, | ||
computed: { | ||
styleNow() { | ||
return `background: ${this.colorNow}; `; | ||
} | ||
}, | ||
methods: { | ||
switchColor(color) { | ||
this.colorNow = color; | ||
}, | ||
switchListen() { | ||
this.$controller.action.callback("listenClipboard"); | ||
} | ||
}, | ||
mounted: function() { | ||
ipc.on(MessageType.WindowOpt.toString(), (event, arg) => { | ||
switch (arg.type) { | ||
case WinOpt.ChangeColor: | ||
this.switchColor(arg.args); | ||
break; | ||
} | ||
}); | ||
this.$controller.setCurrentColor(); | ||
} | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
.statusBar { | ||
width: 100%; | ||
height: 20px; | ||
} | ||
.dragButton { | ||
-webkit-app-region: drag; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<template> | ||
<div | ||
class="statusBar" | ||
:style="styleNow" | ||
v-on:dblclick="minify" | ||
v-on:contextmenu="switchListen" | ||
v-on:mousedown="startDrag" | ||
></div> | ||
</template> | ||
|
||
<script> | ||
import WindowController from "./WindowController"; | ||
import { MessageType, WinOpt } from "../tools/enums"; | ||
import { ipcRenderer as ipc } from "electron"; | ||
import { WindowWrapper } from "../tools/windows"; | ||
export default { | ||
name: "StatusBarV3", | ||
mixins: [WindowController], | ||
data: function() { | ||
return { | ||
colorNow: "white" | ||
}; | ||
}, | ||
computed: { | ||
styleNow() { | ||
return `background: ${this.colorNow}; `; | ||
} | ||
}, | ||
methods: { | ||
switchColor(color) { | ||
this.colorNow = color; | ||
}, | ||
switchListen() { | ||
this.$controller.action.callback("listenClipboard"); | ||
} | ||
}, | ||
mounted: function() { | ||
ipc.on(MessageType.WindowOpt.toString(), (event, arg) => { | ||
switch (arg.type) { | ||
case WinOpt.ChangeColor: | ||
this.switchColor(arg.args); | ||
break; | ||
case WinOpt.EndDrag: | ||
this.endDrag(); | ||
break; | ||
} | ||
}); | ||
this.$controller.setCurrentColor(); | ||
} | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
.statusBar { | ||
width: 100%; | ||
height: 15px; | ||
} | ||
.dragButton { | ||
-webkit-app-region: drag; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.