From patchwork Thu Jan 25 17:00:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 59395 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 02F9427BBEA; Thu, 25 Jan 2024 17:03:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, NORMAL_HTTP_TO_IP,NUMERIC_HTTP_ADDR,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7B9E627BBE9 for ; Thu, 25 Jan 2024 17:03:17 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rT37U-00079G-1s; Thu, 25 Jan 2024 12:02:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rT36y-0006kg-PH for guix-patches@gnu.org; Thu, 25 Jan 2024 12:01:56 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rT36y-0003G1-Ev for guix-patches@gnu.org; Thu, 25 Jan 2024 12:01:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rT373-00038p-Vm for guix-patches@gnu.org; Thu, 25 Jan 2024 12:02:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68680] [PATCH mumi v2 1/3] README.org: Add new sections to help newcomers get started. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Jan 2024 17:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68680 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68680@debbugs.gnu.org Cc: rekado@elephly.net, arunisaac@systemreboot.net, Maxim Cournoyer Received: via spool by 68680-submit@debbugs.gnu.org id=B68680.170620206611994 (code B ref 68680); Thu, 25 Jan 2024 17:02:01 +0000 Received: (at 68680) by debbugs.gnu.org; 25 Jan 2024 17:01:06 +0000 Received: from localhost ([127.0.0.1]:49076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT369-00037N-OM for submit@debbugs.gnu.org; Thu, 25 Jan 2024 12:01:06 -0500 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]:50658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT363-00036C-JT for 68680@debbugs.gnu.org; Thu, 25 Jan 2024 12:01:00 -0500 Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3bb53e20a43so4811491b6e.1 for <68680@debbugs.gnu.org>; Thu, 25 Jan 2024 09:00:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706202047; x=1706806847; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3mHlKfb9Em9U1xMi4tLPjXlA5x9CMdBqSpo53CEwIhE=; b=U/p/VrtZlXQFa+ALiCzciPg1/5Ghja2fWbqczuZMH1HQnr+3cPnBwTvS5g3XQoPpGq kmOaRfRGfs5Qo/gox6xDMl7LQYkdkQ96aLle6HHyCQqVep14NzLheHdl6c2eQhc8nzyT sf5pimD1h8FahvhEnxmTEOmUIBMllZzzU1pwhvP2Su0khl6O1r6n1DrMfXNqWvDtJ7pa YNKk6cTE+dRRKdttMpeHPH8VcXrCxoufe/VbO2VTC8cFzVpptdz5o6WdUjoacL2Ao9Kk LXQd/v6O85OIp8Lprl5Ugz6non4u3vnBx+7W52MewNO8e+vhX6c7Ft0wwrIkiO/bFES6 xX8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706202047; x=1706806847; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3mHlKfb9Em9U1xMi4tLPjXlA5x9CMdBqSpo53CEwIhE=; b=w1434PpKBw7qidHzMgWI6Zg7zDDB+5o11UkJUsHAT/TAI4BViowrT3H3H2CDDTzuT2 fXU4D9qyQCNPcFWPzfnVhfQhs6kgfpGsZpgKMDaHTimzBgwnMRL2Ze703jlHRgz8+LGM nMy7rBlXzSeide+vaFD/usgYb5Q/sOdKl/C9Zb3lNlaYLUXJmE7pxAbF6dPj+VwRZuh1 5YDzLVYYVRsoD6vE4tyAmSmueU2dM9DkG9SCZORS0s46aqhOdAPIXVGwGfNyqdEHKqHb TJwYL0zIMEbU2nKknf84IS/kkwMjskqDMsGQA8qLEBRo0+/UBsVVfw7OLSodHDwuvhjG Uf9g== X-Gm-Message-State: AOJu0YybyiRWOf7gsRaOwZbNzORGwMYJBC50WZDREdnBw/TeWp4PVEX8 /sQ/z6hgRv+t9OAn7z3o7i5duVGr/DLmvexLVJwnkHDmYzmG3qd2bnYev/ZL X-Google-Smtp-Source: AGHT+IGbEpfooyEqjaLDHaseaVBpT0W/fBDKSdGxO0n+pWkA41pHTewSwmWnwFB5UIHDdkv/Sa6RiA== X-Received: by 2002:a05:6808:1485:b0:3bd:6833:3c78 with SMTP id e5-20020a056808148500b003bd68333c78mr56675oiw.35.1706202047365; Thu, 25 Jan 2024 09:00:47 -0800 (PST) Received: from localhost.localdomain (dsl-155-16.b2b2c.ca. [66.158.155.16]) by smtp.gmail.com with ESMTPSA id x11-20020ae9e90b000000b007832575779esm5194566qkf.52.2024.01.25.09.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 09:00:47 -0800 (PST) From: Maxim Cournoyer Date: Thu, 25 Jan 2024 12:00:13 -0500 Message-ID: <20240125170042.12022-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240125170042.12022-1-maxim.cournoyer@gmail.com> References: <20240125170042.12022-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * README.org (Running a local instance of mumi): New section. (Disabling browser caching): Likewise. --- (no changes since v1) README.org | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.org b/README.org index fd1d77b..d092de7 100644 --- a/README.org +++ b/README.org @@ -11,3 +11,27 @@ run #+BEGIN_SRC shell $ guix shell -D mumi #+END_SRC + +** Running a local instance of mumi + +First copy some test mail data to be indexed: + +#+begin_src shell + $ cp -a tests/data data +#+end_src + +Then, to have these emails indexed, run: + +#+begin_src shell + $ ./pre-inst-env mumi fetch +#+end_src + +You should now be able to visit http://0.0.0.0:1234 in your browser +and see your local mumi instance running. + +** Disabling browser caching + +If you modify the CSS or JavaScript source files, you'll want to make +sure your browser doesn't keep cached copies. This can be done by +changing a preference in the development tools menus, which is called +something like "Disable cache (while DevTools is active)". From patchwork Thu Jan 25 17:00:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 59394 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B55A227BBE2; Thu, 25 Jan 2024 17:02:42 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5980127BBE9 for ; Thu, 25 Jan 2024 17:02:42 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rT376-0006oq-MO; Thu, 25 Jan 2024 12:02:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rT36y-0006kk-Qg for guix-patches@gnu.org; Thu, 25 Jan 2024 12:01:56 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rT36y-0003G2-F5 for guix-patches@gnu.org; Thu, 25 Jan 2024 12:01:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rT374-00038x-C1 for guix-patches@gnu.org; Thu, 25 Jan 2024 12:02:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68680] [PATCH mumi v2 2/3] .gitignore: Register mumi.xapian and signing-key files. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Jan 2024 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68680 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68680@debbugs.gnu.org Cc: rekado@elephly.net, arunisaac@systemreboot.net, Maxim Cournoyer Received: via spool by 68680-submit@debbugs.gnu.org id=B68680.170620206612003 (code B ref 68680); Thu, 25 Jan 2024 17:02:02 +0000 Received: (at 68680) by debbugs.gnu.org; 25 Jan 2024 17:01:06 +0000 Received: from localhost ([127.0.0.1]:49078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT36A-00037P-5T for submit@debbugs.gnu.org; Thu, 25 Jan 2024 12:01:06 -0500 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]:52515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT364-00036E-Li for 68680@debbugs.gnu.org; Thu, 25 Jan 2024 12:01:00 -0500 Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3bd7c5b2439so3984804b6e.1 for <68680@debbugs.gnu.org>; Thu, 25 Jan 2024 09:00:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706202048; x=1706806848; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ed+Jgz4fLmlIQRTpnaZXz2tCj6FJI7QVT+9VyLl1bUk=; b=P0AIrimlBXFNyWo0cVzh/vem1R9ixtL8oFRtw/GGOILtAmaNBAnruEQaxoG7gSpHng VHPaejmkjGr8sPYLiakJeW936L6pgYWiMP4CJWFwVK6rD627qHFXnCpRc05WcUWCs23R v9M0WE2kwl5cueBxJAjwlEDgGfSTOAsqmuoaVphVziAbmVU1xjqYvC04PhmYKsgpdVQ6 f74xpwmO/K1ekKM6IQz9+dVMF53ZQaAnN4rk7Qa4gkNgAb883XFGKX8MqfIme0T93vuF mQ0oH8EGjIm0iCwlpx36tFxDkn8hn4Z0czASR6xV6whsiZ5i5aUP1gNfNnj+KZHlA/sL h+mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706202048; x=1706806848; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ed+Jgz4fLmlIQRTpnaZXz2tCj6FJI7QVT+9VyLl1bUk=; b=He503FvARKQEM2CmzKNNZKv6S9s5sQi9mjK5lSINEs1vHCOe4zbnaH0MUrA5P9NByf HyhaNsw0vkVoF3nBQmikMRxjeOobJc/2LQXGrL3cK3l1GPiGDkzVyUW5rM1noHdKDcr3 PCP1QRzUuntAnqx+abCL9KLmm+Zb1jZt/AjN1++dWdi/cjgw6ejNQqQE4LF/pMcZvPsg 5+2W6jZYFZoYB/fkXmSoSRzxPmyv+P8Gs8ybGom1S3hEghMNP/kAs2KW8X+IAR+DCPhu wkU9NkVK9o8T0IPR3e0qD/Wlzuv9fcHCXu2fIvzUCmCqo+yna+onEqQvG+TlqhKtVdK5 yX6A== X-Gm-Message-State: AOJu0YzYVyTwjCjn9JAqcyNxgBOvauol/p3051hGGsHi9ZvDkX3irwNL KZWO0O6lCJFB+a+adnAffBx9fthMyanF3zFFU37zCMX33v0h7WUw+RvWcWOq X-Google-Smtp-Source: AGHT+IES9u6uFCBY1ntqWENv4HlFWd+qgzhX/SBcvyS4eNiM4XYXxT2gHYelw9onS4EIxMg+DXtZ4A== X-Received: by 2002:a05:6808:2028:b0:3bb:bc99:97ea with SMTP id q40-20020a056808202800b003bbbc9997eamr19310oiw.113.1706202048653; Thu, 25 Jan 2024 09:00:48 -0800 (PST) Received: from localhost.localdomain (dsl-155-16.b2b2c.ca. [66.158.155.16]) by smtp.gmail.com with ESMTPSA id x11-20020ae9e90b000000b007832575779esm5194566qkf.52.2024.01.25.09.00.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 09:00:48 -0800 (PST) From: Maxim Cournoyer Date: Thu, 25 Jan 2024 12:00:14 -0500 Message-ID: <20240125170042.12022-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240125170042.12022-1-maxim.cournoyer@gmail.com> References: <20240125170042.12022-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches --- (no changes since v1) .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 2604e48..7247392 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,10 @@ config.log config.status configure +mumi.xapian mumi/config.scm scripts/mumi +signing-key pre-inst-env *.log *.trs From patchwork Thu Jan 25 17:00:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 59393 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B37B127BBEA; Thu, 25 Jan 2024 17:02:30 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 221B727BBE2 for ; Thu, 25 Jan 2024 17:02:29 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rT376-0006rJ-NN; Thu, 25 Jan 2024 12:02:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rT36z-0006l4-3t for guix-patches@gnu.org; Thu, 25 Jan 2024 12:01:57 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rT36y-0003GB-R5 for guix-patches@gnu.org; Thu, 25 Jan 2024 12:01:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rT374-000394-ON for guix-patches@gnu.org; Thu, 25 Jan 2024 12:02:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68680] [PATCH mumi v2 3/3] html: Add a button to copy a Message-ID to the clipboard. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Jan 2024 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68680 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68680@debbugs.gnu.org Cc: rekado@elephly.net, arunisaac@systemreboot.net, Maxim Cournoyer Received: via spool by 68680-submit@debbugs.gnu.org id=B68680.170620206712009 (code B ref 68680); Thu, 25 Jan 2024 17:02:02 +0000 Received: (at 68680) by debbugs.gnu.org; 25 Jan 2024 17:01:07 +0000 Received: from localhost ([127.0.0.1]:49080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT36A-00037Y-Ga for submit@debbugs.gnu.org; Thu, 25 Jan 2024 12:01:07 -0500 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:56517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT366-00036G-65 for 68680@debbugs.gnu.org; Thu, 25 Jan 2024 12:01:03 -0500 Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3bdbf401bd3so2753113b6e.0 for <68680@debbugs.gnu.org>; Thu, 25 Jan 2024 09:00:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706202050; x=1706806850; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cgHbW0vK7bQXhozd4O1Y4MWWFZH3mpjtBbqtT5fyhwk=; b=jAfNArj101si+vkNWzjaaNQ9OHsvWh41zJ+/cRY3KpGj7dYxXnUA3rBDb3A8tLcG/3 BxKYYnVaCxBCtAeBoCkTwOfVNFY++DDBrenNvkOqmY0wUOfYPTe9AxifVnunUWxa1dU0 dFYOac9DGhv7nxvuP2mPtV2s1SCZx/dRIyAzK1GR8SPjCvJFcKfrl5Ewoyg3aZ9Fg9+F USipXfddXVM+3RPef9yVIdMoEEvaUvE5hjwtrYxwj2CaTbAIOX5U8Sm6cTF6eaOCzzuO cvN/WED2OZhXZGb9ZIh9V6IAm3XOTAjMDqiRc/q2HiZcpcPCCubcujOv3r4wGUEUTbbq lngQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706202050; x=1706806850; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cgHbW0vK7bQXhozd4O1Y4MWWFZH3mpjtBbqtT5fyhwk=; b=q9miclS/UT4FXuqN/5s0HiiQhv85znHMP3oOuNoaFPtBbi0Ti00VZ+Erp0GRUJLVE/ aG95UPFXt03+gYUqcBK8MlXy9Xm7679qgepRDvzL2BR0EBbjnA1b2EEYuYz/Ua5fn8Wb wqGhZ+OvZPSdxpVCZO6kpQtLefBiUmvjQQhxXltMyBuixPPcTgOCoJfwQgYTQK7I/+h8 Vm6RHxrUdBfi4Zt1HbBUmf28gmPrJ3S1A7z3OexLxzuJB0cIsXODF7WNTS01hnMFiwVF 4baeOSx89ccFGzpmmWb7ExL9Zz+8tiNCTd+9rI5715a+majiS9a2PlKRzQQgJAF4/B+A hSEA== X-Gm-Message-State: AOJu0Ywe/Ag+zsTtgFLO4vIzc+j9yOfI7+XvVaLti2yIdQPOfKem0VMa TGCqeqUO6s7XUSX3mRR5xrFrxj0SwbWQTJ39fKcG1Qccd3YOA6YbBCBD3anm X-Google-Smtp-Source: AGHT+IFD1W617jySx8OnflRrih+6eqqsnyZFMH2beAmAwhi7Xfln1+He2hcVb+FVtcBD1MMGMr/arg== X-Received: by 2002:a05:6808:2793:b0:3bd:cf90:c5e with SMTP id es19-20020a056808279300b003bdcf900c5emr29242oib.100.1706202049944; Thu, 25 Jan 2024 09:00:49 -0800 (PST) Received: from localhost.localdomain (dsl-155-16.b2b2c.ca. [66.158.155.16]) by smtp.gmail.com with ESMTPSA id x11-20020ae9e90b000000b007832575779esm5194566qkf.52.2024.01.25.09.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 09:00:49 -0800 (PST) From: Maxim Cournoyer Date: Thu, 25 Jan 2024 12:00:15 -0500 Message-ID: <20240125170042.12022-4-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240125170042.12022-1-maxim.cournoyer@gmail.com> References: <20240125170042.12022-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * mumi/web/view/html.scm (issue-page) : New HTML element. (layout): Bump timestamp on .css and .js files to force reload. * mumi/web/view/utils.scm (download-icon): Update source. Use 'rem' as size unit. (copy-icon): New variable. (display-message-body) : Add IDs to buttons. Add to "message-button" class. * assets/mumi.scss: Refactor spacing of message header buttons via a flex display. Add a shrinking animation to message buttons on hover. * assets/js/mumi.js (mumi): Register an event for it that copies the Message-ID to the clipboard. Add js-indent-level prop line. * mumi/web/view/html.scm --- Changes in v2: - Add timestamp to CSS and JavaScript file names to force reload assets/js/mumi.js | 31 ++++++++++++++++++++++++++++- assets/mumi.scss | 23 ++++++++++++++++++--- mumi/web/view/html.scm | 24 ++++++++++++++++------ mumi/web/view/utils.scm | 44 +++++++++++++++++++++++++++-------------- 4 files changed, 97 insertions(+), 25 deletions(-) diff --git a/assets/js/mumi.js b/assets/js/mumi.js index ab29f08..0d25c5a 100644 --- a/assets/js/mumi.js +++ b/assets/js/mumi.js @@ -1,4 +1,4 @@ -// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3.0-or-later +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3.0-or-later -*- js-indent-level: 2; -*- var mumi = (function () { const possibleTokens = [ { text: 'is:open' }, @@ -129,12 +129,41 @@ var mumi = (function () { var init = function () { initTokenInput (); }; + + // Copy a message Message-ID to the clipboard. + var setupMessageIdButtonHandler = function () { + + let messageIdClickHandler = (evt) => { + messageIdButton = evt.currentTarget; + originalTooltip = messageIdButton.dataset.tooltip; + var messageId = messageIdButton.dataset.messageId; + if (!window.isSecureContext) { + console.log("not in a secure context -- " + + "cannot copy message-id to clipboard\n" + + "tip: for testing, open via http://localhost:1234"); + return; + } + // Update button's tooltip for the next 3 s. + messageIdButton.dataset.tooltip = "Copied!"; + setTimeout(() => { messageIdButton.dataset.tooltip = originalTooltip; }, + 3000); + navigator.clipboard.writeText(messageId); + console.log("copied Message-ID " + messageId + " to clipboard"); + }; + + var messageIdButton = document.getElementById("copy-message-id-button"); + if (messageIdButton === null) { return; } + messageIdButton.addEventListener("click", messageIdClickHandler); + }; + return({ 'init': init, 'lines': setupLineHandler, + 'messageIdButtonHandler': setupMessageIdButtonHandler, }); })(); window.addEventListener ("load", mumi.init); window.addEventListener ("DOMContentLoaded", mumi.lines); +window.addEventListener ("DOMContentLoaded", mumi.messageIdButtonHandler); // @license-end diff --git a/assets/mumi.scss b/assets/mumi.scss index 822f110..60dabb1 100644 --- a/assets/mumi.scss +++ b/assets/mumi.scss @@ -506,11 +506,28 @@ details { margin-right: 0.2em; } -.download-message, .download-part { float: right; - font-size: 0.8em; - font-style: italic; +} + +.header-buttons { + display: flex; + flex-direction: row; + float: right; + justify-content: flex-end; + } + +.header-buttons > * { + margin: 0 0 0 0.5rem; + // Custom buttons: undo the Pico CSS default style. + background: revert; + border: revert; + color: revert; + padding: revert; +} + +.message-button:hover { + transform: scale(0.95); } @media (min-width: 768px) { diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm index 8f06a36..b9603ec 100644 --- a/mumi/web/view/html.scm +++ b/mumi/web/view/html.scm @@ -1,6 +1,7 @@ ;;; mumi -- Mediocre, uh, mail interface ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022 Ricardo Wurmus ;;; Copyright © 2018, 2019, 2023 Arun Isaac +;;; Copyright © 2024 Maxim Cournoyer ;;; ;;; This program is free software: you can redistribute it and/or ;;; modify it under the terms of the GNU Affero General Public License @@ -62,11 +63,11 @@ (@ (rel "stylesheet") (media "screen") (type "text/css") - (href "/css/mumi.css?20221231000000"))) + (href "/css/mumi.css?20240125000000"))) (script (@ (src "/js/tokeninput.js"))) (script - (@ (src "/js/mumi.js"))) + (@ (src "/js/mumi.js?20240125000000"))) ,@head) (body (script (@ (src "/js/theme-switcher.js"))) @@ -612,6 +613,7 @@ currently disabled.")) (not (bug-archived bug))) mailer-form disabled-mailer))) + (define (show-message message-number message previous-subject) `((div (a (@ (class "message-anchor") @@ -642,10 +644,20 @@ currently disabled.")) message-number))) (title ,(date->string (date message)))) ,(time->string (date message))))) - (div (@ (class "download-message")) - (a (@ (href ,(format #f "/issue/~a/raw/~a" - id message-number))) - ,download-icon)) + (div (@ (class "header-buttons")) + (div (@ (id "copy-message-id-button") + (class "message-button") + (role "button") ;specific to Pico CSS + (data-tooltip "Copy Message-ID") + (data-message-id ,(message-id message))) + ,copy-icon) + (div (@ (id "download-raw-message-button") + (class "message-button") + (role "button") + (data-tooltip "Download raw message")) + (a (@ (href ,(format #f "/issue/~a/raw/~a" + id message-number))) + ,download-icon))) ,@(if (string-suffix? previous-subject (subject message)) '() `((div (@ (class "subject")) ,(subject message)))) diff --git a/mumi/web/view/utils.scm b/mumi/web/view/utils.scm index 1ce7b64..ed83d15 100644 --- a/mumi/web/view/utils.scm +++ b/mumi/web/view/utils.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017, 2018, 2019, 2020 Ricardo Wurmus ;;; Copyright © 2018, 2019 Arun Isaac ;;; Copyright © 2018 Ludovic Courtès +;;; Copyright © 2024 Maxim Cournoyer ;;; ;;; This program is free software: you can redistribute it and/or ;;; modify it under the terms of the GNU Affero General Public License @@ -35,6 +36,7 @@ #:use-module (web uri) #:export (prettify avatar-color + copy-icon download-icon display-message-body time->string)) @@ -215,23 +217,31 @@ numbers with the given MESSAGE-NUMBER." ;; https://icons.getbootstrap.com/icons/download/ (define download-icon '(svg (@ (class "bi bi-download") - (width "1em") - (height "1em") + (width "1rem") + (height "1rem") + (viewBox "0 0 16 16") + (fill "currentColor") + (xmlns "http://www.w3.org/2000/svg")) + (path (@ (d "M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 \ +1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 \ +1-2-2v-2.5a.5.5 0 0 1 .5-.5"))) + (path (@ (d "M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 \ +0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 \ +1 0-.708.708z"))))) + +;; https://icons.getbootstrap.com/icons/copy/ +(define copy-icon + '(svg (@ (class "bi bi-copy") + (width "1rem") + (height "1rem") (viewBox "0 0 16 16") (fill "currentColor") (xmlns "http://www.w3.org/2000/svg")) - (title "Download") - (path (@ (fill-rule "evenodd") - (clip-rule "evenodd") - (d "M.5 8a.5.5 0 01.5.5V12a1 1 0 001 1h12a1 1 0 001-1\ -V8.5a.5.5 0 011 0V12a2 2 0 01-2 2H2a2 2 0 01-2-2V8.5A.5.5 0 01.5 8z")) "") - (path (@ (fill-rule "evenodd") - (clip-rule "evenodd") - (d "M5 7.5a.5.5 0 01.707 0L8 9.793 10.293 7.5a.5.5 0 \ -11.707.707l-2.646 2.647a.5.5 0 01-.708 0L5 8.207A.5.5 0 015 7.5z")) "") (path (@ (fill-rule "evenodd") - (clip-rule "evenodd") - (d "M8 1a.5.5 0 01.5.5v8a.5.5 0 01-1 0v-8A.5.5 0 018 1z")) ""))) + (d "M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 \ +2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 \ +0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 \ +2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"))))) (define* (display-message-body bug-num message-number message #:optional plain?) "Convenience procedure to render MESSAGE (part of bug with number @@ -285,7 +295,9 @@ lines when PLAIN? is #T." ""))) ((string-suffix? ".scm" attachment-name) `(div (@ (class "multipart scheme")) - (div (@ (class "download-part")) + (div (@ (id "download-scheme-part-button") + (class "download-part message-button") + (data-tooltip "Download Scheme file")) (a (@ (href ,(attachment-url))) ,download-icon)) ,(highlights->sxml (highlight lex-scheme body)))) @@ -294,7 +306,9 @@ lines when PLAIN? is #T." (list "multipart" (or (and content-type (content-type->css-class content-type)) ""))))) - (div (@ (class "download-part")) + (div (@ (id "download-part-button") + (class "download-part message-button") + (data-tooltip "Download MIME part")) (a (@ (href ,(attachment-url))) ,download-icon)) ,(cond