Reformat code
This commit is contained in:
579
.editorconfig
Normal file
579
.editorconfig
Normal file
@@ -0,0 +1,579 @@
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = false
|
||||
max_line_length = 120
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = false
|
||||
ij_continuation_indent_size = 8
|
||||
ij_formatter_off_tag = @formatter:off
|
||||
ij_formatter_on_tag = @formatter:on
|
||||
ij_formatter_tags_enabled = true
|
||||
ij_smart_tabs = false
|
||||
ij_visual_guides = none
|
||||
ij_wrap_on_typing = false
|
||||
|
||||
[*.css]
|
||||
ij_css_align_closing_brace_with_properties = false
|
||||
ij_css_blank_lines_around_nested_selector = 1
|
||||
ij_css_blank_lines_between_blocks = 1
|
||||
ij_css_block_comment_add_space = false
|
||||
ij_css_brace_placement = end_of_line
|
||||
ij_css_enforce_quotes_on_format = false
|
||||
ij_css_hex_color_long_format = false
|
||||
ij_css_hex_color_lower_case = false
|
||||
ij_css_hex_color_short_format = false
|
||||
ij_css_hex_color_upper_case = false
|
||||
ij_css_keep_blank_lines_in_code = 2
|
||||
ij_css_keep_indents_on_empty_lines = false
|
||||
ij_css_keep_single_line_blocks = false
|
||||
ij_css_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
|
||||
ij_css_space_after_colon = true
|
||||
ij_css_space_before_opening_brace = true
|
||||
ij_css_use_double_quotes = true
|
||||
ij_css_value_alignment = do_not_align
|
||||
|
||||
[*.less]
|
||||
indent_size = 2
|
||||
ij_less_align_closing_brace_with_properties = false
|
||||
ij_less_blank_lines_around_nested_selector = 1
|
||||
ij_less_blank_lines_between_blocks = 1
|
||||
ij_less_block_comment_add_space = false
|
||||
ij_less_brace_placement = 0
|
||||
ij_less_enforce_quotes_on_format = false
|
||||
ij_less_hex_color_long_format = false
|
||||
ij_less_hex_color_lower_case = false
|
||||
ij_less_hex_color_short_format = false
|
||||
ij_less_hex_color_upper_case = false
|
||||
ij_less_keep_blank_lines_in_code = 2
|
||||
ij_less_keep_indents_on_empty_lines = false
|
||||
ij_less_keep_single_line_blocks = false
|
||||
ij_less_line_comment_add_space = false
|
||||
ij_less_line_comment_at_first_column = false
|
||||
ij_less_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
|
||||
ij_less_space_after_colon = true
|
||||
ij_less_space_before_opening_brace = true
|
||||
ij_less_use_double_quotes = true
|
||||
ij_less_value_alignment = 0
|
||||
|
||||
[*.properties]
|
||||
ij_properties_align_group_field_declarations = false
|
||||
ij_properties_keep_blank_lines = false
|
||||
ij_properties_key_value_delimiter = equals
|
||||
ij_properties_spaces_around_key_value_delimiter = false
|
||||
|
||||
[*.sass]
|
||||
indent_size = 2
|
||||
ij_sass_align_closing_brace_with_properties = false
|
||||
ij_sass_blank_lines_around_nested_selector = 1
|
||||
ij_sass_blank_lines_between_blocks = 1
|
||||
ij_sass_brace_placement = 0
|
||||
ij_sass_enforce_quotes_on_format = false
|
||||
ij_sass_hex_color_long_format = false
|
||||
ij_sass_hex_color_lower_case = false
|
||||
ij_sass_hex_color_short_format = false
|
||||
ij_sass_hex_color_upper_case = false
|
||||
ij_sass_keep_blank_lines_in_code = 2
|
||||
ij_sass_keep_indents_on_empty_lines = false
|
||||
ij_sass_keep_single_line_blocks = false
|
||||
ij_sass_line_comment_add_space = false
|
||||
ij_sass_line_comment_at_first_column = false
|
||||
ij_sass_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
|
||||
ij_sass_space_after_colon = true
|
||||
ij_sass_space_before_opening_brace = true
|
||||
ij_sass_use_double_quotes = true
|
||||
ij_sass_value_alignment = 0
|
||||
|
||||
[*.scss]
|
||||
indent_size = 2
|
||||
ij_scss_align_closing_brace_with_properties = false
|
||||
ij_scss_blank_lines_around_nested_selector = 1
|
||||
ij_scss_blank_lines_between_blocks = 1
|
||||
ij_scss_block_comment_add_space = false
|
||||
ij_scss_brace_placement = 0
|
||||
ij_scss_enforce_quotes_on_format = false
|
||||
ij_scss_hex_color_long_format = false
|
||||
ij_scss_hex_color_lower_case = false
|
||||
ij_scss_hex_color_short_format = false
|
||||
ij_scss_hex_color_upper_case = false
|
||||
ij_scss_keep_blank_lines_in_code = 2
|
||||
ij_scss_keep_indents_on_empty_lines = false
|
||||
ij_scss_keep_single_line_blocks = false
|
||||
ij_scss_line_comment_add_space = false
|
||||
ij_scss_line_comment_at_first_column = false
|
||||
ij_scss_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
|
||||
ij_scss_space_after_colon = true
|
||||
ij_scss_space_before_opening_brace = true
|
||||
ij_scss_use_double_quotes = true
|
||||
ij_scss_value_alignment = 0
|
||||
|
||||
[*.vue]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
||||
ij_continuation_indent_size = 4
|
||||
ij_vue_indent_children_of_top_level = template
|
||||
ij_vue_interpolation_new_line_after_start_delimiter = true
|
||||
ij_vue_interpolation_new_line_before_end_delimiter = true
|
||||
ij_vue_interpolation_wrap = off
|
||||
ij_vue_keep_indents_on_empty_lines = false
|
||||
ij_vue_spaces_within_interpolation_expressions = true
|
||||
|
||||
[.editorconfig]
|
||||
ij_editorconfig_align_group_field_declarations = false
|
||||
ij_editorconfig_space_after_colon = false
|
||||
ij_editorconfig_space_after_comma = true
|
||||
ij_editorconfig_space_before_colon = false
|
||||
ij_editorconfig_space_before_comma = false
|
||||
ij_editorconfig_spaces_around_assignment_operators = true
|
||||
|
||||
[{*.ant,*.appxmanifest,*.axml,*.cscfg,*.csdef,*.disco,*.dotsettings,*.filelayout,*.fxml,*.jhm,*.jnlp,*.jrxml,*.manifest,*.myapp,*.nuspec,*.rng,*.stylecop,*.svcmap,*.tld,*.wadcfgx,*.webref,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt,*.xul,StyleCop.Cache}]
|
||||
ij_xml_align_attributes = true
|
||||
ij_xml_align_text = false
|
||||
ij_xml_attribute_wrap = normal
|
||||
ij_xml_block_comment_add_space = false
|
||||
ij_xml_block_comment_at_first_column = true
|
||||
ij_xml_keep_blank_lines = 2
|
||||
ij_xml_keep_indents_on_empty_lines = false
|
||||
ij_xml_keep_line_breaks = true
|
||||
ij_xml_keep_line_breaks_in_text = true
|
||||
ij_xml_keep_whitespaces = false
|
||||
ij_xml_keep_whitespaces_around_cdata = preserve
|
||||
ij_xml_keep_whitespaces_inside_cdata = false
|
||||
ij_xml_line_comment_at_first_column = true
|
||||
ij_xml_space_after_tag_name = false
|
||||
ij_xml_space_around_equals_in_attribute = false
|
||||
ij_xml_space_inside_empty_tag = false
|
||||
ij_xml_text_wrap = normal
|
||||
|
||||
[{*.ats,*.cts,*.mts,*.ts}]
|
||||
ij_continuation_indent_size = 4
|
||||
ij_typescript_align_imports = false
|
||||
ij_typescript_align_multiline_array_initializer_expression = false
|
||||
ij_typescript_align_multiline_binary_operation = false
|
||||
ij_typescript_align_multiline_chained_methods = false
|
||||
ij_typescript_align_multiline_extends_list = false
|
||||
ij_typescript_align_multiline_for = true
|
||||
ij_typescript_align_multiline_parameters = true
|
||||
ij_typescript_align_multiline_parameters_in_calls = false
|
||||
ij_typescript_align_multiline_ternary_operation = false
|
||||
ij_typescript_align_object_properties = 0
|
||||
ij_typescript_align_union_types = false
|
||||
ij_typescript_align_var_statements = 0
|
||||
ij_typescript_array_initializer_new_line_after_left_brace = false
|
||||
ij_typescript_array_initializer_right_brace_on_new_line = false
|
||||
ij_typescript_array_initializer_wrap = off
|
||||
ij_typescript_assignment_wrap = off
|
||||
ij_typescript_binary_operation_sign_on_next_line = false
|
||||
ij_typescript_binary_operation_wrap = off
|
||||
ij_typescript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/**
|
||||
ij_typescript_blank_lines_after_imports = 1
|
||||
ij_typescript_blank_lines_around_class = 1
|
||||
ij_typescript_blank_lines_around_field = 0
|
||||
ij_typescript_blank_lines_around_field_in_interface = 0
|
||||
ij_typescript_blank_lines_around_function = 1
|
||||
ij_typescript_blank_lines_around_method = 1
|
||||
ij_typescript_blank_lines_around_method_in_interface = 1
|
||||
ij_typescript_block_brace_style = end_of_line
|
||||
ij_typescript_block_comment_add_space = false
|
||||
ij_typescript_block_comment_at_first_column = true
|
||||
ij_typescript_call_parameters_new_line_after_left_paren = false
|
||||
ij_typescript_call_parameters_right_paren_on_new_line = false
|
||||
ij_typescript_call_parameters_wrap = off
|
||||
ij_typescript_catch_on_new_line = false
|
||||
ij_typescript_chained_call_dot_on_new_line = true
|
||||
ij_typescript_class_brace_style = end_of_line
|
||||
ij_typescript_comma_on_new_line = false
|
||||
ij_typescript_do_while_brace_force = never
|
||||
ij_typescript_else_on_new_line = false
|
||||
ij_typescript_enforce_trailing_comma = keep
|
||||
ij_typescript_enum_constants_wrap = on_every_item
|
||||
ij_typescript_extends_keyword_wrap = off
|
||||
ij_typescript_extends_list_wrap = off
|
||||
ij_typescript_field_prefix = _
|
||||
ij_typescript_file_name_style = relaxed
|
||||
ij_typescript_finally_on_new_line = false
|
||||
ij_typescript_for_brace_force = never
|
||||
ij_typescript_for_statement_new_line_after_left_paren = false
|
||||
ij_typescript_for_statement_right_paren_on_new_line = false
|
||||
ij_typescript_for_statement_wrap = off
|
||||
ij_typescript_force_quote_style = false
|
||||
ij_typescript_force_semicolon_style = false
|
||||
ij_typescript_function_expression_brace_style = end_of_line
|
||||
ij_typescript_if_brace_force = never
|
||||
ij_typescript_import_merge_members = global
|
||||
ij_typescript_import_prefer_absolute_path = global
|
||||
ij_typescript_import_sort_members = true
|
||||
ij_typescript_import_sort_module_name = false
|
||||
ij_typescript_import_use_node_resolution = true
|
||||
ij_typescript_imports_wrap = on_every_item
|
||||
ij_typescript_indent_case_from_switch = true
|
||||
ij_typescript_indent_chained_calls = true
|
||||
ij_typescript_indent_package_children = 0
|
||||
ij_typescript_jsdoc_include_types = false
|
||||
ij_typescript_jsx_attribute_value = braces
|
||||
ij_typescript_keep_blank_lines_in_code = 2
|
||||
ij_typescript_keep_first_column_comment = true
|
||||
ij_typescript_keep_indents_on_empty_lines = false
|
||||
ij_typescript_keep_line_breaks = true
|
||||
ij_typescript_keep_simple_blocks_in_one_line = false
|
||||
ij_typescript_keep_simple_methods_in_one_line = false
|
||||
ij_typescript_line_comment_add_space = true
|
||||
ij_typescript_line_comment_at_first_column = false
|
||||
ij_typescript_method_brace_style = end_of_line
|
||||
ij_typescript_method_call_chain_wrap = off
|
||||
ij_typescript_method_parameters_new_line_after_left_paren = false
|
||||
ij_typescript_method_parameters_right_paren_on_new_line = false
|
||||
ij_typescript_method_parameters_wrap = off
|
||||
ij_typescript_object_literal_wrap = on_every_item
|
||||
ij_typescript_object_types_wrap = on_every_item
|
||||
ij_typescript_parentheses_expression_new_line_after_left_paren = false
|
||||
ij_typescript_parentheses_expression_right_paren_on_new_line = false
|
||||
ij_typescript_place_assignment_sign_on_next_line = false
|
||||
ij_typescript_prefer_as_type_cast = false
|
||||
ij_typescript_prefer_explicit_types_function_expression_returns = false
|
||||
ij_typescript_prefer_explicit_types_function_returns = false
|
||||
ij_typescript_prefer_explicit_types_vars_fields = false
|
||||
ij_typescript_prefer_parameters_wrap = false
|
||||
ij_typescript_reformat_c_style_comments = false
|
||||
ij_typescript_space_after_colon = true
|
||||
ij_typescript_space_after_comma = true
|
||||
ij_typescript_space_after_dots_in_rest_parameter = false
|
||||
ij_typescript_space_after_generator_mult = true
|
||||
ij_typescript_space_after_property_colon = true
|
||||
ij_typescript_space_after_quest = true
|
||||
ij_typescript_space_after_type_colon = true
|
||||
ij_typescript_space_after_unary_not = false
|
||||
ij_typescript_space_before_async_arrow_lparen = true
|
||||
ij_typescript_space_before_catch_keyword = true
|
||||
ij_typescript_space_before_catch_left_brace = true
|
||||
ij_typescript_space_before_catch_parentheses = true
|
||||
ij_typescript_space_before_class_lbrace = true
|
||||
ij_typescript_space_before_class_left_brace = true
|
||||
ij_typescript_space_before_colon = true
|
||||
ij_typescript_space_before_comma = false
|
||||
ij_typescript_space_before_do_left_brace = true
|
||||
ij_typescript_space_before_else_keyword = true
|
||||
ij_typescript_space_before_else_left_brace = true
|
||||
ij_typescript_space_before_finally_keyword = true
|
||||
ij_typescript_space_before_finally_left_brace = true
|
||||
ij_typescript_space_before_for_left_brace = true
|
||||
ij_typescript_space_before_for_parentheses = true
|
||||
ij_typescript_space_before_for_semicolon = false
|
||||
ij_typescript_space_before_function_left_parenth = true
|
||||
ij_typescript_space_before_generator_mult = false
|
||||
ij_typescript_space_before_if_left_brace = true
|
||||
ij_typescript_space_before_if_parentheses = true
|
||||
ij_typescript_space_before_method_call_parentheses = false
|
||||
ij_typescript_space_before_method_left_brace = true
|
||||
ij_typescript_space_before_method_parentheses = false
|
||||
ij_typescript_space_before_property_colon = false
|
||||
ij_typescript_space_before_quest = true
|
||||
ij_typescript_space_before_switch_left_brace = true
|
||||
ij_typescript_space_before_switch_parentheses = true
|
||||
ij_typescript_space_before_try_left_brace = true
|
||||
ij_typescript_space_before_type_colon = false
|
||||
ij_typescript_space_before_unary_not = false
|
||||
ij_typescript_space_before_while_keyword = true
|
||||
ij_typescript_space_before_while_left_brace = true
|
||||
ij_typescript_space_before_while_parentheses = true
|
||||
ij_typescript_spaces_around_additive_operators = true
|
||||
ij_typescript_spaces_around_arrow_function_operator = true
|
||||
ij_typescript_spaces_around_assignment_operators = true
|
||||
ij_typescript_spaces_around_bitwise_operators = true
|
||||
ij_typescript_spaces_around_equality_operators = true
|
||||
ij_typescript_spaces_around_logical_operators = true
|
||||
ij_typescript_spaces_around_multiplicative_operators = true
|
||||
ij_typescript_spaces_around_relational_operators = true
|
||||
ij_typescript_spaces_around_shift_operators = true
|
||||
ij_typescript_spaces_around_unary_operator = false
|
||||
ij_typescript_spaces_within_array_initializer_brackets = false
|
||||
ij_typescript_spaces_within_brackets = false
|
||||
ij_typescript_spaces_within_catch_parentheses = false
|
||||
ij_typescript_spaces_within_for_parentheses = false
|
||||
ij_typescript_spaces_within_if_parentheses = false
|
||||
ij_typescript_spaces_within_imports = false
|
||||
ij_typescript_spaces_within_interpolation_expressions = false
|
||||
ij_typescript_spaces_within_method_call_parentheses = false
|
||||
ij_typescript_spaces_within_method_parentheses = false
|
||||
ij_typescript_spaces_within_object_literal_braces = false
|
||||
ij_typescript_spaces_within_object_type_braces = true
|
||||
ij_typescript_spaces_within_parentheses = false
|
||||
ij_typescript_spaces_within_switch_parentheses = false
|
||||
ij_typescript_spaces_within_type_assertion = false
|
||||
ij_typescript_spaces_within_union_types = true
|
||||
ij_typescript_spaces_within_while_parentheses = false
|
||||
ij_typescript_special_else_if_treatment = true
|
||||
ij_typescript_ternary_operation_signs_on_next_line = false
|
||||
ij_typescript_ternary_operation_wrap = off
|
||||
ij_typescript_union_types_wrap = on_every_item
|
||||
ij_typescript_use_chained_calls_group_indents = false
|
||||
ij_typescript_use_double_quotes = true
|
||||
ij_typescript_use_explicit_js_extension = auto
|
||||
ij_typescript_use_path_mapping = always
|
||||
ij_typescript_use_public_modifier = false
|
||||
ij_typescript_use_semicolon_after_statement = true
|
||||
ij_typescript_var_declaration_wrap = normal
|
||||
ij_typescript_while_brace_force = never
|
||||
ij_typescript_while_on_new_line = false
|
||||
ij_typescript_wrap_comments = false
|
||||
|
||||
[{*.bash,*.sh,*.zsh}]
|
||||
indent_size = 2
|
||||
tab_width = 2
|
||||
ij_shell_binary_ops_start_line = false
|
||||
ij_shell_keep_column_alignment_padding = false
|
||||
ij_shell_minify_program = false
|
||||
ij_shell_redirect_followed_by_space = false
|
||||
ij_shell_switch_cases_indented = false
|
||||
ij_shell_use_unix_line_separator = true
|
||||
|
||||
[{*.cjs,*.js}]
|
||||
ij_continuation_indent_size = 4
|
||||
ij_javascript_align_imports = false
|
||||
ij_javascript_align_multiline_array_initializer_expression = false
|
||||
ij_javascript_align_multiline_binary_operation = false
|
||||
ij_javascript_align_multiline_chained_methods = false
|
||||
ij_javascript_align_multiline_extends_list = false
|
||||
ij_javascript_align_multiline_for = true
|
||||
ij_javascript_align_multiline_parameters = true
|
||||
ij_javascript_align_multiline_parameters_in_calls = false
|
||||
ij_javascript_align_multiline_ternary_operation = false
|
||||
ij_javascript_align_object_properties = 0
|
||||
ij_javascript_align_union_types = false
|
||||
ij_javascript_align_var_statements = 0
|
||||
ij_javascript_array_initializer_new_line_after_left_brace = false
|
||||
ij_javascript_array_initializer_right_brace_on_new_line = false
|
||||
ij_javascript_array_initializer_wrap = off
|
||||
ij_javascript_assignment_wrap = off
|
||||
ij_javascript_binary_operation_sign_on_next_line = false
|
||||
ij_javascript_binary_operation_wrap = off
|
||||
ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/**
|
||||
ij_javascript_blank_lines_after_imports = 1
|
||||
ij_javascript_blank_lines_around_class = 1
|
||||
ij_javascript_blank_lines_around_field = 0
|
||||
ij_javascript_blank_lines_around_function = 1
|
||||
ij_javascript_blank_lines_around_method = 1
|
||||
ij_javascript_block_brace_style = end_of_line
|
||||
ij_javascript_block_comment_add_space = false
|
||||
ij_javascript_block_comment_at_first_column = true
|
||||
ij_javascript_call_parameters_new_line_after_left_paren = false
|
||||
ij_javascript_call_parameters_right_paren_on_new_line = false
|
||||
ij_javascript_call_parameters_wrap = off
|
||||
ij_javascript_catch_on_new_line = false
|
||||
ij_javascript_chained_call_dot_on_new_line = true
|
||||
ij_javascript_class_brace_style = end_of_line
|
||||
ij_javascript_comma_on_new_line = false
|
||||
ij_javascript_do_while_brace_force = never
|
||||
ij_javascript_else_on_new_line = false
|
||||
ij_javascript_enforce_trailing_comma = keep
|
||||
ij_javascript_extends_keyword_wrap = off
|
||||
ij_javascript_extends_list_wrap = off
|
||||
ij_javascript_field_prefix = _
|
||||
ij_javascript_file_name_style = relaxed
|
||||
ij_javascript_finally_on_new_line = false
|
||||
ij_javascript_for_brace_force = never
|
||||
ij_javascript_for_statement_new_line_after_left_paren = false
|
||||
ij_javascript_for_statement_right_paren_on_new_line = false
|
||||
ij_javascript_for_statement_wrap = off
|
||||
ij_javascript_force_quote_style = false
|
||||
ij_javascript_force_semicolon_style = false
|
||||
ij_javascript_function_expression_brace_style = end_of_line
|
||||
ij_javascript_if_brace_force = never
|
||||
ij_javascript_import_merge_members = global
|
||||
ij_javascript_import_prefer_absolute_path = global
|
||||
ij_javascript_import_sort_members = true
|
||||
ij_javascript_import_sort_module_name = false
|
||||
ij_javascript_import_use_node_resolution = true
|
||||
ij_javascript_imports_wrap = on_every_item
|
||||
ij_javascript_indent_case_from_switch = true
|
||||
ij_javascript_indent_chained_calls = true
|
||||
ij_javascript_indent_package_children = 0
|
||||
ij_javascript_jsx_attribute_value = braces
|
||||
ij_javascript_keep_blank_lines_in_code = 2
|
||||
ij_javascript_keep_first_column_comment = true
|
||||
ij_javascript_keep_indents_on_empty_lines = false
|
||||
ij_javascript_keep_line_breaks = true
|
||||
ij_javascript_keep_simple_blocks_in_one_line = false
|
||||
ij_javascript_keep_simple_methods_in_one_line = false
|
||||
ij_javascript_line_comment_add_space = true
|
||||
ij_javascript_line_comment_at_first_column = false
|
||||
ij_javascript_method_brace_style = end_of_line
|
||||
ij_javascript_method_call_chain_wrap = off
|
||||
ij_javascript_method_parameters_new_line_after_left_paren = false
|
||||
ij_javascript_method_parameters_right_paren_on_new_line = false
|
||||
ij_javascript_method_parameters_wrap = off
|
||||
ij_javascript_object_literal_wrap = on_every_item
|
||||
ij_javascript_object_types_wrap = on_every_item
|
||||
ij_javascript_parentheses_expression_new_line_after_left_paren = false
|
||||
ij_javascript_parentheses_expression_right_paren_on_new_line = false
|
||||
ij_javascript_place_assignment_sign_on_next_line = false
|
||||
ij_javascript_prefer_as_type_cast = false
|
||||
ij_javascript_prefer_explicit_types_function_expression_returns = false
|
||||
ij_javascript_prefer_explicit_types_function_returns = false
|
||||
ij_javascript_prefer_explicit_types_vars_fields = false
|
||||
ij_javascript_prefer_parameters_wrap = false
|
||||
ij_javascript_reformat_c_style_comments = false
|
||||
ij_javascript_space_after_colon = true
|
||||
ij_javascript_space_after_comma = true
|
||||
ij_javascript_space_after_dots_in_rest_parameter = false
|
||||
ij_javascript_space_after_generator_mult = true
|
||||
ij_javascript_space_after_property_colon = true
|
||||
ij_javascript_space_after_quest = true
|
||||
ij_javascript_space_after_type_colon = true
|
||||
ij_javascript_space_after_unary_not = false
|
||||
ij_javascript_space_before_async_arrow_lparen = true
|
||||
ij_javascript_space_before_catch_keyword = true
|
||||
ij_javascript_space_before_catch_left_brace = true
|
||||
ij_javascript_space_before_catch_parentheses = true
|
||||
ij_javascript_space_before_class_lbrace = true
|
||||
ij_javascript_space_before_class_left_brace = true
|
||||
ij_javascript_space_before_colon = true
|
||||
ij_javascript_space_before_comma = false
|
||||
ij_javascript_space_before_do_left_brace = true
|
||||
ij_javascript_space_before_else_keyword = true
|
||||
ij_javascript_space_before_else_left_brace = true
|
||||
ij_javascript_space_before_finally_keyword = true
|
||||
ij_javascript_space_before_finally_left_brace = true
|
||||
ij_javascript_space_before_for_left_brace = true
|
||||
ij_javascript_space_before_for_parentheses = true
|
||||
ij_javascript_space_before_for_semicolon = false
|
||||
ij_javascript_space_before_function_left_parenth = true
|
||||
ij_javascript_space_before_generator_mult = false
|
||||
ij_javascript_space_before_if_left_brace = true
|
||||
ij_javascript_space_before_if_parentheses = true
|
||||
ij_javascript_space_before_method_call_parentheses = false
|
||||
ij_javascript_space_before_method_left_brace = true
|
||||
ij_javascript_space_before_method_parentheses = false
|
||||
ij_javascript_space_before_property_colon = false
|
||||
ij_javascript_space_before_quest = true
|
||||
ij_javascript_space_before_switch_left_brace = true
|
||||
ij_javascript_space_before_switch_parentheses = true
|
||||
ij_javascript_space_before_try_left_brace = true
|
||||
ij_javascript_space_before_type_colon = false
|
||||
ij_javascript_space_before_unary_not = false
|
||||
ij_javascript_space_before_while_keyword = true
|
||||
ij_javascript_space_before_while_left_brace = true
|
||||
ij_javascript_space_before_while_parentheses = true
|
||||
ij_javascript_spaces_around_additive_operators = true
|
||||
ij_javascript_spaces_around_arrow_function_operator = true
|
||||
ij_javascript_spaces_around_assignment_operators = true
|
||||
ij_javascript_spaces_around_bitwise_operators = true
|
||||
ij_javascript_spaces_around_equality_operators = true
|
||||
ij_javascript_spaces_around_logical_operators = true
|
||||
ij_javascript_spaces_around_multiplicative_operators = true
|
||||
ij_javascript_spaces_around_relational_operators = true
|
||||
ij_javascript_spaces_around_shift_operators = true
|
||||
ij_javascript_spaces_around_unary_operator = false
|
||||
ij_javascript_spaces_within_array_initializer_brackets = false
|
||||
ij_javascript_spaces_within_brackets = false
|
||||
ij_javascript_spaces_within_catch_parentheses = false
|
||||
ij_javascript_spaces_within_for_parentheses = false
|
||||
ij_javascript_spaces_within_if_parentheses = false
|
||||
ij_javascript_spaces_within_imports = false
|
||||
ij_javascript_spaces_within_interpolation_expressions = false
|
||||
ij_javascript_spaces_within_method_call_parentheses = false
|
||||
ij_javascript_spaces_within_method_parentheses = false
|
||||
ij_javascript_spaces_within_object_literal_braces = false
|
||||
ij_javascript_spaces_within_object_type_braces = true
|
||||
ij_javascript_spaces_within_parentheses = false
|
||||
ij_javascript_spaces_within_switch_parentheses = false
|
||||
ij_javascript_spaces_within_type_assertion = false
|
||||
ij_javascript_spaces_within_union_types = true
|
||||
ij_javascript_spaces_within_while_parentheses = false
|
||||
ij_javascript_special_else_if_treatment = true
|
||||
ij_javascript_ternary_operation_signs_on_next_line = false
|
||||
ij_javascript_ternary_operation_wrap = off
|
||||
ij_javascript_union_types_wrap = on_every_item
|
||||
ij_javascript_use_chained_calls_group_indents = false
|
||||
ij_javascript_use_double_quotes = true
|
||||
ij_javascript_use_explicit_js_extension = auto
|
||||
ij_javascript_use_path_mapping = always
|
||||
ij_javascript_use_public_modifier = false
|
||||
ij_javascript_use_semicolon_after_statement = true
|
||||
ij_javascript_var_declaration_wrap = normal
|
||||
ij_javascript_while_brace_force = never
|
||||
ij_javascript_while_on_new_line = false
|
||||
ij_javascript_wrap_comments = false
|
||||
|
||||
[{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,jest.config}]
|
||||
indent_size = 2
|
||||
ij_json_array_wrapping = split_into_lines
|
||||
ij_json_keep_blank_lines_in_code = 0
|
||||
ij_json_keep_indents_on_empty_lines = false
|
||||
ij_json_keep_line_breaks = true
|
||||
ij_json_keep_trailing_comma = false
|
||||
ij_json_object_wrapping = split_into_lines
|
||||
ij_json_property_alignment = do_not_align
|
||||
ij_json_space_after_colon = true
|
||||
ij_json_space_after_comma = true
|
||||
ij_json_space_before_colon = false
|
||||
ij_json_space_before_comma = false
|
||||
ij_json_spaces_within_braces = false
|
||||
ij_json_spaces_within_brackets = false
|
||||
ij_json_wrap_long_lines = false
|
||||
|
||||
[{*.htm,*.html,*.ng,*.sht,*.shtm,*.shtml}]
|
||||
ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3
|
||||
ij_html_align_attributes = true
|
||||
ij_html_align_text = false
|
||||
ij_html_attribute_wrap = normal
|
||||
ij_html_block_comment_add_space = false
|
||||
ij_html_block_comment_at_first_column = true
|
||||
ij_html_do_not_align_children_of_min_lines = 0
|
||||
ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p
|
||||
ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot
|
||||
ij_html_enforce_quotes = false
|
||||
ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var
|
||||
ij_html_keep_blank_lines = 2
|
||||
ij_html_keep_indents_on_empty_lines = false
|
||||
ij_html_keep_line_breaks = true
|
||||
ij_html_keep_line_breaks_in_text = true
|
||||
ij_html_keep_whitespaces = false
|
||||
ij_html_keep_whitespaces_inside = span,pre,textarea
|
||||
ij_html_line_comment_at_first_column = true
|
||||
ij_html_new_line_after_last_attribute = never
|
||||
ij_html_new_line_before_first_attribute = never
|
||||
ij_html_quote_style = double
|
||||
ij_html_remove_new_line_before_tags = br
|
||||
ij_html_space_after_tag_name = false
|
||||
ij_html_space_around_equality_in_attribute = false
|
||||
ij_html_space_inside_empty_tag = false
|
||||
ij_html_text_wrap = normal
|
||||
|
||||
[{*.http,*.rest}]
|
||||
indent_size = 0
|
||||
ij_continuation_indent_size = 4
|
||||
ij_http request_call_parameters_wrap = normal
|
||||
|
||||
[{*.markdown,*.md}]
|
||||
ij_markdown_force_one_space_after_blockquote_symbol = true
|
||||
ij_markdown_force_one_space_after_header_symbol = true
|
||||
ij_markdown_force_one_space_after_list_bullet = true
|
||||
ij_markdown_force_one_space_between_words = true
|
||||
ij_markdown_format_tables = true
|
||||
ij_markdown_insert_quote_arrows_on_wrap = true
|
||||
ij_markdown_keep_indents_on_empty_lines = false
|
||||
ij_markdown_keep_line_breaks_inside_text_blocks = true
|
||||
ij_markdown_max_lines_around_block_elements = 1
|
||||
ij_markdown_max_lines_around_header = 1
|
||||
ij_markdown_max_lines_between_paragraphs = 1
|
||||
ij_markdown_min_lines_around_block_elements = 1
|
||||
ij_markdown_min_lines_around_header = 1
|
||||
ij_markdown_min_lines_between_paragraphs = 1
|
||||
ij_markdown_wrap_text_if_long = true
|
||||
ij_markdown_wrap_text_inside_blockquotes = true
|
||||
|
||||
[{*.yaml,*.yml}]
|
||||
indent_size = 2
|
||||
ij_yaml_align_values_properties = do_not_align
|
||||
ij_yaml_autoinsert_sequence_marker = true
|
||||
ij_yaml_block_mapping_on_new_line = false
|
||||
ij_yaml_indent_sequence_value = true
|
||||
ij_yaml_keep_indents_on_empty_lines = false
|
||||
ij_yaml_keep_line_breaks = true
|
||||
ij_yaml_sequence_on_new_line = false
|
||||
ij_yaml_space_before_colon = false
|
||||
ij_yaml_spaces_within_braces = true
|
||||
ij_yaml_spaces_within_brackets = true
|
||||
@@ -10,10 +10,7 @@ public class AspnetCoreWebContext : IWebContext
|
||||
{
|
||||
private readonly HttpContext _context;
|
||||
|
||||
public AspnetCoreWebContext(HttpContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public AspnetCoreWebContext(HttpContext context) { _context = context; }
|
||||
|
||||
public string RequestPath => _context.Request.Path;
|
||||
|
||||
@@ -82,35 +79,23 @@ public class AspnetCoreWebContext : IWebContext
|
||||
_requestForm = _context.Request.Form
|
||||
.ToDictionary(p => p.Key, p => p.Value[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
_requestForm = new Dictionary<string, string?>();
|
||||
}
|
||||
else { _requestForm = new Dictionary<string, string?>(); }
|
||||
}
|
||||
|
||||
return _requestForm;
|
||||
}
|
||||
}
|
||||
|
||||
public void ResponseWrite(string text)
|
||||
{
|
||||
_context.Response.WriteAsync(text).GetAwaiter().GetResult();
|
||||
}
|
||||
public void ResponseWrite(string text) { _context.Response.WriteAsync(text).GetAwaiter().GetResult(); }
|
||||
|
||||
public void ResponseWriteBin(byte[] content)
|
||||
{
|
||||
_context.Response.Body.WriteAsync(content).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public void ResponseFlush()
|
||||
{
|
||||
_context.Response.Body.FlushAsync().GetAwaiter().GetResult();
|
||||
}
|
||||
public void ResponseFlush() { _context.Response.Body.FlushAsync().GetAwaiter().GetResult(); }
|
||||
|
||||
public void ResponseRedirect(string url)
|
||||
{
|
||||
_context.Response.Redirect(url);
|
||||
}
|
||||
public void ResponseRedirect(string url) { _context.Response.Redirect(url); }
|
||||
|
||||
public void AddResponseCookie(string cookieName, string value, DateTime? expiration = null)
|
||||
{
|
||||
@@ -121,10 +106,7 @@ public class AspnetCoreWebContext : IWebContext
|
||||
);
|
||||
}
|
||||
|
||||
public void DelResponseCookie(string cookieName)
|
||||
{
|
||||
_context.Response.Cookies.Delete(cookieName);
|
||||
}
|
||||
public void DelResponseCookie(string cookieName) { _context.Response.Cookies.Delete(cookieName); }
|
||||
|
||||
public bool ResponseHasStarted => _context.Response.HasStarted;
|
||||
|
||||
@@ -140,10 +122,7 @@ public class AspnetCoreWebContext : IWebContext
|
||||
set => _context.Response.ContentType = value;
|
||||
}
|
||||
|
||||
public void SetResponseHeader(string key, string value)
|
||||
{
|
||||
_context.Response.Headers.SafeSet(key, value);
|
||||
}
|
||||
public void SetResponseHeader(string key, string value) { _context.Response.Headers.SafeSet(key, value); }
|
||||
|
||||
public void PrepareCacheableResponse()
|
||||
{
|
||||
@@ -161,5 +140,4 @@ public class AspnetCoreWebContext : IWebContext
|
||||
.ToString("ddd, dd MMM yyyy HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture);
|
||||
_context.Response.Headers.SafeSet("Expires", $"{expireDate} GMT");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -46,7 +46,6 @@ public class GlobalRouterMiddleware
|
||||
}
|
||||
|
||||
private static bool IsIgnoreException(Exception ex) { return ex is ThreadAbortException; }
|
||||
|
||||
}
|
||||
|
||||
public static class GlobalRouterMiddlewareExtensions
|
||||
|
||||
@@ -5,15 +5,9 @@ namespace VAR.WebFormsCore.AspNetCore;
|
||||
|
||||
public static class DefaultMain
|
||||
{
|
||||
public static void WebFormCoreMain(string[] args)
|
||||
{
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
public static void WebFormCoreMain(string[] args) { CreateHostBuilder(args).Build().Run(); }
|
||||
|
||||
private static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
.ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); });
|
||||
}
|
||||
@@ -11,14 +11,8 @@ public class Startup
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
// If using Kestrel:
|
||||
services.Configure<KestrelServerOptions>(options =>
|
||||
{
|
||||
options.AddServerHeader = false;
|
||||
});
|
||||
services.Configure<KestrelServerOptions>(options => { options.AddServerHeader = false; });
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
app.UseGlobalRouterMiddleware(env);
|
||||
}
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { app.UseGlobalRouterMiddleware(env); }
|
||||
}
|
||||
@@ -17,10 +17,7 @@ public class FrmDefault: PageCommon
|
||||
Init += FrmLogin_Init;
|
||||
}
|
||||
|
||||
private void FrmLogin_Init(object? sender, EventArgs e)
|
||||
{
|
||||
InitializeControls();
|
||||
}
|
||||
private void FrmLogin_Init(object? sender, EventArgs e) { InitializeControls(); }
|
||||
|
||||
private void InitializeControls()
|
||||
{
|
||||
@@ -38,8 +35,5 @@ public class FrmDefault: PageCommon
|
||||
Controls.Add(FormUtils.CreateField(string.Empty, _lblMessage));
|
||||
}
|
||||
|
||||
private void BtnTest_Click(object? sender, EventArgs e)
|
||||
{
|
||||
_lblMessage.Text = $"Hello World: {_txtText.Text}";
|
||||
}
|
||||
private void BtnTest_Click(object? sender, EventArgs e) { _lblMessage.Text = $"Hello World: {_txtText.Text}"; }
|
||||
}
|
||||
@@ -4,9 +4,5 @@ namespace VAR.WebFormsCore.TestWebApp;
|
||||
|
||||
public static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
DefaultMain.WebFormCoreMain(args);
|
||||
}
|
||||
|
||||
public static void Main(string[] args) { DefaultMain.WebFormCoreMain(args); }
|
||||
}
|
||||
@@ -15,12 +15,7 @@ public class TestWebAppGlobalConfig : IGlobalConfig
|
||||
public List<string> AllowedExtensions { get; } = new()
|
||||
{ ".png", ".jpg", ".jpeg", ".gif", ".ico", ".wav", ".mp3", ".ogg", ".mp4", ".webm", ".webp", ".mkv", ".avi" };
|
||||
|
||||
public bool IsUserAuthenticated(IWebContext context)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public bool IsUserAuthenticated(IWebContext context) { return false; }
|
||||
|
||||
public void UserDeauthenticate(IWebContext context)
|
||||
{
|
||||
}
|
||||
public void UserDeauthenticate(IWebContext context) { }
|
||||
}
|
||||
@@ -13,7 +13,9 @@ public class ObjectActivatorTests
|
||||
Assert.IsType<object>(result);
|
||||
}
|
||||
|
||||
private class TestType { }
|
||||
private class TestType
|
||||
{
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CreateInstance__TestType__TestType()
|
||||
|
||||
@@ -53,10 +53,7 @@ public class ButtonTests
|
||||
CommandArgument = commandArgument,
|
||||
};
|
||||
string? result = null;
|
||||
button.Click += (o, _) =>
|
||||
{
|
||||
result = (o as Button)?.CommandArgument;
|
||||
};
|
||||
button.Click += (o, _) => { result = (o as Button)?.CommandArgument; };
|
||||
page.Controls.Add(button);
|
||||
|
||||
fakeWebContext.RequestForm.Add(button.ClientID, "Clicked");
|
||||
|
||||
@@ -219,10 +219,7 @@ public class CTextBoxTests
|
||||
};
|
||||
page.Controls.Add(cTextBox);
|
||||
Button button = new();
|
||||
button.Click += (_, _) =>
|
||||
{
|
||||
cTextBox.SetClientsideHeight(null);
|
||||
};
|
||||
button.Click += (_, _) => { cTextBox.SetClientsideHeight(null); };
|
||||
page.Controls.Add(button);
|
||||
|
||||
fakeWebContext.RequestForm.Add(button.ClientID, "Clicked");
|
||||
@@ -258,10 +255,7 @@ public class CTextBoxTests
|
||||
Button button = new();
|
||||
button.Click += (_, _) =>
|
||||
{
|
||||
if (cTextBox.HidSize != null)
|
||||
{
|
||||
cTextBox.HidSize.Value = "[]";
|
||||
}
|
||||
if (cTextBox.HidSize != null) { cTextBox.HidSize.Value = "[]"; }
|
||||
};
|
||||
page.Controls.Add(button);
|
||||
|
||||
@@ -288,10 +282,7 @@ public class CTextBoxTests
|
||||
Button button = new();
|
||||
button.Click += (_, _) =>
|
||||
{
|
||||
if (cTextBox.HidSize != null)
|
||||
{
|
||||
cTextBox.HidSize.Value = "{}";
|
||||
}
|
||||
if (cTextBox.HidSize != null) { cTextBox.HidSize.Value = "{}"; }
|
||||
};
|
||||
page.Controls.Add(button);
|
||||
|
||||
@@ -373,5 +364,4 @@ public class CTextBoxTests
|
||||
}
|
||||
|
||||
#endregion IsEmpty
|
||||
|
||||
}
|
||||
@@ -16,10 +16,7 @@ public class FakeGlobalConfig : IGlobalConfig
|
||||
|
||||
private string _loginHandler = string.Empty;
|
||||
|
||||
public void FakeSetLoginHandler(string loginHandler)
|
||||
{
|
||||
_loginHandler = loginHandler;
|
||||
}
|
||||
public void FakeSetLoginHandler(string loginHandler) { _loginHandler = loginHandler; }
|
||||
|
||||
public string LoginHandler => _loginHandler;
|
||||
|
||||
@@ -27,18 +24,9 @@ public class FakeGlobalConfig : IGlobalConfig
|
||||
|
||||
private bool _authenticated;
|
||||
|
||||
public void FakeSetAuthenticated(bool authenticated)
|
||||
{
|
||||
_authenticated = authenticated;
|
||||
}
|
||||
public void FakeSetAuthenticated(bool authenticated) { _authenticated = authenticated; }
|
||||
|
||||
public bool IsUserAuthenticated(IWebContext context)
|
||||
{
|
||||
return _authenticated;
|
||||
}
|
||||
public bool IsUserAuthenticated(IWebContext context) { return _authenticated; }
|
||||
|
||||
public void UserDeauthenticate(IWebContext context)
|
||||
{
|
||||
_authenticated = false;
|
||||
}
|
||||
public void UserDeauthenticate(IWebContext context) { _authenticated = false; }
|
||||
}
|
||||
@@ -5,10 +5,7 @@ namespace VAR.WebFormsCore.Tests.Fakes;
|
||||
|
||||
public class FakeWebContext : IWebContext
|
||||
{
|
||||
public FakeWebContext(string requestMethod = "GET")
|
||||
{
|
||||
RequestMethod = requestMethod;
|
||||
}
|
||||
public FakeWebContext(string requestMethod = "GET") { RequestMethod = requestMethod; }
|
||||
|
||||
public string RequestPath => string.Empty;
|
||||
|
||||
@@ -24,15 +21,9 @@ public class FakeWebContext : IWebContext
|
||||
|
||||
public List<WritePackage> FakeWritePackages { get; } = new();
|
||||
|
||||
public void ResponseWrite(string text)
|
||||
{
|
||||
FakeWritePackages.Add(new WritePackage { Text = text, });
|
||||
}
|
||||
public void ResponseWrite(string text) { FakeWritePackages.Add(new WritePackage { Text = text, }); }
|
||||
|
||||
public void ResponseWriteBin(byte[] content)
|
||||
{
|
||||
FakeWritePackages.Add(new WritePackage { Bin = content, });
|
||||
}
|
||||
public void ResponseWriteBin(byte[] content) { FakeWritePackages.Add(new WritePackage { Bin = content, }); }
|
||||
|
||||
public void ResponseFlush()
|
||||
{
|
||||
@@ -50,17 +41,11 @@ public class FakeWebContext : IWebContext
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void DelResponseCookie(string cookieName)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public void DelResponseCookie(string cookieName) { throw new NotImplementedException(); }
|
||||
|
||||
private bool _responseHasStarted;
|
||||
|
||||
public void FakeSetResponseHasStarted(bool responseHasStarted)
|
||||
{
|
||||
_responseHasStarted = responseHasStarted;
|
||||
}
|
||||
public void FakeSetResponseHasStarted(bool responseHasStarted) { _responseHasStarted = responseHasStarted; }
|
||||
|
||||
public bool ResponseHasStarted => _responseHasStarted;
|
||||
|
||||
@@ -70,10 +55,7 @@ public class FakeWebContext : IWebContext
|
||||
|
||||
public Dictionary<string, string> FakeResponseHeaders { get; } = new();
|
||||
|
||||
public void SetResponseHeader(string key, string value)
|
||||
{
|
||||
FakeResponseHeaders.Add(key, value);
|
||||
}
|
||||
public void SetResponseHeader(string key, string value) { FakeResponseHeaders.Add(key, value); }
|
||||
|
||||
public void PrepareCacheableResponse()
|
||||
{
|
||||
@@ -93,15 +75,9 @@ public struct WritePackage
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (Text != null)
|
||||
{
|
||||
return Text;
|
||||
}
|
||||
if (Text != null) { return Text; }
|
||||
|
||||
if (Bin == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
if (Bin == null) { return string.Empty; }
|
||||
|
||||
string text = Encoding.UTF8.GetString(Bin ?? Array.Empty<byte>());
|
||||
return text;
|
||||
|
||||
@@ -25,5 +25,4 @@ public class FrmErrorTests
|
||||
""",
|
||||
actual: result);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,10 +11,7 @@ public class PageCommonTests
|
||||
|
||||
private class TestEmptyForm : PageCommon
|
||||
{
|
||||
public TestEmptyForm(bool mustBeAuthenticated)
|
||||
{
|
||||
MustBeAuthenticated = mustBeAuthenticated;
|
||||
}
|
||||
public TestEmptyForm(bool mustBeAuthenticated) { MustBeAuthenticated = mustBeAuthenticated; }
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -75,10 +75,7 @@ public class PageTests
|
||||
Page page = new();
|
||||
page.Load += (_, _) =>
|
||||
{
|
||||
if (page.IsPostBack)
|
||||
{
|
||||
fakeWebContext.FakeSetResponseHasStarted(true);
|
||||
}
|
||||
if (page.IsPostBack) { fakeWebContext.FakeSetResponseHasStarted(true); }
|
||||
};
|
||||
|
||||
page.ProcessRequest(fakeWebContext);
|
||||
@@ -96,10 +93,7 @@ public class PageTests
|
||||
Page page = new();
|
||||
page.Load += (_, _) =>
|
||||
{
|
||||
if (page.IsPostBack)
|
||||
{
|
||||
fakeWebContext.FakeSetResponseHasStarted(true);
|
||||
}
|
||||
if (page.IsPostBack) { fakeWebContext.FakeSetResponseHasStarted(true); }
|
||||
};
|
||||
|
||||
page.ProcessRequest(fakeWebContext);
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FDeconstructionDeclarations/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FElsewhere/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FSimpleTypes/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_ENUM_ARRANGEMENT/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_EXISTING_EXPR_MEMBER_ARRANGEMENT/@EntryValue">False</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ACCESSOR_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ACCESSORHOLDER_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_EMBEDDED_BLOCK_ON_SAME_LINE/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ENUM_ON_SINGLE_LINE/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_METHOD_ON_SINGLE_LINE/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_AFTER_DECLARATION_LPAR/@EntryValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_ENUM_DECLARATION/@EntryValue">CHOP_IF_LONG</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_PARAMETERS_STYLE/@EntryValue">CHOP_IF_LONG</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ID/@EntryIndexedValue">ID</s:String>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=abiword/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Childs/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
@@ -40,13 +40,8 @@ public static class GlobalConfig
|
||||
public string LoginHandler => string.Empty;
|
||||
public List<string> AllowedExtensions { get; } = new();
|
||||
|
||||
public bool IsUserAuthenticated(IWebContext context)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public bool IsUserAuthenticated(IWebContext context) { return false; }
|
||||
|
||||
public void UserDeauthenticate(IWebContext context)
|
||||
{
|
||||
}
|
||||
public void UserDeauthenticate(IWebContext context) { }
|
||||
}
|
||||
}
|
||||
@@ -96,10 +96,7 @@ public class GlobalRouter
|
||||
{
|
||||
lock (Handlers)
|
||||
{
|
||||
if (Handlers.ContainsKey(typeName) == false)
|
||||
{
|
||||
Handlers.Add(typeName, type);
|
||||
}
|
||||
if (Handlers.ContainsKey(typeName) == false) { Handlers.Add(typeName, type); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,10 +85,7 @@ public static class MultiLang
|
||||
|
||||
Dictionary<string, object>? literalCurrentCulture = _literals[culture];
|
||||
|
||||
if (literalCurrentCulture == null || literalCurrentCulture.ContainsKey(resource) == false)
|
||||
{
|
||||
return resource;
|
||||
}
|
||||
if (literalCurrentCulture == null || literalCurrentCulture.ContainsKey(resource) == false) { return resource; }
|
||||
|
||||
return (literalCurrentCulture[resource] as string) ?? resource;
|
||||
}
|
||||
|
||||
@@ -7,10 +7,7 @@ public static class ServerHelpers
|
||||
{
|
||||
private static string? _contentRoot;
|
||||
|
||||
public static void SetContentRoot(string contentRoot)
|
||||
{
|
||||
_contentRoot = contentRoot;
|
||||
}
|
||||
public static void SetContentRoot(string contentRoot) { _contentRoot = contentRoot; }
|
||||
|
||||
public static string MapContentPath(string path)
|
||||
{
|
||||
@@ -20,10 +17,7 @@ public static class ServerHelpers
|
||||
|
||||
public static string HtmlEncode(string text)
|
||||
{
|
||||
if (string.IsNullOrEmpty(text))
|
||||
{
|
||||
return text;
|
||||
}
|
||||
if (string.IsNullOrEmpty(text)) { return text; }
|
||||
|
||||
StringBuilder sbResult = new();
|
||||
|
||||
@@ -54,10 +48,7 @@ public static class ServerHelpers
|
||||
sbResult.Append(((int)ch).ToString(NumberFormatInfo.InvariantInfo));
|
||||
sbResult.Append(';');
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResult.Append(ch);
|
||||
}
|
||||
else { sbResult.Append(ch); }
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -69,28 +60,19 @@ public static class ServerHelpers
|
||||
|
||||
public static string UrlEncode(string text)
|
||||
{
|
||||
if (string.IsNullOrEmpty(text))
|
||||
{
|
||||
return text;
|
||||
}
|
||||
if (string.IsNullOrEmpty(text)) { return text; }
|
||||
|
||||
StringBuilder sbResult = new();
|
||||
|
||||
foreach (var ch in text)
|
||||
{
|
||||
if (ch == ' ')
|
||||
{
|
||||
sbResult.Append('+');
|
||||
}
|
||||
if (ch == ' ') { sbResult.Append('+'); }
|
||||
else if (IsUrlSafe(ch) == false)
|
||||
{
|
||||
int intCh = ch;
|
||||
sbResult.Append($"%{intCh:X02}");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResult.Append(ch);
|
||||
}
|
||||
else { sbResult.Append(ch); }
|
||||
}
|
||||
|
||||
return sbResult.ToString();
|
||||
@@ -108,10 +90,7 @@ public static class ServerHelpers
|
||||
ch == '!' ||
|
||||
ch == '*' ||
|
||||
ch == '(' ||
|
||||
ch == ')')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
ch == ')') { return true; }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -23,5 +23,6 @@ public class Unit
|
||||
|
||||
public enum UnitType
|
||||
{
|
||||
Pixel, Percentage,
|
||||
Pixel,
|
||||
Percentage,
|
||||
}
|
||||
@@ -20,10 +20,8 @@ public class Button : Control, IReceivePostbackEvent
|
||||
textWriter.Write("<input type=\"submit\" ");
|
||||
RenderAttributes(textWriter);
|
||||
RenderAttribute(textWriter, "value", Text);
|
||||
if (string.IsNullOrEmpty(OnClientClick) == false)
|
||||
{
|
||||
RenderAttribute(textWriter, "onclick", OnClientClick);
|
||||
}
|
||||
if (string.IsNullOrEmpty(OnClientClick) == false) { RenderAttribute(textWriter, "onclick", OnClientClick); }
|
||||
|
||||
textWriter.Write(">");
|
||||
|
||||
base.Render(textWriter);
|
||||
|
||||
@@ -72,7 +72,8 @@ public class CTextBox : Control, INamingContainer, IValidableControl
|
||||
string strCfgName = $"{ClientID}_cfg";
|
||||
Dictionary<string, object> cfg = new()
|
||||
{
|
||||
{"txtContent", _txtContent.ClientID}, {"hidSize", _hidSize?.ClientID ?? string.Empty}, {"keepSize", KeepSize},
|
||||
{ "txtContent", _txtContent.ClientID }, { "hidSize", _hidSize?.ClientID ?? string.Empty },
|
||||
{ "keepSize", KeepSize },
|
||||
};
|
||||
StringBuilder sbCfg = new StringBuilder();
|
||||
sbCfg.AppendFormat("<script>\n");
|
||||
@@ -87,10 +88,7 @@ public class CTextBox : Control, INamingContainer, IValidableControl
|
||||
private void CTextBox_PreRender(object? sender, EventArgs e)
|
||||
{
|
||||
_txtContent.CssClass = CssClassBase;
|
||||
if (string.IsNullOrEmpty(CssClassExtra) == false)
|
||||
{
|
||||
_txtContent.CssClass = $"{CssClassBase} {CssClassExtra}";
|
||||
}
|
||||
if (string.IsNullOrEmpty(CssClassExtra) == false) { _txtContent.CssClass = $"{CssClassBase} {CssClassExtra}"; }
|
||||
|
||||
if (Page?.IsPostBack == true && (AllowEmpty == false && IsEmpty()) || MarkedInvalid)
|
||||
{
|
||||
@@ -99,10 +97,7 @@ public class CTextBox : Control, INamingContainer, IValidableControl
|
||||
|
||||
_txtContent.Attributes.Add("onchange", "ElementRemoveClass(this, 'textBoxInvalid');");
|
||||
|
||||
if (string.IsNullOrEmpty(PlaceHolder) == false)
|
||||
{
|
||||
_txtContent.Attributes.Add("placeholder", PlaceHolder);
|
||||
}
|
||||
if (string.IsNullOrEmpty(PlaceHolder) == false) { _txtContent.Attributes.Add("placeholder", PlaceHolder); }
|
||||
|
||||
if (NextFocusOnEnter != null)
|
||||
{
|
||||
@@ -138,10 +133,8 @@ public class CTextBox : Control, INamingContainer, IValidableControl
|
||||
{
|
||||
if (height == null)
|
||||
{
|
||||
if (_hidSize != null)
|
||||
{
|
||||
_hidSize.Value = string.Empty;
|
||||
}
|
||||
if (_hidSize != null) { _hidSize.Value = string.Empty; }
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -151,13 +144,11 @@ public class CTextBox : Control, INamingContainer, IValidableControl
|
||||
JsonParser jsonParser = new JsonParser();
|
||||
sizeObj = jsonParser.Parse(_hidSize?.Value) as Dictionary<string, object?>;
|
||||
}
|
||||
|
||||
sizeObj ??= new Dictionary<string, object?> { { "height", null }, { "width", null }, { "scrollTop", null }, };
|
||||
sizeObj["height"] = height;
|
||||
|
||||
if (_hidSize != null)
|
||||
{
|
||||
_hidSize.Value = JsonWriter.WriteObject(sizeObj);
|
||||
}
|
||||
if (_hidSize != null) { _hidSize.Value = JsonWriter.WriteObject(sizeObj); }
|
||||
}
|
||||
|
||||
#endregion Public methods
|
||||
|
||||
@@ -185,10 +185,7 @@ public class Control
|
||||
|
||||
if (_controls != null)
|
||||
{
|
||||
foreach (Control child in _controls)
|
||||
{
|
||||
child.ChildsOfType<T>(controls);
|
||||
}
|
||||
foreach (Control child in _controls) { child.ChildsOfType<T>(controls); }
|
||||
}
|
||||
|
||||
return controls;
|
||||
|
||||
@@ -7,6 +7,7 @@ public class LiteralControl : Control
|
||||
public string Content { get; set; } = string.Empty;
|
||||
|
||||
public LiteralControl() { }
|
||||
|
||||
public LiteralControl(string content) { Content = content; }
|
||||
|
||||
protected override void Render(TextWriter textWriter) { textWriter.Write(Content); }
|
||||
|
||||
@@ -50,5 +50,7 @@ public class TextBox : Control
|
||||
|
||||
public enum TextBoxMode
|
||||
{
|
||||
Normal, Password, MultiLine,
|
||||
Normal,
|
||||
Password,
|
||||
MultiLine,
|
||||
}
|
||||
@@ -35,10 +35,7 @@ public static class FormUtils
|
||||
return pnlRow;
|
||||
}
|
||||
|
||||
public static bool Control_IsValid(Control control)
|
||||
{
|
||||
return (control as IValidableControl)?.IsValid() != false;
|
||||
}
|
||||
public static bool Control_IsValid(Control control) { return (control as IValidableControl)?.IsValid() != false; }
|
||||
|
||||
public static bool Controls_AreValid(ControlCollection controls)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,8 @@ public class FrmError : PageCommon
|
||||
//if (exAux is HttpUnhandledException && exAux.InnerException != null) { exAux = exAux.InnerException; }
|
||||
while (exAux != null)
|
||||
{
|
||||
LiteralControl lblMessage = new LiteralControl($"<p><b>Message:</b> {HttpUtility.HtmlEncode(exAux.Message)}</p>");
|
||||
LiteralControl lblMessage =
|
||||
new LiteralControl($"<p><b>Message:</b> {HttpUtility.HtmlEncode(exAux.Message)}</p>");
|
||||
Controls.Add(lblMessage);
|
||||
|
||||
LiteralControl lblStacktraceTitle = new LiteralControl("<p><b>Stacktrace:</b></p>");
|
||||
|
||||
@@ -41,10 +41,7 @@ public class PageCommon : Page
|
||||
{
|
||||
Context?.PrepareUncacheableResponse();
|
||||
|
||||
if (Context != null)
|
||||
{
|
||||
_isAuthenticated = GlobalConfig.Get().IsUserAuthenticated(Context);
|
||||
}
|
||||
if (Context != null) { _isAuthenticated = GlobalConfig.Get().IsUserAuthenticated(Context); }
|
||||
|
||||
if (MustBeAuthenticated && _isAuthenticated == false)
|
||||
{
|
||||
@@ -68,10 +65,8 @@ public class PageCommon : Page
|
||||
|
||||
private void btnLogout_Click(object? sender, EventArgs e)
|
||||
{
|
||||
if(Context != null)
|
||||
{
|
||||
GlobalConfig.Get().UserDeauthenticate(Context);
|
||||
}
|
||||
if (Context != null) { GlobalConfig.Get().UserDeauthenticate(Context); }
|
||||
|
||||
if (MustBeAuthenticated) { Context?.ResponseRedirect(GlobalConfig.Get().LoginHandler); }
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,9 @@ function GetElement(element) {
|
||||
//
|
||||
function ElementAddClass(element, classname) {
|
||||
element = GetElement(element);
|
||||
if (!element) { return; }
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
var cn = element.className;
|
||||
if (cn.indexOf(classname) !== -1) {
|
||||
return;
|
||||
@@ -29,7 +31,9 @@ function ElementAddClass(element, classname) {
|
||||
//
|
||||
function ElementRemoveClass(element, className) {
|
||||
element = GetElement(element);
|
||||
if (!element) { return; }
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
var regex = new RegExp('(?:^|\\s)' + className + '(?!\\S)');
|
||||
if (regex.test(element.className)) {
|
||||
element.className = element.className.replace(regex, '');
|
||||
@@ -41,7 +45,9 @@ function ElementRemoveClass(element, className) {
|
||||
//
|
||||
function ElementToggleClass(element, className) {
|
||||
element = GetElement(element);
|
||||
if (!element) { return; }
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
var regex = new RegExp('(?:^|\\s)' + className + '(?!\\S)');
|
||||
if (regex.test(element.className)) {
|
||||
element.className = element.className.replace(regex, '');
|
||||
@@ -71,24 +77,34 @@ function fixedEncodeURIComponent(str) {
|
||||
if (!window.localStorage) {
|
||||
window.localStorage = {
|
||||
getItem: function (sKey) {
|
||||
if (!sKey || !this.hasOwnProperty(sKey)) { return null; }
|
||||
if (!sKey || !this.hasOwnProperty(sKey)) {
|
||||
return null;
|
||||
}
|
||||
return unescape(document.cookie.replace(new RegExp("(?:^|.*;\\s*)" + escape(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"), "$1"));
|
||||
},
|
||||
key: function (nKeyId) { return unescape(document.cookie.replace(/\s*\=(?:.(?!;))*$/, "").split(/\s*\=(?:[^;](?!;))*[^;]?;\s*/)[nKeyId]); },
|
||||
key: function (nKeyId) {
|
||||
return unescape(document.cookie.replace(/\s*\=(?:.(?!;))*$/, "").split(/\s*\=(?:[^;](?!;))*[^;]?;\s*/)[nKeyId]);
|
||||
},
|
||||
setItem: function (sKey, sValue) {
|
||||
if (!sKey) { return; }
|
||||
if (!sKey) {
|
||||
return;
|
||||
}
|
||||
document.cookie = escape(sKey) + "=" + escape(sValue) + "; path=/";
|
||||
this.length = document.cookie.match(/\=/g).length;
|
||||
},
|
||||
length: 0,
|
||||
removeItem: function (sKey) {
|
||||
if (!sKey || !this.hasOwnProperty(sKey)) { return; }
|
||||
if (!sKey || !this.hasOwnProperty(sKey)) {
|
||||
return;
|
||||
}
|
||||
var sExpDate = new Date();
|
||||
sExpDate.setDate(sExpDate.getDate() - 1);
|
||||
document.cookie = escape(sKey) + "=; expires=" + sExpDate.toGMTString() + "; path=/";
|
||||
this.length--;
|
||||
},
|
||||
hasOwnProperty: function (sKey) { return (new RegExp("(?:^|;\\s*)" + escape(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie); }
|
||||
hasOwnProperty: function (sKey) {
|
||||
return (new RegExp("(?:^|;\\s*)" + escape(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie);
|
||||
}
|
||||
};
|
||||
window.localStorage.length = (document.cookie.match(/\=/g) || window.localStorage).length;
|
||||
}
|
||||
@@ -172,6 +172,7 @@ textarea.textBox {
|
||||
.button:hover {
|
||||
background-color: rgb(220, 220, 220);
|
||||
}
|
||||
|
||||
.button:focus {
|
||||
border: solid 1px black;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user