mirror of
https://github.com/labring/sealos.git
synced 2026-08-30 17:58:09 +08:00
Update app menu types. (#4735)
* Update app menu types. Signed-off-by: zzjin <tczzjin@gmail.com> * rebase code. Signed-off-by: zzjin <tczzjin@gmail.com> * Fix typo. Signed-off-by: zzjin <tczzjin@gmail.com> --------- Signed-off-by: zzjin <tczzjin@gmail.com>
This commit is contained in:
@@ -26,9 +26,8 @@ type Data struct {
|
||||
}
|
||||
|
||||
type MenuData struct {
|
||||
NameColor string `json:"nameColor,omitempty"`
|
||||
HelpDropDown bool `json:"helpDropDown,omitempty"`
|
||||
HelpDocs string `json:"helpDocs,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Link string `json:"link,omitempty"`
|
||||
}
|
||||
|
||||
type DisplayType string
|
||||
@@ -50,8 +49,8 @@ type AppMeta struct {
|
||||
//+kubebuilder:validation:Optional
|
||||
DisplayType DisplayType `json:"displayType,omitempty"`
|
||||
|
||||
Data Data `json:"data,omitempty"`
|
||||
MenuData MenuData `json:"menuData,omitempty"`
|
||||
Data Data `json:"data,omitempty"`
|
||||
MenuData []MenuData `json:"menuData,omitempty"`
|
||||
}
|
||||
|
||||
// AppSpec defines the desired state of App
|
||||
|
||||
@@ -87,7 +87,11 @@ func (in *AppList) DeepCopyObject() runtime.Object {
|
||||
func (in *AppMeta) DeepCopyInto(out *AppMeta) {
|
||||
*out = *in
|
||||
out.Data = in.Data
|
||||
out.MenuData = in.MenuData
|
||||
if in.MenuData != nil {
|
||||
in, out := &in.MenuData, &out.MenuData
|
||||
*out = make([]MenuData, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppMeta.
|
||||
@@ -103,7 +107,7 @@ func (in *AppMeta) DeepCopy() *AppMeta {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AppSpec) DeepCopyInto(out *AppSpec) {
|
||||
*out = *in
|
||||
out.AppMeta = in.AppMeta
|
||||
in.AppMeta.DeepCopyInto(&out.AppMeta)
|
||||
if in.I18N != nil {
|
||||
in, out := &in.I18N, &out.I18N
|
||||
*out = new(map[string]AppMeta)
|
||||
@@ -111,7 +115,7 @@ func (in *AppSpec) DeepCopyInto(out *AppSpec) {
|
||||
in, out := *in, *out
|
||||
*out = make(map[string]AppMeta, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
(*out)[key] = *val.DeepCopy()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,14 +81,14 @@ spec:
|
||||
icon:
|
||||
type: string
|
||||
menuData:
|
||||
properties:
|
||||
helpDocs:
|
||||
type: string
|
||||
helpDropDown:
|
||||
type: boolean
|
||||
nameColor:
|
||||
type: string
|
||||
type: object
|
||||
items:
|
||||
properties:
|
||||
link:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
type:
|
||||
@@ -98,14 +98,14 @@ spec:
|
||||
icon:
|
||||
type: string
|
||||
menuData:
|
||||
properties:
|
||||
helpDocs:
|
||||
type: string
|
||||
helpDropDown:
|
||||
type: boolean
|
||||
nameColor:
|
||||
type: string
|
||||
type: object
|
||||
items:
|
||||
properties:
|
||||
link:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
type:
|
||||
|
||||
@@ -93,14 +93,14 @@ spec:
|
||||
icon:
|
||||
type: string
|
||||
menuData:
|
||||
properties:
|
||||
helpDocs:
|
||||
type: string
|
||||
helpDropDown:
|
||||
type: boolean
|
||||
nameColor:
|
||||
type: string
|
||||
type: object
|
||||
items:
|
||||
properties:
|
||||
link:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
type:
|
||||
@@ -110,14 +110,14 @@ spec:
|
||||
icon:
|
||||
type: string
|
||||
menuData:
|
||||
properties:
|
||||
helpDocs:
|
||||
type: string
|
||||
helpDropDown:
|
||||
type: boolean
|
||||
nameColor:
|
||||
type: string
|
||||
type: object
|
||||
items:
|
||||
properties:
|
||||
link:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
type:
|
||||
|
||||
Reference in New Issue
Block a user