mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
improve missing branch styling (#3619)
Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
0feae7c1b2
commit
144cb8822c
|
@ -77,6 +77,8 @@ span.separator {
|
||||||
/* PANELS */
|
/* PANELS */
|
||||||
div.panel {
|
div.panel {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
padding: 0.5em 0.5em;
|
||||||
|
margin: 0.5em 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dummydiv {
|
div.dummydiv {
|
||||||
|
@ -220,7 +222,7 @@ div.repo_container {
|
||||||
}
|
}
|
||||||
|
|
||||||
div.repo_banner {
|
div.repo_banner {
|
||||||
margin: 0em 1.2em 1em;
|
margin: 0em 1em 1em;
|
||||||
padding: 0.5em 0.5em;
|
padding: 0.5em 0.5em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
|
|
|
@ -63,6 +63,10 @@ div.panel.success {
|
||||||
color: #589a58 !important;
|
color: #589a58 !important;
|
||||||
background-color: #c5eac5;
|
background-color: #c5eac5;
|
||||||
}
|
}
|
||||||
|
div.panel.error {
|
||||||
|
color: #d41919;
|
||||||
|
background-color: #fad6d6;
|
||||||
|
}
|
||||||
#debug-output { color: var(--theme-debug-color); }
|
#debug-output { color: var(--theme-debug-color); }
|
||||||
div.dummydiv { background-color: var(--theme-container-background-color); }
|
div.dummydiv { background-color: var(--theme-container-background-color); }
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ CLASS zcl_abapgit_gui_chunk_lib DEFINITION
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!ix_error TYPE REF TO zcx_abapgit_exception OPTIONAL
|
!ix_error TYPE REF TO zcx_abapgit_exception OPTIONAL
|
||||||
!iv_error TYPE string OPTIONAL
|
!iv_error TYPE string OPTIONAL
|
||||||
|
!iv_extra_style TYPE string OPTIONAL
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
|
VALUE(ro_html) TYPE REF TO zcl_abapgit_html .
|
||||||
CLASS-METHODS render_repo_top
|
CLASS-METHODS render_repo_top
|
||||||
|
@ -142,7 +143,36 @@ ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD advanced_submenu.
|
||||||
|
|
||||||
|
CREATE OBJECT ro_menu.
|
||||||
|
|
||||||
|
ro_menu->add(
|
||||||
|
iv_txt = 'Database util'
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-go_db
|
||||||
|
)->add(
|
||||||
|
iv_txt = 'Package to zip'
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-zip_package
|
||||||
|
)->add(
|
||||||
|
iv_txt = 'Transport to zip'
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-zip_transport
|
||||||
|
)->add(
|
||||||
|
iv_txt = 'Object to files'
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-zip_object
|
||||||
|
)->add(
|
||||||
|
iv_txt = 'Test changed by'
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-changed_by
|
||||||
|
)->add(
|
||||||
|
iv_txt = 'Debug info'
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-go_debuginfo
|
||||||
|
)->add(
|
||||||
|
iv_txt = 'Settings'
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-go_settings ).
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD class_constructor.
|
METHOD class_constructor.
|
||||||
|
@ -170,6 +200,26 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD help_submenu.
|
||||||
|
|
||||||
|
CREATE OBJECT ro_menu.
|
||||||
|
|
||||||
|
ro_menu->add(
|
||||||
|
iv_txt = 'Tutorial'
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-go_tutorial
|
||||||
|
)->add(
|
||||||
|
iv_txt = 'Documentation'
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-documentation
|
||||||
|
)->add(
|
||||||
|
iv_txt = 'Explore'
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-go_explore
|
||||||
|
)->add(
|
||||||
|
iv_txt = 'Changelog'
|
||||||
|
iv_act = zif_abapgit_definitions=>c_action-changelog ).
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD normalize_program_name.
|
METHOD normalize_program_name.
|
||||||
|
|
||||||
rv_normalized_program_name = substring_before(
|
rv_normalized_program_name = substring_before(
|
||||||
|
@ -252,6 +302,11 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
||||||
METHOD render_error.
|
METHOD render_error.
|
||||||
|
|
||||||
DATA lv_error TYPE string.
|
DATA lv_error TYPE string.
|
||||||
|
DATA lv_class TYPE string VALUE 'panel error center'.
|
||||||
|
|
||||||
|
IF iv_extra_style IS NOT INITIAL.
|
||||||
|
lv_class = lv_class && ` ` && iv_extra_style.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
CREATE OBJECT ro_html.
|
CREATE OBJECT ro_html.
|
||||||
|
|
||||||
|
@ -261,7 +316,7 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
||||||
lv_error = iv_error.
|
lv_error = iv_error.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ro_html->add( '<div class="dummydiv error">' ).
|
ro_html->add( |<div class="{ lv_class }">| ).
|
||||||
ro_html->add( |{ zcl_abapgit_html=>icon( 'exclamation-circle/red' ) } Error: { lv_error }| ).
|
ro_html->add( |{ zcl_abapgit_html=>icon( 'exclamation-circle/red' ) } Error: { lv_error }| ).
|
||||||
ro_html->add( '</div>' ).
|
ro_html->add( '</div>' ).
|
||||||
|
|
||||||
|
@ -724,52 +779,4 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
|
||||||
ro_html->add( '</div>' ).
|
ro_html->add( '</div>' ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
METHOD advanced_submenu.
|
|
||||||
|
|
||||||
CREATE OBJECT ro_menu.
|
|
||||||
|
|
||||||
ro_menu->add(
|
|
||||||
iv_txt = 'Database util'
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-go_db
|
|
||||||
)->add(
|
|
||||||
iv_txt = 'Package to zip'
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-zip_package
|
|
||||||
)->add(
|
|
||||||
iv_txt = 'Transport to zip'
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-zip_transport
|
|
||||||
)->add(
|
|
||||||
iv_txt = 'Object to files'
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-zip_object
|
|
||||||
)->add(
|
|
||||||
iv_txt = 'Test changed by'
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-changed_by
|
|
||||||
)->add(
|
|
||||||
iv_txt = 'Debug info'
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-go_debuginfo
|
|
||||||
)->add(
|
|
||||||
iv_txt = 'Settings'
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-go_settings ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
METHOD help_submenu.
|
|
||||||
|
|
||||||
CREATE OBJECT ro_menu.
|
|
||||||
|
|
||||||
ro_menu->add(
|
|
||||||
iv_txt = 'Tutorial'
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-go_tutorial
|
|
||||||
)->add(
|
|
||||||
iv_txt = 'Documentation'
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-documentation
|
|
||||||
)->add(
|
|
||||||
iv_txt = 'Explore'
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-go_explore
|
|
||||||
)->add(
|
|
||||||
iv_txt = 'Changelog'
|
|
||||||
iv_act = zif_abapgit_definitions=>c_action-changelog ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
|
@ -713,7 +713,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_VIEW_REPO IMPLEMENTATION.
|
||||||
AND mo_repo->has_remote_source( ) = abap_true
|
AND mo_repo->has_remote_source( ) = abap_true
|
||||||
AND lv_lstate IS INITIAL AND lv_rstate IS INITIAL.
|
AND lv_lstate IS INITIAL AND lv_rstate IS INITIAL.
|
||||||
ri_html->add(
|
ri_html->add(
|
||||||
|<div class="repo_banner panel success">|
|
|<div class="panel success repo_banner">|
|
||||||
&& |ZIP source is attached and completely <b>matches</b> to the local state|
|
&& |ZIP source is attached and completely <b>matches</b> to the local state|
|
||||||
&& |</div>| ).
|
&& |</div>| ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
@ -765,9 +765,13 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_VIEW_REPO IMPLEMENTATION.
|
||||||
ri_html->add( '</div>' ).
|
ri_html->add( '</div>' ).
|
||||||
ri_html->add( '</div>' ).
|
ri_html->add( '</div>' ).
|
||||||
CATCH zcx_abapgit_exception INTO lx_error.
|
CATCH zcx_abapgit_exception INTO lx_error.
|
||||||
ri_html->add( render_head_line( iv_lstate = lv_lstate
|
ri_html->add(
|
||||||
iv_rstate = lv_rstate ) ).
|
render_head_line(
|
||||||
ri_html->add( zcl_abapgit_gui_chunk_lib=>render_error( ix_error = lx_error ) ).
|
iv_lstate = lv_lstate
|
||||||
|
iv_rstate = lv_rstate ) ).
|
||||||
|
ri_html->add( zcl_abapgit_gui_chunk_lib=>render_error(
|
||||||
|
iv_extra_style = 'repo_banner'
|
||||||
|
ix_error = lx_error ) ).
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user