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

feat:调整布局

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