Skip to content

Commit 4e71fcf

Browse files
authored
Merge pull request #1177 from Concordium/fix-tabs-in-dark-mode
Changed tabs extension to a more compatible one
2 parents b5a85c9 + 4c82f5c commit 4e71fcf

File tree

8 files changed

+57
-129
lines changed

8 files changed

+57
-129
lines changed

source/mainnet/docs/smart-contracts/guides/setup-contract.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ The *from a template* option is available for ``cargo-concordium`` version 2.2.0
1111
smart contract templates. Choose the template that best fits your project scope.
1212
The *from scratch* option guides you through the process when you want to start a new project without any boilerplate code.
1313

14-
.. tabs::
14+
.. tab-set::
1515

16-
.. tab:: From a template (recommended)
16+
.. tab-item:: From a template (recommended)
1717

1818
Concordium maintains several smart contract
1919
`templates <https://github.com/Concordium/concordium-rust-smart-contracts/tree/main/templates>`_ (currently a ``default`` template and a ``cis2-nft`` template).
@@ -35,7 +35,7 @@ The *from scratch* option guides you through the process when you want to start
3535
You can find additional information on the available templates in the
3636
`README file <https://github.com/Concordium/concordium-rust-smart-contracts/tree/main/templates/README.md>`_.
3737

38-
.. tab:: From scratch
38+
.. tab-item:: From scratch
3939

4040
A smart contract in Rust is written as an ordinary Rust library crate.
4141
The library is then compiled to Wasm using the Rust target

source/mainnet/docs/smart-contracts/introduction.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ system, combining on and off-chain functionality. An example of off-chain
2828
functionality could be a server that invokes the smart contract based on
2929
data from the real-world, such as prices of stocks, or weather information.
3030

31-
.. tabs::
31+
.. tab-set::
3232

33-
.. tab:: What are smart contracts for?
33+
.. tab-item:: What are smart contracts for?
3434

3535
Smart contracts can reduce the needed amount of trust in third-parties, in some cases
3636
removing the need for a trusted third-party, in other cases reducing their
@@ -40,7 +40,7 @@ data from the real-world, such as prices of stocks, or weather information.
4040
anybody with access to a node can verify, they can be very useful for ensuring
4141
agreement between parties.
4242

43-
.. tab:: What are smart contracts *not* for?
43+
.. tab-item:: What are smart contracts *not* for?
4444

4545
Smart contracts are a very exciting technology and people are still finding new
4646
ways to take advantage of them.

source/mainnet/tools/wallet-sdk/wallet-sdk-account-transaction.rst

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ This example constructs and signs a simple transfer, which is an account transac
1818

1919
Note that when the transaction has been signed anyone with the signature and the transaction will be able to send it to a Concordium node. Therefore it is very important that a wallet requests user approval before utilizing their signing keys.
2020

21-
.. tabs::
21+
.. tab-set::
2222

23-
.. tab::
24-
25-
TypeScript (Web)
23+
.. tab-item:: TypeScript (Web)
2624

2725
.. code-block:: javascript
2826
@@ -80,9 +78,7 @@ Note that when the transaction has been signed anyone with the signature and the
8078
8179
const signature = await signTransaction(accountTransaction, signer);
8280
83-
.. tab::
84-
85-
Kotlin (Android)
81+
.. tab-item:: Kotlin (Android)
8682

8783
.. code-block:: Kotlin
8884
@@ -141,9 +137,7 @@ Note that when the transaction has been signed anyone with the signature and the
141137
.nonce(nonce).expiry(expiry).signer(signer).build()
142138
}
143139
144-
.. tab::
145-
146-
Swift (macOS, iOS)
140+
.. tab-item:: Swift (macOS, iOS)
147141

148142
.. code-block:: Swift
149143
@@ -188,11 +182,9 @@ Send an account transaction to a Concordium node
188182

189183
Finally, when the transaction has been constructed and signed, it is ready to be sent to a Concordium node. The output of the function sending a transaction to a Concordium node is the transaction hash. The transaction hash can then be used to monitor the status of the submitted transaction.
190184

191-
.. tabs::
185+
.. tab-set::
192186

193-
.. tab::
194-
195-
TypeScript (Web)
187+
.. tab-item:: TypeScript (Web)
196188

197189
.. code-block:: javascript
198190
@@ -203,9 +195,7 @@ Finally, when the transaction has been constructed and signed, it is ready to be
203195
const client = new ConcordiumGRPCWebClient(nodeAddress, nodePort);
204196
const transactionHash = await client.sendAccountTransaction(accountTransaction, signature);
205197
206-
.. tab::
207-
208-
Kotlin (Android)
198+
.. tab-item:: Kotlin (Android)
209199

210200
.. code-block:: Kotlin
211201
@@ -223,9 +213,7 @@ Finally, when the transaction has been constructed and signed, it is ready to be
223213
val transactionHash = client.sendTransaction(transaction)
224214
}
225215
226-
.. tab::
227-
228-
Swift (macOS, iOS)
216+
.. tab-item:: Swift (macOS, iOS)
229217

230218
.. code-block:: Swift
231219

source/mainnet/tools/wallet-sdk/wallet-sdk-credential-deployment.rst

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ Create a credential deployment transaction
1616

1717
The following example demonstrates how a credential deployment transaction is created. Note that you must have saved the identity object and the identity provider that was used to create that identity, as they are required input for this transaction type.
1818

19-
.. tabs::
19+
.. tab-set::
2020

21-
.. tab::
22-
23-
TypeScript (Web)
21+
.. tab-item:: TypeScript (Web)
2422

2523
.. code-block:: typescript
2624
@@ -86,9 +84,7 @@ The following example demonstrates how a credential deployment transaction is cr
8684
expiry
8785
);
8886
89-
.. tab::
90-
91-
Kotlin (Android)
87+
.. tab-item:: Kotlin (Android)
9288

9389
.. code-block:: Kotlin
9490
@@ -178,9 +174,7 @@ The following example demonstrates how a credential deployment transaction is cr
178174
return CredentialDeploymentDetails(Credential.createUnsignedCredential(input).unsignedCdi, expiry)
179175
}
180176
181-
.. tab::
182-
183-
Swift (macOS, iOS)
177+
.. tab-item:: Swift (macOS, iOS)
184178

185179
.. code-block:: Swift
186180
@@ -228,11 +222,9 @@ Sign a credential deployment transaction
228222
With the credential deployment transaction created, the next step is to sign the transaction. It is important that the key used for signing the transaction
229223
is the signing key that corresponds to the public key used when creating the transaction. If they do not match, then the transaction will be rejected.
230224

231-
.. tabs::
225+
.. tab-set::
232226

233-
.. tab::
234-
235-
TypeScript (Web)
227+
.. tab-item:: TypeScript (Web)
236228

237229
.. code-block:: javascript
238230
@@ -260,9 +252,7 @@ is the signing key that corresponds to the public key used when creating the tra
260252
261253
const signature = await signCredentialTransaction(credentialDeploymentTransaction, signingKey);
262254
263-
.. tab::
264-
265-
Kotlin (Android)
255+
.. tab-item:: Kotlin (Android)
266256

267257
.. code-block:: Kotlin
268258
@@ -298,9 +288,7 @@ is the signing key that corresponds to the public key used when creating the tra
298288
return signingKey.sign(credentialDeploymentSignDigest)
299289
}
300290
301-
.. tab::
302-
303-
Swift (iOS)
291+
.. tab-item:: Swift (iOS)
304292

305293
.. code-block:: Swift
306294
@@ -326,11 +314,9 @@ of the call is a transaction hash that can then be used to monitor the status of
326314
If successful, the credential will be deployed, and it is now possible to start creating account transactions. Go to
327315
:ref:`wallet-sdk-account-transaction` for a guide about creating account transactions.
328316

329-
.. tabs::
330-
331-
.. tab::
317+
.. tab-set::
332318

333-
TypeScript (Web)
319+
.. tab-item:: TypeScript (Web)
334320

335321
.. code-block:: javascript
336322
@@ -349,9 +335,7 @@ If successful, the credential will be deployed, and it is now possible to start
349335
signature
350336
);
351337
352-
.. tab::
353-
354-
Kotlin (Android)
338+
.. tab-item:: Kotlin (Android)
355339

356340
.. code-block:: Kotlin
357341
@@ -386,9 +370,7 @@ If successful, the credential will be deployed, and it is now possible to start
386370
return client.sendCredentialDeploymentTransaction(credentialDeploymentTransaction)
387371
}
388372
389-
.. tab::
390-
391-
Swift (macOS, iOS)
373+
.. tab-item:: Swift (macOS, iOS)
392374

393375
.. code-block:: Swift
394376

source/mainnet/tools/wallet-sdk/wallet-sdk-identity-creation.rst

Lines changed: 15 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@ Create an identity request
1919

2020
The first step is to create the actual identity request. To do this, you need the list of identity providers. Refer to :ref:`Identity Provider List` to understand how to retrieve it.
2121

22-
.. tabs::
22+
.. tab-set::
2323

24-
.. tab::
25-
26-
TypeScript (Web)
24+
.. tab-item:: TypeScript (Web)
2725

2826
.. code-block:: javascript
2927
@@ -79,9 +77,7 @@ The first step is to create the actual identity request. To do this, you need th
7977
8078
const identityRequest: Versioned<IdObjectRequestV1> = createIdentityRequestWithKeys(input);
8179
82-
.. tab::
83-
84-
Kotlin (Android)
80+
.. tab-item:: Kotlin (Android)
8581

8682
.. code-block:: Kotlin
8783
@@ -138,9 +134,7 @@ The first step is to create the actual identity request. To do this, you need th
138134
return Identity.createIdentityRequest(input)
139135
}
140136
141-
.. tab::
142-
143-
Swift (macOS, iOS)
137+
.. tab-item:: Swift (macOS, iOS)
144138

145139
.. code-block:: Swift
146140
@@ -197,11 +191,9 @@ Once the identity request has been created, the next step is to send it to the c
197191

198192
A part of the request is a `redirectUri`, which tells the identity provider where to redirect the user when the identity verification flow has been completed. A wallet application has to choose this in such a way that the user is sent back into the wallet application, where the actual identity object can then be retrieved from the information provided in the hash property of the redirect URL.
199193

200-
.. tabs::
194+
.. tab-set::
201195

202-
.. tab::
203-
204-
TypeScript (Web)
196+
.. tab-item:: TypeScript (Web)
205197

206198
.. code-block:: javascript
207199
@@ -246,15 +238,13 @@ A part of the request is a `redirectUri`, which tells the identity provider wher
246238
return response.url;
247239
}
248240
249-
.. tab::
250-
251-
Kotlin (Android)
241+
.. tab-item:: Kotlin (Android)
252242

253243
.. code-block:: Kotlin
254244
255245
import android.content.Context
256246
import android.net.Uri
257-
import androidx.browser.customtabs.CustomTabsIntent
247+
import androidx.browser.customtab-set.Customtab-setIntent
258248
import okhttp3.OkHttpClient
259249
import okhttp3.Request
260250
@@ -284,14 +274,12 @@ A part of the request is a `redirectUri`, which tells the identity provider wher
284274
?: throw Exception("The identity provider did not redirect as expected.")
285275
286276
// Open the URL in a browser. This is just an example of how that could be done.
287-
val customTabsIntent = CustomTabsIntent.Builder().build()
288-
customTabsIntent.launchUrl(context, Uri.parse(redirectedUrl))
277+
val customtab-setIntent = Customtab-setIntent.Builder().build()
278+
customtab-setIntent.launchUrl(context, Uri.parse(redirectedUrl))
289279
}
290280
}
291281
292-
.. tab::
293-
294-
Swift (macOS, iOS)
282+
.. tab-item:: Swift (macOS, iOS)
295283

296284
.. code-block:: Swift
297285
@@ -312,11 +300,9 @@ Retrieve the identity after creation
312300

313301
Upon completing identity verification with the identity provider, the identity provider does a redirect of the user back to the `redirectUri` that was provided when sending the identity request to the identity provider. The hash property of the URL that the identity provider redirects the user to contains the URL where the identity object can be retrieved from in the format `redirectUri#code_uri=`, where the URL will be after the equals sign.
314302

315-
.. tabs::
316-
317-
.. tab::
303+
.. tab-set::
318304

319-
TypeScript (Web)
305+
.. tab-item:: TypeScript (Web)
320306

321307
.. code-block:: javascript
322308
@@ -377,9 +363,7 @@ Upon completing identity verification with the identity provider, the identity p
377363
// The wallet should retry after some time if this happens.
378364
}
379365
380-
.. tab::
381-
382-
Kotlin (Android)
366+
.. tab-item:: Kotlin (Android)
383367
384368
.. code-block:: Kotlin
385369
@@ -447,9 +431,7 @@ Upon completing identity verification with the identity provider, the identity p
447431
}
448432
449433
450-
.. tab::
451-
452-
Swift (macOS, iOS)
434+
.. tab-item:: Swift (macOS, iOS)
453435
454436
.. code-block:: Swift
455437

source/mainnet/tools/wallet-sdk/wallet-sdk-identity-provider.rst

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ Get list of identity providers and their metadata
1414

1515
Here is an example of how the list of identity providers can be retrieved from the wallet-proxy service. The libraries used here to perform the requests are merely examples, so feel free to use the libraries already utilized in your project.
1616

17-
.. tabs::
17+
.. tab-set::
1818

19-
.. tab::
20-
21-
TypeScript (Web)
19+
.. tab-item:: TypeScript (Web)
2220

2321
.. code-block:: typescript
2422
@@ -48,9 +46,7 @@ Here is an example of how the list of identity providers can be retrieved from t
4846
const testnetIdentityProviders = getIdentityProviders(walletProxyTestnetBaseUrl);
4947
const mainnetIdentityProviders = getIdentityProviders(walletProxyMainnetBaseUrl);
5048
51-
.. tab::
52-
53-
Kotlin (Android)
49+
.. tab-item:: Kotlin (Android)
5450

5551
.. code-block:: Kotlin
5652
@@ -95,9 +91,7 @@ Here is an example of how the list of identity providers can be retrieved from t
9591
val mainnetIdentityProviders = getIdentityProviders(walletProxyMainnetBaseUrl)
9692
}
9793
98-
.. tab::
99-
100-
Swift (macOS, iOS)
94+
.. tab-item:: Swift (macOS, iOS)
10195

10296
.. code-block:: Swift
10397

0 commit comments

Comments
 (0)