mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 18:15:39 +00:00
Deploying to gh-pages from @ 82ecfd695a9f673d6661c4b2ae8a3528c635486c 🚀
This commit is contained in:
@@ -102,6 +102,11 @@
|
||||
<a href="#102" id="102">102</a>
|
||||
<a href="#103" id="103">103</a>
|
||||
<a href="#104" id="104">104</a>
|
||||
<a href="#105" id="105">105</a>
|
||||
<a href="#106" id="106">106</a>
|
||||
<a href="#107" id="107">107</a>
|
||||
<a href="#108" id="108">108</a>
|
||||
<a href="#109" id="109">109</a>
|
||||
</pre></div><pre class="rust"><code><span class="comment">// Copyright (C) 2022 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
//
|
||||
@@ -156,7 +161,12 @@
|
||||
|
||||
<span class="doccomment">/// print date
|
||||
</span><span class="kw">pub fn </span>date(<span class="kw-2">&</span><span class="self">self</span>) -> String {
|
||||
<span class="macro">format!</span>(<span class="string">"{}{}{}"</span>, <span class="self">self</span>.time.year(), <span class="self">self</span>.time.month(), <span class="self">self</span>.time.date())
|
||||
<span class="macro">format!</span>(
|
||||
<span class="string">"{}{}{}"</span>,
|
||||
<span class="self">self</span>.time.year(),
|
||||
<span class="self">self</span>.time.month(),
|
||||
<span class="self">self</span>.time.date()
|
||||
)
|
||||
}
|
||||
|
||||
<span class="kw">pub fn </span>new(unix: i64) -> <span class="self">Self </span>{
|
||||
|
||||
@@ -109,6 +109,8 @@
|
||||
<a href="#109" id="109">109</a>
|
||||
<a href="#110" id="110">110</a>
|
||||
<a href="#111" id="111">111</a>
|
||||
<a href="#112" id="112">112</a>
|
||||
<a href="#113" id="113">113</a>
|
||||
</pre></div><pre class="rust"><code><span class="comment">// Copyright (C) 2022 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
//
|
||||
@@ -174,7 +176,8 @@
|
||||
|
||||
<span class="kw">let </span>edit_sitekey_url = PAGES.panel.sitekey.get_edit_advance(<span class="kw-2">&</span>token_key.key);
|
||||
<span class="kw">let </span>delete_sitekey_url = PAGES.panel.sitekey.get_delete(<span class="kw-2">&</span>token_key.key);
|
||||
<span class="kw">let </span>urls = [PAGES.home,
|
||||
<span class="kw">let </span>urls = [
|
||||
PAGES.home,
|
||||
PAGES.panel.sitekey.add_advance,
|
||||
PAGES.panel.sitekey.add_easy,
|
||||
PAGES.panel.sitekey.list,
|
||||
@@ -183,7 +186,8 @@
|
||||
PAGES.panel.settings.delete_account,
|
||||
PAGES.panel.settings.update_secret,
|
||||
<span class="kw-2">&</span>delete_sitekey_url,
|
||||
<span class="kw-2">&</span>edit_sitekey_url];
|
||||
<span class="kw-2">&</span>edit_sitekey_url,
|
||||
];
|
||||
|
||||
<span class="kw">for </span>url <span class="kw">in </span>urls.iter() {
|
||||
<span class="kw">let </span>resp =
|
||||
|
||||
@@ -116,6 +116,13 @@
|
||||
<a href="#116" id="116">116</a>
|
||||
<a href="#117" id="117">117</a>
|
||||
<a href="#118" id="118">118</a>
|
||||
<a href="#119" id="119">119</a>
|
||||
<a href="#120" id="120">120</a>
|
||||
<a href="#121" id="121">121</a>
|
||||
<a href="#122" id="122">122</a>
|
||||
<a href="#123" id="123">123</a>
|
||||
<a href="#124" id="124">124</a>
|
||||
<a href="#125" id="125">125</a>
|
||||
</pre></div><pre class="rust"><code><span class="comment">// Copyright (C) 2022 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
//
|
||||
@@ -213,9 +220,11 @@
|
||||
<span class="macro">assert!</span>(n.print_date().contains(<span class="string">"seconds ago"</span>));
|
||||
|
||||
<span class="comment">// minutes test
|
||||
</span>n.received = OffsetDateTime::from_unix_timestamp(timestamp - MINUTE * <span class="number">2</span>).unwrap();
|
||||
</span>n.received =
|
||||
OffsetDateTime::from_unix_timestamp(timestamp - MINUTE * <span class="number">2</span>).unwrap();
|
||||
<span class="macro">assert!</span>(n.print_date().contains(<span class="string">"minutes ago"</span>));
|
||||
n.received = OffsetDateTime::from_unix_timestamp(timestamp - MINUTE * <span class="number">56</span>).unwrap();
|
||||
n.received =
|
||||
OffsetDateTime::from_unix_timestamp(timestamp - MINUTE * <span class="number">56</span>).unwrap();
|
||||
<span class="macro">assert!</span>(n.print_date().contains(<span class="string">"minutes ago"</span>));
|
||||
|
||||
<span class="comment">// hours test
|
||||
@@ -230,7 +239,12 @@
|
||||
|
||||
<span class="comment">// date test
|
||||
</span>n.received = OffsetDateTime::from_unix_timestamp(timestamp - <span class="number">6 </span>* WEEK).unwrap();
|
||||
<span class="kw">let </span>date = <span class="macro">format!</span>(<span class="string">"{}{}{}"</span>, n.received.year(), n.received.month(), n.received.date());
|
||||
<span class="kw">let </span>date = <span class="macro">format!</span>(
|
||||
<span class="string">"{}{}{}"</span>,
|
||||
n.received.year(),
|
||||
n.received.month(),
|
||||
n.received.date()
|
||||
);
|
||||
<span class="macro">assert!</span>(n.print_date().contains(<span class="kw-2">&</span>date))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
</span><span class="kw">use </span>cache_buster::Files;
|
||||
</span><span class="kw">use </span>libcachebust::Files;
|
||||
|
||||
<span class="kw">pub struct </span>FileMap {
|
||||
<span class="kw">pub </span>files: Files,
|
||||
@@ -47,7 +47,7 @@
|
||||
<span class="kw">impl </span>FileMap {
|
||||
<span class="attr">#[allow(clippy::new_without_default)]
|
||||
</span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{
|
||||
<span class="kw">let </span>map = <span class="macro">include_str!</span>(<span class="string">"../cache_buster_data.json"</span>);
|
||||
<span class="kw">let </span>map = <span class="macro">include_str!</span>(<span class="string">"../libcachebust_data.json"</span>);
|
||||
<span class="kw">let </span>files = Files::new(map);
|
||||
<span class="self">Self </span>{ files }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user