mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-22 10:51:02 +01:00
feat: sort / description improvements on scoring page (#147)
- swap upgrade / format descriptions - default to advanced format view - persist view choice after modal closes / tab changes
This commit is contained in:
@@ -173,11 +173,6 @@ export const pushFiles = async () => {
|
||||
const response = await axios.post(`/api/git/push`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.log(
|
||||
'Push error full structure:',
|
||||
JSON.stringify(error.response?.data, null, 2)
|
||||
);
|
||||
|
||||
if (error.response?.data?.error) {
|
||||
return error.response.data;
|
||||
}
|
||||
|
||||
@@ -76,8 +76,6 @@ export const updateArrConfig = async (id, config) => {
|
||||
export const getArrConfigs = async () => {
|
||||
try {
|
||||
const response = await axios.get(`/api/arr/config`);
|
||||
console.log('Raw axios response:', response);
|
||||
console.log('Response data:', response.data);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error('Error fetching arr configs:', error);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useState} from 'react';
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import SearchBar from '@ui/DataBar/SearchBar';
|
||||
import useSearch from '@hooks/useSearch';
|
||||
@@ -7,9 +7,21 @@ import BasicView from './BasicView';
|
||||
import {ChevronDown, Settings, List} from 'lucide-react';
|
||||
|
||||
const FormatSettings = ({formats, onScoreChange}) => {
|
||||
const [isAdvancedView, setIsAdvancedView] = useState(false);
|
||||
// Initialize state from localStorage, falling back to true if no value is stored
|
||||
const [isAdvancedView, setIsAdvancedView] = useState(() => {
|
||||
const stored = localStorage.getItem('formatSettingsView');
|
||||
return stored === null ? true : JSON.parse(stored);
|
||||
});
|
||||
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
||||
|
||||
// Save to localStorage whenever isAdvancedView changes
|
||||
useEffect(() => {
|
||||
localStorage.setItem(
|
||||
'formatSettingsView',
|
||||
JSON.stringify(isAdvancedView)
|
||||
);
|
||||
}, [isAdvancedView]);
|
||||
|
||||
const {
|
||||
searchTerms,
|
||||
currentInput,
|
||||
|
||||
@@ -25,8 +25,8 @@ const ProfileScoringTab = ({
|
||||
Upgrade Settings
|
||||
</h2>
|
||||
<p className='text-xs text-gray-500 dark:text-gray-400'>
|
||||
Assign scores to different formats to control
|
||||
download preferences
|
||||
Configure when upgrades should be downloaded and
|
||||
what scores are required
|
||||
</p>
|
||||
</div>
|
||||
<div className='flex flex-col items-end space-y-1'>
|
||||
@@ -70,8 +70,9 @@ const ProfileScoringTab = ({
|
||||
Format Settings
|
||||
</h2>
|
||||
<p className='text-xs text-gray-500 dark:text-gray-400'>
|
||||
Configure when upgrades should be downloaded and what
|
||||
scores are required
|
||||
Assign scores to different formats to control download
|
||||
preferences. View formats in the traditional arr style,
|
||||
or in filtered A/V grids.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ import React from 'react';
|
||||
import {GitCommit, Code, FileText, Settings, File} from 'lucide-react';
|
||||
|
||||
const PushRow = ({change}) => {
|
||||
console.log('Push Row Change:', change);
|
||||
|
||||
const getTypeIcon = type => {
|
||||
switch (type) {
|
||||
case 'Regex Pattern':
|
||||
|
||||
Reference in New Issue
Block a user