Feat nav on start icons (#849)

This commit is contained in:
James Read 2026-01-25 22:51:53 +00:00 committed by GitHub
commit 912e6cfeb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 38 additions and 19 deletions

View File

@ -1,10 +1,8 @@
--- ---
#branches: # Only allow releases on the main branch (for 3k)
# - name: main # releases for 2k are published manaually.
# range: '3000.x.x' branches:
- name: main
# - name: release/2k
# range: '>=2000.0.0 <3000.0.0'
plugins: plugins:
- '@semantic-release/commit-analyzer' - '@semantic-release/commit-analyzer'

View File

@ -1,4 +1,4 @@
// @generated by protoc-gen-es v2.10.2 // @generated by protoc-gen-es v2.11.0
// @generated from file olivetin/api/v1/olivetin.proto (package olivetin.api.v1, syntax proto3) // @generated from file olivetin/api/v1/olivetin.proto (package olivetin.api.v1, syntax proto3)
/* eslint-disable */ /* eslint-disable */
@ -1458,6 +1458,11 @@ export declare type InitResponse = Message<"olivetin.api.v1.InitResponse"> & {
* @generated from field: repeated string available_themes = 24; * @generated from field: repeated string available_themes = 24;
*/ */
availableThemes: string[]; availableThemes: string[];
/**
* @generated from field: bool show_navigate_on_start_icons = 25;
*/
showNavigateOnStartIcons: boolean;
}; };
/** /**
@ -1841,4 +1846,3 @@ export declare const OliveTinApiService: GenService<{
output: typeof EntitySchema; output: typeof EntitySchema;
}, },
}>; }>;

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
<button :id="`actionButtonInner-${bindingId}`" :title="title" :disabled="!canExec || isDisabled" <button :id="`actionButtonInner-${bindingId}`" :title="title" :disabled="!canExec || isDisabled"
:class="combinedClasses" @click="handleClick"> :class="combinedClasses" @click="handleClick">
<div class="navigate-on-start-container"> <div v-if="showNavigateOnStartIcons" class="navigate-on-start-container">
<div v-if="navigateOnStart == 'pop'" class="navigate-on-start" title="Opens a popup dialog on start"> <div v-if="navigateOnStart == 'pop'" class="navigate-on-start" title="Opens a popup dialog on start">
<HugeiconsIcon :icon="ComputerTerminal01Icon" /> <HugeiconsIcon :icon="ComputerTerminal01Icon" />
</div> </div>
@ -69,6 +69,11 @@ let rateLimitInterval = null
// Animation classes // Animation classes
const buttonClasses = ref([]) const buttonClasses = ref([])
// Show navigate on start icons - defaults to true if not set
const showNavigateOnStartIcons = computed(() => {
return window.initResponse?.showNavigateOnStartIcons ?? true
})
// Combined classes including custom cssClass // Combined classes including custom cssClass
const combinedClasses = computed(() => { const combinedClasses = computed(() => {
const classes = [...buttonClasses.value] const classes = [...buttonClasses.value]

View File

@ -333,6 +333,7 @@ message InitResponse {
bool show_log_list = 22; bool show_log_list = 22;
bool login_required = 23; bool login_required = 23;
repeated string available_themes = 24; // List of available theme names repeated string available_themes = 24; // List of available theme names
bool show_navigate_on_start_icons = 25;
} }
message AdditionalLink { message AdditionalLink {

View File

@ -3237,6 +3237,7 @@ type InitResponse struct {
ShowLogList bool `protobuf:"varint,22,opt,name=show_log_list,json=showLogList,proto3" json:"show_log_list,omitempty"` ShowLogList bool `protobuf:"varint,22,opt,name=show_log_list,json=showLogList,proto3" json:"show_log_list,omitempty"`
LoginRequired bool `protobuf:"varint,23,opt,name=login_required,json=loginRequired,proto3" json:"login_required,omitempty"` LoginRequired bool `protobuf:"varint,23,opt,name=login_required,json=loginRequired,proto3" json:"login_required,omitempty"`
AvailableThemes []string `protobuf:"bytes,24,rep,name=available_themes,json=availableThemes,proto3" json:"available_themes,omitempty"` // List of available theme names AvailableThemes []string `protobuf:"bytes,24,rep,name=available_themes,json=availableThemes,proto3" json:"available_themes,omitempty"` // List of available theme names
ShowNavigateOnStartIcons bool `protobuf:"varint,25,opt,name=show_navigate_on_start_icons,json=showNavigateOnStartIcons,proto3" json:"show_navigate_on_start_icons,omitempty"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@ -3439,6 +3440,13 @@ func (x *InitResponse) GetAvailableThemes() []string {
return nil return nil
} }
func (x *InitResponse) GetShowNavigateOnStartIcons() bool {
if x != nil {
return x.ShowNavigateOnStartIcons
}
return false
}
type AdditionalLink struct { type AdditionalLink struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
@ -4096,7 +4104,7 @@ const file_olivetin_api_v1_olivetin_proto_rawDesc = "" +
"\x16GetDiagnosticsResponse\x12 \n" + "\x16GetDiagnosticsResponse\x12 \n" +
"\vSshFoundKey\x18\x01 \x01(\tR\vSshFoundKey\x12&\n" + "\vSshFoundKey\x18\x01 \x01(\tR\vSshFoundKey\x12&\n" +
"\x0eSshFoundConfig\x18\x02 \x01(\tR\x0eSshFoundConfig\"\r\n" + "\x0eSshFoundConfig\x18\x02 \x01(\tR\x0eSshFoundConfig\"\r\n" +
"\vInitRequest\"\xcd\b\n" + "\vInitRequest\"\x8d\t\n" +
"\fInitResponse\x12\x1e\n" + "\fInitResponse\x12\x1e\n" +
"\n" + "\n" +
"showFooter\x18\x01 \x01(\bR\n" + "showFooter\x18\x01 \x01(\bR\n" +
@ -4125,7 +4133,8 @@ const file_olivetin_api_v1_olivetin_proto_rawDesc = "" +
"\x10show_diagnostics\x18\x15 \x01(\bR\x0fshowDiagnostics\x12\"\n" + "\x10show_diagnostics\x18\x15 \x01(\bR\x0fshowDiagnostics\x12\"\n" +
"\rshow_log_list\x18\x16 \x01(\bR\vshowLogList\x12%\n" + "\rshow_log_list\x18\x16 \x01(\bR\vshowLogList\x12%\n" +
"\x0elogin_required\x18\x17 \x01(\bR\rloginRequired\x12)\n" + "\x0elogin_required\x18\x17 \x01(\bR\rloginRequired\x12)\n" +
"\x10available_themes\x18\x18 \x03(\tR\x0favailableThemes\"8\n" + "\x10available_themes\x18\x18 \x03(\tR\x0favailableThemes\x12>\n" +
"\x1cshow_navigate_on_start_icons\x18\x19 \x01(\bR\x18showNavigateOnStartIcons\"8\n" +
"\x0eAdditionalLink\x12\x14\n" + "\x0eAdditionalLink\x12\x14\n" +
"\x05title\x18\x01 \x01(\tR\x05title\x12\x10\n" + "\x05title\x18\x01 \x01(\tR\x05title\x12\x10\n" +
"\x03url\x18\x02 \x01(\tR\x03url\"L\n" + "\x03url\x18\x02 \x01(\tR\x03url\"L\n" +

View File

@ -905,6 +905,7 @@ func (api *oliveTinAPI) Init(ctx ctx.Context, req *connect.Request[apiv1.InitReq
ShowLogList: user.EffectivePolicy.ShowLogList, ShowLogList: user.EffectivePolicy.ShowLogList,
LoginRequired: loginRequired, LoginRequired: loginRequired,
AvailableThemes: discoverAvailableThemes(api.cfg), AvailableThemes: discoverAvailableThemes(api.cfg),
ShowNavigateOnStartIcons: api.cfg.ShowNavigateOnStartIcons,
} }
return connect.NewResponse(res), nil return connect.NewResponse(res), nil

View File

@ -128,6 +128,7 @@ type Config struct {
ShowFooter bool `koanf:"showFooter"` ShowFooter bool `koanf:"showFooter"`
ShowNavigation bool `koanf:"showNavigation"` ShowNavigation bool `koanf:"showNavigation"`
ShowNewVersions bool `koanf:"showNewVersions"` ShowNewVersions bool `koanf:"showNewVersions"`
ShowNavigateOnStartIcons bool `koanf:"showNavigateOnStartIcons"`
EnableCustomJs bool `koanf:"enableCustomJs"` EnableCustomJs bool `koanf:"enableCustomJs"`
AuthJwtCookieName string `koanf:"authJwtCookieName"` AuthJwtCookieName string `koanf:"authJwtCookieName"`
AuthJwtHeader string `koanf:"authJwtHeader"` AuthJwtHeader string `koanf:"authJwtHeader"`
@ -244,6 +245,7 @@ func DefaultConfigWithBasePort(basePort int) *Config {
config.ShowFooter = true config.ShowFooter = true
config.ShowNavigation = true config.ShowNavigation = true
config.ShowNewVersions = true config.ShowNewVersions = true
config.ShowNavigateOnStartIcons = true
config.EnableCustomJs = false config.EnableCustomJs = false
config.ExternalRestAddress = "." config.ExternalRestAddress = "."
config.LogLevel = "INFO" config.LogLevel = "INFO"