Skip to content

Commit f514adb

Browse files
committed
feat: style improvements
1 parent 05c8c9b commit f514adb

File tree

10 files changed

+27
-15
lines changed

10 files changed

+27
-15
lines changed

api/src/core/sso/sso-remove.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { existsSync, renameSync, unlinkSync } from 'node:fs';
22

3-
import { cliLogger } from '@app/core/log';
3+
import { logger } from '@app/core/log';
44

55
export const removeSso = () => {
66
const path = '/usr/local/emhttp/plugins/dynamix/include/.login.php';
@@ -13,8 +13,8 @@ export const removeSso = () => {
1313
unlinkSync(path);
1414
}
1515
renameSync(backupPath, path);
16-
cliLogger.debug('SSO login file restored.');
16+
logger.debug('SSO login file restored.');
1717
} else {
18-
cliLogger.debug('No SSO login file backup found.');
18+
logger.debug('No SSO login file backup found.');
1919
}
2020
};

api/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ try {
108108
logger.info('SSO setup complete');
109109
} else {
110110
await removeSso();
111-
logger.info('SSO removed');
112111
}
113112
} catch (err) {
114113
logger.error('Failed to setup SSO with error: %o', err);

api/src/unraid-api/cli/sso/add-sso-user.command.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export class AddSSOUserCommand extends CommandRunner {
4040
writeConfigSync('flash');
4141
this.logger.info(`User added ${options.username}`);
4242
if (shouldRestart) {
43-
this.logger.info('Restarting the Unraid API to enable to SSO button');
43+
this.logger.info('Restarting the Unraid API in 5 seconds to enable the SSO button');
44+
await new Promise(resolve => setTimeout(resolve, 5000));
4445
await this.restartCommand.run([]);
4546
}
4647
}

api/src/unraid-api/cli/start.command.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ export class StartCommand extends CommandRunner {
1717

1818
async run(_: string[], options: StartCommandOptions): Promise<void> {
1919
this.logger.info('Starting the Unraid API');
20+
21+
// Update PM2 first if necessary
22+
const { stderr: updateErr, stdout: updateOut } = await execa(`${PM2_PATH} update`);
23+
if (updateOut) {
24+
this.logger.log(updateOut);
25+
}
26+
if (updateErr) {
27+
this.logger.error('PM2 Update Error: ' + updateErr);
28+
process.exit(1);
29+
}
30+
2031
const envLog = options['log-level'] ? `LOG_LEVEL=${options['log-level']}` : '';
2132
const { stderr, stdout } = await execa(`${envLog} ${PM2_PATH}`.trim(), [
2233
'start',

unraid-ui/src/components/common/sheet/sheet.variants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { cva } from "class-variance-authority";
22

33
export const sheetVariants = cva(
4-
"fixed z-50 bg-background gap-4 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
4+
"fixed z-50 bg-background gap-4 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 border-border",
55
{
66
variants: {
77
side: {

unraid-ui/src/theme/preset.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ export const unraidPreset = {
1414
},
1515
},
1616
extend: {
17+
borderColor: {
18+
DEFAULT: "hsl(var(--border))",
19+
},
1720
fontFamily: {
1821
sans: "clear-sans,ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",
1922
},

web/assets/main.css

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ body {
3939
@tailwind utilities;
4040

4141
@layer base {
42-
* {
43-
@apply border-border;
44-
}
4542
body {
4643
@apply bg-background text-foreground;
4744
}

web/components/Notifications/List.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async function onLoadMore() {
7070
<div
7171
v-if="notifications?.length > 0"
7272
v-infinite-scroll="[onLoadMore, { canLoadMore: () => canLoadMore }]"
73-
class="divide-y divide-gray-200 px-7 flex flex-col overflow-y-scroll flex-1 min-h-0"
73+
class="divide-y px-7 flex flex-col overflow-y-scroll flex-1 min-h-0"
7474
>
7575
<NotificationsItem
7676
v-for="notification in notifications"

web/components/shadcn/sheet/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export { default as SheetDescription } from './SheetDescription.vue'
1010
export { default as SheetFooter } from './SheetFooter.vue'
1111

1212
export const sheetVariants = cva(
13-
'fixed z-50 bg-muted dark:bg-background gap-4 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
13+
'fixed z-50 bg-muted dark:bg-background gap-4 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 border-border',
1414
{
1515
variants: {
1616
side: {

web/store/theme.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const defaultColors: Record<string, ThemeVariables> = {
3232
'--popover-foreground': '0 0% 98%',
3333
'--card': '0 0% 14.9%',
3434
'--card-foreground': '0 0% 98%',
35-
'--border': '0 0% 14.9%',
35+
'--border': '0 0% 20%',
3636
'--input': '0 0% 14.9%',
3737
'--primary': '24 100% 50%',
3838
'--primary-foreground': '0 0% 98%',
@@ -74,19 +74,20 @@ export const defaultColors: Record<string, ThemeVariables> = {
7474
},
7575
} as const;
7676

77-
export const DARK_THEMES = ['black', 'azure'] as const;
78-
77+
// used to swap the UPC text color when using the azure or gray theme
78+
export const DARK_THEMES = ['black', 'gray'] as const;
7979

8080
export const useThemeStore = defineStore('theme', () => {
8181
// State
8282
const theme = ref<Theme | undefined>();
8383

8484
const activeColorVariables = ref<ThemeVariables>(defaultColors.light);
8585
// Getters
86+
8687
const darkMode = computed<boolean>(
8788
() => DARK_THEMES.includes(theme.value?.name as (typeof DARK_THEMES)[number]) ?? false
8889
);
89-
// used to swap the UPC text color when using the azure or gray theme
90+
9091
const bannerGradient = computed(() => {
9192
if (!theme.value?.banner || !theme.value?.bannerGradient) {
9293
return undefined;

0 commit comments

Comments
 (0)