Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: modal functionaltiy #17

Merged
merged 5 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
!.github
# ignore node/grunt dependency directories
node_modules/
wp-content/

# ignore vendor
vendor/
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"helsingborg-stad/acf-export-manager": ">=1.0.0",
"symfony/polyfill-intl-idn": "1.31.0",
"helsingborg-stad/wpservice": "^2.0",
"helsingborg-stad/acfservice": "^0.8.1"
"helsingborg-stad/acfservice": "^0.8.1",
"helsingborg-stad/component-library": "^4"
},
"require-dev": {
"codedungeon/phpunit-result-printer": "^0.32.0",
Expand Down
4 changes: 2 additions & 2 deletions dist/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"css/broken-link-detector.css": "css/broken-link-detector.024cd1a77a7b5c050e6a.css",
"js/context-detector.js": "js/context-detector.93354089fe4a513a8445.js",
"css/broken-link-detector.css": "css/broken-link-detector.40888f073f7fe120bcae.css",
"js/context-detector.js": "js/context-detector.09d51a4f92bccb526918.js",
"js/editor-highlight.js": "js/editor-highlight.a7ccb59aeba3991ac935.js"
}
Binary file modified languages/broken-link-detector-sv_SE.mo
Binary file not shown.
99 changes: 78 additions & 21 deletions languages/broken-link-detector-sv_SE.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Broken Link Detector\n"
"POT-Creation-Date: 2024-11-13 10:53+0100\n"
"PO-Revision-Date: 2024-11-13 11:03+0100\n"
"POT-Creation-Date: 2024-12-03 12:37+0100\n"
"PO-Revision-Date: 2024-12-03 12:38+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: sv_SE\n"
Expand All @@ -15,23 +15,23 @@ msgstr ""
"X-Poedit-WPHeader: broken-link-detector.php\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n"
"X-Poedit-SearchPathExcluded-1: dist\n"
"X-Poedit-SearchPathExcluded-2: vendor\n"
"X-Poedit-SearchPathExcluded-3: node_modules\n"

#: source/fields/php/context-detection.php:6
#: source/fields/php/context-detection.php:8
msgid "Context Detect"
msgstr "Identifiering av användarkontext"

#: source/fields/php/context-detection.php:10
#: source/fields/php/context-detection.php:12
msgid "Enable detection of user context"
msgstr "Identifiera användarens kontext i nätverket"

#: source/fields/php/context-detection.php:14
#: source/fields/php/context-detection.php:16
msgid ""
"The user detection functionality will disable links that are internal only. "
"It also adds a tipbox to them explaining why the link is unreachable."
Expand All @@ -41,51 +41,71 @@ msgstr ""
"tillgängliga om denna resurs är otillgänglig, kommer markeras som icke "
"klickbara."

#: source/fields/php/context-detection.php:22
#: source/fields/php/context-detection.php:24
msgid "Detects user context by fetching a internal resource."
msgstr ""
"Identifierar användarens kontext i nätverket genom att försöka hämta en "
"intern resurs."

#: source/fields/php/context-detection.php:24
#: source/fields/php/context-detection.php:26
msgid "Enabled"
msgstr "Aktiverad"

#: source/fields/php/context-detection.php:25
#: source/fields/php/context-detection.php:27
msgid "Disabled"
msgstr "Avaktiverad"

#: source/fields/php/context-detection.php:30
#: source/fields/php/context-detection.php:32
msgid "Internal Context Detection Resource"
msgstr "Resurs som ska hämtas"

#: source/fields/php/context-detection.php:34
#: source/fields/php/context-detection.php:36
msgid ""
"The internal context checker require you to publish a image on a server "
"without public access. The image should be as small as possible, if your "
"site is running on https, this resource must also be served with https."
msgstr ""
"För att identifiera användarens kontext, krävs det att du publicerar en "
"bild på en webbadress som bara kan nås från det interna nätverket. Resursen "
"måste vara tillgänglig via http eller https (om din webbplats använder ssl-"
"För att identifiera användarens kontext, krävs det att du publicerar en bild "
"på en webbadress som bara kan nås från det interna nätverket. Resursen måste "
"vara tillgänglig via http eller https (om din webbplats använder ssl-"
"certifikat)."

#: source/fields/php/context-detection.php:51
#: source/fields/php/context-detection.php:53
msgid "https://internal.resource.admin-network.local/image-1x1.jpg"
msgstr ""

#: source/fields/php/context-detection.php:55
#: source/fields/php/context-detection.php:57
msgid "Inform user by the following methods"
msgstr "Informera användaren genom"

#: source/fields/php/context-detection.php:78
msgid "Tooltip"
msgstr "Text på tooltip"

#: source/fields/php/context-detection.php:79
msgid "Modal"
msgstr "Modalfönster"

#: source/fields/php/context-detection.php:92
msgid "Tooltip Text"
msgstr "Text på tooltip"

#: source/fields/php/context-detection.php:59
msgid "The text that displays in the tooltip, whenever a link is unavabile."
#: source/fields/php/context-detection.php:96
msgid "The text that displays in the tooltip, whenever a link is unavailable."
msgstr "Den text som ska visas när en länk inte är tillgänglig."

#: source/fields/php/context-detection.php:77 source/php/Config/Config.php:340
msgid "Link unavabile"
#: source/fields/php/context-detection.php:114 source/php/Config/Config.php:360
msgid "Link unavailable"
msgstr "Otillgänglig"

#: source/fields/php/context-detection.php:120
msgid "Modal Title"
msgstr "Titel i modalfönster"

#: source/fields/php/context-detection.php:148
msgid "Modal Content"
msgstr "Innehåll i modalfönster"

#: source/fields/php/local-domains.php:6
msgid "Local Domain Settings"
msgstr "Inställningar för lokala domäner"
Expand Down Expand Up @@ -177,6 +197,43 @@ msgstr "Alla HTTP Koder"
msgid "Filter"
msgstr "Filter"

#: source/php/Config/Config.php:396
msgid "Content unavailable"
msgstr "Länk otillgänglig"

#: source/php/Config/Config.php:414
msgid ""
"\n"
" This link cannot be accessed on your current network. The system you "
"are trying to reach is only available through a secure, authorized "
"connection. \n"
"\n"
" To access it, you need to either be connected to the network in a "
"specific location, such as an office, or use a secure connection method, "
"like a VPN. \n"
"\n"
" Please ensure you are connected to the correct network to proceed.\n"
" "
msgstr ""
"\n"
" Den här länken kan inte nås på ditt nuvarande nätverk. Systemet du "
"försöker nå är endast tillgängligt genom en säker, auktoriserad anslutning.\n"
"\n"
" För att få åtkomst behöver du antingen vara ansluten till nätverket på "
"en specifik plats, som ett kontor, eller använda en säker anslutningsmetod, "
"som en VPN.\n"
"\n"
" Vänligen säkerställ att du är ansluten till rätt nätverk för att "
"fortsätta. "

#: source/php/Modal.php:28
msgid "Open Anyway"
msgstr "Fortsätt ändå"

#: source/php/Modal.php:29
msgid "Close"
msgstr "Stäng"

#. Plugin Name of the plugin/theme
msgid "Broken Link Detector"
msgstr "Brutna länkar (Broken Link Detector)"
Expand Down
101 changes: 96 additions & 5 deletions source/fields/json/context-detection.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,82 @@
"default_value": "",
"placeholder": "https:\/\/internal.resource.admin-network.local\/image-1x1.jpg"
},
{
"key": "field_674ed2cff358e",
"label": "Inform user by the following methods",
"name": "broken_links_context_notify_by",
"aria-label": "",
"type": "checkbox",
"instructions": "",
"required": 0,
"conditional_logic": [
[
{
"field": "field_6718e9eed55b7",
"operator": "==",
"value": "1"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"tooltip": "Tooltip",
"modal": "Modal"
},
"default_value": [],
"return_format": "value",
"allow_custom": 0,
"layout": "horizontal",
"toggle": 0,
"save_custom": 0,
"custom_choice_button_text": "L\u00e4gg till nytt val"
},
{
"key": "field_6733096f5d072",
"label": "Tooltip Text",
"name": "broken_links_context_tooltip",
"aria-label": "",
"type": "text",
"instructions": "The text that displays in the tooltip, whenever a link is unavabile.",
"instructions": "The text that displays in the tooltip, whenever a link is unavailable.",
"required": 0,
"conditional_logic": [
[
{
"field": "field_6718e9eed55b7",
"field": "field_674ed2cff358e",
"operator": "==",
"value": "1"
"value": "tooltip"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"maxlength": "",
"placeholder": "Link unavailable",
"prepend": "",
"append": ""
},
{
"key": "field_674ed3fcf358f",
"label": "Modal Title",
"name": "broken_links_context_modal_title",
"aria-label": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": [
[
{
"field": "field_674ed2cff358e",
"operator": "==",
"value": "modal"
}
]
],
Expand All @@ -71,9 +133,38 @@
},
"default_value": "",
"maxlength": "",
"placeholder": "Link unavabile",
"placeholder": "",
"prepend": "",
"append": ""
},
{
"key": "field_674ed42ef3590",
"label": "Modal Content",
"name": "broken_links_context_modal_content",
"aria-label": "",
"type": "textarea",
"instructions": "",
"required": 0,
"conditional_logic": [
[
{
"field": "field_674ed2cff358e",
"operator": "==",
"value": "modal"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"acfe_textarea_code": 0,
"maxlength": "",
"rows": "",
"placeholder": "",
"new_lines": ""
}
],
"location": [
Expand Down Expand Up @@ -102,4 +193,4 @@
"acfe_meta": "",
"acfe_note": ""
}]

Loading
Loading