mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
make billing section optional
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
debug = true
|
debug = true
|
||||||
source_code = "https://github.com/mCaptcha/mCaptcha"
|
source_code = "https://github.com/mCaptcha/mCaptcha"
|
||||||
|
commercial = false
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
# Please set a unique value, your mCaptcha instance's security depends on this being
|
# Please set a unique value, your mCaptcha instance's security depends on this being
|
||||||
|
|||||||
30
src/data.rs
30
src/data.rs
@@ -1,19 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
//! App data: redis cache, database connections, etc.
|
//! App data: redis cache, database connections, etc.
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
@@ -98,6 +98,7 @@ pub struct Redis {
|
|||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
pub struct Settings {
|
pub struct Settings {
|
||||||
pub debug: bool,
|
pub debug: bool,
|
||||||
|
pub commercial: bool,
|
||||||
pub database: Database,
|
pub database: Database,
|
||||||
pub redis: Option<Redis>,
|
pub redis: Option<Redis>,
|
||||||
pub server: Server,
|
pub server: Server,
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<. if crate::SETTINGS.commercial { .>
|
||||||
<li class="secondary-menu__item">
|
<li class="secondary-menu__item">
|
||||||
<a class="secondary-menu__item-link" href="">
|
<a class="secondary-menu__item-link" href="">
|
||||||
<img class="secondary-menu__icon" src="<.= crate::CREDIT_CARD.0 .>" alt="<.= crate::CREDIT_CARD.1 .>" />
|
<img class="secondary-menu__icon" src="<.= crate::CREDIT_CARD.0 .>" alt="<.= crate::CREDIT_CARD.1 .>" />
|
||||||
@@ -46,6 +47,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<. } .>
|
||||||
<li class="secondary-menu__item">
|
<li class="secondary-menu__item">
|
||||||
<a class="secondary-menu__item-link" href="">
|
<a class="secondary-menu__item-link" href="">
|
||||||
<img class="secondary-menu__icon" src="<.= crate::HELP_CIRCLE.0 .>" alt="<.= crate::HELP_CIRCLE.1 .>" />
|
<img class="secondary-menu__icon" src="<.= crate::HELP_CIRCLE.0 .>" alt="<.= crate::HELP_CIRCLE.1 .>" />
|
||||||
|
|||||||
Reference in New Issue
Block a user