Skip to content

Commit

Permalink
fix: build init error + update deps + markdown editor user settings (…
Browse files Browse the repository at this point in the history
…wip)
  • Loading branch information
NGPixel committed Nov 23, 2023
1 parent dec9272 commit f8bc9e8
Show file tree
Hide file tree
Showing 14 changed files with 1,293 additions and 1,211 deletions.
12 changes: 12 additions & 0 deletions server/graph/resolvers/user.mjs
Expand Up @@ -89,6 +89,18 @@ export default {
return WIKI.config.userDefaults
},

async userEditorSettings (obj, args, context) {
if (!context.req.user || context.req.user.id === WIKI.auth.guest.id) {
throw new WIKI.Error.AuthRequired()
}

const config = await WIKI.db.knex('userEditorSettings').first('config').where({
id: context.req.user.id,
editor: args.editor
})
return config ?? {}
},

async lastLogins (obj, args, context, info) {
if (!WIKI.auth.checkAccess(context.req.user, ['read:dashboard', 'read:users', 'write:users', 'manage:users'])) {
throw new Error('ERR_FORBIDDEN')
Expand Down
4 changes: 4 additions & 0 deletions server/graph/schemas/user.graphql
Expand Up @@ -18,6 +18,10 @@ extend type Query {

userDefaults: UserDefaults

userEditorSettings(
editor: String!
): JSON

lastLogins: [UserLastLogin]

userPermissions: [String]
Expand Down
5 changes: 5 additions & 0 deletions server/locales/en.json
Expand Up @@ -1624,6 +1624,11 @@
"editor.select.customView": "or create a custom view?",
"editor.select.title": "Which editor do you want to use for this page?",
"editor.settings": "Editor Settings",
"editor.settings.markdown": "Markdown Editor Settings",
"editor.settings.markdownFontSize": "Editor Font Size",
"editor.settings.markdownFontSizeHint": "The font size to use in the editor.",
"editor.settings.markdownPreviewShown": "Display Render Preview",
"editor.settings.markdownPreviewShownHint": "Whether to display a preview of the rendered content.",
"editor.tableEditor.title": "Table Editor",
"editor.togglePreviewPane": "Toggle Preview Pane",
"editor.toggleScrollSync": "Toggle Scroll Sync",
Expand Down
40 changes: 20 additions & 20 deletions server/package.json
Expand Up @@ -36,22 +36,22 @@
"node": ">=18.0"
},
"dependencies": {
"@apollo/server": "4.9.4",
"@azure/storage-blob": "12.16.0",
"@apollo/server": "4.9.5",
"@azure/storage-blob": "12.17.0",
"@exlinc/keycloak-passport": "1.0.2",
"@graphql-tools/schema": "10.0.0",
"@graphql-tools/utils": "10.0.7",
"@graphql-tools/utils": "10.0.8",
"@hexagon/base64": "1.1.28",
"@joplin/turndown-plugin-gfm": "1.0.50",
"@joplin/turndown-plugin-gfm": "1.0.53",
"@node-saml/passport-saml": "4.0.4",
"@root/csr": "0.8.1",
"@root/keypairs": "0.10.3",
"@root/pem": "1.0.4",
"@simplewebauthn/server": "8.3.2",
"@vue-email/compiler": "0.8.0-beta.4",
"@simplewebauthn/server": "8.3.5",
"@vue-email/compiler": "0.8.0-beta.5",
"acme": "3.0.3",
"akismet-api": "6.0.0",
"aws-sdk": "2.1478.0",
"aws-sdk": "2.1499.0",
"bcryptjs": "2.4.3",
"chalk": "5.3.0",
"cheerio": "1.0.0-rc.12",
Expand All @@ -60,7 +60,7 @@
"clean-css": "5.3.2",
"command-exists": "1.2.9",
"compression": "1.7.4",
"connect-session-knex": "3.0.1",
"connect-session-knex": "4.0.0",
"cookie-parser": "1.4.6",
"cors": "2.8.5",
"cron-parser": "4.9.0",
Expand All @@ -76,7 +76,7 @@
"express": "4.18.2",
"express-brute": "1.0.1",
"express-session": "1.17.3",
"file-type": "18.5.0",
"file-type": "18.7.0",
"filesize": "10.1.0",
"fs-extra": "11.1.1",
"getos": "3.2.1",
Expand All @@ -98,7 +98,7 @@
"knex": "3.0.1",
"lodash": "4.17.21",
"lodash-es": "4.17.21",
"luxon": "3.4.3",
"luxon": "3.4.4",
"markdown-it": "13.0.2",
"markdown-it-abbr": "1.0.4",
"markdown-it-attrs": "4.1.6",
Expand All @@ -117,14 +117,14 @@
"mime-types": "2.1.35",
"ms": "2.1.3",
"multer": "1.4.5-lts.1",
"nanoid": "5.0.2",
"nanoid": "5.0.3",
"node-2fa": "2.0.3",
"node-cache": "5.1.2",
"nodemailer": "6.9.7",
"objection": "3.1.2",
"octokit": "3.1.1",
"octokit": "3.1.2",
"passport": "0.6.0",
"passport-auth0": "1.4.3",
"passport-auth0": "1.4.4",
"passport-azure-ad": "4.3.5",
"passport-cas": "0.1.1",
"passport-discord": "0.1.4",
Expand All @@ -148,10 +148,10 @@
"pg-pubsub": "0.8.1",
"pg-query-stream": "4.5.3",
"pg-tsquery": "8.4.1",
"poolifier": "2.7.5",
"poolifier": "3.0.5",
"prom-client": "15.0.0",
"punycode": "2.3.0",
"puppeteer-core": "21.4.0",
"punycode": "2.3.1",
"puppeteer-core": "21.5.2",
"qr-image": "3.2.0",
"remove-markdown": "0.5.0",
"safe-regex": "2.1.1",
Expand All @@ -166,19 +166,19 @@
"tar-fs": "3.0.4",
"turndown": "7.1.2",
"twemoji": "14.0.2",
"ufo": "1.3.1",
"ufo": "1.3.2",
"uslug": "1.0.4",
"uuid": "9.0.1",
"validate.js": "0.13.1",
"vue": "3.3.7",
"vue": "3.3.8",
"xss": "1.0.14",
"yargs": "17.7.2"
},
"devDependencies": {
"eslint": "8.52.0",
"eslint": "8.54.0",
"eslint-config-requarks": "1.0.7",
"eslint-config-standard": "17.1.0",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-import": "2.29.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "6.1.1",
"nodemon": "3.0.1"
Expand Down

0 comments on commit f8bc9e8

Please sign in to comment.