styles n stuff
This commit is contained in:
1 parent
6b8ebe3f35
commit
470270954f
7 files changed
+25
-10
No files matched your search
@@ -3,7 +3,10 @@
|
|||||||
push offers
|
push offers
|
||||||
cover off admin routes and commands
|
cover off admin routes and commands
|
||||||
|
|
||||||
decline / unaccept
|
|
||||||
minimum quality
|
minimum quality
|
||||||
|
|
||||||
listen / notify
|
listen / notify
|
||||||
|
on offers
|
||||||
|
notify admins
|
||||||
|
|
||||||
|
|
||||||
@@ -29,6 +29,7 @@ async function start() {
|
|||||||
} = createServices(log);
|
} = createServices(log);
|
||||||
|
|
||||||
// events.emit(Events.StartupSync);
|
// events.emit(Events.StartupSync);
|
||||||
|
events.emit(Events.ListingsUpdated);
|
||||||
|
|
||||||
api.listen();
|
api.listen();
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -52,7 +52,10 @@ export default function createPg(log: Log, prisma: PrismaClient): Pg {
|
|||||||
|
|
||||||
async function userOffers(user: User) {
|
async function userOffers(user: User) {
|
||||||
return prisma.offer.findMany({
|
return prisma.offer.findMany({
|
||||||
where: { userId: user.id },
|
where: {
|
||||||
|
userId: user.id,
|
||||||
|
status: { not: Status.Declined }
|
||||||
|
},
|
||||||
include: {
|
include: {
|
||||||
want: true,
|
want: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -67,6 +67,11 @@ export default function createRpc(log: Log, pg: Pg, user: User, ws, discogs, off
|
|||||||
async function receive(message: any): Promise<RpcMessage> {
|
async function receive(message: any): Promise<RpcMessage> {
|
||||||
const [msgType, params] = message;
|
const [msgType, params] = message;
|
||||||
|
|
||||||
|
if (!user) {
|
||||||
|
log.debug('anon rpc call');
|
||||||
|
return [RpcMessageType.Pong, []];
|
||||||
|
}
|
||||||
|
|
||||||
if (msgType !== RpcMessageType.Ping) log.info({ msgType, params }, 'rpc message');
|
if (msgType !== RpcMessageType.Ping) log.info({ msgType, params }, 'rpc message');
|
||||||
|
|
||||||
// // this sucks but can't figure out how to convince typescript to agree yet
|
// // this sucks but can't figure out how to convince typescript to agree yet
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ export default function Offer(offer) {
|
|||||||
: 'Accept';
|
: 'Accept';
|
||||||
|
|
||||||
const negBtn = accepted
|
const negBtn = accepted
|
||||||
? 'Cancel'
|
? <button onClick={() => setStatus('Pending')} class='neg'>Cancel</button>
|
||||||
: 'decline';
|
: <button onClick={() => setStatus('Declined')} class='neg'>Decline</button>;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="offer">
|
<div class="offer">
|
||||||
@@ -37,7 +37,7 @@ export default function Offer(offer) {
|
|||||||
</section>
|
</section>
|
||||||
<img src={details.thumb} />
|
<img src={details.thumb} />
|
||||||
<button onClick={() => setStatus('Accepted')} disabled={accepted} class={classes} >{btnText}</button>
|
<button onClick={() => setStatus('Accepted')} disabled={accepted} class={classes} >{btnText}</button>
|
||||||
<button class='neg'>{negBtn}</button>
|
{negBtn}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -31,8 +31,10 @@ function Item({ item }) {
|
|||||||
<a href={item.listing.data.uri} target="_blank" >
|
<a href={item.listing.data.uri} target="_blank" >
|
||||||
<h4>{item.listing.data.release.description}</h4>
|
<h4>{item.listing.data.release.description}</h4>
|
||||||
</a>
|
</a>
|
||||||
|
<h5>{item.user.email}</h5>
|
||||||
<h5 class='alt-text'>{item.total}</h5>
|
<h5 class='alt-text'>{item.total}</h5>
|
||||||
<h5>{item.status}</h5>
|
<h5>{item.status}</h5>
|
||||||
|
<label>Set Status:</label>
|
||||||
<select onChange={onChange}>
|
<select onChange={onChange}>
|
||||||
{statuses}
|
{statuses}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -300,22 +300,23 @@ header {
|
|||||||
flex-flow: row;
|
flex-flow: row;
|
||||||
|
|
||||||
.bundle {
|
.bundle {
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 2fr 1fr;
|
|
||||||
margin-bottom: var(--base-spacing-double);
|
margin-bottom: var(--base-spacing-double);
|
||||||
|
|
||||||
|
section {
|
||||||
|
margin-bottom: var(--base-spacing);
|
||||||
|
}
|
||||||
|
|
||||||
.items {
|
.items {
|
||||||
grid-column: 1 / -1;
|
// grid-column: 1 / -1;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(5, 1fr);
|
grid-template-columns: repeat(5, 1fr);
|
||||||
align-items: stretch;
|
|
||||||
|
|
||||||
div {
|
div {
|
||||||
margin-right: var(--base-spacing);
|
margin-right: var(--base-spacing);
|
||||||
margin-bottom: var(--base-spacing);
|
margin-bottom: var(--base-spacing);
|
||||||
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: 1fr 1fr 1fr;
|
// grid-template-rows: 1fr 1fr 1fr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user