adminforth 1.0.86 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ import path from 'path';
17
17
  import { promisify } from 'util';
18
18
  import { ADMIN_FORTH_ABSOLUTE_PATH } from './utils.js';
19
19
  import { getComponentNameFromPath } from './utils.js';
20
- import { styles } from '../styles.js';
20
+ import { styles } from './styles.js';
21
21
  let TMP_DIR;
22
22
  try {
23
23
  TMP_DIR = os.tmpdir();
@@ -13,7 +13,7 @@ export const useCoreStore = defineStore('core', () => {
13
13
  const resourceOptions = ref(null);
14
14
  const resourceColumnsError = ref('');
15
15
  const resourceColumnsId = ref(null);
16
- const user = ref(null);
16
+ const adminUser = ref(null);
17
17
 
18
18
  async function fetchMenuAndResource() {
19
19
  const resp = await callAdminForthApi({
@@ -29,10 +29,8 @@ export const useCoreStore = defineStore('core', () => {
29
29
  return acc;
30
30
  }, {});
31
31
  config.value = resp.config;
32
- user.value = resp.user;
32
+ adminUser.value = resp.user;
33
33
  console.log('🌍 AdminForth v', resp.version);
34
-
35
-
36
34
  }
37
35
 
38
36
  async function fetchRecord({ resourceId, primaryKey }) {
@@ -109,12 +107,12 @@ export const useCoreStore = defineStore('core', () => {
109
107
 
110
108
  const username = computed(() => {
111
109
  const usernameField = config.value.usernameField;
112
- return user.value && user.value[usernameField];
110
+ return adminUser.value && adminUser.value[usernameField];
113
111
  });
114
112
 
115
113
  const userFullname = computed(() => {
116
114
  const userFullnameField = config.value.userFullnameField;
117
- return user.value && user.value[userFullnameField];
115
+ return adminUser.value && adminUser.value[userFullnameField];
118
116
  })
119
117
 
120
118
 
@@ -134,5 +132,6 @@ export const useCoreStore = defineStore('core', () => {
134
132
  resourceOptions,
135
133
  logout,
136
134
  resource,
135
+ adminUser,
137
136
  }
138
137
  })
@@ -53,7 +53,7 @@ Users table will be used to store a credentials for login into backoffice itself
53
53
 
54
54
  We will use schema with different column types for apartments to show many of AdminForth features.
55
55
 
56
- Check [AdminForthConfig](/docs/api/type-aliases/AdminForthConfig.md) for all possible AdminForth Configs.
56
+ Check [AdminForthConfig](/docs/api/AdminForthConfig/type-aliases/AdminForthConfig.md) for all possible options.
57
57
 
58
58
 
59
59
  # Setting up a demo
@@ -32,8 +32,8 @@ export default function Home(): JSX.Element {
32
32
  const {siteConfig} = useDocusaurusContext();
33
33
  return (
34
34
  <Layout
35
- title={`Hello from ${siteConfig.title}`}
36
- description="Description will go into a meta tag in <head />">
35
+ title={`${siteConfig.title}`}
36
+ description="OpenSource Tailwind Admin Panel extendable with Vue3 and typescript!">
37
37
  <HomepageHeader />
38
38
  <main>
39
39
  <HomepageFeatures />
@@ -9,7 +9,7 @@ import { promisify } from 'util';
9
9
  import AdminForth from '../index.js';
10
10
  import { ADMIN_FORTH_ABSOLUTE_PATH } from './utils.js';
11
11
  import { getComponentNameFromPath } from './utils.js';
12
- import { styles } from '../styles.js'
12
+ import { styles } from './styles.js'
13
13
  import { CodeInjectorType } from '../types/AdminForthConfig.js';
14
14
 
15
15
 
@@ -0,0 +1,52 @@
1
+ export const styles = () => `
2
+
3
+ "colors": {
4
+ "html-bg": "#FFFFFF", // Changed to white
5
+ "header-bg": "#EDEDED", // Light grey
6
+ "header-bg-hover": "#D3D3D3", // Light grey hover
7
+ "header-text": "#333333", // Dark grey text
8
+ "header-text-hover": "#333333", // Dark grey text hover
9
+ "header-icons": "#333333", // Dark grey icons
10
+ "header-icons-hover": "#333333", // Dark grey icons hover
11
+ "header-logo-color": "#333333", // Dark grey logo
12
+ "header-border-color": "#CCCCCC", // Light grey border
13
+
14
+ "nav-menu-bg": "#F5F5F5", // Very light grey
15
+ "nav-menu-bg-hover": "#E0E0E0", // Light grey hover
16
+ "nav-menu-bg-active": "#CCCCCC", // Light grey active
17
+ "nav-menu-hover": "#E0E0E0", // Light grey hover
18
+ "nav-menu-active": "#CCCCCC", // Light grey active
19
+ "nav-menu-active-text": "#333333", // Dark grey active text
20
+ "nav-menu-text": "#333333", // Dark grey text
21
+ "nav-menu-text-hover": "#333333", // Dark grey text hover
22
+ "nav-menu-text-active": "#333333", // Dark grey text active
23
+ "nav-menu-devider": "#E0E0E0", // Light grey divider
24
+ "nav-menu-icons": "#333333", // Dark grey icons
25
+ "nav-menu-heading": "#333333", // Dark grey heading
26
+
27
+ "list-view-bg": "#FFFFFF", // White background
28
+ "list-view-table-bg": "#FFFFFF", // White table background
29
+ "list-view-table-heading": "#F5F5F5", // Very light grey heading
30
+ "list-view-table-heading-text": "#333333", // Dark grey heading text
31
+ "list-view-table-text": "#333333", // Dark grey text
32
+ "list-view-table-row-hover": "#F0F0F0", // Very light grey row hover
33
+ "list-view-bread-crumbs-text": "#666666", // Medium grey bread crumbs
34
+ "list-view-border-color": "#DDDDDD", // Light grey border
35
+
36
+ "form-view-bg": "#FFFFFF", // White form background
37
+ "form-view-border-color": "#F5F5F5", // Very light grey border
38
+ "form-view-heading": "#EDEDED" // Dark grey heading
39
+ },
40
+ "boxShadow": {
41
+ "custom-light": "0 4px 8px rgba(0, 0, 0, 0.1)", // Lighter shadow
42
+ "header-shadow": "0 4px 8px rgba(0, 0, 0, 0.1)", // Lighter shadow
43
+ "list-table-shadow": "0 4px 8px rgba(0, 0, 0, 0.1)", // Lighter shadow
44
+ "resourse-form-shadow": "0 4px 8px rgba(0, 0, 0, 0.1)" // Lighter shadow
45
+ },
46
+ "fontSize": {
47
+ "header-text-size": "1rem"
48
+ },
49
+ "borderRadius": {
50
+ "default": "2px"
51
+ }
52
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.0.86",
3
+ "version": "1.1.2",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,7 +13,7 @@ export const useCoreStore = defineStore('core', () => {
13
13
  const resourceOptions = ref(null);
14
14
  const resourceColumnsError = ref('');
15
15
  const resourceColumnsId = ref(null);
16
- const user = ref(null);
16
+ const adminUser = ref(null);
17
17
 
18
18
  async function fetchMenuAndResource() {
19
19
  const resp = await callAdminForthApi({
@@ -29,10 +29,8 @@ export const useCoreStore = defineStore('core', () => {
29
29
  return acc;
30
30
  }, {});
31
31
  config.value = resp.config;
32
- user.value = resp.user;
32
+ adminUser.value = resp.user;
33
33
  console.log('🌍 AdminForth v', resp.version);
34
-
35
-
36
34
  }
37
35
 
38
36
  async function fetchRecord({ resourceId, primaryKey }) {
@@ -109,12 +107,12 @@ export const useCoreStore = defineStore('core', () => {
109
107
 
110
108
  const username = computed(() => {
111
109
  const usernameField = config.value.usernameField;
112
- return user.value && user.value[usernameField];
110
+ return adminUser.value && adminUser.value[usernameField];
113
111
  });
114
112
 
115
113
  const userFullname = computed(() => {
116
114
  const userFullnameField = config.value.userFullnameField;
117
- return user.value && user.value[userFullnameField];
115
+ return adminUser.value && adminUser.value[userFullnameField];
118
116
  })
119
117
 
120
118
 
@@ -134,5 +132,6 @@ export const useCoreStore = defineStore('core', () => {
134
132
  resourceOptions,
135
133
  logout,
136
134
  resource,
135
+ adminUser,
137
136
  }
138
137
  })
File without changes