From 4ed46c5caf9afabf836f6e01b441a70764278f21 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 9 Sep 2022 18:36:45 +0700 Subject: [PATCH 01/19] Update with diff --- conf/app.src | 6 +++--- manifest.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/app.src b/conf/app.src index 4746a63..b32b955 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/outline/outline/archive/refs/tags/v0.66.0.tar.gz -SOURCE_SUM=956bb0dec2445b355b3d9e02af56049d934a90ea29826ef12e0773cb878b4758 +SOURCE_URL=https://github.com/outline/outline/archive/refs/heads/main.zip +SOURCE_SUM=b1e1c94e032841f1e0efb16e0ef9dda5d0c77e11adda8951e54b77b6a71597c8 SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz +SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true SOURCE_FILENAME= SOURCE_EXTRACT=true diff --git a/manifest.json b/manifest.json index 743b9d7..9677bfb 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Wiki and knowledge base for teams", "fr": "Wiki et base de connaissances pour les équipes" }, - "version": "0.66.0~ynh1", + "version": "0.66.0~ynh2", "url": "www.getoutline.com", "upstream": { "license": "BUSL-1.1", From 6ea6d8cfc24965e2d0733fb5eaf46f90f36d6fff Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 10 Sep 2022 23:17:17 +0700 Subject: [PATCH 02/19] Test patching --- sources/patches/app-03-visitor.patch | 102 ++++++++++++++++++++++ sources/patches/app-04-bible.patch | 125 +++++++++++++++++++++++++++ 2 files changed, 227 insertions(+) create mode 100644 sources/patches/app-03-visitor.patch create mode 100644 sources/patches/app-04-bible.patch diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch new file mode 100644 index 0000000..8981e55 --- /dev/null +++ b/sources/patches/app-03-visitor.patch @@ -0,0 +1,102 @@ +diff --git a/server/routes/auth/providers/req.ts b/server/routes/auth/providers/req.ts +new file mode 100644 +index 00000000..22beba6e +--- /dev/null ++++ b/server/routes/auth/providers/req.ts +@@ -0,0 +1,64 @@ ++import passport from "@outlinewiki/koa-passport"; ++import Router from "koa-router"; ++import { capitalize } from "lodash"; ++import { Strategy as ReqStrategy } from "passport-req"; ++import accountProvisioner from "@server/commands/accountProvisioner"; ++import env from "@server/env"; ++import passportMiddleware from "@server/middlewares/passport"; ++import { getAllowedDomains } from "@server/utils/authentication"; ++import { StateStore } from "@server/utils/passport"; ++ ++const router = new Router(); ++const providerName = "req"; ++const allowedDomains = getAllowedDomains(); ++ ++export const config = { ++ name: "Visitor", ++ enabled: true, ++}; ++ ++if (true) { ++ passport.use( ++ new ReqStrategy( ++ async function (req,done) { ++ try { ++ const domain = "domain.tld"; ++ const subdomain = domain.split(".")[0]; ++ const teamName = capitalize(subdomain); ++ const name = "Visitor"; ++ const email = "visitor@domain.tld"; ++ const result = await accountProvisioner({ ++ ip: req.ip, ++ team: { ++ name: teamName, ++ domain, ++ subdomain, ++ }, ++ user: { ++ name: name, ++ email: email, ++ avatarUrl: null, ++ }, ++ authenticationProvider: { ++ name: providerName, ++ providerId: domain, ++ }, ++ authentication: { ++ providerId: "1234", ++ accessToken: null, ++ refreshToken: null, ++ scopes: [], ++ }, ++ }); ++ return done(null, result.user, result); ++ } catch (err) { ++ return done(err, null); ++ } ++ } ++ ) ++ ); ++ ++ router.get("req", passportMiddleware(providerName)); ++} ++ ++export default router; +diff --git a/yarn.lock b/yarn.lock +index 0bc83b9b..b642b8f7 100644 +--- a/yarn.lock ++++ b/yarn.lock +@@ -11790,6 +11790,15 @@ passport-oauth@1.0.x: + passport-oauth1 "1.x.x" + passport-oauth2 "1.x.x" + ++passport-req@^0.1.1: ++ version "0.1.1" ++ resolved "https://registry.yarnpkg.com ++ passport-req/-/passport-req-0.1.1.tgz#451bff1500b3d464a768d42f0762328a21236a18" ++ integrity sha1-RRv/FQCz1GSnaNQvB2IyiiEjahg= ++ dependencies: ++ passport "~0.1.1" ++ pkginfo "0.2.x" ++ + passport-slack-oauth2@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/passport-slack-oauth2/-/passport-slack-oauth2-1.1.1.tgz#d831ffc3f1e968fcc3622e6ecf41643c8d8f9cbc" +diff --git a/package.json b/package.json +index ff45e246..a5837c23 100644 +--- a/package.json ++++ b/package.json +@@ -144,6 +144,7 @@ + "passport": "^0.6.0", + "passport-google-oauth2": "^0.2.0", + "passport-oauth2": "^1.6.1", ++ "passport-req": "^0.1.1", + "passport-slack-oauth2": "^1.1.1", + "pg": "^8.5.1", + "pg-hstore": "^2.3.4", \ No newline at end of file diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch new file mode 100644 index 0000000..7205852 --- /dev/null +++ b/sources/patches/app-04-bible.patch @@ -0,0 +1,125 @@ +diff --git a/app/editor/menus/block.ts b/app/editor/menus/block.ts +index 9a6fbe7d..26fac655 100644 +--- a/app/editor/menus/block.ts ++++ b/app/editor/menus/block.ts +@@ -18,6 +18,7 @@ import { + AttachmentIcon, + ClockIcon, + CalendarIcon, ++ BookmarkedIcon, + } from "outline-icons"; + import { MenuItem } from "@shared/editor/types"; + import { Dictionary } from "~/hooks/useDictionary"; +@@ -168,5 +169,12 @@ export default function blockMenuItems(dictionary: Dictionary): MenuItem[] { + keywords: "notice card suggestion", + attrs: { style: "tip" }, + }, ++ { ++ name: "container_notice", ++ title: dictionary.bibleNotice, ++ icon: BookmarkedIcon, ++ keywords: "notice card suggestion", ++ attrs: { style: "bible" }, ++ }, + ]; + } +diff --git a/app/hooks/useDictionary.ts b/app/hooks/useDictionary.ts +index 67001749..d8492e05 100644 +--- a/app/hooks/useDictionary.ts ++++ b/app/hooks/useDictionary.ts +@@ -75,6 +75,8 @@ export default function useDictionary() { + showSource: t("Show source"), + warning: t("Warning"), + warningNotice: t("Warning notice"), ++ bible: t("Bible"), ++ bibleNotice: t("Bible quote"), + insertDate: t("Current date"), + insertTime: t("Current time"), + insertDateTime: t("Current date and time"), +diff --git a/app/typings/styled-components.d.ts b/app/typings/styled-components.d.ts +index c8e571d5..7d8aef81 100644 +--- a/app/typings/styled-components.d.ts ++++ b/app/typings/styled-components.d.ts +@@ -54,6 +54,8 @@ declare module "styled-components" { + noticeTipText: string; + noticeWarningBackground: string; + noticeWarningText: string; ++ noticeBibleBackground: string; ++ noticeBibleText: string; + } + + interface Colors { +diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts +index e1ba4bfa..f6725fb5 100644 +--- a/shared/editor/components/Styles.ts ++++ b/shared/editor/components/Styles.ts +@@ -511,6 +511,20 @@ h6 { + } + } + ++.notice-block.bible { ++ background: ${transparentize(0.9, props.theme.noticeBibleBackground)}; ++ border-left: 4px solid ${props.theme.noticeBibleBackground}; ++ color: ${props.theme.noticeBibleText}; ++ ++ .icon { ++ color: ${props.theme.noticeBibleBackground}; ++ } ++ ++ a { ++ color: ${props.theme.noticeBibleText}; ++ } ++} ++ + blockquote { + margin: 0; + padding-left: 1.5em; +diff --git a/shared/editor/nodes/Notice.tsx b/shared/editor/nodes/Notice.tsx +index 158a0dfb..f297c343 100644 +--- a/shared/editor/nodes/Notice.tsx ++++ b/shared/editor/nodes/Notice.tsx +@@ -1,5 +1,5 @@ + import Token from "markdown-it/lib/token"; +-import { WarningIcon, InfoIcon, StarredIcon } from "outline-icons"; ++import { WarningIcon, InfoIcon, StarredIcon, BookmarkedIcon } from "outline-icons"; + import { wrappingInputRule } from "prosemirror-inputrules"; + import { NodeSpec, Node as ProsemirrorNode, NodeType } from "prosemirror-model"; + import * as React from "react"; +@@ -15,6 +15,7 @@ export default class Notice extends Node { + info: this.options.dictionary.info, + warning: this.options.dictionary.warning, + tip: this.options.dictionary.tip, ++ bible: this.options.dictionary.bible, + }); + } + +@@ -47,6 +48,8 @@ export default class Notice extends Node { + ? "tip" + : dom.className.includes("warning") + ? "warning" ++ : dom.className.includes("bible") ++ ? "bible" + : undefined, + }), + }, +@@ -75,6 +78,8 @@ export default class Notice extends Node { + component = ; + } else if (node.attrs.style === "warning") { + component = ; ++ } else if (node.attrs.style === "bible") { ++ component = ; + } else { + component = ; + } +diff --git a/shared/styles/theme.ts b/shared/styles/theme.ts +index 3ff5c7cf..f3809fd1 100644 +--- a/shared/styles/theme.ts ++++ b/shared/styles/theme.ts +@@ -87,6 +87,8 @@ export const base = { + noticeTipText: colors.almostBlack, + noticeWarningBackground: "#d73a49", + noticeWarningText: colors.almostBlack, ++ noticeBibleBackground: "#e9f5f9", ++ noticeBibleText: colors.almostBlack, + breakpoints, + }; \ No newline at end of file From 2a5cced140511a23627db3ae0e3fc32e72a26028 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 10 Sep 2022 23:20:10 +0700 Subject: [PATCH 03/19] Update app.src --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index b32b955..b08e741 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/outline/outline/archive/refs/heads/main.zip -SOURCE_SUM=b1e1c94e032841f1e0efb16e0ef9dda5d0c77e11adda8951e54b77b6a71597c8 +SOURCE_URL=https://github.com/outline/outline/archive/1f93399447cd24d54b8c7ee06f6276cb993ca6a1.zip +SOURCE_SUM=f57a9006eb54ef2672096b5dd022cba80e5b26095cfeb678953b9583a37626fe SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true From b5821873e16377fec238ba905515f64e33938b3b Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 11 Sep 2022 00:03:42 +0700 Subject: [PATCH 04/19] Update app-03-visitor.patch --- sources/patches/app-03-visitor.patch | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch index 8981e55..7bb5b1b 100644 --- a/sources/patches/app-03-visitor.patch +++ b/sources/patches/app-03-visitor.patch @@ -69,17 +69,16 @@ index 00000000..22beba6e + +export default router; diff --git a/yarn.lock b/yarn.lock -index 0bc83b9b..b642b8f7 100644 +index 0bc83b9b..06e1b385 100644 --- a/yarn.lock +++ b/yarn.lock -@@ -11790,6 +11790,15 @@ passport-oauth@1.0.x: +@@ -11790,6 +11790,14 @@ passport-oauth@1.0.x: passport-oauth1 "1.x.x" passport-oauth2 "1.x.x" +passport-req@^0.1.1: + version "0.1.1" -+ resolved "https://registry.yarnpkg.com -+ passport-req/-/passport-req-0.1.1.tgz#451bff1500b3d464a768d42f0762328a21236a18" ++ resolved "https://registry.yarnpkg.com/passport-req/-/passport-req-0.1.1.tgz#451bff1500b3d464a768d42f0762328a21236a18" + integrity sha1-RRv/FQCz1GSnaNQvB2IyiiEjahg= + dependencies: + passport "~0.1.1" From fc1af873a354a69b59fa2c1421f73d133561d06f Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 11 Sep 2022 00:35:52 +0700 Subject: [PATCH 05/19] Update app-03-visitor.patch --- sources/patches/app-03-visitor.patch | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch index 7bb5b1b..1fbbbb3 100644 --- a/sources/patches/app-03-visitor.patch +++ b/sources/patches/app-03-visitor.patch @@ -1,9 +1,9 @@ diff --git a/server/routes/auth/providers/req.ts b/server/routes/auth/providers/req.ts new file mode 100644 -index 00000000..22beba6e +index 00000000..04990bb3 --- /dev/null +++ b/server/routes/auth/providers/req.ts -@@ -0,0 +1,64 @@ +@@ -0,0 +1,62 @@ +import passport from "@outlinewiki/koa-passport"; +import Router from "koa-router"; +import { capitalize } from "lodash"; @@ -11,12 +11,10 @@ index 00000000..22beba6e +import accountProvisioner from "@server/commands/accountProvisioner"; +import env from "@server/env"; +import passportMiddleware from "@server/middlewares/passport"; -+import { getAllowedDomains } from "@server/utils/authentication"; +import { StateStore } from "@server/utils/passport"; + +const router = new Router(); +const providerName = "req"; -+const allowedDomains = getAllowedDomains(); + +export const config = { + name: "Visitor", From 995466da24e7a3e0b7473e41c159ccdc10575659 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 11 Sep 2022 14:29:38 +0700 Subject: [PATCH 06/19] Update app.src --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index b08e741..ab4177b 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/outline/outline/archive/1f93399447cd24d54b8c7ee06f6276cb993ca6a1.zip -SOURCE_SUM=f57a9006eb54ef2672096b5dd022cba80e5b26095cfeb678953b9583a37626fe +SOURCE_URL=https://github.com/outline/outline/archive/3aa7f34a73973c3f5fca16b7541548fb5a4ac879.zip +SOURCE_SUM=64c6d04e8b789474a225bf0172a265b55e2c94784cef4342d42c14db34654b69 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true From 2314143170c207d706e868bb3b915baea87da6e8 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 15 Sep 2022 17:19:17 +0700 Subject: [PATCH 07/19] Change bible color --- conf/app.src | 4 ++-- sources/patches/app-04-bible.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index ab4177b..f00b4b8 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/outline/outline/archive/3aa7f34a73973c3f5fca16b7541548fb5a4ac879.zip -SOURCE_SUM=64c6d04e8b789474a225bf0172a265b55e2c94784cef4342d42c14db34654b69 +SOURCE_URL=https://github.com/outline/outline/archive/410c9900c1c6ec359213bf6cef50fad9a0976087.zip +SOURCE_SUM=10a43c44ff223a080f782100f2c4a12e6c1c2b9487aed32101b5e30b860f8e26 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch index 7205852..12ca61c 100644 --- a/sources/patches/app-04-bible.patch +++ b/sources/patches/app-04-bible.patch @@ -117,7 +117,7 @@ index 3ff5c7cf..f3809fd1 100644 +++ b/shared/styles/theme.ts @@ -87,6 +87,8 @@ export const base = { noticeTipText: colors.almostBlack, - noticeWarningBackground: "#d73a49", + noticeWarningBackground: "#996633", noticeWarningText: colors.almostBlack, + noticeBibleBackground: "#e9f5f9", + noticeBibleText: colors.almostBlack, From b94906fd7a412e9ccd6742408a089c81732fd68e Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 15 Sep 2022 17:58:33 +0700 Subject: [PATCH 08/19] Update app-04-bible.patch --- sources/patches/app-04-bible.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch index 12ca61c..44b6cde 100644 --- a/sources/patches/app-04-bible.patch +++ b/sources/patches/app-04-bible.patch @@ -112,14 +112,14 @@ index 158a0dfb..f297c343 100644 component = ; } diff --git a/shared/styles/theme.ts b/shared/styles/theme.ts -index 3ff5c7cf..f3809fd1 100644 +index 3ff5c7cf..e8c00cca 100644 --- a/shared/styles/theme.ts +++ b/shared/styles/theme.ts @@ -87,6 +87,8 @@ export const base = { noticeTipText: colors.almostBlack, - noticeWarningBackground: "#996633", + noticeWarningBackground: "#d73a49", noticeWarningText: colors.almostBlack, -+ noticeBibleBackground: "#e9f5f9", ++ noticeBibleBackground: "#996633", + noticeBibleText: colors.almostBlack, breakpoints, }; \ No newline at end of file From 08c0822c5acb22053a06e4d769edb7cddb0cbd0c Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 15 Sep 2022 18:01:33 +0700 Subject: [PATCH 09/19] Update app-04-bible.patch --- sources/patches/app-04-bible.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch index 44b6cde..23d138f 100644 --- a/sources/patches/app-04-bible.patch +++ b/sources/patches/app-04-bible.patch @@ -122,4 +122,5 @@ index 3ff5c7cf..e8c00cca 100644 + noticeBibleBackground: "#996633", + noticeBibleText: colors.almostBlack, breakpoints, - }; \ No newline at end of file + }; + \ No newline at end of file From 6d89585836ccf55a5c3099251c29ad91e9cb0880 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 15 Sep 2022 20:03:28 +0700 Subject: [PATCH 10/19] Create app-05-login.patch --- sources/patches/app-05-login.patch | 59 ++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sources/patches/app-05-login.patch diff --git a/sources/patches/app-05-login.patch b/sources/patches/app-05-login.patch new file mode 100644 index 0000000..65c2797 --- /dev/null +++ b/sources/patches/app-05-login.patch @@ -0,0 +1,59 @@ +diff --git a/app/scenes/Login/AuthenticationProvider.tsx b/app/scenes/Login/AuthenticationProvider.tsx +index b5bb854a..18caede4 100644 +--- a/app/scenes/Login/AuthenticationProvider.tsx ++++ b/app/scenes/Login/AuthenticationProvider.tsx +@@ -67,7 +67,7 @@ function AuthenticationProvider(props: Props) { + + +- {t("Sign In")} → ++ {t("S'identifier")} → + + + ) : ( + } fullwidth> +- {t("Continue with Email")} ++ {t("Accès membre")} + + )} + +@@ -106,7 +106,7 @@ function AuthenticationProvider(props: Props) { + icon={} + fullwidth + > +- {t("Continue with {{ authProviderName }}", { ++ {t("Bienvenue sur {{ authProviderName }}", { + authProviderName: name, + })} + +diff --git a/app/scenes/Login/index.tsx b/app/scenes/Login/index.tsx +index e08e120c..05871715 100644 +--- a/app/scenes/Login/index.tsx ++++ b/app/scenes/Login/index.tsx +@@ -180,7 +180,7 @@ function Login({ children }: Props) { + ) : ( + <> + +- {t("Login to {{ authProviderName }}", { ++ {t("Bienvenue sur {{ authProviderName }}", { + authProviderName: config.name || "Outline", + })} + +@@ -198,7 +198,7 @@ function Login({ children }: Props) { + {hasMultipleProviders && ( + <> + +- {t("You signed in with {{ authProviderName }} last time.", { ++ {t("Vous vous êtes authentifié comme {{ authProviderName }} la dernière fois.", { + authProviderName: defaultProvider.name, + })} + From 1530b3d408af7f1bc4155b8d4e79c2e9f1b172a2 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 16 Sep 2022 22:59:46 +0700 Subject: [PATCH 11/19] Update --- conf/.env | 2 +- sources/patches/app-03-visitor.patch | 4 ++-- sources/patches/app-04-bible.patch | 12 ++++++++++-- sources/patches/app-05-login.patch | 12 ++++++------ 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/conf/.env b/conf/.env index c79cff1..f02bbac 100644 --- a/conf/.env +++ b/conf/.env @@ -55,7 +55,7 @@ OIDC_USERINFO_URI=__DEX_USER_URI__ OIDC_USERNAME_CLAIM=preferred_username # Display name for OIDC authentication -OIDC_DISPLAY_NAME=Yunohost +OIDC_DISPLAY_NAME=membre (mot de passe) # Space separated auth scopes. OIDC_SCOPES="openid profile email" diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch index 1fbbbb3..d63cde6 100644 --- a/sources/patches/app-03-visitor.patch +++ b/sources/patches/app-03-visitor.patch @@ -1,6 +1,6 @@ diff --git a/server/routes/auth/providers/req.ts b/server/routes/auth/providers/req.ts new file mode 100644 -index 00000000..04990bb3 +index 00000000..1c954d24 --- /dev/null +++ b/server/routes/auth/providers/req.ts @@ -0,0 +1,62 @@ @@ -17,7 +17,7 @@ index 00000000..04990bb3 +const providerName = "req"; + +export const config = { -+ name: "Visitor", ++ name: "visiteur", + enabled: true, +}; + diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch index 23d138f..dfa7c01 100644 --- a/sources/patches/app-04-bible.patch +++ b/sources/patches/app-04-bible.patch @@ -112,7 +112,7 @@ index 158a0dfb..f297c343 100644 component = ; } diff --git a/shared/styles/theme.ts b/shared/styles/theme.ts -index 3ff5c7cf..e8c00cca 100644 +index 3ff5c7cf..fb4804ec 100644 --- a/shared/styles/theme.ts +++ b/shared/styles/theme.ts @@ -87,6 +87,8 @@ export const base = { @@ -123,4 +123,12 @@ index 3ff5c7cf..e8c00cca 100644 + noticeBibleText: colors.almostBlack, breakpoints, }; - \ No newline at end of file + +@@ -206,6 +208,7 @@ export const dark = { + noticeInfoText: colors.white, + noticeTipText: colors.white, + noticeWarningText: colors.white, ++ noticeBibleText: colors.white, + progressBarBackground: colors.slate, + scrollbarBackground: colors.black, + scrollbarThumb: colors.lightBlack, diff --git a/sources/patches/app-05-login.patch b/sources/patches/app-05-login.patch index 65c2797..5692640 100644 --- a/sources/patches/app-05-login.patch +++ b/sources/patches/app-05-login.patch @@ -1,5 +1,5 @@ diff --git a/app/scenes/Login/AuthenticationProvider.tsx b/app/scenes/Login/AuthenticationProvider.tsx -index b5bb854a..18caede4 100644 +index b5bb854a..d29e958b 100644 --- a/app/scenes/Login/AuthenticationProvider.tsx +++ b/app/scenes/Login/AuthenticationProvider.tsx @@ -67,7 +67,7 @@ function AuthenticationProvider(props: Props) { @@ -22,7 +22,7 @@ index b5bb854a..18caede4 100644 ) : ( } fullwidth> - {t("Continue with Email")} -+ {t("Accès membre")} ++ {t("Accès membre (email)")} )} @@ -31,12 +31,12 @@ index b5bb854a..18caede4 100644 fullwidth > - {t("Continue with {{ authProviderName }}", { -+ {t("Bienvenue sur {{ authProviderName }}", { ++ {t("Accès {{ authProviderName }}", { authProviderName: name, })} diff --git a/app/scenes/Login/index.tsx b/app/scenes/Login/index.tsx -index e08e120c..05871715 100644 +index e08e120c..f9e03f21 100644 --- a/app/scenes/Login/index.tsx +++ b/app/scenes/Login/index.tsx @@ -180,7 +180,7 @@ function Login({ children }: Props) { @@ -53,7 +53,7 @@ index e08e120c..05871715 100644 <> - {t("You signed in with {{ authProviderName }} last time.", { -+ {t("Vous vous êtes authentifié comme {{ authProviderName }} la dernière fois.", { ++ {t("Vous vous êtes authentifié avec l'accès {{ authProviderName }} la dernière fois.", { authProviderName: defaultProvider.name, })} - + \ No newline at end of file From 45f5339ff3b0ecb68308a6e59135cec9b3af7742 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 16 Sep 2022 23:02:30 +0700 Subject: [PATCH 12/19] logo --- sources/patches/app-06-logo.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sources/patches/app-06-logo.patch diff --git a/sources/patches/app-06-logo.patch b/sources/patches/app-06-logo.patch new file mode 100644 index 0000000..3339c7b --- /dev/null +++ b/sources/patches/app-06-logo.patch @@ -0,0 +1,13 @@ +diff --git a/app/components/OutlineLogo.tsx b/app/components/OutlineLogo.tsx +index 81eb4855..1fee69cd 100644 +--- a/app/components/OutlineLogo.tsx ++++ b/app/components/OutlineLogo.tsx +@@ -16,7 +16,7 @@ function OutlineLogo({ size = 32, fill = "#333", className }: Props) { + xmlns="http://www.w3.org/2000/svg" + className={className} + > +- ++ + + ); + } From c27db6dc9d2c081fee96c9480a4b493ed4ad75a6 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 16 Sep 2022 23:03:58 +0700 Subject: [PATCH 13/19] Update version --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index f00b4b8..4401611 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/outline/outline/archive/410c9900c1c6ec359213bf6cef50fad9a0976087.zip -SOURCE_SUM=10a43c44ff223a080f782100f2c4a12e6c1c2b9487aed32101b5e30b860f8e26 +SOURCE_URL=https://github.com/outline/outline/archive/dccf86c491cd85c3e2a9427e72836e6e2e78cb19.zip +SOURCE_SUM=930bc83b1551689b700299842397bb61c96e087431b425795fa42b9d29921def SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true From e1e648452ba3987c66e376fd3070293ba9970ae3 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 17 Sep 2022 01:00:33 +0700 Subject: [PATCH 14/19] Update app-03-visitor.patch --- sources/patches/app-03-visitor.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch index d63cde6..87c6175 100644 --- a/sources/patches/app-03-visitor.patch +++ b/sources/patches/app-03-visitor.patch @@ -1,6 +1,6 @@ diff --git a/server/routes/auth/providers/req.ts b/server/routes/auth/providers/req.ts new file mode 100644 -index 00000000..1c954d24 +index 00000000..be344d2e --- /dev/null +++ b/server/routes/auth/providers/req.ts @@ -0,0 +1,62 @@ @@ -29,8 +29,8 @@ index 00000000..1c954d24 + const domain = "domain.tld"; + const subdomain = domain.split(".")[0]; + const teamName = capitalize(subdomain); -+ const name = "Visitor"; -+ const email = "visitor@domain.tld"; ++ const name = "visiteur"; ++ const email = "visiteur@anthropologiebiblique.fr"; + const result = await accountProvisioner({ + ip: req.ip, + team: { From 71eaa8ba02084fab92dce808b4a9aa8938be39d1 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 12 Nov 2022 23:21:10 +0700 Subject: [PATCH 15/19] First test --- conf/app.src | 4 +-- manifest.json | 2 +- sources/patches/app-01-branding.patch | 14 -------- sources/patches/app-02-email.patch | 2 +- sources/patches/app-03-visitor.patch | 47 ++++++++++++++++--------- sources/patches/app-04-bible.patch | 49 ++++++++++++++------------- sources/patches/app-05-login.patch | 10 +++--- sources/patches/app-06-logo.patch | 4 +-- 8 files changed, 67 insertions(+), 65 deletions(-) delete mode 100644 sources/patches/app-01-branding.patch diff --git a/conf/app.src b/conf/app.src index 4401611..78ee0b2 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/outline/outline/archive/dccf86c491cd85c3e2a9427e72836e6e2e78cb19.zip -SOURCE_SUM=930bc83b1551689b700299842397bb61c96e087431b425795fa42b9d29921def +SOURCE_URL=https://github.com/outline/outline/archive/refs/tags/v0.67.0.zip +SOURCE_SUM=2fc6f8af630f53ed3be6d562cd6dea517e4c572debd663305e1ed53945d76797 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 9677bfb..f2b1476 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Wiki and knowledge base for teams", "fr": "Wiki et base de connaissances pour les équipes" }, - "version": "0.66.0~ynh2", + "version": "0.67.0~ynh1", "url": "www.getoutline.com", "upstream": { "license": "BUSL-1.1", diff --git a/sources/patches/app-01-branding.patch b/sources/patches/app-01-branding.patch deleted file mode 100644 index 1db6f08..0000000 --- a/sources/patches/app-01-branding.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/app/scenes/Document/components/Document.tsx b/app/scenes/Document/components/Document.tsx -index 9d86f478..25b45653 100644 ---- a/app/scenes/Document/components/Document.tsx -+++ b/app/scenes/Document/components/Document.tsx -@@ -617,9 +617,6 @@ class DocumentScene extends React.Component { - - - -- {isShare && !parseDomain(window.location.origin).custom && ( -- -- )} - - - {!isShare && ( \ No newline at end of file diff --git a/sources/patches/app-02-email.patch b/sources/patches/app-02-email.patch index dbbf9b2..a83d683 100644 --- a/sources/patches/app-02-email.patch +++ b/sources/patches/app-02-email.patch @@ -1,5 +1,5 @@ diff --git a/server/emails/mailer.tsx b/server/emails/mailer.tsx -index 669d0038..ccc5c047 100644 +index 669d00388..ccc5c047f 100644 --- a/server/emails/mailer.tsx +++ b/server/emails/mailer.tsx @@ -121,6 +121,7 @@ export class Mailer { diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch index 87c6175..7b211e2 100644 --- a/sources/patches/app-03-visitor.patch +++ b/sources/patches/app-03-visitor.patch @@ -1,6 +1,6 @@ diff --git a/server/routes/auth/providers/req.ts b/server/routes/auth/providers/req.ts new file mode 100644 -index 00000000..be344d2e +index 000000000..be344d2e2 --- /dev/null +++ b/server/routes/auth/providers/req.ts @@ -0,0 +1,62 @@ @@ -67,17 +67,17 @@ index 00000000..be344d2e + +export default router; diff --git a/yarn.lock b/yarn.lock -index 0bc83b9b..06e1b385 100644 +index ef3b53a5f..e5c12935e 100644 --- a/yarn.lock +++ b/yarn.lock -@@ -11790,6 +11790,14 @@ passport-oauth@1.0.x: +@@ -11822,6 +11822,14 @@ passport-oauth@1.0.x: passport-oauth1 "1.x.x" passport-oauth2 "1.x.x" +passport-req@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/passport-req/-/passport-req-0.1.1.tgz#451bff1500b3d464a768d42f0762328a21236a18" -+ integrity sha1-RRv/FQCz1GSnaNQvB2IyiiEjahg= ++ integrity sha512-9qmM0vD5v7jYLWxezNNCleOw+8IkVAuvOwQ6NJaUuJkdFJTR1KatXH1i5MxWgffx+libLWYLRUPtc6GHOmn+6w== + dependencies: + passport "~0.1.1" + pkginfo "0.2.x" @@ -85,15 +85,30 @@ index 0bc83b9b..06e1b385 100644 passport-slack-oauth2@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/passport-slack-oauth2/-/passport-slack-oauth2-1.1.1.tgz#d831ffc3f1e968fcc3622e6ecf41643c8d8f9cbc" -diff --git a/package.json b/package.json -index ff45e246..a5837c23 100644 ---- a/package.json -+++ b/package.json -@@ -144,6 +144,7 @@ - "passport": "^0.6.0", - "passport-google-oauth2": "^0.2.0", - "passport-oauth2": "^1.6.1", -+ "passport-req": "^0.1.1", - "passport-slack-oauth2": "^1.1.1", - "pg": "^8.5.1", - "pg-hstore": "^2.3.4", \ No newline at end of file +@@ -11844,6 +11852,14 @@ passport@^0.6.0: + pause "0.0.1" + utils-merge "^1.0.1" + ++passport@~0.1.1: ++ version "0.1.18" ++ resolved "https://registry.yarnpkg.com/passport/-/passport-0.1.18.tgz#c8264479dcb6414cadbb66752d12b37e0b6525a1" ++ integrity sha512-qteYojKG/qth7UBbbGU7aqhe5ndJs6YaUkH2B6+7FWQ0OeyYmWknzOATpMhdoSTDcLLliq9n4Fcy1mGs80iUMw== ++ dependencies: ++ pause "0.0.1" ++ pkginfo "0.2.x" ++ + passthrough-counter@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/passthrough-counter/-/passthrough-counter-1.0.0.tgz#1967d9e66da572b5c023c787db112a387ab166fa" +@@ -12067,6 +12083,11 @@ pkg-up@^3.1.0: + dependencies: + find-up "^3.0.0" + ++pkginfo@0.2.x: ++ version "0.2.3" ++ resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.2.3.tgz#7239c42a5ef6c30b8f328439d9b9ff71042490f8" ++ integrity sha512-7W7wTrE/NsY8xv/DTGjwNIyNah81EQH0MWcTzrHL6pOpMocOGZc0Mbdz9aXxSrp+U0mSmkU8jrNCDCfUs3sOBg== ++ + pkginfo@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch index dfa7c01..1c8f8c6 100644 --- a/sources/patches/app-04-bible.patch +++ b/sources/patches/app-04-bible.patch @@ -1,30 +1,31 @@ -diff --git a/app/editor/menus/block.ts b/app/editor/menus/block.ts -index 9a6fbe7d..26fac655 100644 ---- a/app/editor/menus/block.ts -+++ b/app/editor/menus/block.ts +diff --git a/app/editor/menus/block.tsx b/app/editor/menus/block.tsx +index 143c28309..26d7d6d06 100644 +--- a/app/editor/menus/block.tsx ++++ b/app/editor/menus/block.tsx @@ -18,6 +18,7 @@ import { AttachmentIcon, ClockIcon, CalendarIcon, + BookmarkedIcon, } from "outline-icons"; - import { MenuItem } from "@shared/editor/types"; - import { Dictionary } from "~/hooks/useDictionary"; -@@ -168,5 +169,12 @@ export default function blockMenuItems(dictionary: Dictionary): MenuItem[] { - keywords: "notice card suggestion", - attrs: { style: "tip" }, - }, -+ { -+ name: "container_notice", -+ title: dictionary.bibleNotice, + import * as React from "react"; + import styled from "styled-components"; +@@ -176,6 +177,13 @@ export default function blockMenuItems(dictionary: Dictionary): MenuItem[] { + { + name: "container_notice", + title: dictionary.tipNotice, + icon: BookmarkedIcon, + keywords: "notice card suggestion", + attrs: { style: "bible" }, + }, - ]; - } ++ { ++ name: "container_notice", ++ title: dictionary.bibleNotice, + icon: StarredIcon, + keywords: "notice card suggestion", + attrs: { style: "tip" }, diff --git a/app/hooks/useDictionary.ts b/app/hooks/useDictionary.ts -index 67001749..d8492e05 100644 +index 670017490..d8492e05d 100644 --- a/app/hooks/useDictionary.ts +++ b/app/hooks/useDictionary.ts @@ -75,6 +75,8 @@ export default function useDictionary() { @@ -37,10 +38,10 @@ index 67001749..d8492e05 100644 insertTime: t("Current time"), insertDateTime: t("Current date and time"), diff --git a/app/typings/styled-components.d.ts b/app/typings/styled-components.d.ts -index c8e571d5..7d8aef81 100644 +index 239a8e7a6..c0dc3b3bd 100644 --- a/app/typings/styled-components.d.ts +++ b/app/typings/styled-components.d.ts -@@ -54,6 +54,8 @@ declare module "styled-components" { +@@ -53,6 +53,8 @@ declare module "styled-components" { noticeTipText: string; noticeWarningBackground: string; noticeWarningText: string; @@ -50,10 +51,10 @@ index c8e571d5..7d8aef81 100644 interface Colors { diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts -index e1ba4bfa..f6725fb5 100644 +index 540c2f936..a9863bdca 100644 --- a/shared/editor/components/Styles.ts +++ b/shared/editor/components/Styles.ts -@@ -511,6 +511,20 @@ h6 { +@@ -515,6 +515,20 @@ h6 { } } @@ -75,7 +76,7 @@ index e1ba4bfa..f6725fb5 100644 margin: 0; padding-left: 1.5em; diff --git a/shared/editor/nodes/Notice.tsx b/shared/editor/nodes/Notice.tsx -index 158a0dfb..f297c343 100644 +index 158a0dfb9..f297c3433 100644 --- a/shared/editor/nodes/Notice.tsx +++ b/shared/editor/nodes/Notice.tsx @@ -1,5 +1,5 @@ @@ -112,7 +113,7 @@ index 158a0dfb..f297c343 100644 component = ; } diff --git a/shared/styles/theme.ts b/shared/styles/theme.ts -index 3ff5c7cf..fb4804ec 100644 +index 367e8ab9c..70066ddfd 100644 --- a/shared/styles/theme.ts +++ b/shared/styles/theme.ts @@ -87,6 +87,8 @@ export const base = { @@ -124,11 +125,11 @@ index 3ff5c7cf..fb4804ec 100644 breakpoints, }; -@@ -206,6 +208,7 @@ export const dark = { +@@ -208,6 +210,7 @@ export const dark = { noticeInfoText: colors.white, noticeTipText: colors.white, noticeWarningText: colors.white, + noticeBibleText: colors.white, progressBarBackground: colors.slate, scrollbarBackground: colors.black, - scrollbarThumb: colors.lightBlack, + scrollbarThumb: colors.lightBlack, \ No newline at end of file diff --git a/sources/patches/app-05-login.patch b/sources/patches/app-05-login.patch index 5692640..14fce97 100644 --- a/sources/patches/app-05-login.patch +++ b/sources/patches/app-05-login.patch @@ -1,5 +1,5 @@ diff --git a/app/scenes/Login/AuthenticationProvider.tsx b/app/scenes/Login/AuthenticationProvider.tsx -index b5bb854a..d29e958b 100644 +index b5bb854ad..d29e958be 100644 --- a/app/scenes/Login/AuthenticationProvider.tsx +++ b/app/scenes/Login/AuthenticationProvider.tsx @@ -67,7 +67,7 @@ function AuthenticationProvider(props: Props) { @@ -36,19 +36,19 @@ index b5bb854a..d29e958b 100644 })} diff --git a/app/scenes/Login/index.tsx b/app/scenes/Login/index.tsx -index e08e120c..f9e03f21 100644 +index 81adf346e..1287336ae 100644 --- a/app/scenes/Login/index.tsx +++ b/app/scenes/Login/index.tsx -@@ -180,7 +180,7 @@ function Login({ children }: Props) { +@@ -188,7 +188,7 @@ function Login({ children }: Props) { ) : ( <> - + - {t("Login to {{ authProviderName }}", { + {t("Bienvenue sur {{ authProviderName }}", { authProviderName: config.name || "Outline", })} -@@ -198,7 +198,7 @@ function Login({ children }: Props) { +@@ -206,7 +206,7 @@ function Login({ children }: Props) { {hasMultipleProviders && ( <> diff --git a/sources/patches/app-06-logo.patch b/sources/patches/app-06-logo.patch index 3339c7b..141392f 100644 --- a/sources/patches/app-06-logo.patch +++ b/sources/patches/app-06-logo.patch @@ -1,5 +1,5 @@ diff --git a/app/components/OutlineLogo.tsx b/app/components/OutlineLogo.tsx -index 81eb4855..1fee69cd 100644 +index 81eb48551..1fee69cd9 100644 --- a/app/components/OutlineLogo.tsx +++ b/app/components/OutlineLogo.tsx @@ -16,7 +16,7 @@ function OutlineLogo({ size = 32, fill = "#333", className }: Props) { @@ -10,4 +10,4 @@ index 81eb4855..1fee69cd 100644 + ); - } + } \ No newline at end of file From 4378ac7acaee6fc867074f8984f7082a8132e629 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 13 Nov 2022 00:04:51 +0700 Subject: [PATCH 16/19] Correct patches --- sources/patches/app-02-email.patch | 2 +- sources/patches/app-04-bible.patch | 2 +- sources/patches/app-05-login.patch | 2 +- sources/patches/app-06-logo.patch | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/patches/app-02-email.patch b/sources/patches/app-02-email.patch index a83d683..22a0724 100644 --- a/sources/patches/app-02-email.patch +++ b/sources/patches/app-02-email.patch @@ -8,4 +8,4 @@ index 669d00388..ccc5c047f 100644 }, + ignoreTLS:true }; - } \ No newline at end of file + } diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch index 1c8f8c6..d3bbd66 100644 --- a/sources/patches/app-04-bible.patch +++ b/sources/patches/app-04-bible.patch @@ -132,4 +132,4 @@ index 367e8ab9c..70066ddfd 100644 + noticeBibleText: colors.white, progressBarBackground: colors.slate, scrollbarBackground: colors.black, - scrollbarThumb: colors.lightBlack, \ No newline at end of file + scrollbarThumb: colors.lightBlack, diff --git a/sources/patches/app-05-login.patch b/sources/patches/app-05-login.patch index 14fce97..9cc33bf 100644 --- a/sources/patches/app-05-login.patch +++ b/sources/patches/app-05-login.patch @@ -56,4 +56,4 @@ index 81adf346e..1287336ae 100644 + {t("Vous vous êtes authentifié avec l'accès {{ authProviderName }} la dernière fois.", { authProviderName: defaultProvider.name, })} - \ No newline at end of file + diff --git a/sources/patches/app-06-logo.patch b/sources/patches/app-06-logo.patch index 141392f..fa26237 100644 --- a/sources/patches/app-06-logo.patch +++ b/sources/patches/app-06-logo.patch @@ -10,4 +10,4 @@ index 81eb48551..1fee69cd9 100644 + ); - } \ No newline at end of file + } From 96a8583e31608875eb6d57cbcfee7b43ef27c75d Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 13 Nov 2022 00:07:44 +0700 Subject: [PATCH 17/19] Update app-03-visitor.patch --- sources/patches/app-03-visitor.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch index 7b211e2..256abb5 100644 --- a/sources/patches/app-03-visitor.patch +++ b/sources/patches/app-03-visitor.patch @@ -112,3 +112,15 @@ index ef3b53a5f..e5c12935e 100644 pkginfo@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" +diff --git a/package.json b/package.json +index aa6796368..43617af55 100644 +--- a/package.json ++++ b/package.json +@@ -145,6 +145,7 @@ + "passport": "^0.6.0", + "passport-google-oauth2": "^0.2.0", + "passport-oauth2": "^1.6.1", ++ "passport-req": "^0.1.1", + "passport-slack-oauth2": "^1.1.1", + "pg": "^8.5.1", + "pg-hstore": "^2.3.4", From 4901c1e4affe7e2cdc7a4a7a800b07caccc37394 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 13 Nov 2022 00:50:50 +0700 Subject: [PATCH 18/19] Corrections --- sources/patches/app-04-bible.patch | 22 +++++++++++----------- sources/patches/app-05-login.patch | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch index d3bbd66..bbafb29 100644 --- a/sources/patches/app-04-bible.patch +++ b/sources/patches/app-04-bible.patch @@ -1,5 +1,5 @@ diff --git a/app/editor/menus/block.tsx b/app/editor/menus/block.tsx -index 143c28309..26d7d6d06 100644 +index 143c28309..cd6830b12 100644 --- a/app/editor/menus/block.tsx +++ b/app/editor/menus/block.tsx @@ -18,6 +18,7 @@ import { @@ -10,20 +10,20 @@ index 143c28309..26d7d6d06 100644 } from "outline-icons"; import * as React from "react"; import styled from "styled-components"; -@@ -176,6 +177,13 @@ export default function blockMenuItems(dictionary: Dictionary): MenuItem[] { - { - name: "container_notice", - title: dictionary.tipNotice, +@@ -180,6 +181,13 @@ export default function blockMenuItems(dictionary: Dictionary): MenuItem[] { + keywords: "notice card suggestion", + attrs: { style: "tip" }, + }, ++ { ++ name: "container_notice", ++ title: dictionary.bibleNotice, + icon: BookmarkedIcon, + keywords: "notice card suggestion", + attrs: { style: "bible" }, + }, -+ { -+ name: "container_notice", -+ title: dictionary.bibleNotice, - icon: StarredIcon, - keywords: "notice card suggestion", - attrs: { style: "tip" }, + { + name: "separator", + }, diff --git a/app/hooks/useDictionary.ts b/app/hooks/useDictionary.ts index 670017490..d8492e05d 100644 --- a/app/hooks/useDictionary.ts diff --git a/sources/patches/app-05-login.patch b/sources/patches/app-05-login.patch index 9cc33bf..900b2fd 100644 --- a/sources/patches/app-05-login.patch +++ b/sources/patches/app-05-login.patch @@ -36,7 +36,7 @@ index b5bb854ad..d29e958be 100644 })} diff --git a/app/scenes/Login/index.tsx b/app/scenes/Login/index.tsx -index 81adf346e..1287336ae 100644 +index 81adf346e..e4bb23585 100644 --- a/app/scenes/Login/index.tsx +++ b/app/scenes/Login/index.tsx @@ -188,7 +188,7 @@ function Login({ children }: Props) { @@ -44,7 +44,7 @@ index 81adf346e..1287336ae 100644 <> - {t("Login to {{ authProviderName }}", { -+ {t("Bienvenue sur {{ authProviderName }}", { ++ {t("Bienvenue sur Anthropologie Biblique", { authProviderName: config.name || "Outline", })} From 192647682e94bb75042d7dfb9bc8d7baf02d3dad Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 13 Nov 2022 13:57:23 +0700 Subject: [PATCH 19/19] v0.67.0 --- sources/patches/app-03-visitor.patch | 126 ------------------------- sources/patches/app-04-bible.patch | 135 --------------------------- sources/patches/app-05-login.patch | 59 ------------ sources/patches/app-06-logo.patch | 13 --- 4 files changed, 333 deletions(-) delete mode 100644 sources/patches/app-03-visitor.patch delete mode 100644 sources/patches/app-04-bible.patch delete mode 100644 sources/patches/app-05-login.patch delete mode 100644 sources/patches/app-06-logo.patch diff --git a/sources/patches/app-03-visitor.patch b/sources/patches/app-03-visitor.patch deleted file mode 100644 index 256abb5..0000000 --- a/sources/patches/app-03-visitor.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff --git a/server/routes/auth/providers/req.ts b/server/routes/auth/providers/req.ts -new file mode 100644 -index 000000000..be344d2e2 ---- /dev/null -+++ b/server/routes/auth/providers/req.ts -@@ -0,0 +1,62 @@ -+import passport from "@outlinewiki/koa-passport"; -+import Router from "koa-router"; -+import { capitalize } from "lodash"; -+import { Strategy as ReqStrategy } from "passport-req"; -+import accountProvisioner from "@server/commands/accountProvisioner"; -+import env from "@server/env"; -+import passportMiddleware from "@server/middlewares/passport"; -+import { StateStore } from "@server/utils/passport"; -+ -+const router = new Router(); -+const providerName = "req"; -+ -+export const config = { -+ name: "visiteur", -+ enabled: true, -+}; -+ -+if (true) { -+ passport.use( -+ new ReqStrategy( -+ async function (req,done) { -+ try { -+ const domain = "domain.tld"; -+ const subdomain = domain.split(".")[0]; -+ const teamName = capitalize(subdomain); -+ const name = "visiteur"; -+ const email = "visiteur@anthropologiebiblique.fr"; -+ const result = await accountProvisioner({ -+ ip: req.ip, -+ team: { -+ name: teamName, -+ domain, -+ subdomain, -+ }, -+ user: { -+ name: name, -+ email: email, -+ avatarUrl: null, -+ }, -+ authenticationProvider: { -+ name: providerName, -+ providerId: domain, -+ }, -+ authentication: { -+ providerId: "1234", -+ accessToken: null, -+ refreshToken: null, -+ scopes: [], -+ }, -+ }); -+ return done(null, result.user, result); -+ } catch (err) { -+ return done(err, null); -+ } -+ } -+ ) -+ ); -+ -+ router.get("req", passportMiddleware(providerName)); -+} -+ -+export default router; -diff --git a/yarn.lock b/yarn.lock -index ef3b53a5f..e5c12935e 100644 ---- a/yarn.lock -+++ b/yarn.lock -@@ -11822,6 +11822,14 @@ passport-oauth@1.0.x: - passport-oauth1 "1.x.x" - passport-oauth2 "1.x.x" - -+passport-req@^0.1.1: -+ version "0.1.1" -+ resolved "https://registry.yarnpkg.com/passport-req/-/passport-req-0.1.1.tgz#451bff1500b3d464a768d42f0762328a21236a18" -+ integrity sha512-9qmM0vD5v7jYLWxezNNCleOw+8IkVAuvOwQ6NJaUuJkdFJTR1KatXH1i5MxWgffx+libLWYLRUPtc6GHOmn+6w== -+ dependencies: -+ passport "~0.1.1" -+ pkginfo "0.2.x" -+ - passport-slack-oauth2@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/passport-slack-oauth2/-/passport-slack-oauth2-1.1.1.tgz#d831ffc3f1e968fcc3622e6ecf41643c8d8f9cbc" -@@ -11844,6 +11852,14 @@ passport@^0.6.0: - pause "0.0.1" - utils-merge "^1.0.1" - -+passport@~0.1.1: -+ version "0.1.18" -+ resolved "https://registry.yarnpkg.com/passport/-/passport-0.1.18.tgz#c8264479dcb6414cadbb66752d12b37e0b6525a1" -+ integrity sha512-qteYojKG/qth7UBbbGU7aqhe5ndJs6YaUkH2B6+7FWQ0OeyYmWknzOATpMhdoSTDcLLliq9n4Fcy1mGs80iUMw== -+ dependencies: -+ pause "0.0.1" -+ pkginfo "0.2.x" -+ - passthrough-counter@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/passthrough-counter/-/passthrough-counter-1.0.0.tgz#1967d9e66da572b5c023c787db112a387ab166fa" -@@ -12067,6 +12083,11 @@ pkg-up@^3.1.0: - dependencies: - find-up "^3.0.0" - -+pkginfo@0.2.x: -+ version "0.2.3" -+ resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.2.3.tgz#7239c42a5ef6c30b8f328439d9b9ff71042490f8" -+ integrity sha512-7W7wTrE/NsY8xv/DTGjwNIyNah81EQH0MWcTzrHL6pOpMocOGZc0Mbdz9aXxSrp+U0mSmkU8jrNCDCfUs3sOBg== -+ - pkginfo@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" -diff --git a/package.json b/package.json -index aa6796368..43617af55 100644 ---- a/package.json -+++ b/package.json -@@ -145,6 +145,7 @@ - "passport": "^0.6.0", - "passport-google-oauth2": "^0.2.0", - "passport-oauth2": "^1.6.1", -+ "passport-req": "^0.1.1", - "passport-slack-oauth2": "^1.1.1", - "pg": "^8.5.1", - "pg-hstore": "^2.3.4", diff --git a/sources/patches/app-04-bible.patch b/sources/patches/app-04-bible.patch deleted file mode 100644 index bbafb29..0000000 --- a/sources/patches/app-04-bible.patch +++ /dev/null @@ -1,135 +0,0 @@ -diff --git a/app/editor/menus/block.tsx b/app/editor/menus/block.tsx -index 143c28309..cd6830b12 100644 ---- a/app/editor/menus/block.tsx -+++ b/app/editor/menus/block.tsx -@@ -18,6 +18,7 @@ import { - AttachmentIcon, - ClockIcon, - CalendarIcon, -+ BookmarkedIcon, - } from "outline-icons"; - import * as React from "react"; - import styled from "styled-components"; -@@ -180,6 +181,13 @@ export default function blockMenuItems(dictionary: Dictionary): MenuItem[] { - keywords: "notice card suggestion", - attrs: { style: "tip" }, - }, -+ { -+ name: "container_notice", -+ title: dictionary.bibleNotice, -+ icon: BookmarkedIcon, -+ keywords: "notice card suggestion", -+ attrs: { style: "bible" }, -+ }, - { - name: "separator", - }, -diff --git a/app/hooks/useDictionary.ts b/app/hooks/useDictionary.ts -index 670017490..d8492e05d 100644 ---- a/app/hooks/useDictionary.ts -+++ b/app/hooks/useDictionary.ts -@@ -75,6 +75,8 @@ export default function useDictionary() { - showSource: t("Show source"), - warning: t("Warning"), - warningNotice: t("Warning notice"), -+ bible: t("Bible"), -+ bibleNotice: t("Bible quote"), - insertDate: t("Current date"), - insertTime: t("Current time"), - insertDateTime: t("Current date and time"), -diff --git a/app/typings/styled-components.d.ts b/app/typings/styled-components.d.ts -index 239a8e7a6..c0dc3b3bd 100644 ---- a/app/typings/styled-components.d.ts -+++ b/app/typings/styled-components.d.ts -@@ -53,6 +53,8 @@ declare module "styled-components" { - noticeTipText: string; - noticeWarningBackground: string; - noticeWarningText: string; -+ noticeBibleBackground: string; -+ noticeBibleText: string; - } - - interface Colors { -diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts -index 540c2f936..a9863bdca 100644 ---- a/shared/editor/components/Styles.ts -+++ b/shared/editor/components/Styles.ts -@@ -515,6 +515,20 @@ h6 { - } - } - -+.notice-block.bible { -+ background: ${transparentize(0.9, props.theme.noticeBibleBackground)}; -+ border-left: 4px solid ${props.theme.noticeBibleBackground}; -+ color: ${props.theme.noticeBibleText}; -+ -+ .icon { -+ color: ${props.theme.noticeBibleBackground}; -+ } -+ -+ a { -+ color: ${props.theme.noticeBibleText}; -+ } -+} -+ - blockquote { - margin: 0; - padding-left: 1.5em; -diff --git a/shared/editor/nodes/Notice.tsx b/shared/editor/nodes/Notice.tsx -index 158a0dfb9..f297c3433 100644 ---- a/shared/editor/nodes/Notice.tsx -+++ b/shared/editor/nodes/Notice.tsx -@@ -1,5 +1,5 @@ - import Token from "markdown-it/lib/token"; --import { WarningIcon, InfoIcon, StarredIcon } from "outline-icons"; -+import { WarningIcon, InfoIcon, StarredIcon, BookmarkedIcon } from "outline-icons"; - import { wrappingInputRule } from "prosemirror-inputrules"; - import { NodeSpec, Node as ProsemirrorNode, NodeType } from "prosemirror-model"; - import * as React from "react"; -@@ -15,6 +15,7 @@ export default class Notice extends Node { - info: this.options.dictionary.info, - warning: this.options.dictionary.warning, - tip: this.options.dictionary.tip, -+ bible: this.options.dictionary.bible, - }); - } - -@@ -47,6 +48,8 @@ export default class Notice extends Node { - ? "tip" - : dom.className.includes("warning") - ? "warning" -+ : dom.className.includes("bible") -+ ? "bible" - : undefined, - }), - }, -@@ -75,6 +78,8 @@ export default class Notice extends Node { - component = ; - } else if (node.attrs.style === "warning") { - component = ; -+ } else if (node.attrs.style === "bible") { -+ component = ; - } else { - component = ; - } -diff --git a/shared/styles/theme.ts b/shared/styles/theme.ts -index 367e8ab9c..70066ddfd 100644 ---- a/shared/styles/theme.ts -+++ b/shared/styles/theme.ts -@@ -87,6 +87,8 @@ export const base = { - noticeTipText: colors.almostBlack, - noticeWarningBackground: "#d73a49", - noticeWarningText: colors.almostBlack, -+ noticeBibleBackground: "#996633", -+ noticeBibleText: colors.almostBlack, - breakpoints, - }; - -@@ -208,6 +210,7 @@ export const dark = { - noticeInfoText: colors.white, - noticeTipText: colors.white, - noticeWarningText: colors.white, -+ noticeBibleText: colors.white, - progressBarBackground: colors.slate, - scrollbarBackground: colors.black, - scrollbarThumb: colors.lightBlack, diff --git a/sources/patches/app-05-login.patch b/sources/patches/app-05-login.patch deleted file mode 100644 index 900b2fd..0000000 --- a/sources/patches/app-05-login.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/app/scenes/Login/AuthenticationProvider.tsx b/app/scenes/Login/AuthenticationProvider.tsx -index b5bb854ad..d29e958be 100644 ---- a/app/scenes/Login/AuthenticationProvider.tsx -+++ b/app/scenes/Login/AuthenticationProvider.tsx -@@ -67,7 +67,7 @@ function AuthenticationProvider(props: Props) { - - -- {t("Sign In")} → -+ {t("S'identifier")} → - - - ) : ( - } fullwidth> -- {t("Continue with Email")} -+ {t("Accès membre (email)")} - - )} - -@@ -106,7 +106,7 @@ function AuthenticationProvider(props: Props) { - icon={} - fullwidth - > -- {t("Continue with {{ authProviderName }}", { -+ {t("Accès {{ authProviderName }}", { - authProviderName: name, - })} - -diff --git a/app/scenes/Login/index.tsx b/app/scenes/Login/index.tsx -index 81adf346e..e4bb23585 100644 ---- a/app/scenes/Login/index.tsx -+++ b/app/scenes/Login/index.tsx -@@ -188,7 +188,7 @@ function Login({ children }: Props) { - ) : ( - <> - -- {t("Login to {{ authProviderName }}", { -+ {t("Bienvenue sur Anthropologie Biblique", { - authProviderName: config.name || "Outline", - })} - -@@ -206,7 +206,7 @@ function Login({ children }: Props) { - {hasMultipleProviders && ( - <> - -- {t("You signed in with {{ authProviderName }} last time.", { -+ {t("Vous vous êtes authentifié avec l'accès {{ authProviderName }} la dernière fois.", { - authProviderName: defaultProvider.name, - })} - diff --git a/sources/patches/app-06-logo.patch b/sources/patches/app-06-logo.patch deleted file mode 100644 index fa26237..0000000 --- a/sources/patches/app-06-logo.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/app/components/OutlineLogo.tsx b/app/components/OutlineLogo.tsx -index 81eb48551..1fee69cd9 100644 ---- a/app/components/OutlineLogo.tsx -+++ b/app/components/OutlineLogo.tsx -@@ -16,7 +16,7 @@ function OutlineLogo({ size = 32, fill = "#333", className }: Props) { - xmlns="http://www.w3.org/2000/svg" - className={className} - > -- -+ - - ); - }