From 32b708b91bd97b11d66f07d1198d501df2b52d4a Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 3 Mar 2024 23:33:24 +0700 Subject: [PATCH 01/11] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index ed2ce02..e460679 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,7 +58,7 @@ then ynh_script_progression --message="Don't forget to remove MinIO app if you don't use it !" db_name=$(ynh_sanitize_dbid --db_name=$app) - ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS uuid-ossp;" --database=$db_name + ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS "uuid-ossp";" --database=$db_name else ynh_script_progression --message="No migration to be done" fi From ffb39d725d42bc2d2a0575a5d247e8f980b0fc0d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 29 Mar 2024 07:16:28 +0100 Subject: [PATCH 02/11] Auto-update README --- ALL_README.md | 6 +++++ README.md | 28 +++++++++++------------ README_fr.md | 38 ++++++++++++++++---------------- README_gl.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ README_it.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 161 insertions(+), 33 deletions(-) create mode 100644 ALL_README.md create mode 100644 README_gl.md create mode 100644 README_it.md diff --git a/ALL_README.md b/ALL_README.md new file mode 100644 index 0000000..3d6c579 --- /dev/null +++ b/ALL_README.md @@ -0,0 +1,6 @@ +# All available README files by language + +- [Read the README in English](README.md) +- [Lire le README en français](README_fr.md) +- [Le o README en galego](README_gl.md) +- [Leggi il “README” in italiano](README_it.md) diff --git a/README.md b/README.md index 80b9b26..6b93000 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -9,10 +9,10 @@ It shall NOT be edited by hand. [![Install Outline with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=outline) -*[Lire ce readme en français.](./README_fr.md)* +*[Read this README is other languages.](./ALL_README.md)* -> *This package allows you to install Outline quickly and simply on a YunoHost server. -If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* +> *This package allows you to install Outline quickly and simply on a YunoHost server.* +> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* ## Overview @@ -27,7 +27,7 @@ Outline is a wiki and knowledge base for growing teams. Beautiful, feature rich, **Shipped version:** 0.75.0~ynh1 -**Demo:** https://app.getoutline.com/create +**Demo:** ## Screenshots @@ -39,20 +39,20 @@ Outline is a wiki and knowledge base for growing teams. Beautiful, feature rich, ## Documentation and resources -* Official app website: -* Official user documentation: -* Official admin documentation: -* Upstream app code repository: -* YunoHost Store: -* Report a bug: +- Official app website: +- Official user documentation: +- Official admin documentation: +- Upstream app code repository: +- YunoHost Store: +- Report a bug: ## Developer info -Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/outline_ynh/tree/testing). +Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/outline_ynh/tree/testing). -To try the testing branch, please proceed like that. +To try the `testing` branch, please proceed like that: -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/outline_ynh/tree/testing --debug or sudo yunohost app upgrade outline -u https://github.com/YunoHost-Apps/outline_ynh/tree/testing --debug diff --git a/README_fr.md b/README_fr.md index 37a882a..c9bda35 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,6 +1,6 @@ # Outline pour YunoHost @@ -9,10 +9,10 @@ It shall NOT be edited by hand. [![Installer Outline avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=outline) -*[Read this readme in english.](./README.md)* +*[Lire le README dans d'autres langues.](./ALL_README.md)* -> *Ce package vous permet d’installer Outline rapidement et simplement sur un serveur YunoHost. -Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* +> *Ce package vous permet d’installer Outline rapidement et simplement sur un serveur YunoHost.* +> *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.* ## Vue d’ensemble @@ -24,37 +24,37 @@ Outile est un wiki et la base de connaissances les plus rapides pour les équipe - Y compris un serveur Dex pour se connecter à la base d'utilisateurs LDAP de YunoHost à l'aide d'un flux d'authentification OIDC - Utilisation du serveur SMTP intégré de Yunohost pour les notifications -**Version incluse :** 0.75.0~ynh1 +**Version incluse :** 0.75.0~ynh1 -**Démo :** https://app.getoutline.com/create +**Démo :** ## Captures d’écran ![Capture d’écran de Outline](./doc/screenshots/screenshot.png) -## :red_circle: Fonctions indésirables +## :red_circle: Anti-fonctionnalités -- **Not totally free upstream**: The packaged app is under an overall free licence, but with clauses that restrict its use. +- **Application sous licence libre restreinte**: L'application packagée est sous une licence globalement libre, mais avec des clauses qui pourraient restreindre son utilisation. ## Documentations et ressources -* Site officiel de l’app : -* Documentation officielle utilisateur : -* Documentation officielle de l’admin : -* Dépôt de code officiel de l’app : -* YunoHost Store: -* Signaler un bug : +- Site officiel de l’app : +- Documentation officielle utilisateur : +- Documentation officielle de l’admin : +- Dépôt de code officiel de l’app : +- YunoHost Store : +- Signaler un bug : ## Informations pour les développeurs -Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/outline_ynh/tree/testing). +Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/outline_ynh/tree/testing). -Pour essayer la branche testing, procédez comme suit. +Pour essayer la branche `testing`, procédez comme suit : -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/outline_ynh/tree/testing --debug ou sudo yunohost app upgrade outline -u https://github.com/YunoHost-Apps/outline_ynh/tree/testing --debug ``` -**Plus d’infos sur le packaging d’applications :** \ No newline at end of file +**Plus d’infos sur le packaging d’applications :** diff --git a/README_gl.md b/README_gl.md new file mode 100644 index 0000000..07dedb1 --- /dev/null +++ b/README_gl.md @@ -0,0 +1,61 @@ + + +# Outline para YunoHost + +[![Nivel de integración](https://dash.yunohost.org/integration/outline.svg)](https://dash.yunohost.org/appci/app/outline) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/outline.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/outline.maintain.svg) + +[![Instalar Outline con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=outline) + +*[Le este README en outros idiomas.](./ALL_README.md)* + +> *Este paquete permíteche instalar Outline de xeito rápido e doado nun servidor YunoHost.* +> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.* + +## Vista xeral + +Outline is a wiki and knowledge base for growing teams. Beautiful, feature rich, and markdown compatible. + +### Features + +- Fully working installation of Outline wiki +- Including a Dex server to connect to YunoHost's LDAP userbase using an OIDC auth flow +- Using Yunohost's built-in SMTP server for notifications + + +**Versión proporcionada:** 0.75.0~ynh1 + +**Demo:** + +## Capturas de pantalla + +![Captura de pantalla de Outline](./doc/screenshots/screenshot.png) + +## :red_circle: Caraterísticas cuestionables + +- **Not totally free upstream**: The packaged app is under an overall free licence, but with clauses that restrict its use. + +## Documentación e recursos + +- Web oficial da app: +- Documentación oficial para usuarias: +- Documentación oficial para admin: +- Repositorio de orixe do código: +- Tenda YunoHost: +- Informar dun problema: + +## Info de desenvolvemento + +Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/outline_ynh/tree/testing). + +Para probar a rama `testing`, procede deste xeito: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/outline_ynh/tree/testing --debug +ou +sudo yunohost app upgrade outline -u https://github.com/YunoHost-Apps/outline_ynh/tree/testing --debug +``` + +**Máis info sobre o empaquetado da app:** diff --git a/README_it.md b/README_it.md new file mode 100644 index 0000000..5af943b --- /dev/null +++ b/README_it.md @@ -0,0 +1,61 @@ + + +# Outline per YunoHost + +[![Livello di integrazione](https://dash.yunohost.org/integration/outline.svg)](https://dash.yunohost.org/appci/app/outline) ![Stato di funzionamento](https://ci-apps.yunohost.org/ci/badges/outline.status.svg) ![Stato di manutenzione](https://ci-apps.yunohost.org/ci/badges/outline.maintain.svg) + +[![Installa Outline con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=outline) + +*[Leggi questo README in altre lingue.](./ALL_README.md)* + +> *Questo pacchetto ti permette di installare Outline su un server YunoHost in modo semplice e veloce.* +> *Se non hai YunoHost, consulta [la guida](https://yunohost.org/install) per imparare a installarlo.* + +## Panoramica + +Outline is a wiki and knowledge base for growing teams. Beautiful, feature rich, and markdown compatible. + +### Features + +- Fully working installation of Outline wiki +- Including a Dex server to connect to YunoHost's LDAP userbase using an OIDC auth flow +- Using Yunohost's built-in SMTP server for notifications + + +**Versione pubblicata:** 0.75.0~ynh1 + +**Prova:** + +## Screenshot + +![Screenshot di Outline](./doc/screenshots/screenshot.png) + +## :red_circle: Anti-funzionalità + +- **Applicazione con licenza parzialmente libera**: Quest’applicazione è protetta da licenza generalmente libera, ma con delle clausole che potrebbero limitare il suo utilizzo. + +## Documentazione e risorse + +- Sito web ufficiale dell’app: +- Documentazione ufficiale per gli utenti: +- Documentazione ufficiale per gli amministratori: +- Repository upstream del codice dell’app: +- Store di YunoHost: +- Segnala un problema: + +## Informazioni per sviluppatori + +Si prega di inviare la tua pull request alla [branch di `testing`](https://github.com/YunoHost-Apps/outline_ynh/tree/testing). + +Per provare la branch di `testing`, si prega di procedere in questo modo: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/outline_ynh/tree/testing --debug +o +sudo yunohost app upgrade outline -u https://github.com/YunoHost-Apps/outline_ynh/tree/testing --debug +``` + +**Maggiori informazioni riguardo il pacchetto di quest’app:** From 61df4d3f4d3d8db195866aceac38bcc317d6cc35 Mon Sep 17 00:00:00 2001 From: Limezy Date: Mon, 6 May 2024 14:41:24 +0700 Subject: [PATCH 03/11] Test v0.76 --- sources/patches/main-02-visitor.patch | 132 ++++++++++++++++++++++ sources/patches/main-03-login.patch | 59 ++++++++++ sources/patches/main-04-bible.patch | 151 ++++++++++++++++++++++++++ 3 files changed, 342 insertions(+) create mode 100644 sources/patches/main-02-visitor.patch create mode 100644 sources/patches/main-03-login.patch create mode 100644 sources/patches/main-04-bible.patch diff --git a/sources/patches/main-02-visitor.patch b/sources/patches/main-02-visitor.patch new file mode 100644 index 0000000..0d7fcac --- /dev/null +++ b/sources/patches/main-02-visitor.patch @@ -0,0 +1,132 @@ +diff --git a/package.json b/package.json +index e0d3f56ea..fcd1ce270 100644 +--- a/package.json ++++ b/package.json +@@ -160,6 +160,7 @@ + "pg-tsquery": "^8.4.1", + "pluralize": "^8.0.0", + "png-chunks-extract": "^1.0.0", ++ "passport-req": "^0.1.1", + "polished": "^4.2.2", + "prosemirror-codemark": "^0.4.2", + "prosemirror-commands": "^1.5.2", +diff --git a/plugins/req/plugin.json b/plugins/req/plugin.json +new file mode 100644 +index 000000000..ae7c40333 +--- /dev/null ++++ b/plugins/req/plugin.json +@@ -0,0 +1,4 @@ ++{ ++ "name": "visiteur", ++ "description": "Adds an req compatible authentication provider." ++} +diff --git a/plugins/req/server/auth/req.ts b/plugins/req/server/auth/req.ts +new file mode 100644 +index 000000000..bc03fc6d3 +--- /dev/null ++++ b/plugins/req/server/auth/req.ts +@@ -0,0 +1,70 @@ ++import passport from "@outlinewiki/koa-passport"; ++import type { Context } from "koa"; ++import Router from "koa-router"; ++import { capitalize } from "lodash"; ++import { Strategy as ReqStrategy } from "passport-req"; ++import { slugifyDomain } from "@shared/utils/domains"; ++import accountProvisioner from "@server/commands/accountProvisioner"; ++import env from "@server/env"; ++import passportMiddleware from "@server/middlewares/passport"; ++import { User } from "@server/models"; ++import { AuthenticationResult } from "@server/types"; ++import { ++ StateStore, ++ getTeamFromContext, ++ getClientFromContext, ++} 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 c47df111a..3d7a8e387 100644 +--- a/yarn.lock ++++ b/yarn.lock +@@ -10290,6 +10290,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.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/passport-slack-oauth2/-/passport-slack-oauth2-1.2.0.tgz#d214a698b55a137393636a26827747f6c436dab4" +@@ -10320,6 +10328,14 @@ passport@^0.7.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" diff --git a/sources/patches/main-03-login.patch b/sources/patches/main-03-login.patch new file mode 100644 index 0000000..088ebb8 --- /dev/null +++ b/sources/patches/main-03-login.patch @@ -0,0 +1,59 @@ +diff --git a/app/scenes/Login/components/AuthenticationProvider.tsx b/app/scenes/Login/components/AuthenticationProvider.tsx +index 5d564453d..9e3c5b55b 100644 +--- a/app/scenes/Login/components/AuthenticationProvider.tsx ++++ b/app/scenes/Login/components/AuthenticationProvider.tsx +@@ -70,7 +70,7 @@ function AuthenticationProvider(props: Props) { + + +- {t("Sign In")} → ++ {t("S'identifier")} → + + + ) : ( + } fullwidth> +- {t("Continue with Email")} ++ {t("Accès membre (email)")} + + )} + +@@ -99,7 +99,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 9a9650b48..5357d5cf5 100644 +--- a/app/scenes/Login/index.tsx ++++ b/app/scenes/Login/index.tsx +@@ -264,7 +264,7 @@ function Login({ children }: Props) { + ) : ( + <> + +- {t("Login to {{ authProviderName }}", { ++ {t("Bienvenue sur Anthropologie Biblique", { + authProviderName: config.name || env.APP_NAME, + })} + +@@ -282,7 +282,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/main-04-bible.patch b/sources/patches/main-04-bible.patch new file mode 100644 index 0000000..19cf215 --- /dev/null +++ b/sources/patches/main-04-bible.patch @@ -0,0 +1,151 @@ +diff --git a/app/editor/menus/block.tsx b/app/editor/menus/block.tsx +index 301c2610d..1e6917bd8 100644 +--- a/app/editor/menus/block.tsx ++++ b/app/editor/menus/block.tsx +@@ -20,6 +20,7 @@ import { + MathIcon, + DoneIcon, + EmbedIcon, ++ BookmarkedIcon, + } from "outline-icons"; + import * as React from "react"; + import styled from "styled-components"; +@@ -195,6 +196,13 @@ export default function blockMenuItems(dictionary: Dictionary): MenuItem[] { + keywords: "notice card suggestion", + attrs: { style: "tip" }, + }, ++ { ++ name: "container_notice", ++ title: dictionary.bibleNotice, ++ icon: , ++ keywords: "notice card bible", ++ attrs: { style: "bible" }, ++ }, + { + name: "separator", + }, +diff --git a/app/hooks/useDictionary.ts b/app/hooks/useDictionary.ts +index 6a73e6750..15b74aa9e 100644 +--- a/app/hooks/useDictionary.ts ++++ b/app/hooks/useDictionary.ts +@@ -81,6 +81,8 @@ export default function useDictionary() { + warningNotice: t("Warning notice"), + success: t("Success"), + successNotice: t("Success 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/scenes/Document/components/Document.tsx b/app/scenes/Document/components/Document.tsx +index a231a90ee..67684d36d 100644 +--- a/app/scenes/Document/components/Document.tsx ++++ b/app/scenes/Document/components/Document.tsx +@@ -532,11 +532,6 @@ class DocumentScene extends React.Component { + + + +- {isShare && +- !parseDomain(window.location.origin).custom && +- !auth.user && ( +- +- )} + + {!isShare && ( +