Skip to content

Commit bd7bf24

Browse files
committed
feat(ui): add alerts
1 parent a0c5b4e commit bd7bf24

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

web/src/lang/en.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,13 @@ export default {
298298
deleteRunner: 'Delete Runner',
299299
newRunnerToken: 'New Runner',
300300
askDeleteRunner: 'Do you really want to delete runner {runner}?',
301+
roles_only_enterprise: 'Roles are only available in <b>Enterprise</b> edition.',
301302
project_runners_only_pro: 'Project-level runners are only available for <b>PRO</b> users.',
302303
secret_storage_only_pro: 'Secret storages are only available for <b>PRO</b> users.',
303304
foss_runners_limited: 'The open-source version has limited functionality; full functionality is in the <b>PRO</b> version.',
304305
learn_more_about_pro: 'Learn more',
306+
upgrade_to_pro: 'Upgrade',
307+
contact_admin_to_upgrade: 'Contact your Semaphore administrator to upgrade to PRO.',
305308

306309
projectRestoreResult: 'Project restore results',
307310
projectWithNameRestored: 'Project {projectName} successfully restored.',

web/src/views/Runners.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,18 @@
239239
<span v-html="$t('project_runners_only_pro')"></span>
240240

241241
<v-btn
242-
class="ml-2 pr-2"
242+
v-if="isAdmin"
243+
class="ml-2"
243244
color="hsl(348deg, 86%, 61%)"
244245
href="https://semaphoreui.com/pro#runners"
245246
>
246-
{{ $t('learn_more_about_pro') }}
247-
<v-icon>mdi-chevron-right</v-icon>
247+
{{ $t('upgrade_to_pro') }}
248248
</v-btn>
249+
<v-else>
250+
<span>
251+
{{ $t('contact_admin_to_upgrade') }}
252+
</span>
253+
</v-else>
249254
</v-alert>
250255

251256
<v-alert

web/src/views/project/SecretStorages.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,11 @@
104104
<span v-html="$t('secret_storage_only_pro')"></span>
105105

106106
<v-btn
107-
class="ml-2 pr-2"
107+
class="ml-2"
108108
color="hsl(348deg, 86%, 61%)"
109109
href="https://semaphoreui.com/pro#secret_storages"
110110
>
111-
{{ $t('learn_more_about_pro') }}
112-
<v-icon>mdi-chevron-right</v-icon>
111+
{{ $t('upgrade_to_pro') }}
113112
</v-btn>
114113
</v-alert>
115114

0 commit comments

Comments
 (0)