Skip to content

Commit

Permalink
Merge branch 'main' into jdc-1955-inat-import
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeCohen committed Aug 1, 2024
2 parents cfc0f56 + b6123e0 commit 1ed3baf
Show file tree
Hide file tree
Showing 99 changed files with 3,053 additions and 1,708 deletions.
4 changes: 2 additions & 2 deletions app/assets/stylesheets/Admin.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "defaults";

$BODY_BG_COLOR: #Dc00DD;
$BODY_BG_COLOR: #DD00DD;

$LOGO_BORDER_COLOR: black;
$LOGO_BORDER_WIDTH: 2px; // vs 1px in default
Expand All @@ -9,7 +9,7 @@ $LOGO_BG_COLOR: yellow;
$LOGO_HOVER_FG_COLOR: purple;
$LOGO_HOVER_BG_COLOR: yellow;

$LEFT_BAR_BORDER_COLOR: gray;
$LEFT_BAR_BORDER_COLOR: #545555; // gray
$LEFT_BAR_BORDER_RADIUS: 0px;
$LEFT_BAR_HEADER_FG_COLOR: black;
$LEFT_BAR_HEADER_BG_COLOR: yellow;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/Agaricus.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "defaults";

$augustus_cap: #EBCF95; // #ECCF95
$augustus_cap: #EaCe93; // #ECCF95
$brasiliensis_gills_1: #A06463;
$brasiliensis_gills_2: #743931;
$campestris_cap: #F6F0F2;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/Amanita.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "defaults";

$phalloides_foreground: #e5edd5; // #e6edd5
$phalloides_foreground: #e6edd5;
$phalloides_light_cap: #dfe4bc;
$phalloides_middle_cap: #beb977;
$phalloides_dark_cap: #787133;
Expand All @@ -13,7 +13,7 @@ $calyptroderma_middle_cap: #c18346;
$muscaria_background: #cc2616;
$muscaria_foreground: #fff8c6;
$velosa_background: #dd9d5f;
$velosa_light_veil: #faebd4;
$velosa_light_veil: #fbead3; // faebd4
$velosa_dark_veil: #f4d5a6;
$novinupta_background: #d1afa5;
$pachycolea_background: #383138;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/BlackOnWhite.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// and does not use the "old_theme" defaults.
@import "defaults";

$LOGO_BORDER_COLOR: #DbDcDc;
$LOGO_BORDER_COLOR: #DDDDDD;
$LEFT_BAR_BORDER_COLOR: #DDDDDD;
$TOP_BAR_BORDER_COLOR: #DDDDDD;
$TOP_BAR_BORDER_COLOR: #DFDfDD;
$LIST_BORDER_COLOR: #DDDDDD;
$BUTTON_HOVER_BORDER_COLOR: #CCCCCC;
$BUTTON_BG_COLOR: #CCCCCC;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/Cantharellaceae.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "defaults";

$californicus_cap: #f5ae4a; // image 557 #f6ae4a
$californicus_cap: #f6ae4a; // image 557
$californicus_stipe: #fae8b8;
$cinnabarinus_dark_cap: #c12900; // image 551
$cinnabarinus_light_cap: #ff6524;
Expand All @@ -11,7 +11,7 @@ $tubaeformis_hymenium: #c2914c;
$tubaeformis_bright_stipe: #ffb230;
$tubaeformis_dark_stipe: #4b2e0c;
$tubaeformis_light_stipe: #e5bb67;
$cornucopioides_dark_hymenium: #10110b; // image 465
$cornucopioides_dark_hymenium: #11120b; // image 465 #10110b
$cornucopioides_light_hymenium: #9b9690;
$cornucopioides_dark_cap: #4f4337;
$cornucopioides_light_cap: #826c57;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/Hygrocybe.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "defaults";

$conica_stain: #36372f; // #37372f
$conica_stain: #35362d; // #37372f
$conica_cap_red: #a31404;
$conica_cap_orange: #dd6226;
$conica_cap_yellow: #ffbf01;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/Sudo.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "defaults";

$BODY_BG_COLOR: #DC7700; // #DD7700
$BODY_BG_COLOR: #DE7500; // #DD7700

$LOGO_BORDER_COLOR: black;
$LOGO_BORDER_WIDTH: 2px; // vs 1px in default
Expand Down
17 changes: 17 additions & 0 deletions app/assets/stylesheets/mo/_autocomplete.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
// autocompletion
// --------------------------------------------------

// autocompleter state - do we have a match?
.has-id-indicator {
display: none;
}
.create-button {
display: inline-block;
}

.has-id {
.has-id-indicator {
display: inline-block;
}
.create-button {
display: none;
}
}

.dropdown-menu.auto_complete {
// position: absolute;
// color: $dropdown-link-color;
Expand Down
6 changes: 6 additions & 0 deletions app/assets/stylesheets/mo/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ ul.tight-list {
.table-responsive {
border-color: transparent;
}
.panel-body.border-top {
border-top: 1px solid #ddd;
}
.panel-body.border-bottom {
border-bottom: 1px solid #ddd;
}
}

.panel-title {
Expand Down
30 changes: 22 additions & 8 deletions app/assets/stylesheets/mo/_form_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,11 @@ form {
}
}

.has-id-indicator {
.constrained-label {
display: none;
}

.has-id {
.has-id-indicator {
display: inline-block;
}
}

.constrained-label {
.create-label {
display: none;
}

Expand All @@ -148,6 +142,21 @@ form {
.constrained-label {
display: inline-block;
}
.create-label {
display: none;
}
}

.create {
.create-label {
display: inline-block;
}
.unconstrained-label {
display: none;
}
.constrained-label {
display: none;
}
}

.map-point,
Expand All @@ -166,3 +175,8 @@ form {
display: inline-block;
}
}

.overflow-scroll-checklist {
max-height: 30rem;
overflow-y: auto;
}
16 changes: 16 additions & 0 deletions app/assets/stylesheets/mo/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,22 @@
height: 18px;
}

// This is for the stateful icon_link_to helper
.icon-link {
.active-icon, .active-label {
display: none;
}
&.active {
.link-icon:not(.active-icon),
.sr-only:not(.active-label) {
display: none;
}
.active-icon, .active-label {
display: inline-block;
}
}
}

.spinner-right {
@extend .glyphicon, .glyphicon-repeat;

Expand Down
54 changes: 38 additions & 16 deletions app/assets/stylesheets/mo/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,26 @@
display: none !important;
}

.d-inline {
display: inline !important;
}

.d-inline-block {
display: inline-block !important;
}

.d-block {
display: block !important;
}

.d-flex {
display: flex !important;
}

.d-inline-flex {
display: inline-flex !important;
}

.flex-column {
flex-direction: column;
}
Expand All @@ -20,6 +36,10 @@
align-items: center !important;
}

.justify-content-between {
justify-content: space-between !important;
}

.w-auto {
width: auto !important;
}
Expand Down Expand Up @@ -68,22 +88,6 @@
position: fixed !important;
}

.d-inline {
display: inline !important;
}

.d-inline-block {
display: inline-block !important;
}

.d-block {
display: block !important;
}

.d-flex {
display: flex !important;
}

.float-right {
float: right !important;
}
Expand Down Expand Up @@ -150,6 +154,16 @@
border: none !important;
}

.border-top {
border-top-width: 1px !important;
border-top-style: solid !important;
}

.border-bottom {
border-bottom-width: 1px !important;
border-bottom-style: solid !important;
}

.rounded-0 {
border-radius: 0 !important;
}
Expand Down Expand Up @@ -452,6 +466,10 @@
padding-right: 1rem !important;
}

.pl-2 {
padding-left: 0.5rem !important;
}

.pl-3 {
padding-left: 1rem !important;
}
Expand Down Expand Up @@ -677,6 +695,10 @@
display: block !important;
}

.d-sm-inline {
display: inline !important;
}

.d-sm-inline-block {
display: inline-block !important;
}
Expand Down
22 changes: 11 additions & 11 deletions app/classes/ip_stats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ def clean_stats

def okay?(ip)
populate_blocked_ips unless blocked_ips_current?
@@okay_ips.include?(ip)
@okay_ips.include?(ip)
end

def blocked?(ip)
populate_blocked_ips unless blocked_ips_current?
@@blocked_ips.include?(ip) && !@@okay_ips.include?(ip) # DO NOT FIX!
@blocked_ips.include?(ip) && !@okay_ips.include?(ip) # DO NOT FIX!
end

def blocked_ips
populate_blocked_ips unless blocked_ips_current?
@@blocked_ips - @@okay_ips
@blocked_ips - @okay_ips
end

def add_blocked_ips(ips)
Expand Down Expand Up @@ -138,7 +138,7 @@ def read_okay_ips

def reset!
# Force reload next time used.
@@blocked_ips_time = nil
@blocked_ips_time = nil
end

# -------------------------------------
Expand All @@ -156,18 +156,18 @@ def calc_weight(now, time)
end

def blocked_ips_current?
defined?(@@blocked_ips_time) &&
@@blocked_ips_time.to_s != "" &&
@@blocked_ips_time >= File.mtime(MO.blocked_ips_file) &&
@@blocked_ips_time >= File.mtime(MO.okay_ips_file)
defined?(@blocked_ips_time) &&
@blocked_ips_time.to_s != "" &&
@blocked_ips_time >= File.mtime(MO.blocked_ips_file) &&
@blocked_ips_time >= File.mtime(MO.okay_ips_file)
end

def populate_blocked_ips
file1 = MO.blocked_ips_file
file2 = MO.okay_ips_file
@@blocked_ips = parse_ip_list(file1)
@@okay_ips = parse_ip_list(file2)
@@blocked_ips_time = [File.mtime(file1), File.mtime(file2)].max
@blocked_ips = parse_ip_list(file1)
@okay_ips = parse_ip_list(file2)
@blocked_ips_time = [File.mtime(file1), File.mtime(file2)].max
end

def parse_ip_list(file)
Expand Down
Loading

0 comments on commit 1ed3baf

Please sign in to comment.