Skip to content
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
8 changes: 4 additions & 4 deletions frontend/tests/tests/user/test_application_label.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ QUnit.test("rendering stop button", function (assert) {

// Test stop button disabled
assert.ok(
appLabel.$el.querySelector('#stop-button').classList.contains('disabled')
appLabel.$el.querySelector('#stop-button').classList.contains('disabled-entry')
);

// Select running application
Expand All @@ -61,7 +61,7 @@ QUnit.test("rendering stop button", function (assert) {
// Test stop button enabled
Vue.nextTick(function() {
assert.notOk(
appLabel.$el.querySelector('#stop-button').classList.contains('disabled')
appLabel.$el.querySelector('#stop-button').classList.contains('disabled-entry')
);

done();
Expand Down Expand Up @@ -107,7 +107,7 @@ QUnit.test("rendering share button", function (assert) {

// Test share button disabled
assert.ok(
appLabel.$el.querySelector('#share-button').classList.contains('disabled')
appLabel.$el.querySelector('#share-button').classList.contains('disabled-entry')
);

// Select running application
Expand All @@ -116,7 +116,7 @@ QUnit.test("rendering share button", function (assert) {
// Test share button disabled (Because clipboard save is not supported in test environment)
Vue.nextTick(function() {
assert.ok(
appLabel.$el.querySelector('#share-button').classList.contains('disabled')
appLabel.$el.querySelector('#share-button').classList.contains('disabled-entry')
);

done();
Expand Down
57 changes: 29 additions & 28 deletions frontend/user/vue-components/ApplicationLabel.vue
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
<template>
<ul v-if="currentApp !== null" class="nav navbar-nav">
<li class="dropdown">
<li class="dropdown notifications-menu">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing the menu "section title" means that you don't need notification menu anymore.

<a href="#" class="dropdown-toggle cust-padding" data-toggle="dropdown" aria-expanded="false">
<img class="app-icon"
:src="currentApp.appData.image.icon_128 | iconSrc">

<span>{{ currentApp.appData.image | appName }}</span>
</a>

<ul class="dropdown-menu" role="menu">
<li class="disabled">
<a href="#">Application settings</a>
</li>
<li role="separator" class="divider"></li>
<ul class="dropdown-menu">
<li>
<ul class="menu">

<!-- Stop button -->
<li
id="stop-button"
:class="{ disabled: !currentApp.isRunning() }"
@click="stopApplication()">
<a href="#">
<i class="fa fa-times text-danger"></i>
Stop Application
</a>
</li>
<!-- Stop button -->
<li>
<a href="#"
id="stop-button"
:class="{ 'disabled-entry': !currentApp.isRunning() }"
@click="stopApplication()">
<i class="fa fa-times text-danger"></i>
Stop Application
</a>
</li>

<!-- Share button -->
<li
id="share-button"
:class="{ disabled: !(currentApp.isRunning() && clipboardSupported) }"
:data-clipboard-text="sharedUrl">
<a href="#">
<i class="fa fa-clipboard text-light-blue"></i>
Share (copy url to clipboard)
</a>
</li>
<!-- Share button -->
<li>
<a href="#"
id="share-button"
:class="{ 'disabled-entry': !(currentApp.isRunning() && clipboardSupported) }"
:data-clipboard-text="sharedUrl">
<i class="fa fa-clipboard text-light-blue"></i>
Share (copy url to clipboard)
</a>
</li>

<!-- Put other settings here -->
<!-- Put other settings here -->
</ul>
</li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -98,8 +98,9 @@
padding: 9px;
}

.disabled {
.disabled-entry {
pointer-events: none;
opacity: 0.4;
}

.app-icon {
Expand Down