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
|
||||
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
|
||||
concat tag("meta", name: "impress-2020-origin", content: origin)
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
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)
|
||||
hidden_field_tag 'destination', value, :id => nil
|
||||
end
|
||||
|
|
|
@ -14,7 +14,6 @@ import { ApolloProvider } from "@apollo/client";
|
|||
import { BrowserRouter } from "react-router-dom";
|
||||
import { css, Global } from "@emotion/react";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import produce from "immer";
|
||||
|
||||
import apolloClient from "./apolloClient";
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ import getVisibleLayers from "../components/getVisibleLayers";
|
|||
import { OutfitLayers } from "../components/OutfitPreview";
|
||||
import SupportOnly from "./support/SupportOnly";
|
||||
import { useAltStylesForSpecies } from "../loaders/alt-styles";
|
||||
import useSupport from "./support/useSupport";
|
||||
import { useLocalStorage } from "../util";
|
||||
|
||||
// From https://twemoji.twitter.com/, thank you!
|
||||
|
@ -81,7 +80,6 @@ function PosePicker({
|
|||
"DTIPosePickerIsInSupportMode",
|
||||
false,
|
||||
);
|
||||
const { isSupportUser } = useSupport();
|
||||
const toast = useToast();
|
||||
|
||||
const loading = posesQuery.loading || altStylesQuery.isLoading;
|
||||
|
@ -280,30 +278,31 @@ function PosePicker({
|
|||
);
|
||||
}
|
||||
|
||||
function PosePickerButton({ pose, altStyle, isOpen, loading, ...props }, ref) {
|
||||
const theme = useTheme();
|
||||
const PosePickerButton = React.forwardRef(
|
||||
({ pose, altStyle, isOpen, loading, ...props }, ref) => {
|
||||
const theme = useTheme();
|
||||
|
||||
const icon = altStyle != null ? twemojiSunglasses : getIcon(pose);
|
||||
const label = altStyle != null ? altStyle.seriesName : getLabel(pose);
|
||||
const icon = altStyle != null ? twemojiSunglasses : getIcon(pose);
|
||||
const label = altStyle != null ? altStyle.seriesName : getLabel(pose);
|
||||
|
||||
return (
|
||||
<ClassNames>
|
||||
{({ css, cx }) => (
|
||||
<Button
|
||||
variant="unstyled"
|
||||
textShadow={`${theme.colors.blackAlpha["700"]} 0 1px 2px`}
|
||||
d="flex"
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
_focus={{ borderColor: "gray.50" }}
|
||||
_hover={{ borderColor: "gray.50" }}
|
||||
outline="initial"
|
||||
fontSize="sm"
|
||||
fontWeight="normal"
|
||||
minWidth="12ch"
|
||||
disabled={loading}
|
||||
className={cx(
|
||||
css`
|
||||
return (
|
||||
<ClassNames>
|
||||
{({ css, cx }) => (
|
||||
<Button
|
||||
variant="unstyled"
|
||||
textShadow={`${theme.colors.blackAlpha["700"]} 0 1px 2px`}
|
||||
d="flex"
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
_focus={{ borderColor: "gray.50" }}
|
||||
_hover={{ borderColor: "gray.50" }}
|
||||
outline="initial"
|
||||
fontSize="sm"
|
||||
fontWeight="normal"
|
||||
minWidth="12ch"
|
||||
disabled={loading}
|
||||
className={cx(
|
||||
css`
|
||||
border: 1px solid transparent !important;
|
||||
color: ${theme.colors.gray["100"]};
|
||||
cursor: ${loading ? "wait" : "pointer"} !important;
|
||||
|
@ -331,22 +330,22 @@ function PosePickerButton({ pose, altStyle, isOpen, loading, ...props }, ref) {
|
|||
border-width: 2px !important;
|
||||
}
|
||||
`,
|
||||
isOpen && "is-open",
|
||||
)}
|
||||
{...props}
|
||||
ref={ref}
|
||||
>
|
||||
<EmojiImage src={icon} alt="Style" />
|
||||
<Box width=".5em" />
|
||||
{label}
|
||||
<Box width=".5em" />
|
||||
<ChevronDownIcon />
|
||||
</Button>
|
||||
)}
|
||||
</ClassNames>
|
||||
);
|
||||
}
|
||||
PosePickerButton = React.forwardRef(PosePickerButton);
|
||||
isOpen && "is-open",
|
||||
)}
|
||||
{...props}
|
||||
ref={ref}
|
||||
>
|
||||
<EmojiImage src={icon} alt="Style" />
|
||||
<Box width=".5em" />
|
||||
{label}
|
||||
<Box width=".5em" />
|
||||
<ChevronDownIcon />
|
||||
</Button>
|
||||
)}
|
||||
</ClassNames>
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
function PosePickerTable({ poseInfos, onChange, initialFocusRef }) {
|
||||
return (
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import * as React from "react";
|
||||
|
||||
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.
|
||||
const labelCounts = new Map();
|
||||
for (const itemZoneGroup of zonesAndItems) {
|
||||
const { zoneId, zoneLabel } = itemZoneGroup;
|
||||
const { zoneLabel } = itemZoneGroup;
|
||||
|
||||
const count = labelCounts.get(zoneLabel) ?? 0;
|
||||
labelCounts.set(zoneLabel, count + 1);
|
||||
|
|
|
@ -429,6 +429,8 @@ class Item < ApplicationRecord
|
|||
species_support_strs = info['species_support'] || []
|
||||
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.description = info['description']
|
||||
self.thumbnail_url = info['thumbnail_url']
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
%li.terms{"data-updated-recently": terms_updated_recently }
|
||||
= link_to t('.footer.terms', date: terms_updated_timestamp),
|
||||
terms_path
|
||||
%li= link_to t('.footer.about_neopass'), about_neopass_path
|
||||
|
||||
%div
|
||||
#{t('.footer.contact')}:
|
||||
|
|
|
@ -4,41 +4,26 @@
|
|||
|
||||
%p#pet-not-found.alert= t 'pets.load.not_found'
|
||||
|
||||
%section.neopass-announcement
|
||||
= image_tag "about/neopass-survey.png", width: 70, height: 70,
|
||||
srcset: {"about/neopass-survey@2x.png": "2x"},
|
||||
class: "neopass-thumbnail"
|
||||
.neopass-content
|
||||
%p
|
||||
%strong
|
||||
💭 Can you help us and TNT decide what to build next with NeoPass?
|
||||
- if show_neopass_announcement?
|
||||
%section.neopass-announcement
|
||||
= image_tag "about/neopass-survey.png", width: 70, height: 70,
|
||||
srcset: {"about/neopass-survey@2x.png": "2x"},
|
||||
class: "neopass-thumbnail"
|
||||
.neopass-content
|
||||
%p
|
||||
%strong
|
||||
💭 Thank you for sending us your NeoPass feedback!
|
||||
|
||||
%p
|
||||
- if user_signed_in?
|
||||
- if current_user.uses_neopass?
|
||||
= link_to "Login with NeoPass", about_neopass_path
|
||||
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
|
||||
We're working with TNT now to build new integrations, based on what you
|
||||
told us! We're glad
|
||||
= link_to "log in with NeoPass", about_neopass_path
|
||||
is working well, and we're excited to do the next part! More info soon!
|
||||
|
||||
%p
|
||||
Now that we've built the foundation, TNT are looking for our help deciding what integration to build
|
||||
next.
|
||||
= 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
|
||||
%p
|
||||
Thanks again to everyone for helping us out! We're grateful, as always 💖
|
||||
%br
|
||||
%em —Matchu
|
||||
|
||||
#outfit-forms
|
||||
- localized_cache :action_suffix => 'outfit_forms_intro' do
|
||||
|
|
|
@ -31,11 +31,9 @@ en-MEEP:
|
|||
login: Meep in
|
||||
|
||||
footer:
|
||||
blog: Bleep
|
||||
source_code: Source Meep
|
||||
terms: Terms of Use (meeped Sep 2022)
|
||||
contact: Meeptact
|
||||
suggestions: Suggesteeps
|
||||
email: Questions, comments, meepits
|
||||
copyright: Images © 1999–%{year} World of Neopets, Inc. All Rights Reserved.
|
||||
Used With Permission. Meep.
|
||||
|
|
|
@ -31,11 +31,10 @@ en:
|
|||
login: Log in
|
||||
|
||||
footer:
|
||||
blog: Blog
|
||||
source_code: Source Code
|
||||
terms: Terms of Use (updated %{date})
|
||||
about_neopass: About NeoPass
|
||||
contact: Contact
|
||||
suggestions: Suggestions
|
||||
email: Questions, comments, bugs
|
||||
copyright: Images © 1999–%{year} World of Neopets, Inc. All Rights Reserved.
|
||||
Used With Permission
|
||||
|
|
|
@ -24,10 +24,8 @@ pt:
|
|||
logout: Sair
|
||||
login: Entrar
|
||||
footer:
|
||||
blog: Blog
|
||||
source_code: Código Fonte
|
||||
contact: Contato
|
||||
suggestions: Sugestões
|
||||
email: Perguntas, comentários, erros
|
||||
copyright: Images © 1999–%{year} World of Neopets, Inc. All Rights Reserved. Used With Permission
|
||||
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.
|
||||
|
||||
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|
|
||||
t.integer "species_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.boolean "is_manually_nc", default: false, 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.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"
|
||||
|
@ -149,7 +149,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_04_21_033509) do
|
|||
end
|
||||
|
||||
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.string "pet_name", limit: 128, null: false
|
||||
end
|
||||
|
|
|
@ -178,9 +178,9 @@
|
|||
when: not ruby_dir.stat.exists
|
||||
|
||||
- name: Add Ruby 3.3.0 to the global PATH, for developer convenience
|
||||
lineinfile:
|
||||
dest: /etc/profile
|
||||
line: 'PATH="/opt/ruby-3.3.0/bin:$PATH" # Added by impress deploy setup script'
|
||||
copy:
|
||||
dest: /etc/profile.d/ruby_path.sh
|
||||
content: PATH="/opt/ruby-3.3.0/bin:$PATH"
|
||||
|
||||
- name: Install system dependencies for impress's Ruby gems
|
||||
apt:
|
||||
|
@ -444,7 +444,7 @@
|
|||
weekday: "0" # Sunday
|
||||
hour: "1" # 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:
|
||||
- name: Reload nginx
|
||||
|
|
|
@ -30,6 +30,9 @@ namespace :public_data do
|
|||
# Don't lock the database to do it!
|
||||
args << "--single-transaction"
|
||||
|
||||
# Skip dumping tablespaces, so this requires fewer privileges.
|
||||
args << "--no-tablespaces"
|
||||
|
||||
# Dump the public data tables from the primary database.
|
||||
args << config.fetch(:database)
|
||||
args += %w(species colors zones) # manual constants
|
||||
|
@ -53,7 +56,7 @@ namespace :public_data do
|
|||
|
||||
# Link this latest dump as `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)
|
||||
|
||||
puts "Linked dump to #{latest_path}"
|
||||
|
|
|
@ -48,5 +48,6 @@
|
|||
"dev": "yarn build:dev --watch",
|
||||
"lint": "eslint app/javascript",
|
||||
"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