Compare commits
No commits in common. "5a9e874d529bed2377b79aae39f43e5b2875ce2c" and "4d3b19b23b7221eebc38c2045a69c2e84e0e00ec" have entirely different histories.
5a9e874d52
...
4d3b19b23b
20 changed files with 1236 additions and 1398 deletions
|
@ -101,8 +101,7 @@ module ApplicationHelper
|
||||||
|
|
||||||
def impress_2020_meta_tags
|
def impress_2020_meta_tags
|
||||||
origin = Rails.configuration.impress_2020_origin
|
origin = Rails.configuration.impress_2020_origin
|
||||||
support_secret = Rails.application.credentials.dig(
|
support_secret = Rails.application.credentials.impress_2020.support_secret
|
||||||
:impress_2020, :support_secret)
|
|
||||||
|
|
||||||
capture do
|
capture do
|
||||||
concat tag("meta", name: "impress-2020-origin", content: origin)
|
concat tag("meta", name: "impress-2020-origin", content: origin)
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
module OutfitsHelper
|
module OutfitsHelper
|
||||||
LAST_DAY_OF_NEOPASS_ANNOUNCEMENT = Date.parse("2024-05-05")
|
|
||||||
def show_neopass_announcement?
|
|
||||||
Date.today <= LAST_DAY_OF_NEOPASS_ANNOUNCEMENT
|
|
||||||
end
|
|
||||||
|
|
||||||
def destination_tag(value)
|
def destination_tag(value)
|
||||||
hidden_field_tag 'destination', value, :id => nil
|
hidden_field_tag 'destination', value, :id => nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,6 +14,7 @@ import { ApolloProvider } from "@apollo/client";
|
||||||
import { BrowserRouter } from "react-router-dom";
|
import { BrowserRouter } from "react-router-dom";
|
||||||
import { css, Global } from "@emotion/react";
|
import { css, Global } from "@emotion/react";
|
||||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||||
|
import produce from "immer";
|
||||||
|
|
||||||
import apolloClient from "./apolloClient";
|
import apolloClient from "./apolloClient";
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ import getVisibleLayers from "../components/getVisibleLayers";
|
||||||
import { OutfitLayers } from "../components/OutfitPreview";
|
import { OutfitLayers } from "../components/OutfitPreview";
|
||||||
import SupportOnly from "./support/SupportOnly";
|
import SupportOnly from "./support/SupportOnly";
|
||||||
import { useAltStylesForSpecies } from "../loaders/alt-styles";
|
import { useAltStylesForSpecies } from "../loaders/alt-styles";
|
||||||
|
import useSupport from "./support/useSupport";
|
||||||
import { useLocalStorage } from "../util";
|
import { useLocalStorage } from "../util";
|
||||||
|
|
||||||
// From https://twemoji.twitter.com/, thank you!
|
// From https://twemoji.twitter.com/, thank you!
|
||||||
|
@ -80,6 +81,7 @@ function PosePicker({
|
||||||
"DTIPosePickerIsInSupportMode",
|
"DTIPosePickerIsInSupportMode",
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
const { isSupportUser } = useSupport();
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
|
|
||||||
const loading = posesQuery.loading || altStylesQuery.isLoading;
|
const loading = posesQuery.loading || altStylesQuery.isLoading;
|
||||||
|
@ -278,31 +280,30 @@ function PosePicker({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const PosePickerButton = React.forwardRef(
|
function PosePickerButton({ pose, altStyle, isOpen, loading, ...props }, ref) {
|
||||||
({ pose, altStyle, isOpen, loading, ...props }, ref) => {
|
const theme = useTheme();
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
const icon = altStyle != null ? twemojiSunglasses : getIcon(pose);
|
const icon = altStyle != null ? twemojiSunglasses : getIcon(pose);
|
||||||
const label = altStyle != null ? altStyle.seriesName : getLabel(pose);
|
const label = altStyle != null ? altStyle.seriesName : getLabel(pose);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ClassNames>
|
<ClassNames>
|
||||||
{({ css, cx }) => (
|
{({ css, cx }) => (
|
||||||
<Button
|
<Button
|
||||||
variant="unstyled"
|
variant="unstyled"
|
||||||
textShadow={`${theme.colors.blackAlpha["700"]} 0 1px 2px`}
|
textShadow={`${theme.colors.blackAlpha["700"]} 0 1px 2px`}
|
||||||
d="flex"
|
d="flex"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
_focus={{ borderColor: "gray.50" }}
|
_focus={{ borderColor: "gray.50" }}
|
||||||
_hover={{ borderColor: "gray.50" }}
|
_hover={{ borderColor: "gray.50" }}
|
||||||
outline="initial"
|
outline="initial"
|
||||||
fontSize="sm"
|
fontSize="sm"
|
||||||
fontWeight="normal"
|
fontWeight="normal"
|
||||||
minWidth="12ch"
|
minWidth="12ch"
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
className={cx(
|
className={cx(
|
||||||
css`
|
css`
|
||||||
border: 1px solid transparent !important;
|
border: 1px solid transparent !important;
|
||||||
color: ${theme.colors.gray["100"]};
|
color: ${theme.colors.gray["100"]};
|
||||||
cursor: ${loading ? "wait" : "pointer"} !important;
|
cursor: ${loading ? "wait" : "pointer"} !important;
|
||||||
|
@ -330,22 +331,22 @@ const PosePickerButton = React.forwardRef(
|
||||||
border-width: 2px !important;
|
border-width: 2px !important;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
isOpen && "is-open",
|
isOpen && "is-open",
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
>
|
>
|
||||||
<EmojiImage src={icon} alt="Style" />
|
<EmojiImage src={icon} alt="Style" />
|
||||||
<Box width=".5em" />
|
<Box width=".5em" />
|
||||||
{label}
|
{label}
|
||||||
<Box width=".5em" />
|
<Box width=".5em" />
|
||||||
<ChevronDownIcon />
|
<ChevronDownIcon />
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</ClassNames>
|
</ClassNames>
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
);
|
PosePickerButton = React.forwardRef(PosePickerButton);
|
||||||
|
|
||||||
function PosePickerTable({ poseInfos, onChange, initialFocusRef }) {
|
function PosePickerTable({ poseInfos, onChange, initialFocusRef }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import * as React from "react";
|
||||||
|
|
||||||
import { getSupportSecret } from "../../impress-2020-config";
|
import { getSupportSecret } from "../../impress-2020-config";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -700,7 +700,7 @@ function getZonesAndItems(itemsById, wornItemIds, closetedItemIds) {
|
||||||
// used. Then, loop over them again, appending the ID number if count > 1.
|
// used. Then, loop over them again, appending the ID number if count > 1.
|
||||||
const labelCounts = new Map();
|
const labelCounts = new Map();
|
||||||
for (const itemZoneGroup of zonesAndItems) {
|
for (const itemZoneGroup of zonesAndItems) {
|
||||||
const { zoneLabel } = itemZoneGroup;
|
const { zoneId, zoneLabel } = itemZoneGroup;
|
||||||
|
|
||||||
const count = labelCounts.get(zoneLabel) ?? 0;
|
const count = labelCounts.get(zoneLabel) ?? 0;
|
||||||
labelCounts.set(zoneLabel, count + 1);
|
labelCounts.set(zoneLabel, count + 1);
|
||||||
|
|
|
@ -429,8 +429,6 @@ class Item < ApplicationRecord
|
||||||
species_support_strs = info['species_support'] || []
|
species_support_strs = info['species_support'] || []
|
||||||
self.species_support_ids = species_support_strs.map(&:to_i)
|
self.species_support_ids = species_support_strs.map(&:to_i)
|
||||||
|
|
||||||
# NOTE: If some of these fields are missing, it could cause saving the item
|
|
||||||
# to fail, because many of these columns are non-nullable.
|
|
||||||
self.name = info['name']
|
self.name = info['name']
|
||||||
self.description = info['description']
|
self.description = info['description']
|
||||||
self.thumbnail_url = info['thumbnail_url']
|
self.thumbnail_url = info['thumbnail_url']
|
||||||
|
|
|
@ -68,7 +68,6 @@
|
||||||
%li.terms{"data-updated-recently": terms_updated_recently }
|
%li.terms{"data-updated-recently": terms_updated_recently }
|
||||||
= link_to t('.footer.terms', date: terms_updated_timestamp),
|
= link_to t('.footer.terms', date: terms_updated_timestamp),
|
||||||
terms_path
|
terms_path
|
||||||
%li= link_to t('.footer.about_neopass'), about_neopass_path
|
|
||||||
|
|
||||||
%div
|
%div
|
||||||
#{t('.footer.contact')}:
|
#{t('.footer.contact')}:
|
||||||
|
|
|
@ -4,26 +4,41 @@
|
||||||
|
|
||||||
%p#pet-not-found.alert= t 'pets.load.not_found'
|
%p#pet-not-found.alert= t 'pets.load.not_found'
|
||||||
|
|
||||||
- if show_neopass_announcement?
|
%section.neopass-announcement
|
||||||
%section.neopass-announcement
|
= image_tag "about/neopass-survey.png", width: 70, height: 70,
|
||||||
= image_tag "about/neopass-survey.png", width: 70, height: 70,
|
srcset: {"about/neopass-survey@2x.png": "2x"},
|
||||||
srcset: {"about/neopass-survey@2x.png": "2x"},
|
class: "neopass-thumbnail"
|
||||||
class: "neopass-thumbnail"
|
.neopass-content
|
||||||
.neopass-content
|
%p
|
||||||
%p
|
%strong
|
||||||
%strong
|
💭 Can you help us and TNT decide what to build next with NeoPass?
|
||||||
💭 Thank you for sending us your NeoPass feedback!
|
|
||||||
|
|
||||||
%p
|
%p
|
||||||
We're working with TNT now to build new integrations, based on what you
|
- if user_signed_in?
|
||||||
told us! We're glad
|
- if current_user.uses_neopass?
|
||||||
= link_to "log in with NeoPass", about_neopass_path
|
= link_to "Login with NeoPass", about_neopass_path
|
||||||
is working well, and we're excited to do the next part! More info soon!
|
is ready—and you're already on it, thank you! 🥰
|
||||||
|
- else
|
||||||
|
= link_to "Login with NeoPass", about_neopass_path
|
||||||
|
is ready! You can connect via the
|
||||||
|
#{link_to "Settings page", edit_auth_user_path}.
|
||||||
|
- else
|
||||||
|
= link_to "Login with NeoPass", about_neopass_path
|
||||||
|
is ready! If you're new to Dress to Impress, try logging in right now!!
|
||||||
|
🎉
|
||||||
|
|
||||||
%p
|
%p
|
||||||
Thanks again to everyone for helping us out! We're grateful, as always 💖
|
Now that we've built the foundation, TNT are looking for our help deciding what integration to build
|
||||||
%br
|
next.
|
||||||
%em —Matchu
|
= link_to "Would you fill out this survey for us, please?",
|
||||||
|
"https://docs.google.com/forms/d/e/1FAIpQLSdyi7bZB3-gyztdOVSmikRrfts6KM5mK2r37D0SBla3JO3GbQ/viewform"
|
||||||
|
We've got some ideas, and we're looking for more! Even if you don't use
|
||||||
|
NeoPass yet, your input would be <em>super</em> useful.
|
||||||
|
|
||||||
|
%p
|
||||||
|
Thanks again to everyone for helping us out! We're grateful, as always 💖
|
||||||
|
%br
|
||||||
|
%em —Matchu
|
||||||
|
|
||||||
#outfit-forms
|
#outfit-forms
|
||||||
- localized_cache :action_suffix => 'outfit_forms_intro' do
|
- localized_cache :action_suffix => 'outfit_forms_intro' do
|
||||||
|
|
|
@ -31,9 +31,11 @@ en-MEEP:
|
||||||
login: Meep in
|
login: Meep in
|
||||||
|
|
||||||
footer:
|
footer:
|
||||||
|
blog: Bleep
|
||||||
source_code: Source Meep
|
source_code: Source Meep
|
||||||
terms: Terms of Use (meeped Sep 2022)
|
terms: Terms of Use (meeped Sep 2022)
|
||||||
contact: Meeptact
|
contact: Meeptact
|
||||||
|
suggestions: Suggesteeps
|
||||||
email: Questions, comments, meepits
|
email: Questions, comments, meepits
|
||||||
copyright: Images © 1999–%{year} World of Neopets, Inc. All Rights Reserved.
|
copyright: Images © 1999–%{year} World of Neopets, Inc. All Rights Reserved.
|
||||||
Used With Permission. Meep.
|
Used With Permission. Meep.
|
||||||
|
|
|
@ -31,10 +31,11 @@ en:
|
||||||
login: Log in
|
login: Log in
|
||||||
|
|
||||||
footer:
|
footer:
|
||||||
|
blog: Blog
|
||||||
source_code: Source Code
|
source_code: Source Code
|
||||||
terms: Terms of Use (updated %{date})
|
terms: Terms of Use (updated %{date})
|
||||||
about_neopass: About NeoPass
|
|
||||||
contact: Contact
|
contact: Contact
|
||||||
|
suggestions: Suggestions
|
||||||
email: Questions, comments, bugs
|
email: Questions, comments, bugs
|
||||||
copyright: Images © 1999–%{year} World of Neopets, Inc. All Rights Reserved.
|
copyright: Images © 1999–%{year} World of Neopets, Inc. All Rights Reserved.
|
||||||
Used With Permission
|
Used With Permission
|
||||||
|
|
|
@ -24,8 +24,10 @@ pt:
|
||||||
logout: Sair
|
logout: Sair
|
||||||
login: Entrar
|
login: Entrar
|
||||||
footer:
|
footer:
|
||||||
|
blog: Blog
|
||||||
source_code: Código Fonte
|
source_code: Código Fonte
|
||||||
contact: Contato
|
contact: Contato
|
||||||
|
suggestions: Sugestões
|
||||||
email: Perguntas, comentários, erros
|
email: Perguntas, comentários, erros
|
||||||
copyright: Images © 1999–%{year} World of Neopets, Inc. All Rights Reserved. Used With Permission
|
copyright: Images © 1999–%{year} World of Neopets, Inc. All Rights Reserved. Used With Permission
|
||||||
items:
|
items:
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
class FixDefaultValueForItemsDescription < ActiveRecord::Migration[7.1]
|
|
||||||
def change
|
|
||||||
# Idk why, but this column's default value is specified in our schema as
|
|
||||||
# an empty string, but setting up the dev environment on my macOS machine
|
|
||||||
# is saying on latest MariaDB that this isn't allowed.
|
|
||||||
change_column_default :items, :description, from: "", to: nil
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[7.1].define(version: 2024_05_02_195157) do
|
ActiveRecord::Schema[7.1].define(version: 2024_04_21_033509) do
|
||||||
create_table "alt_styles", charset: "utf8mb4", collation: "utf8mb4_unicode_520_ci", force: :cascade do |t|
|
create_table "alt_styles", charset: "utf8mb4", collation: "utf8mb4_unicode_520_ci", force: :cascade do |t|
|
||||||
t.integer "species_id", null: false
|
t.integer "species_id", null: false
|
||||||
t.integer "color_id", null: false
|
t.integer "color_id", null: false
|
||||||
|
@ -132,7 +132,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_05_02_195157) do
|
||||||
t.column "modeling_status_hint", "enum('done','glitchy')"
|
t.column "modeling_status_hint", "enum('done','glitchy')"
|
||||||
t.boolean "is_manually_nc", default: false, null: false
|
t.boolean "is_manually_nc", default: false, null: false
|
||||||
t.string "name", null: false
|
t.string "name", null: false
|
||||||
t.text "description", size: :medium, null: false
|
t.text "description", size: :medium, default: "", null: false
|
||||||
t.string "rarity", default: "", null: false
|
t.string "rarity", default: "", null: false
|
||||||
t.index ["modeling_status_hint", "created_at", "id"], name: "items_modeling_status_hint_and_created_at_and_id"
|
t.index ["modeling_status_hint", "created_at", "id"], name: "items_modeling_status_hint_and_created_at_and_id"
|
||||||
t.index ["modeling_status_hint", "created_at"], name: "items_modeling_status_hint_and_created_at"
|
t.index ["modeling_status_hint", "created_at"], name: "items_modeling_status_hint_and_created_at"
|
||||||
|
@ -149,7 +149,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_05_02_195157) do
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "modeling_logs", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_520_ci", force: :cascade do |t|
|
create_table "modeling_logs", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_520_ci", force: :cascade do |t|
|
||||||
t.datetime "created_at", precision: nil, default: -> { "CURRENT_TIMESTAMP" }, null: false
|
t.datetime "created_at", precision: nil, default: -> { "current_timestamp()" }, null: false
|
||||||
t.text "log_json", size: :long, null: false
|
t.text "log_json", size: :long, null: false
|
||||||
t.string "pet_name", limit: 128, null: false
|
t.string "pet_name", limit: 128, null: false
|
||||||
end
|
end
|
||||||
|
|
|
@ -178,9 +178,9 @@
|
||||||
when: not ruby_dir.stat.exists
|
when: not ruby_dir.stat.exists
|
||||||
|
|
||||||
- name: Add Ruby 3.3.0 to the global PATH, for developer convenience
|
- name: Add Ruby 3.3.0 to the global PATH, for developer convenience
|
||||||
copy:
|
lineinfile:
|
||||||
dest: /etc/profile.d/ruby_path.sh
|
dest: /etc/profile
|
||||||
content: PATH="/opt/ruby-3.3.0/bin:$PATH"
|
line: 'PATH="/opt/ruby-3.3.0/bin:$PATH" # Added by impress deploy setup script'
|
||||||
|
|
||||||
- name: Install system dependencies for impress's Ruby gems
|
- name: Install system dependencies for impress's Ruby gems
|
||||||
apt:
|
apt:
|
||||||
|
@ -444,7 +444,7 @@
|
||||||
weekday: "0" # Sunday
|
weekday: "0" # Sunday
|
||||||
hour: "1" # 1:15am
|
hour: "1" # 1:15am
|
||||||
minute: "15" # 1:15am
|
minute: "15" # 1:15am
|
||||||
job: "bash -c 'source /etc/profile && source ~/.bash_profile && cd /srv/impress/current && bin/rails public_data:commit[scheduled]'"
|
job: "cd /srv/impress/current && bin/rails public_data:commit[scheduled]"
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: Reload nginx
|
- name: Reload nginx
|
||||||
|
|
|
@ -30,9 +30,6 @@ namespace :public_data do
|
||||||
# Don't lock the database to do it!
|
# Don't lock the database to do it!
|
||||||
args << "--single-transaction"
|
args << "--single-transaction"
|
||||||
|
|
||||||
# Skip dumping tablespaces, so this requires fewer privileges.
|
|
||||||
args << "--no-tablespaces"
|
|
||||||
|
|
||||||
# Dump the public data tables from the primary database.
|
# Dump the public data tables from the primary database.
|
||||||
args << config.fetch(:database)
|
args << config.fetch(:database)
|
||||||
args += %w(species colors zones) # manual constants
|
args += %w(species colors zones) # manual constants
|
||||||
|
@ -56,7 +53,7 @@ namespace :public_data do
|
||||||
|
|
||||||
# Link this latest dump as `latest.sql.gz`.
|
# Link this latest dump as `latest.sql.gz`.
|
||||||
latest_path = Rails.configuration.public_data_root / "latest.sql.gz"
|
latest_path = Rails.configuration.public_data_root / "latest.sql.gz"
|
||||||
File.unlink(latest_path) if File.symlink?(latest_path)
|
File.unlink(latest_path) if File.exist?(latest_path)
|
||||||
File.symlink(dest_path, latest_path)
|
File.symlink(dest_path, latest_path)
|
||||||
|
|
||||||
puts "Linked dump to #{latest_path}"
|
puts "Linked dump to #{latest_path}"
|
||||||
|
|
|
@ -48,6 +48,5 @@
|
||||||
"dev": "yarn build:dev --watch",
|
"dev": "yarn build:dev --watch",
|
||||||
"lint": "eslint app/javascript",
|
"lint": "eslint app/javascript",
|
||||||
"prepare": "husky install"
|
"prepare": "husky install"
|
||||||
},
|
}
|
||||||
"packageManager": "yarn@4.2.1"
|
|
||||||
}
|
}
|
||||||
|
|
BIN
vendor/cache/nokogiri-1.16.2-x86_64-darwin.gem
vendored
BIN
vendor/cache/nokogiri-1.16.2-x86_64-darwin.gem
vendored
Binary file not shown.
BIN
vendor/cache/sqlite3-1.7.2-x86_64-darwin.gem
vendored
BIN
vendor/cache/sqlite3-1.7.2-x86_64-darwin.gem
vendored
Binary file not shown.
Loading…
Reference in a new issue