Commit Graph

34 Commits (e13b4977bdc5769f6a82461de0be692944bac6ad)

Author SHA1 Message Date
Ryan Wang 539fd8fd14
refactor: improve login-related logic (#617)
#### What type of PR is this?

/kind improvement
/milestone 2.0

#### What this PR does / why we need it:

适配 https://github.com/halo-dev/halo/pull/2453

1. 将生产构建的 base url 更改为 console
2. 优化登录之后跳转的逻辑。

#### Which issue(s) this PR fixes:

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-admin

测试方式:

1. 在本地根据此 PR 构建生产版本(pnpm build)
2. 根据 https://github.com/halo-dev/halo/pull/2453#issue-1381947867 中的描述修改配置文件。
3. 访问 http://localhost:8090/console

#### Does this PR introduce a user-facing change?

```release-note
None
```
2022-09-22 12:46:12 +00:00
Ryan Wang 32356070e4 refactor: move api-client to core
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-09-22 16:46:32 +08:00
Ryan Wang cd33946ca3
refactor: method parameters of api client (#605)
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->

#### What type of PR is this?

/kind improvement
/milestone 2.0

<!--
添加其中一个类别:
Add one of the following kinds:

/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind optimization

适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:

/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->

#### What this PR does / why we need it:

修改 api-client 的请求参数结构,改为所有参数由一个对象包裹,而不是将各个参数作为方法的参数,防止因为后端参数结构发生改变,或者生成 api-client 时参数顺序发生改变导致请求异常。如:

```diff
await apiClient.extension.storage.group.updatestorageHaloRunV1alpha1Group(
-        formState.value.metadata.name,
-        formState.value
+        {
+          name: formState.value.metadata.name,
+          group: formState.value,
+        }
      );
```

#### Which issue(s) this PR fixes:

<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.

用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
None

#### Screenshots:

<!--
如果此 PR 有 UI 的改动,最好截图说明这个 PR 的改动。
If there are UI changes to this PR, it is best to take a screenshot to illustrate the changes to this PR.

eg.

Before:

![screenshot-before](https://user-images.githubusercontent.com/screenshot.png)

After:

![screenshot-after](https://user-images.githubusercontent.com/screenshot.png)
-->

None

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-admin 

#### Does this PR introduce a user-facing change?

<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->

```release-note
None
```
2022-09-06 02:26:11 +00:00
Ryan Wang 7c3692c5ed feat: support for dynamically adding child routes to a route
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-08-09 12:05:40 +08:00
Ryan Wang de119d35ff refactor: remove plugin loading status panel
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-07-29 11:41:01 +08:00
Ryan Wang 7405b57c6d feat: add plugin uninstall support
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-07-26 11:45:00 +08:00
Ryan Wang f99deaec83 feat: add plugin loading status panel
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-07-25 21:14:56 +08:00
Ryan Wang 2a1be5603d feat: handling front-end plugin loading failure exceptions
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-07-25 20:02:52 +08:00
Ryan Wang 3515108cab chore: update the base url of the plugin resources
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-07-25 10:41:24 +08:00
Ryan Wang 44f09fd2c1 feat: add set api url support
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-07-20 10:56:40 +08:00
Ryan Wang d154fc412e feat: ui permission binding
see https://github.com/halo-dev/halo/pull/2260
2022-07-19 14:07:28 +08:00
Ryan Wang d3d934093d feat: refine roles management
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-07-19 11:18:47 +08:00
Ryan Wang e8fd09205d feat: support permission judgment of interface elements and routes 2022-07-15 16:26:27 +08:00
Ryan Wang 74274ef78b refactor: change role annotations name
change `plugin.halo.run/dependencies` to `rbac.authorization.halo.run/dependencies`
2022-07-14 18:39:19 +08:00
Ryan Wang 9569b43dab refactor: response structure of Extension list API
see halo-dev/halo#2244
2022-07-14 16:48:54 +08:00
Ryan Wang 284edbbee1 refactor: removal of plugin batch operation
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-07-13 17:39:31 +08:00
Ryan Wang 700e12cafd refactor: api client
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-07-13 15:36:21 +08:00
Ryan Wang 7655134732 refactor: update get current login user api
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-07-08 14:40:14 +08:00
Ryan Wang ace341efef feat: get the currently logged-in user information
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-07-04 12:33:00 +08:00
Ryan Wang 32955a4050 feat: add cookie header when requesting the api
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-06-30 16:20:08 +08:00
Ryan Wang efad1d8268 feat: admin shared package support api client
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-06-27 15:31:16 +08:00
Ryan Wang 095c74c40f refactor: move route layouts to @halo-dev/admin-shared
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-06-24 23:05:49 +08:00
Ryan Wang 36e3cd92c3 feat: support load plugin's stylesheet
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-06-23 21:22:24 +08:00
Ryan Wang 72e40542f8
feat: plugin management (#583)
* chore: remove unnecessary files

Signed-off-by: Ryan Wang <i@ryanc.cc>

* feat: plugin management

Signed-off-by: Ryan Wang <i@ryanc.cc>

* feat: refine plugin detail page

Signed-off-by: Ryan Wang <i@ryanc.cc>

* feat: refine plugin detail page

Signed-off-by: Ryan Wang <i@ryanc.cc>

* fix: theme plugin router link

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Update src/modules/system/plugins/PluginList.vue

Co-authored-by: John Niang <johnniang@fastmail.com>

* feat: plugin detail page support start/stop plugin

Signed-off-by: Ryan Wang <i@ryanc.cc>

Co-authored-by: John Niang <johnniang@fastmail.com>
2022-06-23 03:28:23 +00:00
Ryan Wang 690802c52a chore: global loading of base dependencies 2022-06-20 15:08:17 +08:00
Ryan Wang d8c14531e0 feat: bundle core modules 2022-06-20 12:25:36 +08:00
Ryan Wang 515ec78842 feat: use definePlugin function to define a plugin object
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-06-17 15:00:14 +08:00
Ryan Wang 8bc6ff798e
refactor: load admin core as modules (#582)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-06-17 06:12:15 +00:00
Ryan Wang b9f5d4fb6b perf: optimize the code of main.ts
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-06-16 17:01:18 +08:00
Ryan Wang d4b64f203d
chore: use pnpm's workspace feature to manage base components (#579) 2022-06-14 15:56:55 +08:00
Ryan Wang 486b4615e5 perf: improve dashboard page ui
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-05-27 17:28:25 +08:00
Ryan Wang 43945378d5 feat: add filters dropdown ui
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-05-26 17:37:08 +08:00
Ryan Wang 0b1e087c43
chore: configure tailwind css (#504)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-03-11 11:51:40 +08:00
Ryan Wang 020db1422e
chore: next major version base project (#478)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-03-03 18:26:15 +08:00