提交 3251de57 编写于 作者: 璃白.'s avatar 璃白. 🌻

feat:调整布局

上级 cbe9e3a1
...@@ -96,7 +96,7 @@ module.exports = () => { ...@@ -96,7 +96,7 @@ module.exports = () => {
// win.loadFile(path.resolve(__dirname, "../../../../send.html")); // win.loadFile(path.resolve(__dirname, "../../../../send.html"));
// win.loadURL("https://meiyin.xyz"); // win.loadURL("https://meiyin.xyz");
win.loadURL( win.loadURL(
`https://passport.csdn.net/account/login?from=http://test-code.csdn.net/about/quicker` `https://passport.csdn.net/account/login?from=https://gitcode.net/about/quicker`
); );
win.on("closed", () => { win.on("closed", () => {
win = undefined; win = undefined;
......
...@@ -15,11 +15,11 @@ module.exports = () => { ...@@ -15,11 +15,11 @@ module.exports = () => {
: `file://${__dirname}/index.html`; : `file://${__dirname}/index.html`;
win = new BrowserWindow({ win = new BrowserWindow({
height: 186, height: 148, // client_height
useContentSize: true, useContentSize: true,
resizable: true, resizable: true,
width: 920, width: 920,
frame: false, frame: false,
title: "拉比克", title: "拉比克",
show: false, show: false,
skipTaskbar: true, skipTaskbar: true,
...@@ -55,7 +55,7 @@ module.exports = () => { ...@@ -55,7 +55,7 @@ module.exports = () => {
win = undefined; win = undefined;
}); });
win.on("blur", () => { win.on("blur", () => {
win.hide(); // win.hide();
}); });
}; };
......
import axios from 'axios'; import axios from "axios";
import { lt } from 'semver'; import api from "../../renderer/assets/api";
import { dialog, shell } from 'electron'; import { lt } from "semver";
import pkg from '../../../package.json'; import { dialog, shell } from "electron";
const os = require('os'); import pkg from "../../../package.json";
const os = require("os");
const version = pkg.version; const version = pkg.version;
const releaseUrl = 'http://118.195.176.247:8080/release/query'; const releaseUrl = "http://118.195.176.247:8080/release/query";
export async function autoUpdate() { export async function autoUpdate() {
let res; let res;
try { try {
res = await axios.get(releaseUrl); // res = await axios.get(releaseUrl);
res = await api.getVersions();
console.log(res);
} catch (err) { } catch (err) {
console.log(err); console.log(err);
} }
if (res) { if (res) {
const latest = res.data.result[0]; const latest = res.data[0];
const result = compareVersion2Update(version, latest.version); const result = compareVersion2Update(version, latest.version);
if (result) { if (result) {
const res = await dialog.showMessageBox({ const res = await dialog.showMessageBox({
type: 'info', type: "info",
title: '发现新版本', title: "发现新版本",
buttons: ['Yes', 'No'], buttons: ["Yes", "No"],
message: `发现新版本${latest.version}更新了很多功能,${latest.msg}, 是否去下载最新的版本?`, message: `发现新版本${latest.version},是否去下载最新的版本?`,
checkboxLabel: '以后不再提醒', checkboxLabel: "以后不再提醒",
checkboxChecked: false checkboxChecked: false
}); });
if (res.response === 0) { if (res.response === 0) {
if (os.type() === 'Windows_NT') { if (os.type() === "Windows_NT") {
// windows // windows
await shell.openExternal(latest.downloadUrl); await shell.openExternal(latest.downloadUrl);
} else if (os.type() === 'Darwin') { } else if (os.type() === "Darwin") {
// mac // mac
await shell.openExternal(latest.downloadUrl); await shell.openExternal(latest.downloadUrl);
} else { } else {
// 不支持提示 // 不支持提示
dialog.showErrorBox('提示', '系统不支持'); dialog.showErrorBox("提示", "系统不支持");
} }
} }
} }
......
<template> <template>
<div id="app" @mousedown="drag"> <div id="app" @mousedown="drag">
<quick-apps />
<a-layout id="components-layout"> <a-layout id="components-layout">
<div v-if="!searchType" class="rubick-select"> <div v-if="!searchType" class="rubick-select">
<div v-if="selected" class="tag-container"> <div v-if="selected" class="tag-container">
...@@ -61,7 +60,7 @@ ...@@ -61,7 +60,7 @@
e => targetSearch({ value: e.target.value, type: 'space' }) e => targetSearch({ value: e.target.value, type: 'space' })
" "
> >
<!-- <div @click="goMenu" class="suffix-tool" slot="suffix"> <div @click="goMenu" class="suffix-tool" slot="suffix">
<a-icon <a-icon
v-show="selected && selected.key === 'plugin-container'" v-show="selected && selected.key === 'plugin-container'"
class="icon-more" class="icon-more"
...@@ -76,14 +75,14 @@ ...@@ -76,14 +75,14 @@
spin spin
/> />
</a-spin> </a-spin>
<img <!-- <img
referrer="no-referrer" referrer="no-referrer"
v-if="userInfo" v-if="userInfo"
class="icon-tool" class="icon-tool"
:src="userInfo.UserAvatar" :src="userInfo.UserAvatar"
alt="" alt=""
/> /> -->
<img v-else class="icon-tool" :src="selected.icon" /> <img class="icon-tool" :src="selected.icon" />
</div> </div>
<div v-else class="logo"> <div v-else class="logo">
<img <img
...@@ -94,7 +93,7 @@ ...@@ -94,7 +93,7 @@
/> />
<img v-else src="./assets/imgs/quicker.png" /> <img v-else src="./assets/imgs/quicker.png" />
</div> </div>
</div> --> </div>
</a-input> </a-input>
<div v-show="showOptions" class="options"> <div v-show="showOptions" class="options">
<a-list item-layout="horizontal" :data-source="options"> <a-list item-layout="horizontal" :data-source="options">
...@@ -153,6 +152,7 @@ ...@@ -153,6 +152,7 @@
</div> --> </div> -->
<router-view></router-view> <router-view></router-view>
</a-layout> </a-layout>
<quick-apps v-if="isHome" />
</div> </div>
</template> </template>
<script> <script>
...@@ -488,6 +488,9 @@ export default { ...@@ -488,6 +488,9 @@ export default {
"userInfo", "userInfo",
"pluginLoading" "pluginLoading"
]), ]),
isHome() {
return this.$route.path === "/home";
},
isWebview() { isWebview() {
return this.pluginInfo.subType === "webview"; return this.pluginInfo.subType === "webview";
}, },
...@@ -608,11 +611,11 @@ body { ...@@ -608,11 +611,11 @@ body {
.options { .options {
position: absolute; position: absolute;
top: 178px; top: 96px;
left: 0; left: 0;
width: 100%; width: 100%;
z-index: 99; z-index: 99;
max-height: calc(~"100vh - 186px"); max-height: calc(~"100vh - 96px"); // client_height
overflow: auto; overflow: auto;
padding: 0 14px; padding: 0 14px;
box-sizing: border-box; box-sizing: border-box;
......
import axios from "./axios"; import axios from "./axios";
export default { export default {
getVersions: () => axios.get("/releases"),
getPlugins: () => axios.get("/") getPlugins: () => axios.get("/")
}; };
const WINDOW_MAX_HEIGHT = 800; const WINDOW_MAX_HEIGHT = 800;
const WINDOW_MIN_HEIGHT = 186; const WINDOW_MIN_HEIGHT = 148; // client_height
const PRE_ITEM_HEIGHT = 60; const PRE_ITEM_HEIGHT = 60;
const SYSTEM_PLUGINS = [ const SYSTEM_PLUGINS = [
......
...@@ -164,6 +164,6 @@ export default { ...@@ -164,6 +164,6 @@ export default {
<style lang="less"> <style lang="less">
#webview { #webview {
width: 100%; width: 100%;
height: calc(~"100vh - 180px"); height: calc(~"100vh - 84px");
} }
</style> </style>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
</template> </template>
</div> </div>
<div class="tools"> <!-- <div class="tools">
<a-icon @click="goMenu('market')" class="icon-more" type="more" /> <a-icon @click="goMenu('market')" class="icon-more" type="more" />
<img <img
@click="goMenu('settings')" @click="goMenu('settings')"
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
:src="userInfo.UserAvatar" :src="userInfo.UserAvatar"
alt="" alt=""
/> />
</div> </div> -->
</div> </div>
</template> </template>
<script> <script>
...@@ -163,17 +163,17 @@ export default { ...@@ -163,17 +163,17 @@ export default {
display: flex; display: flex;
flex: 1; flex: 1;
justify-content: flex-start; justify-content: flex-start;
min-height: 84px; min-height: 58px;
} }
/deep/.app_item { /deep/.app_item {
cursor: pointer; cursor: pointer;
position: relative; position: relative;
&:not(:first-child) { &:not(:first-child) {
margin-left: 24px; margin-left: 20px;
} }
&.view:hover { &.view:hover {
.app_icon { .app_icon {
bottom: 0; bottom: -4px;
z-index: 4; z-index: 4;
} }
.app_name, .app_name,
...@@ -228,8 +228,8 @@ export default { ...@@ -228,8 +228,8 @@ export default {
margin-right: 10px; margin-right: 10px;
} }
.user_avatar { .user_avatar {
width: 54px; width: 32px;
height: 54px; height: 32px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
......
...@@ -32,8 +32,8 @@ export default { ...@@ -32,8 +32,8 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.app_icon { .app_icon {
width: 56px; width: 32px;
height: 56px; height: 32px;
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
} }
.app_name { .app_name {
color: #666; color: #666;
font-size: 14px; font-size: 12px;
text-align: center; text-align: center;
margin-top: 10px; margin-top: 10px;
opacity: 0; opacity: 0;
......
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
webview { webview {
height: calc(~"100vh - 220px"); height: calc(~"100vh - 84px");
width: 100%; width: 100%;
} }
.ant-tabs { .ant-tabs {
......
...@@ -298,7 +298,7 @@ export default { ...@@ -298,7 +298,7 @@ export default {
<style lang="less"> <style lang="less">
@import "../../../assets/style/varable.less"; @import "../../../assets/style/varable.less";
.pg-settings { .pg-settings {
height: calc(~"100vh - 220px"); height: calc(~"100vh - 128px");
overflow: auto; overflow: auto;
.dev-detail { .dev-detail {
height: 100%; height: 100%;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册