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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ any help with getting started, I'm available most days.

1. Install Docker and Docker Compose - [Windows install instructions](https://docs.docker.com/docker-for-windows/install/)

1. Install the dotnet SDK, currently 8.x
1. Install the dotnet SDK, currently 9.x

1. Log in or sign up for a [Battle.Net Developer](https://develop.battle.net) account

Expand Down Expand Up @@ -119,7 +119,7 @@ any help with getting started, I'm available most days.
1. Start the initial data import/build, this will take a while:

```bash
cd app/tool/
cd apps/tool/
dotnet run all
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
<code>level=60 | &lt;=,&lt;,=,&gt;,&gt;=</code>
</dd>

<dt>Last seen (days)</dt>
<dd>
<code>seen&lt;=7 | &lt;=,&lt;,=,&gt;,&gt;=</code>
</dd>

<dt>Item Level</dt>
<dd>
<code>ilevel&gt;=400 | &lt;=,&lt;,=,&gt;,&gt;=</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
{ id: 'gold', name: 'Gold' },
{ id: 'itemlevel', name: 'Item level' },
{ id: 'level', name: 'Level' },
{ id: 'seen', name: 'Last seen' },
];

let sortByChoices: SettingsChoice[] = $derived([
Expand Down
13 changes: 13 additions & 0 deletions apps/frontend/utils/characters/use-character-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ export function useCharacterFilter(
);
}

// Last seen (in days)
match = part.match(/^seen(<|<=|=|>=|>)(\d+)$/);
if (match) {
const now = Math.floor(Date.now() / 1000);
const days = parseInt(match[2]);
const diff = (now - char.lastSeenAddonUnix) / 86400;
return compareValues(
match[1].toString(),
diff,
days
);
}

// Item level
match = part.match(/^(itemlevel|ilevel|ilvl)(<|<=|=|>=|>)(\d+)$/);
if (match) {
Expand Down
2 changes: 2 additions & 0 deletions apps/frontend/utils/get-character-sort-func.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export const getCharacterSortFunc = (prefixFunc?: SortValueFunction, viewSortBy?
'0'
)
);
} else if (thing === 'seen') {
out.push(leftPad(2000000000 - char.lastSeenAddonUnix, 10, '0'));
} else if (thing === 'level') {
// in descending order
const levelData = getCharacterLevel(char);
Expand Down