chore: 🤖 merge from main
This commit is contained in:
7 files changed
+179
-12
No files matched your search
@@ -0,0 +1,27 @@
|
||||
<section class='card'>
|
||||
{{#if (if (has-block 'header') true @heading)}}
|
||||
<header class='card-header'>
|
||||
{{#if @heading}}
|
||||
<h2>
|
||||
{{#if @icon}}
|
||||
<Rose::Icon @name={{@icon}} @size='medium' />
|
||||
{{/if}}
|
||||
{{@heading}}
|
||||
</h2>
|
||||
{{/if}}
|
||||
|
||||
{{yield to='header'}}
|
||||
|
||||
</header>
|
||||
{{/if}}
|
||||
|
||||
<div class='card-body'>
|
||||
{{yield to='body'}}
|
||||
</div>
|
||||
|
||||
{{#if (has-block 'footer')}}
|
||||
<footer class='card-footer'>
|
||||
{{yield to='footer'}}
|
||||
</footer>
|
||||
{{/if}}
|
||||
</section>
|
||||
@@ -346,7 +346,6 @@
|
||||
|
||||
.rose-dialog-footer {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
||||
div:nth-child(1) {
|
||||
display: flex;
|
||||
@@ -362,7 +361,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$chevron-up: "data:image/svg+xml;utf-8,<svg viewBox='0 0 24 24' fill='%231563FF' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M7.41 16L12 11.42L16.59 16L18 14.59L12 8.59L6 14.59L7.41 16Z' /></svg>";
|
||||
$chevron-down: "data:image/svg+xml;utf-8,<svg viewBox='0 0 24 24' fill='%231563FF' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z' /></svg>";
|
||||
|
||||
@@ -414,3 +412,39 @@ $chevron-down: "data:image/svg+xml;utf-8,<svg viewBox='0 0 24 24' fill='%231563F
|
||||
.reveal-content {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
// Card component (app/componetns/card)
|
||||
.card {
|
||||
border: sizing.rems(xxxxs) solid var(--ui-gray-subtler-3);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: sizing.rems(m);
|
||||
|
||||
.card-header {
|
||||
align-items: center;
|
||||
border-bottom: sizing.rems(xxxxs) solid var(--ui-gray-subtler-3);
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
padding: sizing.rems(s) sizing.rems(m);
|
||||
|
||||
h2 {
|
||||
@include type.type(s, normal);
|
||||
color: var(--ui-gray-starker-1);
|
||||
margin: 0;
|
||||
padding: sizing.rems(xxs) + sizing.rems(xxxs) 0;
|
||||
}
|
||||
|
||||
.rose-icon {
|
||||
margin-right: sizing.rems(xxxs);
|
||||
}
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding: sizing.rems(s);
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
border-top: sizing.rems(xxxxs) solid var(--ui-gray-subtler-3);
|
||||
padding: sizing.rems(s);
|
||||
}
|
||||
}
|
||||
@@ -20,18 +20,43 @@
|
||||
<:body>
|
||||
<h3>{{t 'resources.target.messages.proxy_url.title'}}
|
||||
(<code>{{t 'resources.target.types.tcp'}}</code>)</h3>
|
||||
<Copyable
|
||||
@text={{session.proxy}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{session.proxy_address}}:{{session.proxy_port}}</code>
|
||||
</Copyable>
|
||||
<p>
|
||||
<Copyable
|
||||
@text={{session.proxy}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{session.proxy_address}}:{{session.proxy_port}}</code>
|
||||
</Copyable>
|
||||
</p>
|
||||
|
||||
{{! <Rose::Separator />
|
||||
|
||||
<h3>Credentials</h3> }}
|
||||
<h3>Credentials</h3>
|
||||
|
||||
<Card @heading="Credentials" @icon='app-icons/credentials'>
|
||||
<:body>
|
||||
<Rose::Table @style='condensed' as |table|>
|
||||
<table.header as |header|>
|
||||
<header.row as |row|>
|
||||
<row.headerCell>Key</row.headerCell>
|
||||
<row.headerCell colspan='2'>Value</row.headerCell>
|
||||
</header.row>
|
||||
</table.header>
|
||||
<table.body as |body|>
|
||||
<body.row as |row|>
|
||||
<row.headerCell>foo</row.headerCell>
|
||||
<row.cell>Value</row.cell>
|
||||
</body.row>
|
||||
<body.row as |row|>
|
||||
<row.headerCell>ttl</row.headerCell>
|
||||
<row.cell>Test</row.cell>
|
||||
</body.row>
|
||||
</table.body>
|
||||
</Rose::Table>
|
||||
</:body>
|
||||
</Card>
|
||||
}}
|
||||
</:body>
|
||||
<:footer>
|
||||
<div>
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | card', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
await render(hbs`<Card />`);
|
||||
assert.ok(find('.card'));
|
||||
});
|
||||
|
||||
test('it renders with content', async function (assert) {
|
||||
await render(hbs`
|
||||
<Card>
|
||||
<:header></:header>
|
||||
<:body></:body>
|
||||
<:footer></:footer>
|
||||
</Card>
|
||||
`);
|
||||
|
||||
assert.ok(find('.card'));
|
||||
assert.ok(find('.card-header'));
|
||||
assert.ok(find('.card-body'));
|
||||
assert.ok(find('.card-footer'));
|
||||
});
|
||||
|
||||
test('header renders an icon when defined', async function (assert) {
|
||||
await render(hbs`
|
||||
<Card
|
||||
@heading='This is a heading test'
|
||||
@icon='key'>
|
||||
<:header></:header>
|
||||
<:body></:body>
|
||||
<:footer></:footer>
|
||||
</Card>
|
||||
`);
|
||||
|
||||
assert.ok(find('.card'));
|
||||
assert.ok(find('.card-header'));
|
||||
assert.ok(find('.card-header .rose-icon'));
|
||||
assert.equal(this.element.textContent.trim(), 'This is a heading test');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user