mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 20:03:20 +08:00
Online Repo: URL to clipboard (#5034)
* import latest icon set * Add export URL to clipboard for online repos * omit parameter name * adjust indent * add url class * Update src/ui/zcl_abapgit_gui_chunk_lib.clas.abap Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com> Co-authored-by: Lars Hvam <larshp@hotmail.com> Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
This commit is contained in:
parent
0b71f14f93
commit
4b5b654b49
Binary file not shown.
|
@ -48,25 +48,28 @@
|
||||||
.icon-code-branch:before { content: "\f112"; }
|
.icon-code-branch:before { content: "\f112"; }
|
||||||
.icon-code-commit:before { content: "\f113"; }
|
.icon-code-commit:before { content: "\f113"; }
|
||||||
.icon-cog:before { content: "\f114"; }
|
.icon-cog:before { content: "\f114"; }
|
||||||
.icon-edit-solid:before { content: "\f115"; }
|
.icon-copy-solid:before { content: "\f115"; }
|
||||||
.icon-exclamation-circle:before { content: "\f116"; }
|
.icon-edit-solid:before { content: "\f116"; }
|
||||||
.icon-exclamation-triangle:before { content: "\f117"; }
|
.icon-exclamation-circle:before { content: "\f117"; }
|
||||||
.icon-file-alt:before { content: "\f118"; }
|
.icon-exclamation-triangle:before { content: "\f118"; }
|
||||||
.icon-file-code:before { content: "\f119"; }
|
.icon-file-alt:before { content: "\f119"; }
|
||||||
.icon-file-image:before { content: "\f11a"; }
|
.icon-file-code:before { content: "\f11a"; }
|
||||||
.icon-file:before { content: "\f11b"; }
|
.icon-file-image:before { content: "\f11b"; }
|
||||||
.icon-fire-alt:before { content: "\f11c"; }
|
.icon-file:before { content: "\f11c"; }
|
||||||
.icon-folder:before { content: "\f11d"; }
|
.icon-fire-alt:before { content: "\f11d"; }
|
||||||
.icon-git-alt:before { content: "\f11e"; }
|
.icon-folder:before { content: "\f11e"; }
|
||||||
.icon-info-circle-solid:before { content: "\f11f"; }
|
.icon-git-alt:before { content: "\f11f"; }
|
||||||
.icon-lock:before { content: "\f120"; }
|
.icon-info-circle-solid:before { content: "\f120"; }
|
||||||
.icon-plug:before { content: "\f121"; }
|
.icon-lock:before { content: "\f121"; }
|
||||||
.icon-question-circle-solid:before { content: "\f122"; }
|
.icon-paste-solid:before { content: "\f122"; }
|
||||||
.icon-server-solid:before { content: "\f123"; }
|
.icon-plug:before { content: "\f123"; }
|
||||||
.icon-sliders-h:before { content: "\f124"; }
|
.icon-question-circle-solid:before { content: "\f124"; }
|
||||||
.icon-snowflake:before { content: "\f125"; }
|
.icon-redo-alt-solid:before { content: "\f125"; }
|
||||||
.icon-star:before { content: "\f126"; }
|
.icon-server-solid:before { content: "\f126"; }
|
||||||
.icon-times-solid:before { content: "\f127"; }
|
.icon-sliders-h:before { content: "\f127"; }
|
||||||
.icon-tools-solid:before { content: "\f128"; }
|
.icon-snowflake:before { content: "\f128"; }
|
||||||
.icon-truck-solid:before { content: "\f129"; }
|
.icon-star:before { content: "\f129"; }
|
||||||
.icon-user-solid:before { content: "\f12a"; }
|
.icon-times-solid:before { content: "\f12a"; }
|
||||||
|
.icon-tools-solid:before { content: "\f12b"; }
|
||||||
|
.icon-truck-solid:before { content: "\f12c"; }
|
||||||
|
.icon-user-solid:before { content: "\f12d"; }
|
||||||
|
|
|
@ -186,4 +186,26 @@ CLASS ZCL_ABAPGIT_FRONTEND_SERVICES IMPLEMENTATION.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD zif_abapgit_frontend_services~clipboard_export.
|
||||||
|
DATA lv_rc TYPE i.
|
||||||
|
|
||||||
|
" Note: do not use a string table for 'it_data'!
|
||||||
|
cl_gui_frontend_services=>clipboard_export(
|
||||||
|
EXPORTING
|
||||||
|
no_auth_check = iv_no_auth_check
|
||||||
|
IMPORTING
|
||||||
|
data = it_data
|
||||||
|
CHANGING
|
||||||
|
rc = lv_rc
|
||||||
|
EXCEPTIONS
|
||||||
|
cntl_error = 1
|
||||||
|
error_no_gui = 2
|
||||||
|
not_supported_by_gui = 3
|
||||||
|
no_authority = 4
|
||||||
|
OTHERS = 5 ).
|
||||||
|
IF sy-subrc <> 0.
|
||||||
|
zcx_abapgit_exception=>raise_t100( ).
|
||||||
|
ENDIF.
|
||||||
|
ENDMETHOD.
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
|
@ -835,6 +835,17 @@ CLASS ZCL_ABAPGIT_GUI_CHUNK_LIB IMPLEMENTATION.
|
||||||
iv_class = |url| ).
|
iv_class = |url| ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
IF io_repo->is_offline( ) = abap_false.
|
||||||
|
lo_repo_online ?= io_repo.
|
||||||
|
|
||||||
|
ri_html->add_a( iv_txt = ri_html->icon( iv_name = 'copy-solid'
|
||||||
|
iv_class = 'pad-sides'
|
||||||
|
iv_hint = 'Copy URL to Clipboard' )
|
||||||
|
iv_act = |{ zif_abapgit_definitions=>c_action-clipboard }| &&
|
||||||
|
|?clipboard={ lo_repo_online->get_url( ) }|
|
||||||
|
iv_class = |url| ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
IF io_repo->is_offline( ) = abap_false AND iv_show_commit = abap_true.
|
IF io_repo->is_offline( ) = abap_false AND iv_show_commit = abap_true.
|
||||||
TRY.
|
TRY.
|
||||||
render_repo_top_commit_hash( ii_html = ri_html
|
render_repo_top_commit_hash( ii_html = ri_html
|
||||||
|
|
|
@ -570,11 +570,21 @@ CLASS zcl_abapgit_gui_router IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD other_utilities.
|
METHOD other_utilities.
|
||||||
|
TYPES ty_char600 TYPE c LENGTH 600.
|
||||||
|
DATA lv_clip_content TYPE string.
|
||||||
|
DATA lt_clipboard TYPE STANDARD TABLE OF ty_char600.
|
||||||
|
|
||||||
IF ii_event->mv_action = zif_abapgit_definitions=>c_action-ie_devtools.
|
CASE ii_event->mv_action.
|
||||||
zcl_abapgit_services_basis=>open_ie_devtools( ).
|
WHEN zif_abapgit_definitions=>c_action-ie_devtools.
|
||||||
rs_handled-state = zcl_abapgit_gui=>c_event_state-no_more_act.
|
zcl_abapgit_services_basis=>open_ie_devtools( ).
|
||||||
ENDIF.
|
rs_handled-state = zcl_abapgit_gui=>c_event_state-no_more_act.
|
||||||
|
WHEN zif_abapgit_definitions=>c_action-clipboard.
|
||||||
|
lv_clip_content = ii_event->query( )->get( 'CLIPBOARD' ).
|
||||||
|
APPEND lv_clip_content TO lt_clipboard.
|
||||||
|
zcl_abapgit_ui_factory=>get_frontend_services( )->clipboard_export( lt_clipboard ).
|
||||||
|
MESSAGE 'Successfully exported URL to Clipboard.' TYPE 'S'.
|
||||||
|
rs_handled-state = zcl_abapgit_gui=>c_event_state-no_more_act.
|
||||||
|
ENDCASE.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
|
@ -30,4 +30,11 @@ INTERFACE zif_abapgit_frontend_services PUBLIC.
|
||||||
VALUE(rv_path) TYPE string
|
VALUE(rv_path) TYPE string
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
|
|
||||||
|
METHODS clipboard_export
|
||||||
|
IMPORTING
|
||||||
|
iv_no_auth_check TYPE abap_bool DEFAULT abap_false
|
||||||
|
VALUE(it_data) TYPE STANDARD TABLE
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception.
|
||||||
ENDINTERFACE.
|
ENDINTERFACE.
|
||||||
|
|
|
@ -489,6 +489,7 @@ INTERFACE zif_abapgit_definitions
|
||||||
direction TYPE string VALUE 'direction',
|
direction TYPE string VALUE 'direction',
|
||||||
documentation TYPE string VALUE 'documentation',
|
documentation TYPE string VALUE 'documentation',
|
||||||
changelog TYPE string VALUE 'changelog',
|
changelog TYPE string VALUE 'changelog',
|
||||||
|
clipboard TYPE string VALUE 'clipboard',
|
||||||
END OF c_action.
|
END OF c_action.
|
||||||
CONSTANTS c_spagpa_param_repo_key TYPE c LENGTH 20 VALUE 'REPO_KEY' ##NO_TEXT.
|
CONSTANTS c_spagpa_param_repo_key TYPE c LENGTH 20 VALUE 'REPO_KEY' ##NO_TEXT.
|
||||||
CONSTANTS c_spagpa_param_package TYPE c LENGTH 20 VALUE 'PACKAGE' ##NO_TEXT.
|
CONSTANTS c_spagpa_param_package TYPE c LENGTH 20 VALUE 'PACKAGE' ##NO_TEXT.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user