diff --git a/components/Footer.vue b/components/Footer.vue
index a31c28fa..a66d4e35 100644
--- a/components/Footer.vue
+++ b/components/Footer.vue
@@ -20,7 +20,7 @@
:href='instance.url'
two-line)
v-list-item-avatar
- v-img(:src='`${instance.url}/favicon.ico`')
+ v-img(:src='`${instance.url}/logo.png`')
v-list-item-content
v-list-item-title {{instance.name}}
v-list-item-subtitle {{instance.label}}
diff --git a/components/admin/Theme.vue b/components/admin/Theme.vue
index bcbefa07..333cc730 100644
--- a/components/admin/Theme.vue
+++ b/components/admin/Theme.vue
@@ -9,8 +9,8 @@
accept='image/*')
template(slot='append-outer')
v-btn(color='warning' text @click='resetLogo') mdi-restore {{$t('common.reset')}}
- v-img(:src='`${settings.baseurl}/favicon.ico?${logoKey}`'
- max-width="100px" max-height="80px" contain)
+ v-img(:src='`${settings.baseurl}/logo.png?${logoKey}`'
+ max-width="60px" max-height="60px" contain)
//- v-switch.mt-5(v-model='is_dark'
//- inset
diff --git a/nuxt.config.js b/nuxt.config.js
index ae9500a1..14ec7d80 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -11,7 +11,7 @@ module.exports = {
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
],
- link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
+ link: [{ rel: 'icon', type: 'image/png', href: '/logo.png' }]
},
dev: (process.env.NODE_ENV !== 'production'),
diff --git a/package.json b/package.json
index f7c60c60..5c7181de 100644
--- a/package.json
+++ b/package.json
@@ -67,7 +67,6 @@
"sqlite3": "mapbox/node-sqlite3#593c9d4",
"tiptap": "^1.32.0",
"tiptap-extensions": "^1.35.0",
- "to-ico": "lesion/to-ico#master",
"umzug": "^2.3.0",
"v-calendar": "2.3.1",
"vue": "^2.6.14",
diff --git a/pages/embed/_event_id.vue b/pages/embed/_event_id.vue
index 44466aed..f82265ac 100644
--- a/pages/embed/_event_id.vue
+++ b/pages/embed/_event_id.vue
@@ -37,7 +37,7 @@ export default {
.embed_event {
display: flex;
transition: margin .1s;
- background: url('/favicon.ico') no-repeat right 5px bottom 5px;
+ background: url('/logo.png') no-repeat right 5px bottom 5px;
background-size: 32px;
background-color: #1f1f1f;
text-decoration: none;
diff --git a/pages/index.vue b/pages/index.vue
index 40cced2d..14dbab15 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -65,7 +65,7 @@ export default {
{ hid: 'og-description', name: 'og:description', content: this.settings.description },
{ hid: 'og-title', property: 'og:title', content: this.settings.title },
{ hid: 'og-url', property: 'og:url', content: this.settings.baseurl },
- { property: 'og:image', content: this.settings.baseurl + '/favicon.ico' }
+ { property: 'og:image', content: this.settings.baseurl + '/logo.png' }
],
link: [
{ rel: 'alternate', type: 'application/rss+xml', title: this.settings.title, href: this.settings.baseurl + '/feed/rss' }
diff --git a/pages/user_confirm/_code.vue b/pages/user_confirm/_code.vue
index b16a0745..d5ef3f10 100644
--- a/pages/user_confirm/_code.vue
+++ b/pages/user_confirm/_code.vue
@@ -2,7 +2,7 @@
v-row.mt-5(align='center' justify='center')
v-col(cols='12' md="6" lg="5" xl="4")
v-card
- v-card-title {{$t('common.set_password')}}
+ v-card-title {{$t('common.set_password')}}
template(v-if='valid')
v-card-text(v-if='valid')
v-form(v-if='valid')
diff --git a/server/api/controller/announce.js b/server/api/controller/announce.js
index 3b143cd4..24a56827 100644
--- a/server/api/controller/announce.js
+++ b/server/api/controller/announce.js
@@ -17,7 +17,7 @@ const announceController = {
announcement: req.body.announcement,
visible: true
}
- log.info('Create announcement: "%s" ', req.body.title)
+ log.info('Create announcement: ' + req.body.title)
const announce = await Announcement.create(announcementDetail)
res.json(announce)
},
diff --git a/server/api/controller/settings.js b/server/api/controller/settings.js
index 0f15d797..2307b138 100644
--- a/server/api/controller/settings.js
+++ b/server/api/controller/settings.js
@@ -6,10 +6,7 @@ const fs = require('fs')
const pkg = require('../../../package.json')
const crypto = require('crypto')
const util = require('util')
-const toIco = require('to-ico')
const generateKeyPair = util.promisify(crypto.generateKeyPair)
-const readFile = util.promisify(fs.readFile)
-const writeFile = util.promisify(fs.writeFile)
const sharp = require('sharp')
const log = require('../../log')
@@ -124,16 +121,13 @@ const settingsController = {
const baseImgPath = path.resolve(config.upload_path, 'logo')
// convert and resize to png
- sharp(uploadedPath)
+ return sharp(uploadedPath)
.resize(400)
.png({ quality: 90 })
- .toFile(baseImgPath + '.png', async (err, info) => {
+ .toFile(baseImgPath + '.png', (err, info) => {
if (err) {
- log.error('[LOGO]', err)
+ log.error('[LOGO] ' + err)
}
- const image = await readFile(baseImgPath + '.png')
- const favicon = await toIco([image], { sizes: [64], resize: true })
- writeFile(baseImgPath + '.ico', favicon)
settingsController.set('logo', baseImgPath)
res.sendStatus(200)
})
diff --git a/yarn.lock b/yarn.lock
index 38feeede..d9013a1c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1765,9 +1765,9 @@
integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==
"@types/node@*":
- version "16.4.3"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.3.tgz#c01c1a215721f6dec71b47d88b4687463601ba48"
- integrity sha512-GKM4FLMkWDc0sfx7tXqPWkM6NBow1kge0fgQh0bOnlqo4iT1kvTvMEKE0c1RtUGnbLlGRXiAA8SumE//90uKAg==
+ version "16.4.5"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.5.tgz#eac95d4e52775190c405f0b9061ddcfb0304f7fc"
+ integrity sha512-+0GPv/hIFNoy8r5MFf7vRpBjnqNYNrlHdetoy23E7TYc7JB2ctwyi3GMKpviozaHQ/Sy2kBNUTvG9ywN66zV1g==
"@types/normalize-package-data@^2.4.0":
version "2.4.1"
@@ -2434,11 +2434,6 @@ array.prototype.flat@^1.2.4:
define-properties "^1.1.3"
es-abstract "^1.18.0-next.1"
-arrify@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
- integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=
-
arrify@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa"
@@ -2863,19 +2858,6 @@ browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.16.6, browserslist@^4
escalade "^3.1.1"
node-releases "^1.1.71"
-buffer-alloc-unsafe@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0"
- integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==
-
-buffer-alloc@^1.1.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec"
- integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==
- dependencies:
- buffer-alloc-unsafe "^1.1.0"
- buffer-fill "^1.0.0"
-
buffer-equal-constant-time@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"
@@ -2886,11 +2868,6 @@ buffer-equal@0.0.1:
resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-0.0.1.tgz#91bc74b11ea405bc916bc6aa908faafa5b4aac4b"
integrity sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=
-buffer-fill@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c"
- integrity sha1-+PeLdniYiO858gXNY39o5wISKyw=
-
buffer-from@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
@@ -3096,9 +3073,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001228:
- version "1.0.30001247"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001247.tgz#105be7a8fb30cdd303275e769a9dfb87d4b3577a"
- integrity sha512-4rS7co+7+AoOSPRPOPUt5/GdaqZc0EsUpWk66ofE3HJTAajUK2Ss2VwoNzVN69ghg8lYYlh0an0Iy4LIHHo9UQ==
+ version "1.0.30001248"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001248.tgz#26ab45e340f155ea5da2920dadb76a533cb8ebce"
+ integrity sha512-NwlQbJkxUFJ8nMErnGtT0QTM2TJ33xgz4KXJSMIrjXIbDVdaYueGyjOrLKRtJC+rTiWfi6j5cnZN1NBiSBJGNw==
caseless@~0.12.0:
version "0.12.0"
@@ -4445,9 +4422,9 @@ ee-first@1.1.1:
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
electron-to-chromium@^1.3.723:
- version "1.3.788"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.788.tgz#7a304c8ebb11d30916a1a1c1b4a9bad3983ef232"
- integrity sha512-dbMIpX4E4/Gk4gzOh1GYS7ls1vGsByWKpIqLviJi1mSmSt5BvrWLLtSqpFE5BaC7Ef4NnI0GMaiddNX2Brw6zA==
+ version "1.3.789"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.789.tgz#c3ea060ba1e36e41c87943a47ed2daadc545be2b"
+ integrity sha512-lK4xn6C6ZF1kgLaC/EhOtC1MSKENExj3rMwGVnBTfHW81Z/Hb1Rge5YaWawN/YOXy3xCaESuE4KWSD50kOZ9rQ==
elliptic@^6.5.3:
version "6.5.4"
@@ -6133,13 +6110,6 @@ image-q@^1.1.1:
resolved "https://registry.yarnpkg.com/image-q/-/image-q-1.1.1.tgz#fc84099664460b90ca862d9300b6bfbbbfbf8056"
integrity sha1-/IQJlmRGC5DKhi2TALa/u7+/gFY=
-image-size@^0.8.3:
- version "0.8.3"
- resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.8.3.tgz#f0b568857e034f29baffd37013587f2c0cad8b46"
- integrity sha512-SMtq1AJ+aqHB45c3FsB4ERK0UCiA2d3H1uq8s+8T0Pf8A3W4teyBQyaFaktH6xvZqh+npwlKU7i4fJo0r7TYTg==
- dependencies:
- queue "6.0.1"
-
image-size@~0.5.0:
version "0.5.5"
resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
@@ -8506,13 +8476,6 @@ parse-path@^4.0.0:
qs "^6.9.4"
query-string "^6.13.8"
-parse-png@^1.0.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/parse-png/-/parse-png-1.1.2.tgz#f5c2ad7c7993490986020a284c19aee459711ff2"
- integrity sha1-9cKtfHmTSQmGAgooTBmu5FlxH/I=
- dependencies:
- pngjs "^3.2.0"
-
parse-url@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-6.0.0.tgz#f5dd262a7de9ec00914939220410b66cff09107d"
@@ -8626,10 +8589,10 @@ pg-int8@1.0.1:
resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c"
integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==
-pg-pool@^3.4.0:
- version "3.4.0"
- resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.4.0.tgz#7aba6da11c156605aafc5748d1fc2e4d84075e7f"
- integrity sha512-ddOpyZ2C7ySddu9sQ2t+91LeWT2Lv186kntK4TfPcoV9qH5OOcZAIWrzkGzwhisfHv2pk913/VuT1dPOUXzDMQ==
+pg-pool@^3.4.1:
+ version "3.4.1"
+ resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.4.1.tgz#0e71ce2c67b442a5e862a9c182172c37eda71e9c"
+ integrity sha512-TVHxR/gf3MeJRvchgNHxsYsTCHQ+4wm3VIHSS19z8NC0+gioEhq1okDY1sm/TYbfoP6JLFx01s0ShvZ3puP/iQ==
pg-protocol@^1.5.0:
version "1.5.0"
@@ -8648,14 +8611,14 @@ pg-types@^2.1.0:
postgres-interval "^1.1.0"
pg@^8.6.0:
- version "8.7.0"
- resolved "https://registry.yarnpkg.com/pg/-/pg-8.7.0.tgz#f9a20516684b069a409cf03cae90d47bddc82065"
- integrity sha512-nHB5WvuUC/LpBYebXTo5LyKYOXWPSVjGZatAV7YGimdmSOj5adGZmWXyOD/uAf2S4PyYAEv4rMW6k5HeneykXA==
+ version "8.7.1"
+ resolved "https://registry.yarnpkg.com/pg/-/pg-8.7.1.tgz#9ea9d1ec225980c36f94e181d009ab9f4ce4c471"
+ integrity sha512-7bdYcv7V6U3KAtWjpQJJBww0UEsWuh4yQ/EjNf2HeO/NnvKjpvhEIe/A/TleP6wtmSKnUnghs5A9jUoK6iDdkA==
dependencies:
buffer-writer "2.0.0"
packet-reader "1.0.0"
pg-connection-string "^2.5.0"
- pg-pool "^3.4.0"
+ pg-pool "^3.4.1"
pg-protocol "^1.5.0"
pg-types "^2.1.0"
pgpass "1.x"
@@ -8737,7 +8700,7 @@ pluralize@^8.0.0:
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1"
integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==
-pngjs@^3.0.0, pngjs@^3.2.0, pngjs@^3.3.3:
+pngjs@^3.0.0, pngjs@^3.3.3:
version "3.4.0"
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f"
integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==
@@ -9918,13 +9881,6 @@ queue-microtask@^1.2.2:
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
-queue@6.0.1:
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/queue/-/queue-6.0.1.tgz#abd5a5b0376912f070a25729e0b6a7d565683791"
- integrity sha512-AJBQabRCCNr9ANq8v77RJEv73DPbn55cdTb+Giq4X0AVnNVZvMHlYp7XlQiN+1npCZj1DuSmaA2hYVUUDgxFDg==
- dependencies:
- inherits "~2.0.3"
-
randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
@@ -10213,7 +10169,7 @@ reserved-words@^0.1.2:
resolved "https://registry.yarnpkg.com/reserved-words/-/reserved-words-0.1.2.tgz#00a0940f98cd501aeaaac316411d9adc52b31ab1"
integrity sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE=
-resize-img@2.0.0, resize-img@lesion/resize-img#v2.0.0:
+resize-img@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/resize-img/-/resize-img-2.0.0.tgz#9194e2647973b1a7f45a0a72edc87af982a25128"
integrity sha512-im2Kn4CY0c7JGdYXwL7g77T8AUi15YQeEBmmpWuglrcPFq4Di53tIvLXlbasW7UKed9GaZCza/OSxOJrmB0jbg==
@@ -11453,16 +11409,6 @@ to-fast-properties@^2.0.0:
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
-to-ico@lesion/to-ico#master:
- version "1.1.5"
- resolved "https://codeload.github.com/lesion/to-ico/tar.gz/447a5bd25b8c524c559156e438f97e6256e67157"
- dependencies:
- arrify "^1.0.1"
- buffer-alloc "^1.1.0"
- image-size "^0.8.3"
- parse-png "^1.0.0"
- resize-img lesion/resize-img#v2.0.0
-
to-object-path@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
@@ -12001,9 +11947,9 @@ vue-clipboard2@^0.3.1:
clipboard "^2.0.0"
vue-eslint-parser@^7.1.1, vue-eslint-parser@^7.9.0:
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.9.0.tgz#5eeedc71f22ebc7b18b957d1ab171acf29a41e64"
- integrity sha512-QBlhZ5LteDRVy2dISfQhNEmmcqph+GTaD4SH41bYzXcVHFPJ9p34zCG6QAqOZVa8PKaVgbomFnoZpGJRZi14vg==
+ version "7.10.0"
+ resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.10.0.tgz#ea4e4b10fd10aa35c8a79ac783488d8abcd29be8"
+ integrity sha512-7tc/ewS9Vq9Bn741pvpg8op2fWJPH3k32aL+jcIcWGCTzh/zXSdh7pZ5FV3W2aJancP9+ftPAv292zY5T5IPCg==
dependencies:
debug "^4.1.1"
eslint-scope "^5.1.1"