chore: v2 and v3 interopability + various fixes

parent 5a4a9df4
......@@ -18,6 +18,7 @@ npm-debug.log*
# Generated assets
/assets
/assets-legacy
server/views/master.pug
server/views/legacy/master.pug
server/views/setup.pug
......
......@@ -2,7 +2,7 @@
v-app
.notfound
.notfound-content
img.animated.fadeIn(src='/_assets/svg/icon-delete-file.svg', alt='Not Found')
img.animated.fadeIn(src='/_assets-legacy/svg/icon-delete-file.svg', alt='Not Found')
.headline {{$t('notfound.title')}}
.subheading.mt-3 {{$t('notfound.subtitle')}}
v-btn.mt-5(color='red lighten-4', href='/', large, outlined)
......
......@@ -2,7 +2,7 @@
v-app
.unauthorized
.unauthorized-content
img.animated.fadeIn(src='/_assets/svg/icon-delete-shield.svg', alt='Unauthorized')
img.animated.fadeIn(src='/_assets-legacy/svg/icon-delete-shield.svg', alt='Unauthorized')
.headline {{$t('unauthorized.title')}}
.subtitle-1.mt-3 {{$t('unauthorized.action.' + action)}}
v-btn.mt-5(href='/login', x-large)
......
......@@ -2,7 +2,7 @@
v-app
.onboarding
.onboarding-content
img.animated.fadeIn(src='/_assets/svg/logo-wikijs.svg', alt='Wiki.js')
img.animated.fadeIn(src='/_assets-legacy/svg/logo-wikijs.svg', alt='Wiki.js')
.headline.animated.fadeInUp {{ $t('welcome.title') }}
.subtitle-1.mt-3.animated.fadeInUp.wait-p1s {{ $t('welcome.subtitle') }}
div
......
......@@ -19,7 +19,7 @@ const babelDir = path.join(process.cwd(), '.webpack-cache/babel')
process.noDeprecation = true
fs.emptyDirSync(path.join(process.cwd(), 'assets'))
fs.emptyDirSync(path.join(process.cwd(), 'assets-legacy'))
module.exports = {
mode: 'development',
......@@ -29,8 +29,8 @@ module.exports = {
setup: ['./client/index-setup.js', 'webpack-hot-middleware/client']
},
output: {
path: path.join(process.cwd(), 'assets'),
publicPath: '/_assets/',
path: path.join(process.cwd(), 'assets-legacy'),
publicPath: '/_assets-legacy/',
filename: 'js/[name].js',
chunkFilename: 'js/[name].js',
globalObject: 'this',
......
......@@ -24,7 +24,7 @@ const babelDir = path.join(process.cwd(), '.webpack-cache/babel')
process.noDeprecation = true
fs.emptyDirSync(path.join(process.cwd(), 'assets'))
fs.emptyDirSync(path.join(process.cwd(), 'assets-legacy'))
module.exports = {
mode: 'production',
......@@ -34,8 +34,8 @@ module.exports = {
setup: './client/index-setup.js'
},
output: {
path: path.join(process.cwd(), 'assets'),
publicPath: '/_assets/',
path: path.join(process.cwd(), 'assets-legacy'),
publicPath: '/_assets-legacy/',
filename: `js/[name].js?${now}`,
chunkFilename: `js/[name].js?${now}`,
globalObject: 'this',
......
......@@ -9,7 +9,7 @@
"start": "node server",
"dev": "nodemon server",
"legacy:dev": "node dev",
"legacy:build": "webpack --profile --config dev/webpack/webpack.prod.js",
"legacy:build": "NODE_OPTIONS=--openssl-legacy-provider webpack --profile --config dev/webpack/webpack.prod.js",
"test": "eslint --format codeframe --ext .js,.vue . && pug-lint server/views && jest",
"cypress:open": "cypress open"
},
......
......@@ -4,6 +4,7 @@ const pageHelper = require('../helpers/page')
const _ = require('lodash')
const CleanCSS = require('clean-css')
const moment = require('moment')
const path = require('path')
/* global WIKI */
......@@ -35,24 +36,28 @@ router.get('/healthz', (req, res, next) => {
/**
* Administration
*/
router.get(['/a', '/a/*'], (req, res, next) => {
if (!WIKI.auth.checkAccess(req.user, [
'manage:system',
'write:users',
'manage:users',
'write:groups',
'manage:groups',
'manage:navigation',
'manage:theme',
'manage:api'
])) {
_.set(res.locals, 'pageMeta.title', 'Unauthorized')
return res.status(403).render('unauthorized', { action: 'view' })
}
_.set(res.locals, 'pageMeta.title', 'Admin')
res.render('admin')
router.get(['/_admin', '/_admin/*'], (req, res, next) => {
res.sendFile(path.join(WIKI.ROOTPATH, 'assets/index.html'))
})
// router.get(['/_admin', '/_admin/*'], (req, res, next) => {
// if (!WIKI.auth.checkAccess(req.user, [
// 'manage:system',
// 'write:users',
// 'manage:users',
// 'write:groups',
// 'manage:groups',
// 'manage:navigation',
// 'manage:theme',
// 'manage:api'
// ])) {
// _.set(res.locals, 'pageMeta.title', 'Unauthorized')
// return res.status(403).render('unauthorized', { action: 'view' })
// }
// _.set(res.locals, 'pageMeta.title', 'Admin')
// res.render('admin')
// })
/**
* Download Page / Version
......
......@@ -134,7 +134,7 @@ module.exports = {
]
})
await this.servers.graph.start()
this.servers.graph.applyMiddleware({ app: WIKI.app, cors: false })
this.servers.graph.applyMiddleware({ app: WIKI.app, cors: false, path: '/_graphql' })
},
/**
* Close all active connections
......
......@@ -53,14 +53,18 @@ module.exports = async () => {
// ----------------------------------------
app.use(favicon(path.join(WIKI.ROOTPATH, 'assets', 'favicon.ico')))
app.use('/_assets/svg/twemoji', async (req, res, next) => {
app.use('/_assets', express.static(path.join(WIKI.ROOTPATH, 'assets/_assets'), {
index: false,
maxAge: '7d'
}))
app.use('/_assets-legacy/svg/twemoji', async (req, res, next) => {
try {
WIKI.asar.serve('twemoji', req, res, next)
} catch (err) {
res.sendStatus(404)
}
})
app.use('/_assets', express.static(path.join(WIKI.ROOTPATH, 'assets'), {
app.use('/_assets-legacy', express.static(path.join(WIKI.ROOTPATH, 'assets-legacy'), {
index: false,
maxAge: '7d'
}))
......@@ -175,7 +179,7 @@ module.exports = async () => {
})
app.use((err, req, res, next) => {
if (req.path === '/graphql') {
if (req.path === '/_graphql') {
res.status(err.status || 500).json({
data: {},
errors: [{
......
......@@ -69,6 +69,5 @@
<body>
<div class="init-loading"></div>
<div id="app"><!-- quasar:entry-point --></div>
<script type="module" src="/entry-client.js"></script>
</body>
</html>
......@@ -71,11 +71,11 @@
"luxon": "2.4.0",
"pinia": "2.0.14",
"pug": "3.0.2",
"quasar": "2.7.1",
"quasar": "2.7.2",
"tippy.js": "6.3.7",
"uuid": "8.3.2",
"v-network-graph": "0.5.19",
"vue": "3.2.31",
"vue": "3.2.37",
"vue-codemirror": "5.1.0",
"vue-i18n": "9.1.10",
"vue-router": "4.0.16",
......@@ -84,10 +84,10 @@
},
"devDependencies": {
"@intlify/vite-plugin-vue-i18n": "3.4.0",
"@quasar/app-vite": "1.0.1",
"@quasar/app-vite": "1.0.2",
"@types/lodash": "4.14.182",
"autoprefixer": "10.4.7",
"eslint": "8.17.0",
"eslint": "8.18.0",
"eslint-config-standard": "17.0.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-n": "15.2.3",
......
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="96px" height="96px">
<linearGradient id="SVGID_1_" x1="18.921" x2="25.143" y1="-472.285" y2="-451.285" gradientTransform="translate(0 478)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#0078d3" />
<stop offset="1" stop-color="#0858a1" />
</linearGradient>
<path fill="url(#SVGID_1_)" d="M43,29.5H5V16.6c0-0.7,0.4-1.3,0.9-1.7L22.4,4.5c1-0.6,2.2-0.6,3.2,0l16.5,10.4c0.6,0.4,0.9,1,0.9,1.7V29.5z" />
<linearGradient id="SVGID_2_" x1="24" x2="24" y1="-464.584" y2="-450.767" gradientTransform="translate(0 478)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#fff" />
<stop offset=".24" stop-color="#f8f8f7" />
<stop offset="1" stop-color="#e3e3e1" />
</linearGradient>
<path fill="url(#SVGID_2_)" d="M38,32H10V14c0-0.6,0.4-1,1-1h26c0.6,0,1,0.4,1,1V32z" />
<linearGradient id="SVGID_3_" x1="25.886" x2="37.997" y1="-450.064" y2="-432.731" gradientTransform="translate(0 478)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#3ccbf4" />
<stop offset="1" stop-color="#1fa0e5" />
</linearGradient>
<path fill="url(#SVGID_3_)" d="M43,17v21.3c0,1-0.8,1.7-1.8,1.7H9.6l4.8-6.3L43,17z" />
<linearGradient id="SVGID_4_" x1="3.074" x2="39.962" y1="-450.764" y2="-432.875" gradientTransform="translate(0 478)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#28afea" />
<stop offset="1" stop-color="#0b88da" />
</linearGradient>
<path fill="url(#SVGID_4_)" d="M5,17v21.3c0,1,0.8,1.7,1.8,1.7h34.5c0.6,0,1.1-0.3,1.4-0.7L5,17z" />
<radialGradient id="SVGID_5_" cx="36.373" cy="37.908" r="11.628" gradientUnits="userSpaceOnUse">
<stop offset="0" />
<stop offset="1" stop-opacity="0" />
</radialGradient>
<path fill="url(#SVGID_5_)" d="M37,26c-6.6,0-12,5.4-12,12c0,0.7,0.1,1.3,0.2,2h16c1,0,1.8-0.8,1.8-1.7V27.6C41.2,26.6,39.2,26,37,26z" />
<linearGradient id="SVGID_6_" x1="30.189" x2="44.426" y1="1537.189" y2="1551.426" gradientTransform="translate(0 -1506)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#889097" />
<stop offset=".331" stop-color="#848c94" />
<stop offset=".669" stop-color="#78828b" />
<stop offset="1" stop-color="#64717c" />
</linearGradient>
<path fill="url(#SVGID_6_)" d="M46.7,35.7c-1.2,0.2-2.4-0.4-3.1-1.5c-0.6-1.1-0.5-2.4,0.2-3.4c-1.1-1.1-2.5-1.9-4-2.3 c-0.5,1.1-1.6,1.9-2.8,1.9s-2.4-0.8-2.8-1.9c-1.5,0.5-2.9,1.3-4,2.3c0.7,1,0.9,2.3,0.2,3.4c-0.6,1.1-1.9,1.7-3.1,1.5 C27.1,36.4,27,37.2,27,38s0.1,1.6,0.3,2.3c1.2-0.2,2.4,0.4,3.1,1.5c0.6,1.1,0.5,2.4-0.2,3.4c1.1,1.1,2.5,1.9,4,2.3 c0.5-1.1,1.6-1.9,2.8-1.9s2.4,0.8,2.8,1.9c1.5-0.5,2.9-1.3,4-2.3c-0.7-1-0.9-2.3-0.2-3.4c0.6-1.1,1.9-1.7,3.1-1.5 c0.2-0.7,0.3-1.5,0.3-2.3S46.9,36.4,46.7,35.7z">
<animateTransform attributeType="xml" attributeName="transform" type="rotate" from="-360 37 38" to="0 37 38" dur="7s" additive="sum" repeatCount="indefinite" />
</path>
<linearGradient id="SVGID_7_" x1="40.484" x2="33.47" y1="1547.484" y2="1540.47" gradientTransform="translate(0 -1506)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#fff" />
<stop offset=".242" stop-color="#f2f2f2" />
<stop offset="1" stop-color="#ccc" />
</linearGradient>
<circle cx="37" cy="38" r="5" fill="url(#SVGID_7_)" />
<linearGradient id="SVGID_8_" x1="34.193" x2="39.117" y1="1541.193" y2="1546.117" gradientTransform="translate(0 -1506)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#0d61a9" />
<stop offset=".363" stop-color="#0e5fa4" />
<stop offset=".78" stop-color="#135796" />
<stop offset="1" stop-color="#16528c" />
</linearGradient>
<circle cx="37" cy="38" r="3" fill="url(#SVGID_8_)" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="96px" height="96px"><linearGradient id="SVGID_1_" x1="18.921" x2="25.143" y1="-472.285" y2="-451.285" gradientTransform="translate(0 478)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0078d3"/><stop offset="1" stop-color="#0858a1"/></linearGradient><path fill="url(#SVGID_1_)" d="M43,29.5H5V16.6c0-0.7,0.4-1.3,0.9-1.7L22.4,4.5c1-0.6,2.2-0.6,3.2,0l16.5,10.4c0.6,0.4,0.9,1,0.9,1.7V29.5z"/><linearGradient id="SVGID_2_" x1="24" x2="24" y1="-464.584" y2="-450.767" gradientTransform="translate(0 478)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset=".24" stop-color="#f8f8f7"/><stop offset="1" stop-color="#e3e3e1"/></linearGradient><path fill="url(#SVGID_2_)" d="M38,32H10V14c0-0.6,0.4-1,1-1h26c0.6,0,1,0.4,1,1V32z"/><linearGradient id="SVGID_3_" x1="25.886" x2="37.997" y1="-450.064" y2="-432.731" gradientTransform="translate(0 478)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#3ccbf4"/><stop offset="1" stop-color="#1fa0e5"/></linearGradient><path fill="url(#SVGID_3_)" d="M43,17v21.3c0,1-0.8,1.7-1.8,1.7H9.6l4.8-6.3L43,17z"/><linearGradient id="SVGID_4_" x1="3.074" x2="39.962" y1="-450.764" y2="-432.875" gradientTransform="translate(0 478)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#28afea"/><stop offset="1" stop-color="#0b88da"/></linearGradient><path fill="url(#SVGID_4_)" d="M5,17v21.3c0,1,0.8,1.7,1.8,1.7h34.5c0.6,0,1.1-0.3,1.4-0.7L5,17z"/><radialGradient id="SVGID_5_" cx="36.373" cy="37.908" r="11.628" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-opacity="0"/></radialGradient><path fill="url(#SVGID_5_)" d="M37,26c-6.6,0-12,5.4-12,12c0,0.7,0.1,1.3,0.2,2h16c1,0,1.8-0.8,1.8-1.7V27.6C41.2,26.6,39.2,26,37,26z"/><linearGradient id="SVGID_6_" x1="30.189" x2="44.426" y1="1537.189" y2="1551.426" gradientTransform="translate(0 -1506)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#889097"/><stop offset=".331" stop-color="#848c94"/><stop offset=".669" stop-color="#78828b"/><stop offset="1" stop-color="#64717c"/></linearGradient><path fill="url(#SVGID_6_)" d="M46.7,35.7c-1.2,0.2-2.4-0.4-3.1-1.5c-0.6-1.1-0.5-2.4,0.2-3.4c-1.1-1.1-2.5-1.9-4-2.3 c-0.5,1.1-1.6,1.9-2.8,1.9s-2.4-0.8-2.8-1.9c-1.5,0.5-2.9,1.3-4,2.3c0.7,1,0.9,2.3,0.2,3.4c-0.6,1.1-1.9,1.7-3.1,1.5 C27.1,36.4,27,37.2,27,38s0.1,1.6,0.3,2.3c1.2-0.2,2.4,0.4,3.1,1.5c0.6,1.1,0.5,2.4-0.2,3.4c1.1,1.1,2.5,1.9,4,2.3 c0.5-1.1,1.6-1.9,2.8-1.9s2.4,0.8,2.8,1.9c1.5-0.5,2.9-1.3,4-2.3c-0.7-1-0.9-2.3-0.2-3.4c0.6-1.1,1.9-1.7,3.1-1.5 c0.2-0.7,0.3-1.5,0.3-2.3S46.9,36.4,46.7,35.7z"/><linearGradient id="SVGID_7_" x1="40.484" x2="33.47" y1="1547.484" y2="1540.47" gradientTransform="translate(0 -1506)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset=".242" stop-color="#f2f2f2"/><stop offset="1" stop-color="#ccc"/></linearGradient><circle cx="37" cy="38" r="5" fill="url(#SVGID_7_)"/><linearGradient id="SVGID_8_" x1="34.193" x2="39.117" y1="1541.193" y2="1546.117" gradientTransform="translate(0 -1506)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0d61a9"/><stop offset=".363" stop-color="#0e5fa4"/><stop offset=".78" stop-color="#135796"/><stop offset="1" stop-color="#16528c"/></linearGradient><circle cx="37" cy="38" r="3" fill="url(#SVGID_8_)"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="96px" height="96px">
<linearGradient id="SVGID_1_" x1="18.921" x2="25.143" y1="-472.285" y2="-451.285" gradientTransform="translate(0 478)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#0078d3" />
<stop offset="1" stop-color="#0858a1" />
</linearGradient>
<path fill="url(#SVGID_1_)" d="M43,29.5H5V16.6c0-0.7,0.4-1.3,0.9-1.7L22.4,4.5c1-0.6,2.2-0.6,3.2,0l16.5,10.4c0.6,0.4,0.9,1,0.9,1.7V29.5z" />
<linearGradient id="SVGID_2_" x1="24" x2="24" y1="-464.584" y2="-450.767" gradientTransform="translate(0 478)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#fff" />
<stop offset=".24" stop-color="#f8f8f7" />
<stop offset="1" stop-color="#e3e3e1" />
</linearGradient>
<path fill="url(#SVGID_2_)" d="M38,32H10V14c0-0.6,0.4-1,1-1h26c0.6,0,1,0.4,1,1V32z" />
<linearGradient id="SVGID_3_" x1="25.886" x2="37.997" y1="-450.064" y2="-432.731" gradientTransform="translate(0 478)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#3ccbf4" />
<stop offset="1" stop-color="#1fa0e5" />
</linearGradient>
<path fill="url(#SVGID_3_)" d="M43,17v21.3c0,1-0.8,1.7-1.8,1.7H9.6l4.8-6.3L43,17z" />
<linearGradient id="SVGID_4_" x1="3.074" x2="39.962" y1="-450.764" y2="-432.875" gradientTransform="translate(0 478)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#28afea" />
<stop offset="1" stop-color="#0b88da" />
</linearGradient>
<path fill="url(#SVGID_4_)" d="M5,17v21.3c0,1,0.8,1.7,1.8,1.7h34.5c0.6,0,1.1-0.3,1.4-0.7L5,17z" />
<radialGradient id="SVGID_5_" cx="36.373" cy="37.908" r="11.628" gradientUnits="userSpaceOnUse">
<stop offset="0" />
<stop offset="1" stop-opacity="0" />
</radialGradient>
<path fill="url(#SVGID_5_)" d="M37,26c-6.6,0-12,5.4-12,12c0,0.7,0.1,1.3,0.2,2h16c1,0,1.8-0.8,1.8-1.7V27.6C41.2,26.6,39.2,26,37,26z" />
<linearGradient id="SVGID_6_" x1="30.189" x2="44.426" y1="1537.189" y2="1551.426" gradientTransform="translate(0 -1506)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#889097" />
<stop offset=".331" stop-color="#848c94" />
<stop offset=".669" stop-color="#78828b" />
<stop offset="1" stop-color="#64717c" />
</linearGradient>
<path fill="url(#SVGID_6_)" d="M46.7,35.7c-1.2,0.2-2.4-0.4-3.1-1.5c-0.6-1.1-0.5-2.4,0.2-3.4c-1.1-1.1-2.5-1.9-4-2.3 c-0.5,1.1-1.6,1.9-2.8,1.9s-2.4-0.8-2.8-1.9c-1.5,0.5-2.9,1.3-4,2.3c0.7,1,0.9,2.3,0.2,3.4c-0.6,1.1-1.9,1.7-3.1,1.5 C27.1,36.4,27,37.2,27,38s0.1,1.6,0.3,2.3c1.2-0.2,2.4,0.4,3.1,1.5c0.6,1.1,0.5,2.4-0.2,3.4c1.1,1.1,2.5,1.9,4,2.3 c0.5-1.1,1.6-1.9,2.8-1.9s2.4,0.8,2.8,1.9c1.5-0.5,2.9-1.3,4-2.3c-0.7-1-0.9-2.3-0.2-3.4c0.6-1.1,1.9-1.7,3.1-1.5 c0.2-0.7,0.3-1.5,0.3-2.3S46.9,36.4,46.7,35.7z" />
<linearGradient id="SVGID_7_" x1="40.484" x2="33.47" y1="1547.484" y2="1540.47" gradientTransform="translate(0 -1506)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#fff" />
<stop offset=".242" stop-color="#f2f2f2" />
<stop offset="1" stop-color="#ccc" />
</linearGradient>
<circle cx="37" cy="38" r="5" fill="url(#SVGID_7_)" />
<linearGradient id="SVGID_8_" x1="34.193" x2="39.117" y1="1541.193" y2="1546.117" gradientTransform="translate(0 -1506)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#0d61a9" />
<stop offset=".363" stop-color="#0e5fa4" />
<stop offset=".78" stop-color="#135796" />
<stop offset="1" stop-color="#16528c" />
</linearGradient>
<circle cx="37" cy="38" r="3" fill="url(#SVGID_8_)" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="96px" height="96px">
<linearGradient id="71jOKMe3jIEN7vuoamoZEa" x1="26.5" x2="26.5" y1="42.5" y2="35.874" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#737b80"/>
<stop offset="1" stop-color="#575c61"/>
</linearGradient>
<rect width="25" height="7" x="14" y="34" fill="url(#71jOKMe3jIEN7vuoamoZEa)"/>
<linearGradient id="71jOKMe3jIEN7vuoamoZEb" x1="18" x2="18" y1="38.094" y2="35.749" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ffd869"/>
<stop offset="1" stop-color="#fec52b"/>
</linearGradient>
<path fill="url(#71jOKMe3jIEN7vuoamoZEb)" d="M18.5,39h-1c-0.276,0-0.5-0.224-0.5-0.5v-5c0-0.276,0.224-0.5,0.5-0.5h1 c0.276,0,0.5,0.224,0.5,0.5v5C19,38.776,18.776,39,18.5,39z"/>
<linearGradient id="71jOKMe3jIEN7vuoamoZEc" x1="22" x2="22" y1="38.094" y2="35.749" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ffd869"/>
<stop offset="1" stop-color="#fec52b"/>
</linearGradient>
<path fill="url(#71jOKMe3jIEN7vuoamoZEc)" d="M22.5,39h-1c-0.276,0-0.5-0.224-0.5-0.5v-5c0-0.276,0.224-0.5,0.5-0.5h1 c0.276,0,0.5,0.224,0.5,0.5v5C23,38.776,22.776,39,22.5,39z"/>
<linearGradient id="71jOKMe3jIEN7vuoamoZEd" x1="27" x2="27" y1="38.094" y2="35.749" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ffd869"/>
<stop offset="1" stop-color="#fec52b"/>
</linearGradient>
<path fill="url(#71jOKMe3jIEN7vuoamoZEd)" d="M27.5,39h-1c-0.276,0-0.5-0.224-0.5-0.5v-5c0-0.276,0.224-0.5,0.5-0.5h1 c0.276,0,0.5,0.224,0.5,0.5v5C28,38.776,27.776,39,27.5,39z"/>
<linearGradient id="71jOKMe3jIEN7vuoamoZEe" x1="31" x2="31" y1="38.094" y2="35.749" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ffd869"/>
<stop offset="1" stop-color="#fec52b"/>
</linearGradient>
<path fill="url(#71jOKMe3jIEN7vuoamoZEe)" d="M31.5,39h-1c-0.276,0-0.5-0.224-0.5-0.5v-5c0-0.276,0.224-0.5,0.5-0.5h1 c0.276,0,0.5,0.224,0.5,0.5v5C32,38.776,31.776,39,31.5,39z"/>
<linearGradient id="71jOKMe3jIEN7vuoamoZEf" x1="35" x2="35" y1="38.094" y2="35.749" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ffd869"/>
<stop offset="1" stop-color="#fec52b"/>
</linearGradient>
<path fill="url(#71jOKMe3jIEN7vuoamoZEf)" d="M35.5,39h-1c-0.276,0-0.5-0.224-0.5-0.5v-5c0-0.276,0.224-0.5,0.5-0.5h1 c0.276,0,0.5,0.224,0.5,0.5v5C36,38.776,35.776,39,35.5,39z"/>
<linearGradient id="71jOKMe3jIEN7vuoamoZEg" x1="24" x2="24" y1="30.333" y2="42.75" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#c3cdd9"/>
<stop offset="1" stop-color="#9fa7b0"/>
</linearGradient>
<path fill="url(#71jOKMe3jIEN7vuoamoZEg)" d="M42,30v10c0,1.1-0.9,2-2,2h-1.25c-0.44,0-0.83-0.3-0.96-0.73L37.71,41l-1.3-4.55 C36.17,35.59,35.38,35,34.49,35H18.51c-0.89,0-1.68,0.59-1.92,1.45L15.29,41l-0.08,0.27C15.08,41.7,14.69,42,14.25,42H8 c-1.1,0-2-0.9-2-2V30H42z"/>
<g>
<path d="M42,30v10c0,1.1-0.9,2-2,2h-1.25c-0.44,0-0.83-0.3-0.96-0.73L37.71,41h-1.04l-1.22-4.27 C35.33,36.3,34.94,36,34.49,36H18.51c-0.45,0-0.84,0.3-0.96,0.73L16.33,41h-1.04l-0.08,0.27C15.08,41.7,14.69,42,14.25,42H8 c-1.1,0-2-0.9-2-2V30H42z" opacity=".05"/>
<path d="M42,30v10c0,1.1-0.9,2-2,2h-1.25c-0.44,0-0.83-0.3-0.96-0.73L37.71,41h-0.52l-1.26-4.41 c-0.18-0.64-0.77-1.09-1.44-1.09H18.51c-0.67,0-1.26,0.45-1.44,1.09L15.81,41h-0.52l-0.08,0.27C15.08,41.7,14.69,42,14.25,42H8 c-1.1,0-2-0.9-2-2V30H42z" opacity=".07"/>
</g>
<linearGradient id="71jOKMe3jIEN7vuoamoZEh" x1="24" x2="24" y1="6.417" y2="31.933" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#737b80"/>
<stop offset="1" stop-color="#575c61"/>
</linearGradient>
<path fill="url(#71jOKMe3jIEN7vuoamoZEh)" d="M10.764,6h26.471c1.008,0,1.859,0.75,1.984,1.751l2.767,22.02C42.124,30.958,41.195,32,40,32 H8c-1.195,0-2.124-1.042-1.987-2.229L8.78,7.751C8.906,6.75,9.756,6,10.764,6z"/>
<g>
<path d="M11,35c1.105,0,2,0.895,2,2s-0.895,2-2,2s-2-0.895-2-2S9.895,35,11,35 M11,34c-1.654,0-3,1.346-3,3s1.346,3,3,3 s3-1.346,3-3S12.654,34,11,34L11,34z" opacity=".05"/>
<path d="M11,35c1.105,0,2,0.895,2,2s-0.895,2-2,2s-2-0.895-2-2S9.895,35,11,35 M11,34.5c-1.379,0-2.5,1.121-2.5,2.5 s1.121,2.5,2.5,2.5s2.5-1.121,2.5-2.5S12.379,34.5,11,34.5L11,34.5z" opacity=".07"/>
<linearGradient id="71jOKMe3jIEN7vuoamoZEi" x1="11" x2="11" y1="34.958" y2="39.052" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#75ff8a"/>
<stop offset="1" stop-color="#1ee446"/>
</linearGradient>
<circle cx="11" cy="37" r="2" fill="#666666" />
<circle cx="11" cy="37" r="2" fill="url(#71jOKMe3jIEN7vuoamoZEi)">
<animate attributeName="opacity" dur="2s" values="0;1;0" repeatCount="indefinite" begin="0.1" />
</circle>
</g>
<g>
<g opacity=".05">
<path d="M10.5,28c0.828,0,1.5,0.448,1.5,1s-0.672,1-1.5,1S9,29.552,9,29S9.672,28,10.5,28 M10.5,27C9.098,27,8,27.878,8,29 s1.098,2,2.5,2s2.5-0.878,2.5-2S11.902,27,10.5,27L10.5,27z"/>
<path d="M37.5,28c0.828,0,1.5,0.448,1.5,1s-0.672,1-1.5,1S36,29.552,36,29S36.672,28,37.5,28 M37.5,27c-1.402,0-2.5,0.878-2.5,2 s1.098,2,2.5,2s2.5-0.878,2.5-2S38.902,27,37.5,27L37.5,27z"/>
<path d="M12.5,8C13.328,8,14,8.448,14,9s-0.672,1-1.5,1S11,9.552,11,9S11.672,8,12.5,8 M12.5,7C11.098,7,10,7.878,10,9 s1.098,2,2.5,2S15,10.122,15,9S13.902,7,12.5,7L12.5,7z"/>
<path d="M35.5,8C36.328,8,37,8.448,37,9s-0.672,1-1.5,1S34,9.552,34,9S34.672,8,35.5,8 M35.5,7C34.098,7,33,7.878,33,9 s1.098,2,2.5,2S38,10.122,38,9S36.902,7,35.5,7L35.5,7z"/>
</g>
<g opacity=".07">
<path d="M10.5,28c0.828,0,1.5,0.448,1.5,1s-0.672,1-1.5,1S9,29.552,9,29S9.672,28,10.5,28 M10.5,27.5c-1.121,0-2,0.659-2,1.5 s0.879,1.5,2,1.5s2-0.659,2-1.5S11.621,27.5,10.5,27.5L10.5,27.5z"/>
<path d="M37.5,28c0.828,0,1.5,0.448,1.5,1s-0.672,1-1.5,1S36,29.552,36,29S36.672,28,37.5,28 M37.5,27.5c-1.121,0-2,0.659-2,1.5 s0.879,1.5,2,1.5s2-0.659,2-1.5S38.621,27.5,37.5,27.5L37.5,27.5z"/>
<path d="M12.5,8C13.328,8,14,8.448,14,9s-0.672,1-1.5,1S11,9.552,11,9S11.672,8,12.5,8 M12.5,7.5c-1.121,0-2,0.659-2,1.5 s0.879,1.5,2,1.5s2-0.659,2-1.5S13.621,7.5,12.5,7.5L12.5,7.5z"/>
<path d="M35.5,8C36.328,8,37,8.448,37,9s-0.672,1-1.5,1S34,9.552,34,9S34.672,8,35.5,8 M35.5,7.5c-1.121,0-2,0.659-2,1.5 s0.879,1.5,2,1.5s2-0.659,2-1.5S36.621,7.5,35.5,7.5L35.5,7.5z"/>
</g>
<ellipse cx="10.5" cy="29" fill="#ccc" rx="1.5" ry="1"/>
<ellipse cx="37.5" cy="29" fill="#ccc" rx="1.5" ry="1"/>
<ellipse cx="12.5" cy="9" fill="#ccc" rx="1.5" ry="1"/>
<ellipse cx="35.5" cy="9" fill="#ccc" rx="1.5" ry="1"/>
</g>
</svg>
......@@ -51,9 +51,7 @@
<stop offset="1" stop-color="#1ee446"/>
</linearGradient>
<circle cx="11" cy="37" r="2" fill="#666666" />
<circle cx="11" cy="37" r="2" fill="url(#71jOKMe3jIEN7vuoamoZEi)">
<animate attributeName="opacity" dur="2s" values="0;1;0" repeatCount="indefinite" begin="0.1" />
</circle>
<circle cx="11" cy="37" r="2" fill="url(#71jOKMe3jIEN7vuoamoZEi)" />
</g>
<g>
<g opacity=".05">
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
......@@ -57,7 +57,7 @@ module.exports = configure(function (/* ctx */) {
build: {
target: {
browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
node: 'node16'
node: 'node18'
},
vueRouterMode: 'history', // available values: 'hash', 'history'
......@@ -74,9 +74,11 @@ module.exports = configure(function (/* ctx */) {
// ignorePublicFolder: true,
// minify: false,
// polyfillModulePreload: true,
// distDir
distDir: '../assets',
// extendViteConf (viteConf) {},
extendViteConf (viteConf) {
viteConf.build.assetsDir = '_assets'
},
// viteVuePluginOptions: {},
vitePlugins: [
......@@ -96,7 +98,7 @@ module.exports = configure(function (/* ctx */) {
open: false, // opens browser window automatically
port: 3001,
proxy: {
'/_graphql': 'http://localhost:3000/graphql'
'/_graphql': 'http://localhost:3000/_graphql'
}
},
......
<template lang='pug'>
q-btn.q-ml-md(flat, round, dense, color='grey')
q-icon(v-if='!user.picture', name='las la-user-circle')
q-icon(v-if='!state.user.picture', name='las la-user-circle')
q-avatar(v-else)
img(:src='user.picture')
img(:src='state.user.picture')
q-menu(auto-close)
q-card(flat, style='width: 300px;', :dark='false')
q-card-section(align='center')
.text-subtitle1.text-grey-7 {{user.name}}
.text-caption.text-grey-8 {{user.email}}
.text-subtitle1.text-grey-7 {{state.user.name}}
.text-caption.text-grey-8 {{state.user.email}}
q-separator(:dark='false')
q-card-actions(align='center')
q-btn(
......@@ -15,7 +15,7 @@ q-btn.q-ml-md(flat, round, dense, color='grey')
label='Profile'
icon='las la-user-alt'
color='primary'
to='/p'
href='/_profile'
no-caps
)
q-btn(flat
......@@ -28,17 +28,14 @@ q-btn.q-ml-md(flat, round, dense, color='grey')
q-tooltip Account
</template>
<script>
export default {
name: 'AccountMenu',
data () {
return {
user: {
name: 'John Doe',
email: 'test@example.com',
picture: null
}
}
<script setup>
import { reactive } from 'vue'
const state = reactive({
user: {
name: 'John Doe',
email: 'test@example.com',
picture: null
}
}
})
</script>
......@@ -178,6 +178,7 @@ defineEmits([
const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } = useDialogPluginComponent()
const $q = useQuasar()
defineExpose({ $q })
// I18N
......
......@@ -510,6 +510,7 @@ import UtilCodeEditor from './UtilCodeEditor.vue'
// QUASAR
const $q = useQuasar()
defineExpose({ $q })
// STORES
......
......@@ -218,6 +218,7 @@ defineEmits([
const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } = useDialogPluginComponent()
const $q = useQuasar()
defineExpose({ $q })
// I18N
......
......@@ -3,7 +3,7 @@ q-layout.admin(view='hHh Lpr lff')
q-header.bg-black.text-white
.row.no-wrap
q-toolbar(style='height: 64px;', dark)
q-btn(dense, flat, to='/')
q-btn(dense, flat, href='/')
q-avatar(size='34px', square)
img(src='/_assets/logo-wikijs.svg')
q-toolbar-title.text-h6.font-poppins Wiki.js
......@@ -184,7 +184,7 @@ q-layout.admin(view='hHh Lpr lff')
</template>
<script setup>
import { useMeta, setCssVar } from 'quasar'
import { useMeta, useQuasar, setCssVar } from 'quasar'
import { defineAsyncComponent, onMounted, reactive, ref, watch } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useI18n } from 'vue-i18n'
......@@ -200,6 +200,11 @@ const overlays = {
UserEditOverlay: defineAsyncComponent(() => import('../components/UserEditOverlay.vue'))
}
// QUASAR
const $q = useQuasar()
defineExpose({ $q })
// STORES
const adminStore = useAdminStore()
......
......@@ -2,7 +2,7 @@
q-page.admin-mail
.row.q-pa-md.items-center
.col-auto
img.admin-icon.animated.fadeInLeft(src='/_assets/icons/fluent-message-settings.svg')
img.admin-icon.animated.fadeInLeft(src='/_assets/icons/fluent-message-settings-animated.svg')
.col.q-pl-md
.text-h5.text-primary.animated.fadeInLeft {{ t('admin.mail.title') }}
.text-subtitle1.text-grey.animated.fadeInLeft.wait-p2s {{ t('admin.mail.subtitle') }}
......
......@@ -2,7 +2,7 @@
q-page.admin-storage
.row.q-pa-md.items-center
.col-auto
img.admin-icon.animated.fadeInLeft(src='/_assets/icons/fluent-ssd.svg')
img.admin-icon.animated.fadeInLeft(src='/_assets/icons/fluent-ssd-animated.svg')
.col.q-pl-md
.text-h5.text-primary.animated.fadeInLeft {{ t('admin.storage.title') }}
.text-subtitle1.text-grey.animated.fadeInLeft.wait-p2s {{ t('admin.storage.subtitle') }}
......
This diff was suppressed by a .gitattributes entry.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment