Compare commits
11 commits
4d3b19b23b
...
5a9e874d52
Author | SHA1 | Date | |
---|---|---|---|
5a9e874d52 | |||
3f0936f25c | |||
32c3ec4f14 | |||
c74d9fa735 | |||
c751173c52 | |||
7c09b76b5e | |||
0943e2dbba | |||
73c2d4327a | |||
12764c44fc | |||
3d0c506370 | |||
460235e7cf |
20 changed files with 1398 additions and 1236 deletions
|
@ -101,7 +101,8 @@ 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.impress_2020.support_secret
|
support_secret = Rails.application.credentials.dig(
|
||||||
|
: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,4 +1,9 @@
|
||||||
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,7 +14,6 @@ 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,7 +31,6 @@ 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!
|
||||||
|
@ -81,7 +80,6 @@ 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;
|
||||||
|
@ -280,30 +278,31 @@ function PosePicker({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function PosePickerButton({ pose, altStyle, isOpen, loading, ...props }, ref) {
|
const PosePickerButton = React.forwardRef(
|
||||||
const theme = useTheme();
|
({ pose, altStyle, isOpen, loading, ...props }, ref) => {
|
||||||
|
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;
|
||||||
|
@ -331,22 +330,22 @@ function PosePickerButton({ pose, altStyle, isOpen, loading, ...props }, ref) {
|
||||||
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,5 +1,3 @@
|
||||||
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 { zoneId, zoneLabel } = itemZoneGroup;
|
const { 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,6 +429,8 @@ 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,6 +68,7 @@
|
||||||
%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,41 +4,26 @@
|
||||||
|
|
||||||
%p#pet-not-found.alert= t 'pets.load.not_found'
|
%p#pet-not-found.alert= t 'pets.load.not_found'
|
||||||
|
|
||||||
%section.neopass-announcement
|
- if show_neopass_announcement?
|
||||||
= image_tag "about/neopass-survey.png", width: 70, height: 70,
|
%section.neopass-announcement
|
||||||
srcset: {"about/neopass-survey@2x.png": "2x"},
|
= image_tag "about/neopass-survey.png", width: 70, height: 70,
|
||||||
class: "neopass-thumbnail"
|
srcset: {"about/neopass-survey@2x.png": "2x"},
|
||||||
.neopass-content
|
class: "neopass-thumbnail"
|
||||||
%p
|
.neopass-content
|
||||||
%strong
|
%p
|
||||||
💭 Can you help us and TNT decide what to build next with NeoPass?
|
%strong
|
||||||
|
💭 Thank you for sending us your NeoPass feedback!
|
||||||
|
|
||||||
%p
|
%p
|
||||||
- if user_signed_in?
|
We're working with TNT now to build new integrations, based on what you
|
||||||
- if current_user.uses_neopass?
|
told us! We're glad
|
||||||
= link_to "Login with NeoPass", about_neopass_path
|
= link_to "log in with NeoPass", about_neopass_path
|
||||||
is ready—and you're already on it, thank you! 🥰
|
is working well, and we're excited to do the next part! More info soon!
|
||||||
- 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
|
||||||
Now that we've built the foundation, TNT are looking for our help deciding what integration to build
|
Thanks again to everyone for helping us out! We're grateful, as always 💖
|
||||||
next.
|
%br
|
||||||
= link_to "Would you fill out this survey for us, please?",
|
%em —Matchu
|
||||||
"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,11 +31,9 @@ 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,11 +31,10 @@ 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,10 +24,8 @@ 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:
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
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_04_21_033509) do
|
ActiveRecord::Schema[7.1].define(version: 2024_05_02_195157) 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_04_21_033509) 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, default: "", null: false
|
t.text "description", size: :medium, 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_04_21_033509) 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
|
||||||
lineinfile:
|
copy:
|
||||||
dest: /etc/profile
|
dest: /etc/profile.d/ruby_path.sh
|
||||||
line: 'PATH="/opt/ruby-3.3.0/bin:$PATH" # Added by impress deploy setup script'
|
content: PATH="/opt/ruby-3.3.0/bin:$PATH"
|
||||||
|
|
||||||
- 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: "cd /srv/impress/current && bin/rails public_data:commit[scheduled]"
|
job: "bash -c 'source /etc/profile && source ~/.bash_profile && cd /srv/impress/current && bin/rails public_data:commit[scheduled]'"
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: Reload nginx
|
- name: Reload nginx
|
||||||
|
|
|
@ -30,6 +30,9 @@ 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
|
||||||
|
@ -53,7 +56,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.exist?(latest_path)
|
File.unlink(latest_path) if File.symlink?(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,5 +48,6 @@
|
||||||
"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
Normal file
BIN
vendor/cache/nokogiri-1.16.2-x86_64-darwin.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/sqlite3-1.7.2-x86_64-darwin.gem
vendored
Normal file
BIN
vendor/cache/sqlite3-1.7.2-x86_64-darwin.gem
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue