no message
This commit is contained in:
parent
9e1dd940b8
commit
d246199a5e
@ -2,10 +2,10 @@
|
||||
directory=/var/www
|
||||
|
||||
# 生产环境
|
||||
#command=php bin/laravels start -i
|
||||
command=php bin/laravels start -i
|
||||
|
||||
# 开发环境
|
||||
command=./bin/inotify ./app
|
||||
#command=./bin/inotify ./app
|
||||
|
||||
numprocs=1
|
||||
autostart=true
|
||||
|
56
nativefier.js
vendored
56
nativefier.js
vendored
@ -1,25 +1,61 @@
|
||||
const nativefier = require('nativefier').default;
|
||||
const inquirer = require('inquirer');
|
||||
const config = require('./package.json');
|
||||
|
||||
const options = {
|
||||
name: config.name,
|
||||
version: config.version,
|
||||
targetUrl: 'http://127.0.0.1:2222',
|
||||
arch: 'arm64',
|
||||
appVersion: config.version,
|
||||
buildVersion: config.version,
|
||||
out: './build',
|
||||
icon: './resources/assets/statics/public/images/logo-app.png',
|
||||
bounce: false,
|
||||
counter: true,
|
||||
clearCache: false,
|
||||
disableDevTools: false,
|
||||
disableContextMenu: false,
|
||||
disableDevTools: true,
|
||||
disableContextMenu: true,
|
||||
fileDownloadOptions: {
|
||||
saveAs: true,
|
||||
},
|
||||
};
|
||||
|
||||
nativefier(options, function (error, appPath) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('App has been nativefied to', appPath);
|
||||
const questions = [
|
||||
{
|
||||
type: 'input',
|
||||
name: 'targetUrl',
|
||||
message: "请输入网站地址",
|
||||
validate: function (value) {
|
||||
return value !== ''
|
||||
}
|
||||
}, {
|
||||
type: 'list',
|
||||
name: 'platform',
|
||||
message: "选择操作系统平台",
|
||||
choices: [{
|
||||
name: "MacOS Intel",
|
||||
value: {
|
||||
platform: 'mac',
|
||||
arch: 'x64',
|
||||
}
|
||||
}, {
|
||||
name: "MacOS Arm64",
|
||||
value: {
|
||||
platform: 'mac',
|
||||
arch: 'arm64',
|
||||
}
|
||||
}, {
|
||||
name: "Window x86_64",
|
||||
value: {
|
||||
platform: 'windows',
|
||||
arch: 'x64',
|
||||
}
|
||||
}]
|
||||
}
|
||||
];
|
||||
|
||||
inquirer.prompt(questions).then(answers => {
|
||||
nativefier(Object.assign(options, answers.platform, {
|
||||
targetUrl: answers.targetUrl
|
||||
}), (error) => {
|
||||
error && console.error(error)
|
||||
});
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.0.2",
|
||||
"version": "0.2.12",
|
||||
"description": "DooTask is task management system",
|
||||
"scripts": {
|
||||
"dev": "npm run development",
|
||||
@ -16,6 +16,7 @@
|
||||
"cross-env": "^7.0.2",
|
||||
"css-loader": "^5.2.6",
|
||||
"file-loader": "^6.2.0",
|
||||
"inquirer": "^8.1.1",
|
||||
"internal-ip": "^6.2.0",
|
||||
"jquery": "^3.5.1",
|
||||
"laravel-mix": "^6.0.6",
|
||||
|
2
resources/assets/js/app.js
vendored
2
resources/assets/js/app.js
vendored
@ -71,7 +71,7 @@ Vue.prototype.goForward = function(location, isReplace) {
|
||||
if (typeof location === 'string') location = {name: location};
|
||||
if (isReplace === true) {
|
||||
app.$router.replace(location).then(() => {});
|
||||
}else{
|
||||
} else {
|
||||
app.$router.push(location).then(() => {});
|
||||
}
|
||||
};
|
||||
|
@ -1,70 +1,69 @@
|
||||
<template>
|
||||
<h1 v-if="false"><slot/></h1>
|
||||
<div v-if="false"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PageTitle',
|
||||
props: {
|
||||
title: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
export default {
|
||||
name: 'PageTitle',
|
||||
props: {
|
||||
title: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
pagePath: ''
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
data() {
|
||||
return {
|
||||
pagePath: ''
|
||||
}
|
||||
},
|
||||
|
||||
activated() {
|
||||
this.updateTitle()
|
||||
},
|
||||
|
||||
watch: {
|
||||
title: {
|
||||
handler() {
|
||||
this.initTitle()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
initTitle() {
|
||||
this.pagePath = this.$route.path;
|
||||
this.updateTitle()
|
||||
},
|
||||
beforeUpdate () {
|
||||
this.updateTitle()
|
||||
},
|
||||
activated() {
|
||||
this.updateTitle()
|
||||
},
|
||||
watch: {
|
||||
title() {
|
||||
this.pagePath = this.$route.path;
|
||||
this.updateTitle()
|
||||
|
||||
updateTitle() {
|
||||
if (this.pagePath == '') {
|
||||
return;
|
||||
}
|
||||
let pageTitle = this.title;
|
||||
let {title} = document;
|
||||
if (pageTitle !== title && this.pagePath === this.$route.path) {
|
||||
this.setPageTile(pageTitle);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateTitle () {
|
||||
let pageTitle;
|
||||
if (this.title) {
|
||||
pageTitle = this.title;
|
||||
} else {
|
||||
let slots = this.$slots.default;
|
||||
if (typeof slots === 'undefined' || slots.length < 1 || typeof slots[0].text !== 'string') {
|
||||
return;
|
||||
}
|
||||
let {text} = slots[0];
|
||||
pageTitle = text;
|
||||
}
|
||||
let {title} = document;
|
||||
if (pageTitle !== title && this.pagePath === this.$route.path) this.setTile(pageTitle);
|
||||
},
|
||||
setTile(title) {
|
||||
document.title = title;
|
||||
let mobile = navigator.userAgent.toLowerCase();
|
||||
if (/iphone|ipad|ipod/.test(mobile)) {
|
||||
let iframe = document.createElement('iframe');
|
||||
iframe.style.display = 'none';
|
||||
let iframeCallback = function () {
|
||||
setTimeout(function () {
|
||||
iframe.removeEventListener('load', iframeCallback);
|
||||
document.body.removeChild(iframe)
|
||||
}, 0)
|
||||
};
|
||||
iframe.addEventListener('load', iframeCallback);
|
||||
document.body.appendChild(iframe)
|
||||
}
|
||||
|
||||
setPageTile(title) {
|
||||
document.title = title;
|
||||
let mobile = navigator.userAgent.toLowerCase();
|
||||
if (/iphone|ipad|ipod/.test(mobile)) {
|
||||
let iframe = document.createElement('iframe');
|
||||
iframe.style.display = 'none';
|
||||
let iframeCallback = function () {
|
||||
setTimeout(function () {
|
||||
iframe.removeEventListener('load', iframeCallback);
|
||||
document.body.removeChild(iframe)
|
||||
}, 0)
|
||||
};
|
||||
iframe.addEventListener('load', iframeCallback);
|
||||
document.body.appendChild(iframe)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page-login">
|
||||
<PageTitle>{{$L('登录页面')}}</PageTitle>
|
||||
<PageTitle :title="$L('登录')"/>
|
||||
<div class="login-body">
|
||||
<div class="login-logo"></div>
|
||||
<div class="login-box">
|
||||
|
@ -155,6 +155,8 @@ export default {
|
||||
|
||||
archivedProjectShow: false,
|
||||
|
||||
titleInterval: null,
|
||||
|
||||
natificationHidden: false,
|
||||
natificationReady: false,
|
||||
notificationClass: null,
|
||||
@ -165,12 +167,14 @@ export default {
|
||||
this.$store.dispatch("getUserInfo");
|
||||
this.$store.dispatch("getTaskPriority");
|
||||
//
|
||||
this.startCountTitle();
|
||||
this.notificationInit();
|
||||
this.onVisibilityChange();
|
||||
},
|
||||
|
||||
deactivated() {
|
||||
this.addShow = false;
|
||||
clearInterval(this.titleInterval);
|
||||
},
|
||||
|
||||
computed: {
|
||||
@ -324,6 +328,38 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
startCountTitle() {
|
||||
this.titleInterval = setInterval(() => {
|
||||
let {title} = document;
|
||||
let newTitle = title.replace(/^(.*?)\((\d+)\)$/g, "$1")
|
||||
if (this.userId) {
|
||||
if (this.msgAllUnread > 0) {
|
||||
newTitle+= " (" + this.msgAllUnread + ")"
|
||||
}
|
||||
}
|
||||
if (title != newTitle) {
|
||||
this.setPageTile(newTitle);
|
||||
}
|
||||
}, 500)
|
||||
},
|
||||
|
||||
setPageTile(title) {
|
||||
document.title = title;
|
||||
let mobile = navigator.userAgent.toLowerCase();
|
||||
if (/iphone|ipad|ipod/.test(mobile)) {
|
||||
let iframe = document.createElement('iframe');
|
||||
iframe.style.display = 'none';
|
||||
let iframeCallback = function () {
|
||||
setTimeout(function () {
|
||||
iframe.removeEventListener('load', iframeCallback);
|
||||
document.body.removeChild(iframe)
|
||||
}, 0)
|
||||
};
|
||||
iframe.addEventListener('load', iframeCallback);
|
||||
document.body.appendChild(iframe)
|
||||
}
|
||||
},
|
||||
|
||||
notificationInit() {
|
||||
this.notificationClass = new notificationKoro(this.$L("打开通知成功"));
|
||||
if (this.notificationClass.support) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page-calendar">
|
||||
<PageTitle>{{$L('日历')}}</PageTitle>
|
||||
<PageTitle :title="$L('日历')"/>
|
||||
<div class="calendar-head">
|
||||
<div class="calendar-titbox">
|
||||
<div class="calendar-title">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page-dashboard">
|
||||
<PageTitle>{{$L('仪表盘')}}</PageTitle>
|
||||
<PageTitle :title="$L('仪表盘')"/>
|
||||
<div class="dashboard-wrapper">
|
||||
<div class="dashboard-hello">{{$L('欢迎您,' + userInfo.nickname)}}</div>
|
||||
<div class="dashboard-desc">{{$L('以下是你当前的任务统计数据')}}</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page-messenger">
|
||||
<PageTitle>{{$L('消息')}}</PageTitle>
|
||||
<PageTitle :title="$L('消息')"/>
|
||||
<div class="messenger-wrapper">
|
||||
<div class="messenger-select">
|
||||
<div class="messenger-search">
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="page-project">
|
||||
<PageTitle>{{$L('项目面板')}}</PageTitle>
|
||||
<ProjectList/>
|
||||
<ProjectDialog v-if="tablePanel('chat')"/>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page-setting">
|
||||
<PageTitle :title="$L(titleNameRoute || '设置')"/>
|
||||
<PageTitle :title="$L(titleNameRoute)"/>
|
||||
<div class="setting-head">
|
||||
<div class="setting-titbox">
|
||||
<div class="setting-title">
|
||||
@ -58,7 +58,7 @@ export default {
|
||||
return true;
|
||||
}
|
||||
})
|
||||
return name;
|
||||
return name || '设置';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user