Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ def write_listing(i, item_index, _exp_count):
st.image(listing["photo_urls"])
val_item_type = st.radio("Device", ["bad device"] + PHONES, horizontal=True, key=f"ver_{i}", index=item_index)
val_grade = st.radio("Grade", GRADES, horizontal=True, key=f"grade_{i}", index=1)
val_size = st.radio("Size/Pro", SIZES, horizontal=True, key=f"size_{i}", index=1)

# Creating columns for different options
st.markdown("<div style='padding-bottom: 0.25rem; font-size: 14px;'>Damage</div>", unsafe_allow_html=True)
back_col, cam_col = st.columns(2)
Expand All @@ -114,6 +116,7 @@ def write_listing(i, item_index, _exp_count):
with lock_col:
with st.container(border=True):
val_lock = st.checkbox("ICloud Lock", key=f"lock_{i}")

st.button("Next", on_click=_next, args=(_exp_count,), key=f"next_{i}", use_container_width=True)
# Returning selected values as a dictionary
results = {
Expand Down
7 changes: 5 additions & 2 deletions offerup/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


PHONES = list(reversed(["iphone 11", "iphone 12", "iphone 13", "iphone 14", "iphone 15"]))

SIZES = list(reversed(["Pro", "ProMax", "Reg", "Plus", ""]))
if platform.system() == 'Windows':
CHROME_DATA_PATH = f"user-data-dir={os.path.expanduser('~')}\\AppData\\Local\\Google\\Chrome\\User Data"
else:
Expand All @@ -26,8 +26,9 @@ class Config:
loaded = False # dotenv loaded

valid_iphone_models: list[str]
valid_sizes: list2[str]
location: tuple[str, str]
listing_limit: int
listing_limit: intq
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
listing_limit: intq
listing_limit: int


chrome_data_path = CHROME_DATA_PATH
firefox_data_path = FIREFOX_DATA_PATH
Expand All @@ -52,6 +53,7 @@ def __getitem__(self, item):
def _default(cls) -> Self:
return cls(
valid_iphone_models=PHONES,
valid_iphone_size=SIZE,
location=("Atlanta", "Georgia"),
listing_limit=30,
)
Expand All @@ -62,6 +64,7 @@ def _test(cls) -> Self:
return cls(
# valid_iphone_models=["Gamer Guy Bath water"],
valid_iphone_models=PHONES,
valid_iphone_size=MODELS,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
valid_iphone_size=MODELS,
valid_iphone_size=SIZE,

location=("Atlanta", "Georgia"),
listing_limit=10,
)
Expand Down