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

Change confirm action to dialog element #2357

Closed
wants to merge 5 commits into from
Closed
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
6 changes: 6 additions & 0 deletions internal/locale/translations/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "Sind Sie sicher?",
"confirm.question.refresh": "Möchten Sie eine erzwungene Aktualisierung durchführen?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "ja",
"confirm.no": "nein",
"confirm.loading": "In Arbeit...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/el_EL.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "Είστε σίγουροι;",
"confirm.question.refresh": "Θέλετε να επιτελέσετε μια υποχρεωτική ανανέωση;",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "ναι",
"confirm.no": "όχι",
"confirm.loading": "Σε εξέλιξη...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "Are you sure?",
"confirm.question.refresh": "Are you sure you want to force refresh?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "yes",
"confirm.no": "no",
"confirm.loading": "In progress…",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "¿Estás seguro?",
"confirm.question.refresh": "¿Quieres forzar la actualización?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "sí",
"confirm.no": "no",
"confirm.loading": "En progreso...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/fi_FI.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "Oletko varma?",
"confirm.question.refresh": "Haluatko pakottaa päivityksen?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "kyllä",
"confirm.no": "ei",
"confirm.loading": "Käynnissä...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Aller au contenu",
"confirm.question": "Êtes-vous sûr ?",
"confirm.question.refresh": "Voulez-vous forcer le rafraîchissement ?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "oui",
"confirm.no": "non",
"confirm.loading": "En cours...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/hi_IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "मंजूर है?",
"confirm.question.refresh": "क्या आप बल द्वारा ताज़ा करना चाहते हैं?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "हाँ",
"confirm.no": " नहीं",
"confirm.loading": " प्रगति में है ...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/id_ID.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "Apakah Anda yakin?",
"confirm.question.refresh": "Apakah Anda ingin memaksa penyegaran?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "ya",
"confirm.no": "tidak",
"confirm.loading": "Sedang progres...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/it_IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "Sei sicuro?",
"confirm.question.refresh": "Vuoi forzare l'aggiornamento?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "sì",
"confirm.no": "no",
"confirm.loading": "In corso...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/ja_JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "よろしいですか?",
"confirm.question.refresh": "強制的に更新しますか?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "はい",
"confirm.no": "いいえ",
"confirm.loading": "実行中…",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/nl_NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "Weet je het zeker?",
"confirm.question.refresh": "Wil je een gedwongen vernieuwing uitvoeren?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "ja",
"confirm.no": "nee",
"confirm.loading": "Bezig...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/pl_PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "Czy jesteś pewny?",
"confirm.question.refresh": "Czy chcesz wymusić odświeżenie?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "tak",
"confirm.no": "nie",
"confirm.loading": "W toku...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/pt_BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "Tem certeza?",
"confirm.question.refresh": "Você deseja forçar a atualização?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "Sim",
"confirm.no": "Não",
"confirm.loading": "Carregando...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/ru_RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "Вы уверены?",
"confirm.question.refresh": "Вы хотите выполнить принудительное обновление?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "да",
"confirm.no": "нет",
"confirm.loading": "В процессе…",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/tr_TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "Emin misiniz?",
"confirm.question.refresh": "Zorla yenilemek istiyor musunuz?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "evet",
"confirm.no": "hayır",
"confirm.loading": "Devam ediyor...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/uk_UA.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "Ви впевнені?",
"confirm.question.refresh": "Ви хочете змусити оновити?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "так",
"confirm.no": "ні",
"confirm.loading": "В процесі...",
Expand Down
6 changes: 6 additions & 0 deletions internal/locale/translations/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"skip_to_content": "Skip to content",
"confirm.question": "您确认吗?",
"confirm.question.refresh": "您是否要强制刷新?",
"confirm.action.category.remove": "Remove %s category",
"confirm.action.category.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.feed.remove": "Remove %s feed",
"confirm.action.feed.mark_all_as_read": "Mark all %s entries as read",
"confirm.action.user.remove": "Remove user %s",
"confirm.action.unshare": "Unshare %s",
"confirm.yes": "是",
"confirm.no": "否",
"confirm.loading": "执行中…",
Expand Down
8 changes: 7 additions & 1 deletion internal/locale/translations/zh_TW.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"skip_to_content": "Skip to content",
"skip_to_content": "跳至主要內容",
"confirm.question": "您確認嗎?",
"confirm.question.refresh": "您想要強制刷新嗎?",
"confirm.action.category.remove": "移除%s分類",
"confirm.action.category.mark_all_as_read": "將%s的所有文章標記為已讀",
"confirm.action.feed.remove": "移除%s feed",
"confirm.action.feed.mark_all_as_read": "將%s的所有文章標記為已讀",
"confirm.action.user.remove": "移除使用者%s",
"confirm.action.unshare": "取消分享%s",
"confirm.yes": "是",
"confirm.no": "否",
"confirm.loading": "執行中…",
Expand Down
11 changes: 5 additions & 6 deletions internal/template/templates/common/feed_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,17 @@ <h2 id="feed-title-{{ .ID }}" class="item-title">
</ul>
<ul class="item-meta-icons">
<li class="item-meta-icons-refresh">
<a href="{{ route "refreshFeed" "feedID" .ID }}"
aria-describedby="feed-title-{{ .ID }}">{{ icon "refresh" }}<span class="icon-label">{{ t "menu.refresh_feed" }}</span></a>
<a href="{{ route "refreshFeed" "feedID" .ID }}">{{ icon "refresh" }}<span class="icon-label">{{ t "menu.refresh_feed" }}</span></a>
</li>
<li class="item-meta-icons-edit">
<a href="{{ route "editFeed" "feedID" .ID }}"
aria-describedby="feed-title-{{ .ID }}">{{ icon "edit" }}<span class="icon-label">{{ t "menu.edit_feed" }}</span></a>
<a href="{{ route "editFeed" "feedID" .ID }}">{{ icon "edit" }}<span class="icon-label">{{ t "menu.edit_feed" }}</span></a>
</li>
<li class="item-meta-icons-remove">
<button
aria-describedby="feed-title-{{ .ID }}"
data-confirm="true"
data-confirm-is-danger
data-label-question="{{ t "confirm.question" }}"
data-label-action="{{ t "confirm.action.feed.remove" .Title }}"
data-label-yes="{{ t "confirm.yes" }}"
data-label-no="{{ t "confirm.no" }}"
data-label-loading="{{ t "confirm.loading" }}"
Expand All @@ -71,9 +70,9 @@ <h2 id="feed-title-{{ .ID }}" class="item-title">
{{ if .UnreadCount }}
<li class="item-meta-icons-mark-as-read">
<button
aria-describedby="feed-title-{{ .ID }}"
data-confirm="true"
data-label-question="{{ t "confirm.question" }}"
data-label-action="{{ t "confirm.action.feed.mark_all_as_read" .Title }}"
data-label-yes="{{ t "confirm.yes" }}"
data-label-no="{{ t "confirm.no" }}"
data-label-loading="{{ t "confirm.loading" }}"
Expand Down
8 changes: 1 addition & 7 deletions internal/template/templates/common/item_meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<ul class="item-meta-icons">
<li class="item-meta-icons-read">
<button
aria-describedby="entry-title-{{ .entry.ID }}"
title="{{ t "entry.status.title" }}"
data-toggle-status="true"
data-label-loading="{{ t "entry.state.saving" }}"
Expand All @@ -29,7 +28,6 @@
</li>
<li class="item-meta-icons-star">
<button
aria-describedby="entry-title-{{ .entry.ID }}"
data-toggle-bookmark="true"
data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}"
data-label-loading="{{ t "entry.state.saving" }}"
Expand All @@ -41,16 +39,15 @@
{{ if .entry.ShareCode }}
<li class="item-meta-icons-share">
<a href="{{ route "sharedEntry" "shareCode" .entry.ShareCode }}"
aria-describedby="entry-title-{{ .entry.ID }}"
title="{{ t "entry.shared_entry.title" }}"
target="_blank">{{ icon "share" }}<span class="icon-label">{{ t "entry.shared_entry.label" }}</span></a>
</li>
<li class="item-meta-icons-delete">
<button
aria-describedby="entry-title-{{ .entry.ID }}"
data-confirm="true"
data-url="{{ route "unshareEntry" "entryID" .entry.ID }}"
data-label-question="{{ t "confirm.question" }}"
data-label-action="{{ t "confirm.action.unshare" .entry.Title }}"
data-label-yes="{{ t "confirm.yes" }}"
data-label-no="{{ t "confirm.no" }}"
data-label-loading="{{ t "confirm.loading" }}">{{ icon "delete" }}<span class="icon-label">{{ t "entry.unshare.label" }}</span></button>
Expand All @@ -59,7 +56,6 @@
{{ if .hasSaveEntry }}
<li>
<button
aria-describedby="entry-title-{{ .entry.ID }}"
title="{{ t "entry.save.title" }}"
data-save-entry="true"
data-save-url="{{ route "saveEntry" "entryID" .entry.ID }}"
Expand All @@ -70,7 +66,6 @@
{{ end }}
<li class="item-meta-icons-external-url">
<a href="{{ .entry.URL | safeURL }}"
aria-describedby="entry-title-{{ .entry.ID }}"
target="_blank"
rel="noopener noreferrer"
referrerpolicy="no-referrer"
Expand All @@ -79,7 +74,6 @@
{{ if .entry.CommentsURL }}
<li class="item-meta-icons-comments">
<a href="{{ .entry.CommentsURL | safeURL }}"
aria-describedby="entry-title-{{ .entry.ID }}"
title="{{ t "entry.comments.title" }}"
target="_blank"
rel="noopener noreferrer"
Expand Down
23 changes: 23 additions & 0 deletions internal/template/templates/common/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,29 @@
<main id="main">
{{template "content" .}}
</main>

<dialog
role="alertdialog"
id="confirm-alert-dialog"
class="alert-dialog"
>
<template id="confirm-dialog-template">
<form class="alert-dialog-close-form" method="dialog">
<button class="alert-dialog-close-form-button" aria-label="Close dialog" autofocus>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16">
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/>
</svg>
</button>
</form>
<h2 class="alert-dialog-title"></h2>
<p class="alert-dialog-description"></p>
<button class="alert-dialog-confirm-button button button-primary">
</button>
<button class="alert-dialog-cancel-button button button-secondary">
</button>
</template>
</dialog>

<template id="keyboard-shortcuts">
<div id="modal-left">
<button class="btn-close-modal" aria-label="Close">x</button>
Expand Down
5 changes: 3 additions & 2 deletions internal/template/templates/views/api_keys.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ <h1 id="page-header-title">{{ t "page.api_keys.title" }}</h1>
<tr>
<th>{{ t "page.api_keys.table.actions" }}</th>
<td>
<a href="#"
<button
data-confirm="true"
data-label-question="{{ t "confirm.question" }}"
data-label-action="{{ t "action.remove" }}"
data-label-yes="{{ t "confirm.yes" }}"
data-label-no="{{ t "confirm.no" }}"
data-label-loading="{{ t "confirm.loading" }}"
data-url="{{ route "removeAPIKey" "keyID" .ID }}">{{ t "action.remove" }}</a>
data-url="{{ route "removeAPIKey" "keyID" .ID }}">{{ t "action.remove" }}</button>
</td>
</tr>
</table>
Expand Down
Loading
Loading