For store only build
This commit is contained in:
parent
bdf2b9be71
commit
051dbb3b1b
|
@ -62,6 +62,6 @@ deploy:
|
|||
skip_cleanup: true
|
||||
on:
|
||||
repo: cutls/TheDesk
|
||||
tags: false
|
||||
#branches:
|
||||
# only: "/^v?[0-9\\.]+/"
|
||||
tags: true
|
||||
branches:
|
||||
only: "/^v?[0-9\\.]+/"
|
||||
|
|
|
@ -143,8 +143,8 @@ function css(mainWindow) {
|
|||
";--bottom:" + bottom + ";--accent:" + accent + ";" + ";--emphasized:" + emphasized + ";--his-data:" +
|
||||
hisData +
|
||||
";--active:" + active + ";--postbox:" + postbox + ";--modalfooter:" +
|
||||
modalFooter + ";--selected:" + selected + ";--selectedWithShare:" + selectedWithShare + "}" +
|
||||
"--gray:" + gray + ";" +
|
||||
modalFooter + ";--selected:" + selected + ";--selectedWithShare:" + selectedWithShare +
|
||||
"--gray:" + gray + ";}" +
|
||||
".customtheme #imagemodal{background: url(\"../img/pixel.svg\");}";
|
||||
} else {
|
||||
var css = compatibleTheme(json)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "thedesk",
|
||||
"version": "21.1.1",
|
||||
"version": "21.2.0",
|
||||
"codename": "Mayu",
|
||||
"description": "TheDesk is a Mastodon client for PC.",
|
||||
"repository": "https://github.com/cutls/TheDesk",
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</script>
|
||||
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
|
||||
@@comment-end@@
|
||||
@@pwa@@
|
||||
@@pwa@@ @@store@@
|
||||
</head>
|
||||
|
||||
<body id="mainView" class="@@pwaClass@@">
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
_jipt.push(['project', 'thedesk'])
|
||||
</script>
|
||||
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
|
||||
@@comment-end@@ @@pwa@@
|
||||
@@comment-end@@ @@pwa@@ @@store@@
|
||||
</head>
|
||||
|
||||
<body class="@@pwaClass@@">
|
||||
|
|
|
@ -16,8 +16,12 @@ var pwa = false
|
|||
if (process.argv.indexOf('--pwa') > 0) {
|
||||
var pwa = true
|
||||
}
|
||||
var store = false
|
||||
if (process.argv.indexOf('--store') > 0) {
|
||||
var store = true
|
||||
}
|
||||
|
||||
function main(ver, basefile, pwa) {
|
||||
function main(ver, basefile, pwa, store) {
|
||||
const execSync = require('child_process').execSync
|
||||
let gitHash = execSync('git rev-parse HEAD')
|
||||
.toString()
|
||||
|
@ -144,7 +148,7 @@ function main(ver, basefile, pwa) {
|
|||
source = source.replace(/@@lang@@/g, lang)
|
||||
source = source.replace(/@@langlist@@/g, langstr)
|
||||
if(pwa) {
|
||||
source = source.replace(/@@pwa@@/g, `<link rel="manifest" href="/manifest.json" />
|
||||
source = source.replace(/@@pwa@@/g, `<link rel="manifest" href="../../manifest.json" />
|
||||
<script>var pwa = true;"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.pwa.js").then(e=>{});</script>`)
|
||||
source = source.replace(/@@node_base@@/g, 'dependencies')
|
||||
source = source.replace(/@@pwaClass@@/g, 'pwaView')
|
||||
|
@ -153,11 +157,16 @@ function main(ver, basefile, pwa) {
|
|||
source = source.replace(/@@node_base@@/g, 'node_modules')
|
||||
source = source.replace(/@@pwaClass@@/g, '')
|
||||
}
|
||||
if (store) {
|
||||
source = source.replace(/@@store@@/g, '<script>var store = true;</script>')
|
||||
} else {
|
||||
source = source.replace(/@@store@@/g, '<script>var store = false;</script>')
|
||||
}
|
||||
fs.writeFileSync(basefile + 'view/' + lang + '/' + pages[i], source)
|
||||
}
|
||||
}
|
||||
}
|
||||
main(ver, basefile, pwa)
|
||||
main(ver, basefile, pwa, store)
|
||||
|
||||
//if --watch, to yarn dev
|
||||
if (process.argv.indexOf('--watch') !== -1) {
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
}
|
||||
</style>
|
||||
@@pwa@@
|
||||
@@store@@
|
||||
</head>
|
||||
|
||||
<body id="mainView" style="overflow-y:scroll" class="@@pwaClass@@">
|
||||
|
@ -107,7 +108,7 @@
|
|||
<br>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<li class="pwa">
|
||||
<div class="collapsible-header">
|
||||
<i class="material-icons">color_lens</i>@@theme@@
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user