mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-01-30 14:30:08 +08:00
feat(frontend): make admin log page wider
This commit is contained in:
parent
c6b4f16a36
commit
0ff65d9f8f
@ -2,6 +2,7 @@ package io.papermc.hangar.controller.extras.pagination.filters.log;
|
||||
|
||||
import io.papermc.hangar.controller.extras.pagination.Filter;
|
||||
import io.papermc.hangar.controller.extras.pagination.filters.log.LogSubjectFilter.LogSubjectFilterInstance;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jdbi.v3.core.statement.SqlStatement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -38,8 +39,10 @@ public class LogSubjectFilter implements Filter<LogSubjectFilterInstance> {
|
||||
|
||||
@Override
|
||||
public void createSql(StringBuilder sb, SqlStatement<?> q) {
|
||||
sb.append(" AND la.s_name = :subjectName");
|
||||
q.bind("subjectName", this.subjectName);
|
||||
if (StringUtils.isNotBlank(this.subjectName)) {
|
||||
sb.append(" AND la.s_name = :subjectName");
|
||||
q.bind("subjectName", this.subjectName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package io.papermc.hangar.controller.extras.pagination.filters.log;
|
||||
|
||||
import io.papermc.hangar.controller.extras.pagination.Filter;
|
||||
import io.papermc.hangar.controller.extras.pagination.filters.log.LogUserFilter.LogUserFilterInstance;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jdbi.v3.core.statement.SqlStatement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -37,8 +38,10 @@ public class LogUserFilter implements Filter<LogUserFilterInstance> {
|
||||
|
||||
@Override
|
||||
public void createSql(StringBuilder sb, SqlStatement<?> q) {
|
||||
sb.append(" AND la.user_name = :userName");
|
||||
q.bind("userName", userName);
|
||||
if (StringUtils.isNotBlank(userName)) {
|
||||
sb.append(" AND la.user_name = :userName");
|
||||
q.bind("userName", userName);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -11,7 +11,7 @@ const key = computed<string>(() => route.params.user as string);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main>
|
||||
<main :data-page="route.name">
|
||||
<Header />
|
||||
<Container class="min-h-[80vh]">
|
||||
<slot />
|
||||
|
@ -188,3 +188,9 @@ useHead(useSeo(i18n.t("userActionLog.title"), null, route, null));
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
main[data-page="admin-log"] .max-w-screen-xl {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user